capistrano_multiconfig_parallel 0.28.4 → 0.28.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0840903a620f1a8c95af1785a6b67573cf6ae648
|
4
|
+
data.tar.gz: 5fce9f63bf9592a01bbc2f8426592fbf62b1b2cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1fb82220d05bcfc06ab07cffd2ba609186c6141774948cc5ff0b1ab2afbf2e0536c1caed32e29edad7c6a5748e6b0c7508ea1ecc9735bc2089c86fd0bf52088
|
7
|
+
data.tar.gz: 863b07e6e964e29ddfba9d12ec76fa08762aed9cea5374159978d1a3fae289d504d44929230fa80e84a7027fe4421d576a152359c7495d1f7caa8fa386afb63a
|
@@ -7,6 +7,9 @@ module CapistranoMulticonfigParallel
|
|
7
7
|
include Celluloid::Notifications
|
8
8
|
include Celluloid::Logger
|
9
9
|
include CapistranoMulticonfigParallel::ApplicationHelper
|
10
|
+
|
11
|
+
attr_reader :options, :errors, :manager, :position, :job_manager
|
12
|
+
|
10
13
|
def self.topic
|
11
14
|
'sshkit_terminal'
|
12
15
|
end
|
@@ -14,6 +17,7 @@ module CapistranoMulticonfigParallel
|
|
14
17
|
def initialize(manager, job_manager, options = {})
|
15
18
|
@manager = manager
|
16
19
|
@position = nil
|
20
|
+
@errors = []
|
17
21
|
@options = options.is_a?(Hash) ? options.stringify_keys : options
|
18
22
|
@job_manager = job_manager
|
19
23
|
async.run
|
@@ -44,6 +48,7 @@ module CapistranoMulticonfigParallel
|
|
44
48
|
def display_table_on_terminal(table)
|
45
49
|
@position ||= CapistranoMulticonfigParallel::Cursor.fetch_position
|
46
50
|
CapistranoMulticonfigParallel::Cursor.display_on_screen("\n#{table}\n", @options.merge(position: @position))
|
51
|
+
puts(@errors.join("\n")) if @errors.present? && options.fetch('clear_screen', false).to_s == 'false'
|
47
52
|
signal_complete
|
48
53
|
end
|
49
54
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module CapistranoMulticonfigParallel
|
2
2
|
# class that holds the options that are configurable for this gem
|
3
3
|
module CoreHelper
|
4
|
-
|
4
|
+
module_function
|
5
5
|
|
6
6
|
def app_debug_enabled?
|
7
7
|
configuration.multi_debug.to_s.downcase == 'true'
|
@@ -45,10 +45,17 @@ module CapistranoMulticonfigParallel
|
|
45
45
|
def log_error(error, output = nil)
|
46
46
|
return if error_filtered?(error)
|
47
47
|
message = format_error(error)
|
48
|
-
|
48
|
+
log_output_error(output, message)
|
49
49
|
log_to_file(message, log_method: 'fatal')
|
50
50
|
end
|
51
51
|
|
52
|
+
def log_output_error(output, message)
|
53
|
+
return if output.blank?
|
54
|
+
terminal = Celluloid::Actor[:terminal_server]
|
55
|
+
terminal.errors.push(message) if terminal.present? && terminal.alive? && !terminal.errors.include?(message)
|
56
|
+
puts message
|
57
|
+
end
|
58
|
+
|
52
59
|
def format_error(exception)
|
53
60
|
message = "\n#{exception.class} (#{exception.respond_to?(:message) ? exception.message : exception.inspect}):\n"
|
54
61
|
message << exception.annoted_source_code.to_s if exception.respond_to?(:annoted_source_code)
|