Class: Pulsar::MainCommand

Inherits:
Clamp::Command
  • Object
show all
Includes:
Helpers::Clamp, Options::ConfRepo, Options::Shared
Defined in:
lib/pulsar/commands/main.rb

Instance Method Summary collapse

Methods included from Options::ConfRepo

included, #parse

Methods included from Options::Shared

included

Methods included from Helpers::Clamp

included

Instance Method Details

#executeObject



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/pulsar/commands/main.rb', line 25

def execute
  find_apps.each do |app|
    target = "#{app}:#{environment}"

    Bundler.with_clean_env do
      begin
        fetch_repo
        bundle_install
        create_capfile
        build_capfile(target)

        unless skip_cap_run?
          cap_args = [ tasks_list ].flatten.join(" ")
          run_capistrano(cap_args)
        end
      ensure
        cleanup!
      end
    end
  end
end