Class: ThemeJuice::Commands::Deploy
- Inherits:
-
ThemeJuice::Command
- Object
- Task
- ThemeJuice::Command
- ThemeJuice::Commands::Deploy
- Defined in:
- lib/theme-juice/commands/deploy.rb
Instance Attribute Summary
Attributes inherited from Task
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Deploy
constructor
A new instance of Deploy.
- #method_missing(method, *args, &block) ⇒ Object
Methods inherited from ThemeJuice::Command
Methods inherited from Task
Constructor Details
#initialize(opts = {}) ⇒ Deploy
Returns a new instance of Deploy.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/theme-juice/commands/deploy.rb', line 7 def initialize(opts = {}) super @config.deployment.stages.keys.each do |stage| self.class.send :define_method, stage do |*args| @env.cap = Capistrano::Application.new @env.stage = stage.to_sym runner do |tasks| tasks << Tasks::Settings.new tasks << Tasks::Stage.new tasks << Tasks::VMStage.new tasks << Tasks::Load.new tasks << Tasks::Invoke.new(args) end self end end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
28 29 30 |
# File 'lib/theme-juice/commands/deploy.rb', line 28 def method_missing(method, *args, &block) @io.error "It looks like the stage '#{method}' doesn't exist" end |