Class: Bundler::GitSource
- Inherits:
-
DirectorySource
- Object
- Source
- DirectorySource
- Bundler::GitSource
- Defined in:
- lib/bowline/bundler/source.rb
Instance Attribute Summary collapse
-
#branch ⇒ Object
readonly
Returns the value of attribute branch.
-
#ref ⇒ Object
readonly
Returns the value of attribute ref.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Attributes inherited from DirectorySource
Attributes inherited from Source
Instance Method Summary collapse
- #download(spec) ⇒ Object
- #gems ⇒ Object
-
#initialize(bundle, options) ⇒ GitSource
constructor
A new instance of GitSource.
- #location ⇒ Object
- #to_s ⇒ Object
Methods inherited from DirectorySource
#==, #add_spec, #can_be_local?, #locate_gemspecs, #merge_defined_specs, #validate_gemspec
Constructor Details
#initialize(bundle, options) ⇒ GitSource
Returns a new instance of GitSource.
303 304 305 306 307 308 |
# File 'lib/bowline/bundler/source.rb', line 303 def initialize(bundle, ) super @uri = [:uri] @branch = [:branch] || 'master' @ref = [:ref] || "origin/#{@branch}" end |
Instance Attribute Details
#branch ⇒ Object (readonly)
Returns the value of attribute branch.
301 302 303 |
# File 'lib/bowline/bundler/source.rb', line 301 def branch @branch end |
#ref ⇒ Object (readonly)
Returns the value of attribute ref.
301 302 303 |
# File 'lib/bowline/bundler/source.rb', line 301 def ref @ref end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
301 302 303 |
# File 'lib/bowline/bundler/source.rb', line 301 def uri @uri end |
Instance Method Details
#download(spec) ⇒ Object
321 322 323 |
# File 'lib/bowline/bundler/source.rb', line 321 def download(spec) # Nothing needed here end |
#gems ⇒ Object
315 316 317 318 319 |
# File 'lib/bowline/bundler/source.rb', line 315 def gems update checkout super end |
#location ⇒ Object
310 311 312 313 |
# File 'lib/bowline/bundler/source.rb', line 310 def location # TMP HAX to get the *.gemspec reading to work bundle.gem_path.join('dirs', File.basename(@uri, '.git')) end |
#to_s ⇒ Object
325 326 327 |
# File 'lib/bowline/bundler/source.rb', line 325 def to_s "git: #{uri}" end |