summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2015-02-19 13:27:40 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2015-02-23 10:44:58 -0800
commit5c6ef532630f3d08325fd0e1635d2b6dd6057a31 (patch)
tree34ebb62d6533770df52378917a7a3f30b2f27c79
parent2603e2153d6ab50179d2278025a51579edb9033f (diff)
downloadchef-5c6ef532630f3d08325fd0e1635d2b6dd6057a31.tar.gz
fix Lint/UnderscorePrefixedVariableName
-rw-r--r--lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb6
-rw-r--r--lib/chef/mixin/shell_out.rb10
-rw-r--r--lib/chef/provider/package/freebsd/base.rb4
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