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