Class: VagrantPlugins::CapistranoPush::Config
- Inherits:
-
Object
- Object
- VagrantPlugins::CapistranoPush::Config
- Defined in:
- lib/vagrant-capistrano-push/config.rb
Instance Attribute Summary collapse
-
#inline ⇒ Object
Returns the value of attribute inline.
-
#stage ⇒ String
The capistrano command (as a string) to execute.
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #validate(machine) ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
9 10 11 |
# File 'lib/vagrant-capistrano-push/config.rb', line 9 def initialize @stage = UNSET_VALUE end |
Instance Attribute Details
#inline ⇒ Object
Returns the value of attribute inline.
7 8 9 |
# File 'lib/vagrant-capistrano-push/config.rb', line 7 def inline @inline end |
#stage ⇒ String
The capistrano command (as a string) to execute.
6 7 8 |
# File 'lib/vagrant-capistrano-push/config.rb', line 6 def stage @stage end |
Instance Method Details
#finalize! ⇒ Object
13 14 15 16 |
# File 'lib/vagrant-capistrano-push/config.rb', line 13 def finalize! @stage = nil if @stage == UNSET_VALUE @inline = "bundle exec cap #{@stage} deploy" end |
#validate(machine) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/vagrant-capistrano-push/config.rb', line 18 def validate(machine) errors = _detected_errors if missing?(@stage) errors << I18n.t("capistrano_push.errors.missing_attribute", attribute: "stage", ) end { "Capistrano push" => errors } end |