summaryrefslogtreecommitdiff
path: root/lib/chef/knife
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-01-18 09:12:29 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-01-18 09:12:29 -0800
commit86643d99789002eca3f064f3450fe48dcd316753 (patch)
tree525ffeff996a1333a498d33821fe7257281a8337 /lib/chef/knife
parentca084429991a141127c80e9d2a08cb1bb68585c4 (diff)
downloadchef-86643d99789002eca3f064f3450fe48dcd316753.tar.gz
Autofixing Style/PercentLiteralDelimeterslcg/percentliteraldelimeters
See chef/chefstyle#11 for analysis and discussion. We select '{}' since audit of our source code shows that is the most common, and that used to be the dominant learning paradigm (e.g. in ruby 1.9 pickaxe book.
Diffstat (limited to 'lib/chef/knife')
-rw-r--r--lib/chef/knife/core/node_editor.rb4
-rw-r--r--lib/chef/knife/serve.rb2
-rw-r--r--lib/chef/knife/ssh.rb2
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/knife/core/node_editor.rb b/lib/chef/knife/core/node_editor.rb
index 9896195a97..897d00932e 100644
--- a/lib/chef/knife/core/node_editor.rb
+++ b/lib/chef/knife/core/node_editor.rb
@@ -57,7 +57,7 @@ class Chef
pristine_copy = Chef::JSONCompat.parse(Chef::JSONCompat.to_json(node))
updated_copy = Chef::JSONCompat.parse(Chef::JSONCompat.to_json(@updated_node))
- updated_properties = %w[
+ updated_properties = %w{
name
chef_environment
automatic
@@ -67,7 +67,7 @@ class Chef
policy_name
policy_group
run_list
- ].reject do |key|
+ }.reject do |key|
pristine_copy[key] == updated_copy[key]
end
diff --git a/lib/chef/knife/serve.rb b/lib/chef/knife/serve.rb
index 4cb698c968..3f97962eae 100644
--- a/lib/chef/knife/serve.rb
+++ b/lib/chef/knife/serve.rb
@@ -27,7 +27,7 @@ class Chef
# --chef-repo-path forcibly overrides all other paths
if config[:chef_repo_path]
Chef::Config.chef_repo_path = config[:chef_repo_path]
- %w(acl client cookbook container data_bag environment group node role user).each do |variable_name|
+ %w{acl client cookbook container data_bag environment group node role user}.each do |variable_name|
Chef::Config.delete("#{variable_name}_path".to_sym)
end
end
diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb
index bf2f0d4bf0..2b2a367f18 100644
--- a/lib/chef/knife/ssh.rb
+++ b/lib/chef/knife/ssh.rb
@@ -463,7 +463,7 @@ class Chef
def cssh
cssh_cmd = nil
- %w[csshX cssh].each do |cmd|
+ %w{csshX cssh}.each do |cmd|
begin
# Unix and Mac only
cssh_cmd = shell_out!("which #{cmd}").stdout.strip