lib/berkshelf/locations/path_location.rb in berkshelf-1.3.1 vs lib/berkshelf/locations/path_location.rb in berkshelf-1.4.0.rc1
- old
+ new
@@ -23,10 +23,11 @@
include Location
set_location_key :path
attr_accessor :path
+ attr_reader :name
# @param [#to_s] name
# @param [Solve::Constraint] version_constraint
# @param [Hash] options
#
@@ -41,10 +42,10 @@
# @param [#to_s] destination
#
# @return [Berkshelf::CachedCookbook]
def download(destination)
- cached = CachedCookbook.from_path(File.expand_path(path))
+ cached = CachedCookbook.from_path(path, name: name)
validate_cached(cached)
set_downloaded_status(true)
cached
rescue IOError