Sha256: 8a52f4a5cac674aed2516359475725734406a8e9d3d1d80c373099c7c1cbb88a

Contents?: true

Size: 771 Bytes

Versions: 43

Compression:

Stored size: 771 Bytes

Contents

module CapistranoMulticonfigParallel
  # class used as a wrapper around capistrano
  class Application < Capistrano::Application
    def name
      'multi_cap'
    end

    def sort_options(options)
      super.concat(CapistranoMulticonfigParallel.capistrano_options)
    end

    def top_level
      job_manager = multi_manager_class.new(self, top_level_tasks, stages)
      if job_manager.can_start? && !options.show_prereqs && !options.show_tasks
        job_manager.start
      else
        super
      end
    end

    def multi_apps?
      stages.find { |stage| stage.include?(':') }.present?
    end

    def multi_manager_class
      multi_apps? ? CapistranoMulticonfigParallel::MultiAppManager : CapistranoMulticonfigParallel::SingleAppManager
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
capistrano_multiconfig_parallel-0.13.2 lib/capistrano_multiconfig_parallel/application.rb
capistrano_multiconfig_parallel-0.13.1 lib/capistrano_multiconfig_parallel/application.rb
capistrano_multiconfig_parallel-0.13.0 lib/capistrano_multiconfig_parallel/application.rb
capistrano_multiconfig_parallel-0.12.9 lib/capistrano_multiconfig_parallel/application.rb
capistrano_multiconfig_parallel-0.12.8 lib/capistrano_multiconfig_parallel/application.rb
capistrano_multiconfig_parallel-0.12.7 lib/capistrano_multiconfig_parallel/application.rb
capistrano_multiconfig_parallel-0.12.6 lib/capistrano_multiconfig_parallel/application.rb
capistrano_multiconfig_parallel-0.12.5 lib/capistrano_multiconfig_parallel/application.rb
capistrano_multiconfig_parallel-0.12.3 lib/capistrano_multiconfig_parallel/application.rb
capistrano_multiconfig_parallel-0.12.2 lib/capistrano_multiconfig_parallel/application.rb
capistrano_multiconfig_parallel-0.12.1 lib/capistrano_multiconfig_parallel/application.rb
capistrano_multiconfig_parallel-0.12.0 lib/capistrano_multiconfig_parallel/application.rb
capistrano_multiconfig_parallel-0.11.6 lib/capistrano_multiconfig_parallel/application.rb
capistrano_multiconfig_parallel-0.11.5 lib/capistrano_multiconfig_parallel/application.rb
capistrano_multiconfig_parallel-0.11.4 lib/capistrano_multiconfig_parallel/application.rb
capistrano_multiconfig_parallel-0.11.3 lib/capistrano_multiconfig_parallel/application.rb
capistrano_multiconfig_parallel-0.11.2 lib/capistrano_multiconfig_parallel/application.rb
capistrano_multiconfig_parallel-0.11.1 lib/capistrano_multiconfig_parallel/application.rb
capistrano_multiconfig_parallel-0.11.0 lib/capistrano_multiconfig_parallel/application.rb
capistrano_multiconfig_parallel-0.10.0 lib/capistrano_multiconfig_parallel/application.rb