Sha256: 53edb5e32da19d9f0d7423a2cf34c6ae402ed6799d3cda38c53257eb5b4fe4d6
Contents?: true
Size: 990 Bytes
Versions: 25
Compression:
Stored size: 990 Bytes
Contents
module Berkshelf # @author Jamie Winsor <jamie@vialstudios.com> class PathLocation include Location set_location_key :path attr_accessor :path # @param [#to_s] name # @param [Solve::Constraint] version_constraint # @param [Hash] options # # @option options [String] :path # a filepath to the cookbook on your local disk def initialize(name, version_constraint, options = {}) @name = name @version_constraint = version_constraint @path = File.expand_path(options[:path]) set_downloaded_status(true) end # @param [#to_s] destination # # @return [Berkshelf::CachedCookbook] def download(destination) cached = CachedCookbook.from_path(path) validate_cached(cached) set_downloaded_status(true) cached end def to_hash super.merge(value: self.path) end def to_s "#{self.class.location_key}: '#{path}'" end end end
Version data entries
25 entries across 25 versions & 1 rubygems