<commit_before>#
# Cookbook Name:: bosh_inception
# Recipe:: git_config
#
# Copyright (c) 2013 Dr <NAME>, Stark & Wayne, LLC
#
# MIT License
#

execute "git config user.name" do
  command "git config --global user.name #{node.git.name}"
  user "vcap"
  group "vcap"
  action :run
  environment ({'HOME' => '/home/vcap'})
end

execute "git config user.email" do
  command "git config --global user.email #{node.git.email}"
  user "vcap"
  group "vcap"
  action :run
  environment ({'HOME' => '/home/vcap'})
end

execute "git config color.ui" do
  command "git config --global color.ui true"
  user "vcap"
  group "vcap"
  action :run
  environment ({'HOME' => '/home/vcap'})
end

bash "install hub" do
  user "root"
  cwd "/var/vcap/store/repos"
  code <<-BASH
  if [[ ! -d hub ]]; then
    git clone https://github.com/defunkt/hub.git
    cd hub
  else
    cd hub
    git pull origin master
  fi
  rake install prefix=/usr/local
  BASH
  action :run
end

directory "/var/vcap/store/repos/hub" do
  owner "vcap"
  group "vcap"
  mode "0755"
  recursive true
  action :create
end
<commit_msg>quote the git config values<commit_after>#
# Cookbook Name:: bosh_inception
# Recipe:: git_config
#
# Copyright (c) 2013 Dr <NAME>, Stark & Wayne, LLC
#
# MIT License
#

execute "git config user.name" do
  command "git config --global --replace-all user.name '#{node.git.name}'"
  user "vcap"
  group "vcap"
  action :run
  environment ({'HOME' => '/home/vcap'})
end

execute "git config user.email" do
  command "git config --global --replace-all user.email '#{node.git.email}'"
  user "vcap"
  group "vcap"
  action :run
  environment ({'HOME' => '/home/vcap'})
end

execute "git config color.ui" do
  command "git config --global color.ui true"
  user "vcap"
  group "vcap"
  action :run
  environment ({'HOME' => '/home/vcap'})
end

bash "install hub" do
  user "root"
  cwd "/var/vcap/store/repos"
  code <<-BASH
  if [[ ! -d hub ]]; then
    git clone https://github.com/defunkt/hub.git
    cd hub
  else
    cd hub
    git pull origin master
  fi
  rake install prefix=/usr/local
  BASH
  action :run
end

directory "/var/vcap/store/repos/hub" do
  owner "vcap"
  group "vcap"
  mode "0755"
  recursive true
  action :create
end

{'fraction_non_alphanumeric': 0.14106019766397124, 'fraction_numerical': 0.0071877807726864335, 'mean_word_length': 3.1626168224299067, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7477898', 'n_tokens_mistral': 833, 'n_tokens_neox': 810, 'n_words': 260}