Class: Bundler::SystemGemSource
- Defined in:
- lib/bowline/bundler/source.rb
Instance Attribute Summary
Attributes inherited from Source
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
- #can_be_local? ⇒ Boolean
- #download(spec) ⇒ Object
- #gems ⇒ Object
-
#initialize(bundle, options = {}) ⇒ SystemGemSource
constructor
A new instance of SystemGemSource.
- #to_s ⇒ Object
Constructor Details
#initialize(bundle, options = {}) ⇒ SystemGemSource
Returns a new instance of SystemGemSource.
113 114 115 116 |
# File 'lib/bowline/bundler/source.rb', line 113 def initialize(bundle, = {}) super @source = Gem::SourceIndex.from_installed_gems end |
Class Method Details
.instance ⇒ Object
105 106 107 |
# File 'lib/bowline/bundler/source.rb', line 105 def self.instance @instance end |
.new(*args) ⇒ Object
109 110 111 |
# File 'lib/bowline/bundler/source.rb', line 109 def self.new(*args) @instance ||= super end |
Instance Method Details
#==(other) ⇒ Object
126 127 128 |
# File 'lib/bowline/bundler/source.rb', line 126 def ==(other) other.is_a?(SystemGemSource) end |
#can_be_local? ⇒ Boolean
118 119 120 |
# File 'lib/bowline/bundler/source.rb', line 118 def can_be_local? false end |
#download(spec) ⇒ Object
134 135 136 137 138 |
# File 'lib/bowline/bundler/source.rb', line 134 def download(spec) gemfile = Pathname.new(spec.loaded_from) gemfile = gemfile.dirname.join('..', 'cache', "#{spec.full_name}.gem") bundle.cache(gemfile) end |
#gems ⇒ Object
122 123 124 |
# File 'lib/bowline/bundler/source.rb', line 122 def gems @gems ||= process_source_gems(@source.gems) end |
#to_s ⇒ Object
130 131 132 |
# File 'lib/bowline/bundler/source.rb', line 130 def to_s "system" end |