summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook/syntax_check.rb
diff options
context:
space:
mode:
authorGreg Thornton <xdissent@me.com>2013-05-23 18:02:59 -0500
committerBryan McLellan <btm@opscode.com>2013-06-18 11:33:30 -0700
commit5144cf38f43e82778f9fb55b9ffb1c86e6436baa (patch)
tree28d275456260e8c5224cde8404cb547933792535 /lib/chef/cookbook/syntax_check.rb
parent8d24bf282c27ebc44ee3178fe6f2d7d41d355e6d (diff)
downloadchef-5144cf38f43e82778f9fb55b9ffb1c86e6436baa.tar.gz
Use cookbook_path accessor instead of instance variable in syntax_check
Diffstat (limited to 'lib/chef/cookbook/syntax_check.rb')
-rw-r--r--lib/chef/cookbook/syntax_check.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/cookbook/syntax_check.rb b/lib/chef/cookbook/syntax_check.rb
index c022645133..4a06c88cbc 100644
--- a/lib/chef/cookbook/syntax_check.rb
+++ b/lib/chef/cookbook/syntax_check.rb
@@ -104,13 +104,13 @@ class Chef
end
def chefignore
- @chefignore ||= Chefignore.new(File.dirname(@cookbook_path))
+ @chefignore ||= Chefignore.new(File.dirname(cookbook_path))
end
def remove_ignored_files(file_list)
return file_list unless chefignore.ignores.length > 0
file_list.reject do |full_path|
- cookbook_pn = Pathname.new @cookbook_path
+ cookbook_pn = Pathname.new cookbook_path
full_pn = Pathname.new full_path
relative_pn = full_pn.relative_path_from cookbook_pn
chefignore.ignored? relative_pn.to_s