capistrano_multiconfig_parallel 0.22.0 → 0.23.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/capistrano_multiconfig_parallel/all.rb +3 -2
- data/lib/capistrano_multiconfig_parallel/application.rb +3 -0
- data/lib/capistrano_multiconfig_parallel/cli.rb +2 -0
- data/lib/capistrano_multiconfig_parallel/helpers/application_helper.rb +0 -2
- data/lib/capistrano_multiconfig_parallel/version.rb +1 -1
- metadata +1 -2
- data/lib/capistrano_multiconfig_parallel/helpers/stages_helper.rb +0 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3abf731d592c43d68e734ea69f0705ad5270ee03
|
4
|
+
data.tar.gz: 60ed9a8d3d00637add5bd7062481bc38830e92e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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,
|
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.
|
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
|