lib/berkshelf/dsl.rb in berkshelf-0.4.0.rc1 vs lib/berkshelf/dsl.rb in berkshelf-0.4.0.rc2

- old
+ new

@@ -13,11 +13,11 @@ yield @@active_group = nil end def metadata(options = {}) - path = options[:path] || File.expand_path('.') + path = options[:path] || File.dirname(filepath) metadata_file = Berkshelf.find_metadata(path) unless metadata_file raise CookbookNotFound, "No 'metadata.rb' found at #{path}" @@ -33,7 +33,13 @@ end source = CookbookSource.new(name, path: File.dirname(metadata_file)) add_source(source) end + + private + + def filepath + File.join(File.expand_path('.'), "DSLFile") + end end end