diff options
-rw-r--r-- | lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb | 6 | ||||
-rw-r--r-- | lib/chef/mixin/shell_out.rb | 10 | ||||
-rw-r--r-- | lib/chef/provider/package/freebsd/base.rb | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb b/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb index 20a3f4e2be..a7f1d733b1 100644 --- a/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb @@ -36,11 +36,11 @@ class Chef # We need the canonical cookbook name if we are using versioned cookbooks, but we don't # want to spend a lot of time adding code to the main Chef libraries if root.versioned_cookbooks - _canonical_name = canonical_cookbook_name(File.basename(file_path)) - fail "When versioned_cookbooks mode is on, cookbook #{file_path} must match format <cookbook_name>-x.y.z" unless _canonical_name + canonical_name = canonical_cookbook_name(File.basename(file_path)) + fail "When versioned_cookbooks mode is on, cookbook #{file_path} must match format <cookbook_name>-x.y.z" unless canonical_name # KLUDGE: We shouldn't have to use instance_variable_set - loader.instance_variable_set(:@cookbook_name, _canonical_name) + loader.instance_variable_set(:@cookbook_name, canonical_name) end loader.load_cookbooks diff --git a/lib/chef/mixin/shell_out.rb b/lib/chef/mixin/shell_out.rb index d3c14fa408..529023056d 100644 --- a/lib/chef/mixin/shell_out.rb +++ b/lib/chef/mixin/shell_out.rb @@ -76,17 +76,17 @@ class Chef def run_command_compatible_options(command_args) return command_args unless command_args.last.is_a?(Hash) - _command_args = command_args.dup - _options = _command_args.last + my_command_args = command_args.dup + my_options = my_command_args.last DEPRECATED_OPTIONS.each do |old_option, new_option| # Edge case: someone specifies :command_log_level and 'command_log_level' in the option hash - next unless value = _options.delete(old_option) || _options.delete(old_option.to_s) + next unless value = my_options.delete(old_option) || my_options.delete(old_option.to_s) deprecate_option old_option, new_option - _options[new_option] = value + my_options[new_option] = value end - return _command_args + return my_command_args end private diff --git a/lib/chef/provider/package/freebsd/base.rb b/lib/chef/provider/package/freebsd/base.rb index b0f05667ff..6a3b97a4fd 100644 --- a/lib/chef/provider/package/freebsd/base.rb +++ b/lib/chef/provider/package/freebsd/base.rb @@ -48,10 +48,10 @@ class Chef # Otherwise look up the path to the ports directory using 'whereis' else whereis = shell_out!("whereis -s #{port}", :env => nil) - unless _path = whereis.stdout[/^#{Regexp.escape(port)}:\s+(.+)$/, 1] + unless path = whereis.stdout[/^#{Regexp.escape(port)}:\s+(.+)$/, 1] raise Chef::Exceptions::Package, "Could not find port with the name #{port}" end - _path + path end end |