capistrano_multiconfig_parallel 0.22.0 → 0.23.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 89e48073b8b6708baeb5b39f98744f373ab3abab
4
- data.tar.gz: 1052b93deab26bec15a3ba72c30c9f690c41a605
3
+ metadata.gz: 3abf731d592c43d68e734ea69f0705ad5270ee03
4
+ data.tar.gz: 60ed9a8d3d00637add5bd7062481bc38830e92e2
5
5
  SHA512:
6
- metadata.gz: 3da4fd7ec16bc1d1a089c5d1ebf681250c3e65c711945114374ebe9c4c1e2567de44554582e152c3ff4b8f2661cd9d0d86ba31058876ea91cc6b5741bd2c255d
7
- data.tar.gz: 76ac0e57d3c78760b9f710207c54efcc6356f5beef76479d3f1636f17105cc9b31c2cd2167cb9d57471b3fef3ef62603086ae4feea61066932e22ad09ea7c209
6
+ metadata.gz: 725383d5a5ea7464ff75c97e3061d9a49db50ee0fca9c9b4e7d4202786e637b9b913a3001a8cb5759c174e78f5367bd89e6fa1c6f549466e409ca826b85263a7
7
+ data.tar.gz: bbf8f5a10007639ac4982a4b4c723119743a63ffd6f7c3ca47fcdc9fe4a3be3eae47000f73060498bf4a84cc7346b1db56af7abda0ede6ff726ffe90cb09a260
@@ -31,8 +31,9 @@ require 'capistrano/all'
31
31
  # fix error with not files that can not be found
32
32
  Gem.find_files('composable_state_machine/**/*.rb').each { |path| require path }
33
33
 
34
- Gem.find_files('capistrano_multiconfig_parallel/**/*.rb').each { |path| require path }
34
+ Gem.find_files('capistrano_multiconfig_parallel/classes/**/*.rb').each { |path| require path }
35
+ Gem.find_files('capistrano_multiconfig_parallel/helpers/**/*.rb').each { |path| require path }
36
+ Gem.find_files('capistrano_multiconfig_parallel/celluloid/**/*.rb').each { |path| require path }
35
37
 
36
38
  require_relative './version'
37
39
  require_relative './base'
38
- require_relative './application'
@@ -1,3 +1,4 @@
1
+ require 'capistrano/multiconfig/dsl'
1
2
  module CapistranoMulticonfigParallel
2
3
  # finds app dependencies, shows menu and delegates jobs to celluloid manager
3
4
  # rubocop:disable ClassLength
@@ -5,6 +6,8 @@ module CapistranoMulticonfigParallel
5
6
  include Celluloid
6
7
  include Celluloid::Logger
7
8
  include CapistranoMulticonfigParallel::ApplicationHelper
9
+ include Capistrano::DSL
10
+ include Capistrano::Multiconfig::DSL
8
11
 
9
12
  attr_reader :stage_apps, :top_level_tasks, :jobs, :branch_backup, :condition, :manager, :dependency_tracker, :application, :stage, :name, :args, :argv, :default_stage
10
13
 
@@ -1,4 +1,5 @@
1
1
  require_relative './all'
2
+ Gem.find_files('capistrano_multiconfig_parallel/initializers/**/*.rb').each { |path| require path }
2
3
  module CapistranoMulticonfigParallel
3
4
  # this is the class that will be invoked from terminal , and willl use the invoke task as the primary function.
4
5
  class CLI
@@ -11,6 +12,7 @@ module CapistranoMulticonfigParallel
11
12
  CapistranoMulticonfigParallel.original_args = ARGV.dup
12
13
  arguments = multi_fetch_argv(original_args)
13
14
  if arguments[CapistranoMulticonfigParallel::ENV_KEY_JOB_ID].blank?
15
+ require_relative './application'
14
16
  run_the_application
15
17
  else
16
18
  Capistrano::Application.new.run
@@ -1,12 +1,10 @@
1
1
  require_relative './core_helper'
2
2
  require_relative './internal_helper'
3
- require_relative './stages_helper'
4
3
  module CapistranoMulticonfigParallel
5
4
  # class that holds the options that are configurable for this gem
6
5
  module ApplicationHelper
7
6
  include CapistranoMulticonfigParallel::InternalHelper
8
7
  include CapistranoMulticonfigParallel::CoreHelper
9
- include CapistranoMulticonfigParallel::StagesHelper
10
8
 
11
9
  delegate :logger,
12
10
  :configuration,
@@ -7,7 +7,7 @@ module CapistranoMulticonfigParallel
7
7
  # module used for generating the version
8
8
  module VERSION
9
9
  MAJOR = 0
10
- MINOR = 22
10
+ MINOR = 23
11
11
  TINY = 0
12
12
  PRE = nil
13
13
 
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.22.0
4
+ version: 0.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - bogdanRada
@@ -661,7 +661,6 @@ files:
661
661
  - lib/capistrano_multiconfig_parallel/helpers/configuration.rb
662
662
  - lib/capistrano_multiconfig_parallel/helpers/core_helper.rb
663
663
  - lib/capistrano_multiconfig_parallel/helpers/internal_helper.rb
664
- - lib/capistrano_multiconfig_parallel/helpers/stages_helper.rb
665
664
  - lib/capistrano_multiconfig_parallel/initializers/rake.rb
666
665
  - lib/capistrano_multiconfig_parallel/version.rb
667
666
  homepage: http://github.com/bogdanRada/capistrano_multiconfig_parallel/
@@ -1,39 +0,0 @@
1
- module CapistranoMulticonfigParallel
2
- # module used to fetch the stages (code taken from https://github.com/railsware/capistrano-multiconfig)
3
- # TODO: find a way to do this without copying code. Can't currently use gem specification to require that gem
4
- # because seems to not work properly after capistrano/all is required. It seems to only work in Capfile if is required.
5
- # Still investigating how to make that work.
6
- module StagesHelper
7
- module_function
8
-
9
- def stages
10
- fetch_stages_paths do |paths|
11
- checks_paths(paths)
12
- end
13
- end
14
-
15
- def checks_paths(paths)
16
- paths.reject! { |path| check_stage_path(paths, path) }
17
- sorted_paths(paths)
18
- end
19
-
20
- def sorted_paths(paths)
21
- paths.present? ? paths.uniq.sort : paths
22
- end
23
-
24
- def check_stage_path(paths, path)
25
- paths.any? { |another| another != path && another.start_with?(path + ':') }
26
- end
27
-
28
- def stages_paths
29
- stages_root = File.expand_path(File.join(detect_root, 'config/deploy'))
30
- Dir["#{stages_root}/**/*.rb"].map do |file|
31
- file.slice(stages_root.size + 1..-4).tr('/', ':')
32
- end
33
- end
34
-
35
- def fetch_stages_paths
36
- stages_paths.tap { |paths| yield paths if block_given? }
37
- end
38
- end
39
- end