capistrano_multiconfig_parallel 0.30.3 → 0.30.4
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/img/parallel_demo-min.png +0 -0
- data/lib/capistrano_multiconfig_parallel/application.rb +8 -1
- data/lib/capistrano_multiconfig_parallel/base.rb +1 -0
- data/lib/capistrano_multiconfig_parallel/celluloid/terminal_table.rb +8 -2
- data/lib/capistrano_multiconfig_parallel/classes/cursor.rb +1 -1
- data/lib/capistrano_multiconfig_parallel/helpers/core_helper.rb +5 -2
- data/lib/capistrano_multiconfig_parallel/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 102ead4be47875fadcc0863c7e64bbcfd0c71dc6
|
4
|
+
data.tar.gz: f6bab9294d0e0b8c8377b877dde7b8ed23388237
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e387fdfdb3fcca43f12f2f5d5a7cabf5134fb895a6bb9b0976bd8b04109bb440ef55126bbbf8f0236f1585ef211905401bf039d095e22125d30cfff89a68a91
|
7
|
+
data.tar.gz: cba797e0050966809ecf3f478a98a429ab12dd0bffcad64c306eaea6d1946c06f0eacf1a89218433dbbdcad8f9a0a5e21058f954b2e72bad65f18af87372b048
|
data/img/parallel_demo-min.png
CHANGED
Binary file
|
@@ -13,6 +13,7 @@ module CapistranoMulticonfigParallel
|
|
13
13
|
|
14
14
|
def initialize
|
15
15
|
Celluloid.boot
|
16
|
+
CapistranoMulticonfigParallel.enable_logging
|
16
17
|
@stage_apps = multi_apps? ? stages.map { |stage| stage.split(':').reverse[1] }.uniq : []
|
17
18
|
collect_command_line_tasks(CapistranoMulticonfigParallel.original_args)
|
18
19
|
@job_count = 0
|
@@ -21,6 +22,7 @@ module CapistranoMulticonfigParallel
|
|
21
22
|
|
22
23
|
def start
|
23
24
|
verify_app_dependencies if multi_apps? && configuration.application_dependencies.present?
|
25
|
+
verify_valid_data
|
24
26
|
check_before_starting
|
25
27
|
initialize_data
|
26
28
|
run
|
@@ -68,6 +70,12 @@ module CapistranoMulticonfigParallel
|
|
68
70
|
stages.find { |stage| stage.include?(':') }.present?
|
69
71
|
end
|
70
72
|
|
73
|
+
def verify_valid_data
|
74
|
+
return if @top_level_tasks != ['default']
|
75
|
+
puts 'Invalid execution, please call something such as `multi_cap production deploy`, where production is a stage you have defined'.red
|
76
|
+
exit(false)
|
77
|
+
end
|
78
|
+
|
71
79
|
def initialize_data
|
72
80
|
@application = custom_command? ? nil : @top_level_tasks.first.split(':').reverse[1]
|
73
81
|
@stage = custom_command? ? nil : @top_level_tasks.first.split(':').reverse[0]
|
@@ -94,7 +102,6 @@ module CapistranoMulticonfigParallel
|
|
94
102
|
end
|
95
103
|
|
96
104
|
def check_before_starting
|
97
|
-
CapistranoMulticonfigParallel.enable_logging
|
98
105
|
@dependency_tracker = CapistranoMulticonfigParallel::DependencyTracker.new(Actor.current)
|
99
106
|
@default_stage = configuration.development_stages.present? ? configuration.development_stages.first : 'development'
|
100
107
|
@condition = Celluloid::Condition.new
|
@@ -54,8 +54,14 @@ module CapistranoMulticonfigParallel
|
|
54
54
|
|
55
55
|
def display_table_on_terminal(table, jobs)
|
56
56
|
table_size = fetch_table_size(jobs)
|
57
|
-
@position, @terminal_rows, @screen_erased = CapistranoMulticonfigParallel::Cursor.display_on_screen(
|
58
|
-
|
57
|
+
@position, @terminal_rows, @screen_erased = CapistranoMulticonfigParallel::Cursor.display_on_screen(
|
58
|
+
"#{table}",
|
59
|
+
@options.merge(
|
60
|
+
position: @position,
|
61
|
+
table_size: table_size,
|
62
|
+
screen_erased: @screen_erased
|
63
|
+
)
|
64
|
+
)
|
59
65
|
print_errors
|
60
66
|
signal_complete
|
61
67
|
end
|
@@ -49,10 +49,13 @@ module CapistranoMulticonfigParallel
|
|
49
49
|
log_to_file(message, log_method: 'fatal')
|
50
50
|
end
|
51
51
|
|
52
|
+
def terminal_actor
|
53
|
+
Celluloid::Actor[:terminal_server]
|
54
|
+
end
|
55
|
+
|
52
56
|
def log_output_error(output, message)
|
53
57
|
puts message if output.present?
|
54
|
-
|
55
|
-
terminal.errors.push(message) if terminal.present? && terminal.alive?
|
58
|
+
terminal_actor.errors.push(message) if terminal_actor.present? && terminal_actor.alive?
|
56
59
|
end
|
57
60
|
|
58
61
|
def format_error(exception)
|