Class: Prebundler::PathGemRef
- Defined in:
- lib/prebundler/path_gem_ref.rb
Constant Summary
Constants inherited from GemRef
GemRef::DEFAULT_SOURCE, GemRef::REF_TYPES
Instance Attribute Summary collapse
-
#path ⇒ Object
(also: #source)
readonly
Returns the value of attribute path.
Attributes inherited from GemRef
#bundle_path, #dependencies, #groups, #name, #prefix, #spec
Class Method Summary collapse
Instance Method Summary collapse
- #gemspecs ⇒ Object
-
#initialize(name, bundle_path, options = {}) ⇒ PathGemRef
constructor
A new instance of PathGemRef.
- #installable? ⇒ Boolean
- #storable? ⇒ Boolean
Methods inherited from GemRef
#add_to_tar, create, #executables, #extension_dir, #id, #install, #install_dir, #install_from_tar, #install_path, #relative_extension_dir, #relative_gem_dir, #relative_gemspec_files, #spec_path, #tar_file, #to_gem, #version
Constructor Details
#initialize(name, bundle_path, options = {}) ⇒ PathGemRef
Returns a new instance of PathGemRef.
11 12 13 14 15 16 17 18 |
# File 'lib/prebundler/path_gem_ref.rb', line 11 def initialize(name, bundle_path, = {}) super # @TODO: Individual gem calls can also specify a path, which # we don't currently handle. For now just use the gem's name # to complete the path. @path = File.join([:path], name) end |
Instance Attribute Details
#path ⇒ Object (readonly) Also known as: source
Returns the value of attribute path.
9 10 11 |
# File 'lib/prebundler/path_gem_ref.rb', line 9 def path @path end |
Class Method Details
.accepts?(options) ⇒ Boolean
4 5 6 |
# File 'lib/prebundler/path_gem_ref.rb', line 4 def accepts?() !![:path] end |
Instance Method Details
#gemspecs ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/prebundler/path_gem_ref.rb', line 28 def gemspecs @gemspecs ||= gemspec_files.map do |gemspec_file| Dir.chdir(File.dirname(gemspec_file)) do Bundler.load_gemspec(File.basename(gemspec_file)) end end end |
#installable? ⇒ Boolean
20 21 22 |
# File 'lib/prebundler/path_gem_ref.rb', line 20 def installable? false end |
#storable? ⇒ Boolean
24 25 26 |
# File 'lib/prebundler/path_gem_ref.rb', line 24 def storable? false end |