capistrano_multiconfig_parallel 0.16.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/capistrano_multiconfig_parallel/all.rb +0 -15
- data/lib/capistrano_multiconfig_parallel/application.rb +1 -4
- data/lib/capistrano_multiconfig_parallel/celluloid/celluloid_manager.rb +1 -2
- data/lib/capistrano_multiconfig_parallel/cli.rb +2 -1
- data/lib/capistrano_multiconfig_parallel/configuration.rb +15 -8
- data/lib/capistrano_multiconfig_parallel/version.rb +1 -1
- metadata +1 -2
- data/lib/capistrano_multiconfig_parallel/initializers/conf.rb +0 -12
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: d46ff24b24d18247e1ea920d37ce383734ffa3bc
         | 
| 4 | 
            +
              data.tar.gz: bf1581316694c05421159ab06874ec929a6dd122
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 1e4abbd36a6096db020e255cb31548f39f8a8ce542f875cc04ca02bc1c530ebafe38df72738b2563832814cf1dcd4d4249582377ba695d2a14b050b4c2141266
         | 
| 7 | 
            +
              data.tar.gz: bc9d444a27c396acb3080f4251649b0a934c5530aad42df6ec097342c9542015293556e8b61028231c0b926bdfe8a4f28ce6eca7d74e4bc13f89199599f56756
         | 
    
        data/Gemfile.lock
    CHANGED
    
    
| @@ -35,18 +35,3 @@ require_relative './version' | |
| 35 35 | 
             
            require_relative './configuration'
         | 
| 36 36 | 
             
            require_relative './base'
         | 
| 37 37 | 
             
            require_relative './application'
         | 
| 38 | 
            -
             | 
| 39 | 
            -
            # Signal.trap("TERM") do
         | 
| 40 | 
            -
            #   puts'aa'
         | 
| 41 | 
            -
            # CapistranoMulticonfigParallel::Application.terminate
         | 
| 42 | 
            -
            # end
         | 
| 43 | 
            -
            #
         | 
| 44 | 
            -
            # Signal.trap('USR1') do
         | 
| 45 | 
            -
            #   puts'aaaa3'
         | 
| 46 | 
            -
            #   CapistranoMulticonfigParallel::Application.terminate
         | 
| 47 | 
            -
            # end
         | 
| 48 | 
            -
            #
         | 
| 49 | 
            -
            # Signal.trap('USR2') do
         | 
| 50 | 
            -
            #   puts'aaaa3'
         | 
| 51 | 
            -
            #   CapistranoMulticonfigParallel::Application.terminate
         | 
| 52 | 
            -
            # end
         | 
| @@ -8,11 +8,11 @@ module CapistranoMulticonfigParallel | |
| 8 8 | 
             
                attr_accessor :stages,:stage_apps, :top_level_tasks, :jobs, :branch_backup, :condition, :manager, :dependency_tracker, :application, :stage, :name, :args, :argv, :default_stage
         | 
| 9 9 |  | 
| 10 10 | 
             
                def initialize
         | 
| 11 | 
            +
                  Celluloid.boot
         | 
| 11 12 | 
             
                  @stages = fetch_stages
         | 
| 12 13 | 
             
                  @stage_apps =  multi_apps? ? @stages.map { |stage| stage.split(':').reverse[1] }.uniq : []
         | 
| 13 14 | 
             
                  collect_command_line_tasks(CapistranoMulticonfigParallel.original_args)
         | 
| 14 15 | 
             
                  @jobs = []
         | 
| 15 | 
            -
                  CapistranoMulticonfigParallel.configuration_valid?(@stages)
         | 
| 16 16 | 
             
                end
         | 
| 17 17 |  | 
| 18 18 |  | 
| @@ -78,9 +78,6 @@ module CapistranoMulticonfigParallel | |
| 78 78 | 
             
                  @argv['BRANCH'] = nil
         | 
| 79 79 | 
             
                end
         | 
| 80 80 |  | 
| 81 | 
            -
                def can_start?
         | 
| 82 | 
            -
                  @top_level_tasks.size >= 1 && (@stages.include?(@top_level_tasks.first) || custom_command?) && @argv[CapistranoMulticonfigParallel::ENV_KEY_JOB_ID].blank?
         | 
| 83 | 
            -
                end
         | 
| 84 81 |  | 
| 85 82 | 
             
                def custom_command?
         | 
| 86 83 | 
             
                  if multi_apps?
         | 
| @@ -10,7 +10,7 @@ module CapistranoMulticonfigParallel | |
| 10 10 |  | 
| 11 11 | 
             
                cattr_accessor :debug_enabled
         | 
| 12 12 |  | 
| 13 | 
            -
                attr_accessor :jobs, :job_to_worker, :worker_to_job, : | 
| 13 | 
            +
                attr_accessor :jobs, :job_to_worker, :worker_to_job, :job_to_condition, :mutex, :registration_complete, :workers_terminated
         | 
| 14 14 |  | 
| 15 15 | 
             
                attr_reader :worker_supervisor, :workers
         | 
| 16 16 | 
             
                trap_exit :worker_died
         | 
| @@ -21,7 +21,6 @@ module CapistranoMulticonfigParallel | |
| 21 21 | 
             
                  @job_manager = job_manager
         | 
| 22 22 | 
             
                  @registration_complete = false
         | 
| 23 23 | 
             
                  # Get a handle on the SupervisionGroup::Member
         | 
| 24 | 
            -
                  @actor_system = Celluloid.boot
         | 
| 25 24 | 
             
                  @mutex = Mutex.new
         | 
| 26 25 | 
             
                  # http://rubydoc.info/gems/celluloid/Celluloid/SupervisionGroup/Member
         | 
| 27 26 | 
             
                  @workers = @worker_supervisor.pool(CapistranoMulticonfigParallel::CelluloidWorker, as: :workers, size: 10)
         | 
| @@ -7,8 +7,9 @@ module CapistranoMulticonfigParallel | |
| 7 7 | 
             
                def self.start
         | 
| 8 8 | 
             
                  CapistranoMulticonfigParallel.check_terminal_tty
         | 
| 9 9 | 
             
                  CapistranoMulticonfigParallel.original_args = ARGV.dup
         | 
| 10 | 
            +
                  CapistranoMulticonfigParallel.configuration_valid?
         | 
| 10 11 | 
             
                  job_manager = CapistranoMulticonfigParallel::Application.new
         | 
| 11 | 
            -
                  if job_manager. | 
| 12 | 
            +
                  if job_manager.argv[CapistranoMulticonfigParallel::ENV_KEY_JOB_ID].blank?
         | 
| 12 13 | 
             
                    job_manager.start
         | 
| 13 14 | 
             
                  else
         | 
| 14 15 | 
             
                    Capistrano::Application.new.run
         | 
| @@ -7,23 +7,30 @@ module CapistranoMulticonfigParallel | |
| 7 7 | 
             
                  attr_accessor :configuration
         | 
| 8 8 |  | 
| 9 9 | 
             
                  def configuration
         | 
| 10 | 
            -
                    @config ||=  | 
| 10 | 
            +
                    @config ||= fetch_configuration
         | 
| 11 | 
            +
                    @config
         | 
| 12 | 
            +
                  end
         | 
| 13 | 
            +
             | 
| 14 | 
            +
             | 
| 15 | 
            +
                  def fetch_configuration
         | 
| 16 | 
            +
                    @fetched_config = Configliere::Param.new
         | 
| 11 17 | 
             
                    command_line_params.each do |param|
         | 
| 12 18 | 
             
                      param_type = change_config_type(param['type'].to_s)
         | 
| 13 | 
            -
                      @ | 
| 19 | 
            +
                      @fetched_config.define param['name'], type: param_type, description: param['description'], default: param['default']
         | 
| 14 20 | 
             
                    end
         | 
| 15 21 |  | 
| 16 22 | 
             
                    ARGV.clear
         | 
| 17 23 |  | 
| 18 24 | 
             
                    CapistranoMulticonfigParallel.original_args.each { |a| ARGV << a }
         | 
| 19 | 
            -
                    @ | 
| 20 | 
            -
                    @ | 
| 25 | 
            +
                    @fetched_config.read config_file if File.file?(config_file)
         | 
| 26 | 
            +
                    @fetched_config.use :commandline
         | 
| 21 27 |  | 
| 22 | 
            -
                    @ | 
| 23 | 
            -
                    @ | 
| 28 | 
            +
                    @fetched_config.use :config_block
         | 
| 29 | 
            +
                    @fetched_config.finally do |c|
         | 
| 24 30 | 
             
                      check_configuration(c)
         | 
| 25 31 | 
             
                    end
         | 
| 26 | 
            -
                    @ | 
| 32 | 
            +
                    @fetched_config.process_argv!
         | 
| 33 | 
            +
                    @fetched_config.resolve!
         | 
| 27 34 | 
             
                  end
         | 
| 28 35 |  | 
| 29 36 | 
             
                  def config_file
         | 
| @@ -71,7 +78,7 @@ module CapistranoMulticonfigParallel | |
| 71 78 | 
             
                    raise ArgumentError, "the property `#{prop}` must be boolean" unless %w(true false).include?(c[prop].to_s.downcase)
         | 
| 72 79 | 
             
                  end
         | 
| 73 80 |  | 
| 74 | 
            -
                  def configuration_valid? | 
| 81 | 
            +
                  def configuration_valid?
         | 
| 75 82 | 
             
                    configuration
         | 
| 76 83 | 
             
                  end
         | 
| 77 84 |  | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: capistrano_multiconfig_parallel
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.16. | 
| 4 | 
            +
              version: 0.16.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - bogdanRada
         | 
| @@ -637,7 +637,6 @@ files: | |
| 637 637 | 
             
            - lib/capistrano_multiconfig_parallel/helpers/output_stream.rb
         | 
| 638 638 | 
             
            - lib/capistrano_multiconfig_parallel/helpers/rake_hook_actor.rb
         | 
| 639 639 | 
             
            - lib/capistrano_multiconfig_parallel/helpers/standard_deploy.rb
         | 
| 640 | 
            -
            - lib/capistrano_multiconfig_parallel/initializers/conf.rb
         | 
| 641 640 | 
             
            - lib/capistrano_multiconfig_parallel/initializers/default.yml
         | 
| 642 641 | 
             
            - lib/capistrano_multiconfig_parallel/version.rb
         | 
| 643 642 | 
             
            homepage: http://github.com/bogdanRada/capistrano_multiconfig_parallel/
         |