diff options
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/cookbook/chefignore.rb | 2 | ||||
-rw-r--r-- | lib/chef/cookbook/cookbook_version_loader.rb | 8 | ||||
-rw-r--r-- | lib/chef/file_access_control/unix.rb | 4 | ||||
-rw-r--r-- | lib/chef/knife/cookbook_site_install.rb | 2 | ||||
-rw-r--r-- | lib/chef/scan_access_control.rb | 8 |
5 files changed, 12 insertions, 12 deletions
diff --git a/lib/chef/cookbook/chefignore.rb b/lib/chef/cookbook/chefignore.rb index 71ef53c9e5..dce58ecdb8 100644 --- a/lib/chef/cookbook/chefignore.rb +++ b/lib/chef/cookbook/chefignore.rb @@ -52,7 +52,7 @@ class Chef ignore_globs << line.strip unless line =~ COMMENTS_AND_WHITESPACE end else - Chef::Log.debug("No chefignore file found at #@ignore_file no files will be ignored") + Chef::Log.debug("No chefignore file found at #{@ignore_file} no files will be ignored") end ignore_globs end diff --git a/lib/chef/cookbook/cookbook_version_loader.rb b/lib/chef/cookbook/cookbook_version_loader.rb index af8b2e043e..d253c956b2 100644 --- a/lib/chef/cookbook/cookbook_version_loader.rb +++ b/lib/chef/cookbook/cookbook_version_loader.rb @@ -308,7 +308,7 @@ class Chef begin @metadata.from_file(file) rescue Chef::Exceptions::JSON::ParseError - Chef::Log.error("Error evaluating metadata.rb for #@inferred_cookbook_name in " + file) + Chef::Log.error("Error evaluating metadata.rb for #{@inferred_cookbook_name} in " + file) raise end end @@ -317,7 +317,7 @@ class Chef begin @metadata.from_json(IO.read(file)) rescue Chef::Exceptions::JSON::ParseError - Chef::Log.error("Couldn't parse cookbook metadata JSON for #@inferred_cookbook_name in " + file) + Chef::Log.error("Couldn't parse cookbook metadata JSON for #{@inferred_cookbook_name} in " + file) raise end end @@ -336,7 +336,7 @@ class Chef # metadata contains a name key. @metadata.name(data["cookbook_name"]) unless data["metadata"].key?("name") rescue Chef::Exceptions::JSON::ParseError - Chef::Log.error("Couldn't parse cookbook metadata JSON for #@inferred_cookbook_name in " + file) + Chef::Log.error("Couldn't parse cookbook metadata JSON for #{@inferred_cookbook_name} in " + file) raise end end @@ -347,7 +347,7 @@ class Chef data = Chef::JSONCompat.parse(IO.read(uploaded_cookbook_version_file)) @frozen = data["frozen?"] rescue Chef::Exceptions::JSON::ParseError - Chef::Log.error("Couldn't parse cookbook metadata JSON for #@inferred_cookbook_name in #{uploaded_cookbook_version_file}") + Chef::Log.error("Couldn't parse cookbook metadata JSON for #{@inferred_cookbook_name} in #{uploaded_cookbook_version_file}") raise end end diff --git a/lib/chef/file_access_control/unix.rb b/lib/chef/file_access_control/unix.rb index 1746db44d3..7d1c211b53 100644 --- a/lib/chef/file_access_control/unix.rb +++ b/lib/chef/file_access_control/unix.rb @@ -123,7 +123,7 @@ class Chef elsif resource.group.kind_of?(Integer) resource.group else - Chef::Log.error("The `group` parameter of the #@resource resource is set to an invalid value (#{resource.owner.inspect})") + Chef::Log.error("The `group` parameter of the #{@resource} resource is set to an invalid value (#{resource.owner.inspect})") raise ArgumentError, "cannot resolve #{resource.group.inspect} to gid, group must be a string or integer" end rescue ArgumentError @@ -270,7 +270,7 @@ class Chef elsif resource.owner.kind_of?(Integer) resource.owner else - Chef::Log.error("The `owner` parameter of the #@resource resource is set to an invalid value (#{resource.owner.inspect})") + Chef::Log.error("The `owner` parameter of the #{@resource} resource is set to an invalid value (#{resource.owner.inspect})") raise ArgumentError, "cannot resolve #{resource.owner.inspect} to uid, owner must be a string or integer" end rescue ArgumentError diff --git a/lib/chef/knife/cookbook_site_install.rb b/lib/chef/knife/cookbook_site_install.rb index 43d015dcc4..5b2d7d3517 100644 --- a/lib/chef/knife/cookbook_site_install.rb +++ b/lib/chef/knife/cookbook_site_install.rb @@ -83,7 +83,7 @@ class Chef # Check to ensure we have a valid source of cookbooks before continuing # @install_path = File.expand_path(Array(config[:cookbook_path]).first) - ui.info "Installing #@cookbook_name to #{@install_path}" + ui.info "Installing #{@cookbook_name} to #{@install_path}" @repo = CookbookSCMRepo.new(@install_path, ui, config) #cookbook_path = File.join(vendor_path, name_args[0]) diff --git a/lib/chef/scan_access_control.rb b/lib/chef/scan_access_control.rb index f55a106e6d..0e6df30303 100644 --- a/lib/chef/scan_access_control.rb +++ b/lib/chef/scan_access_control.rb @@ -70,7 +70,7 @@ class Chef when Integer stat.uid else - Chef::Log.error("The `owner` parameter of the #@new_resource resource is set to an invalid value (#{new_resource.owner.inspect})") + Chef::Log.error("The `owner` parameter of the #{@new_resource} resource is set to an invalid value (#{new_resource.owner.inspect})") raise ArgumentError, "cannot resolve #{new_resource.owner.inspect} to uid, owner must be a string or integer" end end @@ -97,7 +97,7 @@ class Chef when Integer stat.gid else - Chef::Log.error("The `group` parameter of the #@new_resource resource is set to an invalid value (#{new_resource.owner.inspect})") + Chef::Log.error("The `group` parameter of the #{@new_resource} resource is set to an invalid value (#{new_resource.owner.inspect})") raise ArgumentError, "cannot resolve #{new_resource.group.inspect} to gid, group must be a string or integer" end end @@ -121,8 +121,8 @@ class Chef when String, Integer, nil "0#{(stat.mode & 07777).to_s(8)}" else - Chef::Log.error("The `mode` parameter of the #@new_resource resource is set to an invalid value (#{new_resource.mode.inspect})") - raise ArgumentError, "Invalid value #{new_resource.mode.inspect} for `mode` on resource #@new_resource" + Chef::Log.error("The `mode` parameter of the #{@new_resource} resource is set to an invalid value (#{new_resource.mode.inspect})") + raise ArgumentError, "Invalid value #{new_resource.mode.inspect} for `mode` on resource #{@new_resource}" end end |