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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 58e2a9600daf2a4c5fe9616f6445f4b347059244
4
- data.tar.gz: 9b3c580792789c8079ba4b1f29b2161443f0dfc6
3
+ metadata.gz: 102ead4be47875fadcc0863c7e64bbcfd0c71dc6
4
+ data.tar.gz: f6bab9294d0e0b8c8377b877dde7b8ed23388237
5
5
  SHA512:
6
- metadata.gz: a829f654be313dff6ddc40e29ac8c0ee204923fe62eb29ae5d8b9ba2cbb6bac0f321d7df92e664076b962bc6f2bc90113e1aadcff3bbb0841e8202f01e660e38
7
- data.tar.gz: 13b7ca2728d183796f047e1f65fbc5d19a70333d9e8f2895e9eecf8e81b06b8f1df4dad2413c89b7316107a27e201614b7b3385280c6e714ddfadfa88b22f2f9
6
+ metadata.gz: 6e387fdfdb3fcca43f12f2f5d5a7cabf5134fb895a6bb9b0976bd8b04109bb440ef55126bbbf8f0236f1585ef211905401bf039d095e22125d30cfff89a68a91
7
+ data.tar.gz: cba797e0050966809ecf3f478a98a429ab12dd0bffcad64c306eaea6d1946c06f0eacf1a89218433dbbdcad8f9a0a5e21058f954b2e72bad65f18af87372b048
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
@@ -8,6 +8,7 @@ module CapistranoMulticonfigParallel
8
8
  class << self
9
9
  attr_accessor :logger, :original_args
10
10
  include CapistranoMulticonfigParallel::Configuration
11
+ include CapistranoMulticonfigParallel::CoreHelper
11
12
 
12
13
  def enable_logging
13
14
  enable_file_logging
@@ -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("#{table}", @options.merge(position: @position, table_size: table_size, screen_erased: @screen_erased ))
58
- # puts [@position, @terminal_rows, table_size , (@terminal_rows[:rows] - @position[:row]), screen_erased].inspect
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
@@ -11,7 +11,7 @@ module CapistranoMulticonfigParallel
11
11
  handle_string_display(string, options)
12
12
  end
13
13
 
14
- private
14
+ private
15
15
 
16
16
  def move_to_home!(row = 0, column = 1)
17
17
  erase_screen
@@ -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
- terminal = Celluloid::Actor[:terminal_server]
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)
@@ -8,7 +8,7 @@ module CapistranoMulticonfigParallel
8
8
  module VERSION
9
9
  MAJOR = 0
10
10
  MINOR = 30
11
- TINY = 3
11
+ TINY = 4
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.30.3
4
+ version: 0.30.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - bogdanRada