capistrano_multiconfig_parallel 0.28.4 → 0.28.5

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: fa78a70bc3dc26a8ad8fba2629f620f79a2e5885
4
- data.tar.gz: 9b18a8a0abdd29c8f8a82d6b59ab0e48a8894e82
3
+ metadata.gz: 0840903a620f1a8c95af1785a6b67573cf6ae648
4
+ data.tar.gz: 5fce9f63bf9592a01bbc2f8426592fbf62b1b2cd
5
5
  SHA512:
6
- metadata.gz: 2235b4e160ab6a0369dc1a9c1416fc6703f6eeac4a4579d94cee567aba60ee3985f1454936f76afd10ab25eb2b033ce6f58a0c2aaacf757f6e37fa2e11ba95c2
7
- data.tar.gz: 188e3825b51fee53bdd042a6d04acc089f80003b80702b3bdc243042c95c58fa667e6133edc2fc318398c602abab9f95deca7bbf18b630b34ee60cb87cfd61bb
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
- module_function
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
- puts(message) if output.present?
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)
@@ -8,7 +8,7 @@ module CapistranoMulticonfigParallel
8
8
  module VERSION
9
9
  MAJOR = 0
10
10
  MINOR = 28
11
- TINY = 4
11
+ TINY = 5
12
12
  PRE = nil
13
13
 
14
14
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
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.28.4
4
+ version: 0.28.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - bogdanRada