Class: EY::Serverside::Slug::Source::Updater
- Inherits:
-
Object
- Object
- EY::Serverside::Slug::Source::Updater
- Defined in:
- lib/engineyard-serverside/slug/source/updater.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#git ⇒ Object
readonly
Returns the value of attribute git.
-
#quiet ⇒ Object
readonly
Returns the value of attribute quiet.
-
#ref ⇒ Object
readonly
Returns the value of attribute ref.
-
#source_cache ⇒ Object
readonly
Returns the value of attribute source_cache.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize(input = {}) ⇒ Updater
constructor
A new instance of Updater.
- #update ⇒ Object
Methods included from Runner
#run, #run_and_output, #run_and_success?, #runner
Methods included from Railway
Methods included from Result::DSL
Constructor Details
#initialize(input = {}) ⇒ Updater
Returns a new instance of Updater.
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/engineyard-serverside/slug/source/updater.rb', line 28 def initialize(input = {}) @input = input @config = input[:config] source = input[:config].source @source_cache = source.source_cache @uri = source.uri @quiet = source.opts[:verbose] ? '' : '--quiet' @ref = source.ref @git = "#{wrapped_git} --git-dir #{source_cache}/.git --work-tree #{source_cache}" end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
26 27 28 |
# File 'lib/engineyard-serverside/slug/source/updater.rb', line 26 def config @config end |
#git ⇒ Object (readonly)
Returns the value of attribute git.
26 27 28 |
# File 'lib/engineyard-serverside/slug/source/updater.rb', line 26 def git @git end |
#quiet ⇒ Object (readonly)
Returns the value of attribute quiet.
26 27 28 |
# File 'lib/engineyard-serverside/slug/source/updater.rb', line 26 def quiet @quiet end |
#ref ⇒ Object (readonly)
Returns the value of attribute ref.
26 27 28 |
# File 'lib/engineyard-serverside/slug/source/updater.rb', line 26 def ref @ref end |
#source_cache ⇒ Object (readonly)
Returns the value of attribute source_cache.
26 27 28 |
# File 'lib/engineyard-serverside/slug/source/updater.rb', line 26 def source_cache @source_cache end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
26 27 28 |
# File 'lib/engineyard-serverside/slug/source/updater.rb', line 26 def uri @uri end |
Instance Method Details
#update ⇒ Object
39 40 41 |
# File 'lib/engineyard-serverside/slug/source/updater.rb', line 39 def update call(@input) end |