Class: Shipper::Run
- Inherits:
-
Object
- Object
- Shipper::Run
- Defined in:
- lib/shipper/run.rb
Constant Summary collapse
- COMMANDS =
%w[restart].freeze
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#env ⇒ Object
readonly
Returns the value of attribute env.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options) ⇒ Run
constructor
A new instance of Run.
- #perform ⇒ Object
Constructor Details
#initialize(options) ⇒ Run
Returns a new instance of Run.
9 10 11 12 13 |
# File 'lib/shipper/run.rb', line 9 def initialize() pop_env!() @config = ::Shipper::Config.new(env: env) = .empty? ? nil : end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
5 6 7 |
# File 'lib/shipper/run.rb', line 5 def config @config end |
#env ⇒ Object (readonly)
Returns the value of attribute env.
5 6 7 |
# File 'lib/shipper/run.rb', line 5 def env @env end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/shipper/run.rb', line 5 def end |
Instance Method Details
#perform ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/shipper/run.rb', line 15 def perform if restart? ::Shipper::Host.new(config.host).restart! else ::Shipper::Deploy.new(config, ).perform end end |