summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua C. Burt <joshburt@shapeandshare.com>2016-04-27 12:46:03 -0600
committerJoshua C. Burt <joshburt@shapeandshare.com>2016-04-27 12:46:03 -0600
commite774a942bb4792e9bbe5e4a668b5854d9bcb7fcd (patch)
tree12e033d2d46d3b633f2bc3b9e8e215a0610c0d8d
parenta45ee201f8b7a5b22dc783f6120885674bb3dfa8 (diff)
downloadchef-e774a942bb4792e9bbe5e4a668b5854d9bcb7fcd.tar.gz
address chefstyle offenses
-rw-r--r--lib/chef/provider/git.rb4
-rw-r--r--spec/unit/provider/git_spec.rb20
2 files changed, 12 insertions, 12 deletions
diff --git a/lib/chef/provider/git.rb b/lib/chef/provider/git.rb
index 69dde1df05..c9e783126e 100644
--- a/lib/chef/provider/git.rb
+++ b/lib/chef/provider/git.rb
@@ -199,10 +199,10 @@ class Chef
# which we can fix by replacing them all with our target url (hence the --replace-all option)
if multiple_remotes?(remote_status) || !remote_matches?(remote_url, remote_status)
- run_git_command(["config", "--replace-all", "remote.#{remote_name}.url", remote_url], { cwd: cwd })
+ run_git_command(["config", "--replace-all", "remote.#{remote_name}.url", remote_url], { cwd: cwd })
end
when 1
- run_git_command(["remote", "add", remote_name, remote_url], { cwd: cwd })
+ run_git_command(["remote", "add", remote_name, remote_url], { cwd: cwd })
end
end
end
diff --git a/spec/unit/provider/git_spec.rb b/spec/unit/provider/git_spec.rb
index 2e2faf1434..36c33d313c 100644
--- a/spec/unit/provider/git_spec.rb
+++ b/spec/unit/provider/git_spec.rb
@@ -274,7 +274,7 @@ SHAS
@resource.ssh_wrapper "do_it_this_way.sh"
expected_cmd = "git clone \"git://github.com/opscode/chef.git\" \"/Application Support/with/space\""
expect(@provider).to receive(:shell_out!).with(expected_cmd, :user => "deployNinja",
- :log_tag=>"git[web2.0 app]",
+ :log_tag => "git[web2.0 app]",
:environment => { "HOME" => "/home/deployNinja",
"GIT_SSH" => "do_it_this_way.sh" })
@provider.clone
@@ -351,19 +351,19 @@ SHAS
expected_cmd1 = "git fetch origin"
expect(@provider).to receive(:shell_out!).with(expected_cmd1, :cwd => "/my/deploy/dir",
- :user => "whois", :group => "thisis",
- :log_tag => "git[web2.0 app]",
- :environment => { "HOME" => "/home/whois" })
+ :user => "whois", :group => "thisis",
+ :log_tag => "git[web2.0 app]",
+ :environment => { "HOME" => "/home/whois" })
expected_cmd2 = "git fetch origin --tags"
expect(@provider).to receive(:shell_out!).with(expected_cmd2, :cwd => "/my/deploy/dir",
- :user => "whois", :group => "thisis",
- :log_tag => "git[web2.0 app]",
- :environment => { "HOME" => "/home/whois" })
+ :user => "whois", :group => "thisis",
+ :log_tag => "git[web2.0 app]",
+ :environment => { "HOME" => "/home/whois" })
expected_cmd3 = "git reset --hard d35af14d41ae22b19da05d7d03a0bafc321b244c"
expect(@provider).to receive(:shell_out!).with(expected_cmd3, :cwd => "/my/deploy/dir",
- :user => "whois", :group => "thisis",
- :log_tag => "git[web2.0 app]",
- :environment => { "HOME" => "/home/whois" })
+ :user => "whois", :group => "thisis",
+ :log_tag => "git[web2.0 app]",
+ :environment => { "HOME" => "/home/whois" })
@provider.fetch_updates
end