diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-11-15 15:08:04 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-12-06 13:08:26 -0800 |
commit | d874a5a2731e5d7c21111cef7567473f2ed1c47c (patch) | |
tree | 14886f2dde6c31da544833124212bc42e17be394 | |
parent | 2e92c709459dffef54f9d671e10ec9a949a94962 (diff) | |
download | chef-d874a5a2731e5d7c21111cef7567473f2ed1c47c.tar.gz |
fix Style/SpaceInsideStringInterpolation
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r-- | lib/chef/encrypted_data_bag_item/decryptor.rb | 4 | ||||
-rw-r--r-- | lib/chef/provider/package/easy_install.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/route.rb | 6 | ||||
-rw-r--r-- | omnibus/files/chef/build-chef.rb | 2 | ||||
-rw-r--r-- | spec/integration/recipes/resource_load_spec.rb | 6 | ||||
-rwxr-xr-x | tasks/bin/bundle-platform | 2 |
6 files changed, 11 insertions, 11 deletions
diff --git a/lib/chef/encrypted_data_bag_item/decryptor.rb b/lib/chef/encrypted_data_bag_item/decryptor.rb index 773ff4e154..f35611d185 100644 --- a/lib/chef/encrypted_data_bag_item/decryptor.rb +++ b/lib/chef/encrypted_data_bag_item/decryptor.rb @@ -93,7 +93,7 @@ class Chef::EncryptedDataBagItem plaintext << openssl_decryptor.final rescue OpenSSL::Cipher::CipherError => e # if the key length is less than 255 characters, and it contains slashes, we think it may be a path. - raise DecryptionFailure, "Error decrypting data bag value: '#{e.message}'. Most likely the provided key is incorrect. #{ (@key.length < 255 && @key.include?('/')) ? 'You may need to use --secret-file rather than --secret.' : '' }" + raise DecryptionFailure, "Error decrypting data bag value: '#{e.message}'. Most likely the provided key is incorrect. #{(@key.length < 255 && @key.include?('/')) ? 'You may need to use --secret-file rather than --secret.' : ''}" end end @@ -144,7 +144,7 @@ class Chef::EncryptedDataBagItem plaintext << openssl_decryptor.final rescue OpenSSL::Cipher::CipherError => e # if the key length is less than 255 characters, and it contains slashes, we think it may be a path. - raise DecryptionFailure, "Error decrypting data bag value: '#{e.message}'. Most likely the provided key is incorrect. #{ ( @key.length < 255 && @key.include?('/')) ? 'You may need to use --secret-file rather than --secret.' : '' }" + raise DecryptionFailure, "Error decrypting data bag value: '#{e.message}'. Most likely the provided key is incorrect. #{( @key.length < 255 && @key.include?('/')) ? 'You may need to use --secret-file rather than --secret.' : ''}" end end diff --git a/lib/chef/provider/package/easy_install.rb b/lib/chef/provider/package/easy_install.rb index 926f609092..a9c6e2a792 100644 --- a/lib/chef/provider/package/easy_install.rb +++ b/lib/chef/provider/package/easy_install.rb @@ -122,7 +122,7 @@ class Chef def remove_package(name, version) Chef.deprecated(:easy_install, "The easy_install package provider is deprecated and will be removed in Chef 13.") - run_command(:command => "#{easy_install_binary_path }#{expand_options(@new_resource.options)} -m #{name}") + run_command(:command => "#{easy_install_binary_path}#{expand_options(@new_resource.options)} -m #{name}") end def purge_package(name, version) diff --git a/lib/chef/provider/route.rb b/lib/chef/provider/route.rb index 64c89aac6d..7c6f91cdca 100644 --- a/lib/chef/provider/route.rb +++ b/lib/chef/provider/route.rb @@ -134,7 +134,7 @@ class Chef::Provider::Route < Chef::Provider Chef::Log.debug("#{@new_resource} route already active - nothing to do") else command = generate_command(:add) - converge_by ("run #{ command } to add route") do + converge_by ("run #{command} to add route") do run_command( :command => command ) Chef::Log.info("#{@new_resource} added") end @@ -147,7 +147,7 @@ class Chef::Provider::Route < Chef::Provider def action_delete if is_running command = generate_command(:delete) - converge_by ("run #{ command } to delete route ") do + converge_by ("run #{command} to delete route ") do run_command( :command => command ) Chef::Log.info("#{@new_resource} removed") end @@ -186,7 +186,7 @@ class Chef::Provider::Route < Chef::Provider end conf.each do |k, v| network_file_name = "/etc/sysconfig/network-scripts/route-#{k}" - converge_by ("write route route.#{k}\n#{conf[k]} to #{ network_file_name }") do + converge_by ("write route route.#{k}\n#{conf[k]} to #{network_file_name}") do network_file = ::File.new(network_file_name, "w") network_file.puts(conf[k]) Chef::Log.debug("#{@new_resource} writing route.#{k}\n#{conf[k]}") diff --git a/omnibus/files/chef/build-chef.rb b/omnibus/files/chef/build-chef.rb index ba7a84c791..4b8ec78054 100644 --- a/omnibus/files/chef/build-chef.rb +++ b/omnibus/files/chef/build-chef.rb @@ -11,7 +11,7 @@ module BuildChef def create_bundle_config(gemfile, without: without_groups, retries: nil, jobs: nil, frozen: nil) bundle_config = File.expand_path("../.bundle/config", gemfile) - block "Put build config into #{bundle_config}: #{ { without: without, retries: retries, jobs: jobs, frozen: frozen } }" do + block "Put build config into #{bundle_config}: #{{ without: without, retries: retries, jobs: jobs, frozen: frozen }}" do # bundle config build.nokogiri #{nokogiri_build_config} messes up the line, # so we write it directly ourselves. new_bundle_config = "---\n" diff --git a/spec/integration/recipes/resource_load_spec.rb b/spec/integration/recipes/resource_load_spec.rb index 954fbf53a4..791b83c23a 100644 --- a/spec/integration/recipes/resource_load_spec.rb +++ b/spec/integration/recipes/resource_load_spec.rb @@ -48,7 +48,7 @@ describe "Resource.load_current_value" do x "loaded #{Namer.incrementing_value} (#{self.class.properties.sort_by { |name, p| name }. select { |name, p| p.is_set?(self) }. map { |name, p| "#{name}=#{p.get(self)}" }. - join(", ") })" + join(", ")})" end end @@ -175,7 +175,7 @@ describe "Resource.load_current_value" do y "loaded_y #{Namer.incrementing_value} (#{self.class.properties.sort_by { |name, p| name }. select { |name, p| p.is_set?(self) }. map { |name, p| "#{name}=#{p.get(self)}" }. - join(", ") })" + join(", ")})" end end @@ -193,7 +193,7 @@ describe "Resource.load_current_value" do y "loaded_y #{Namer.incrementing_value} (#{self.class.properties.sort_by { |name, p| name }. select { |name, p| p.is_set?(self) }. map { |name, p| "#{name}=#{p.get(self)}" }. - join(", ") })" + join(", ")})" end end diff --git a/tasks/bin/bundle-platform b/tasks/bin/bundle-platform index aa8443e74c..aaf433c98d 100755 --- a/tasks/bin/bundle-platform +++ b/tasks/bin/bundle-platform @@ -6,7 +6,7 @@ platforms = platforms.split(" ").map { |p| Gem::Platform.new(p) } Gem::Platform.instance_eval { @local = platforms.last } old_platforms = Gem.platforms Gem.platforms = platforms -puts "bundle-platform set Gem.platforms to #{Gem.platforms.map { |p| p.to_s }} (was #{old_platforms.map { |p| p.to_s } })" +puts "bundle-platform set Gem.platforms to #{Gem.platforms.map { |p| p.to_s }} (was #{old_platforms.map { |p| p.to_s }})" desired_version = ARGV.shift.delete("_") |