Class: Conjure::Service::RepositoryLink
- Inherits:
-
Object
- Object
- Conjure::Service::RepositoryLink
- Defined in:
- lib/conjure/service/repository_link.rb
Instance Method Summary collapse
- #branch ⇒ Object
-
#initialize(options) ⇒ RepositoryLink
constructor
A new instance of RepositoryLink.
- #update ⇒ Object
Constructor Details
#initialize(options) ⇒ RepositoryLink
Returns a new instance of RepositoryLink.
4 5 6 7 8 9 |
# File 'lib/conjure/service/repository_link.rb', line 4 def initialize() @volume = [:volume] @branch = [:branch] @origin_url = [:origin_url] @public_key = [:public_key] end |
Instance Method Details
#branch ⇒ Object
15 16 17 |
# File 'lib/conjure/service/repository_link.rb', line 15 def branch @branch ||= git_shell.command("cd #{code_path}; git rev-parse --abbrev-ref HEAD").strip end |
#update ⇒ Object
11 12 13 |
# File 'lib/conjure/service/repository_link.rb', line 11 def update code_checked_out ? fetch_code_updates : checkout_code end |