capistrano_multiconfig_parallel 0.12.7 → 0.12.8

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: 2cf871544abbc31ba4cab9436d3654743594a4f2
4
- data.tar.gz: 5e0b3a2767357c53e6be436b32c036d413bc0bc4
3
+ metadata.gz: 3f4cabdd4041b99eaddd7f84bc54d364ed1bbbe7
4
+ data.tar.gz: b6beba4c0954046619b3a67ed48cb0177fba3c01
5
5
  SHA512:
6
- metadata.gz: f4a837d2d7ffd39ad0a349eadb68a5b135fc1e06500826f712f3062dafef5b7f2a1e50c5eea52c6aec9a570c94bc046a8bf273db4091564db068f07f6d5ad52c
7
- data.tar.gz: 1d12a6259cab92782f4bd5be40ef9dfb0d2dbade29f01bc1e218b06e77999f2cd38fb3b4735f4fdb4f3257f655d40c6d3816939f2047e3fc6a260399e2fec46d
6
+ metadata.gz: 63eddae356a7597d489a79c58552ebc820d1fea75d7a67b44aa5a9b2b3804fa9be55ff635c9f15c8a6b1f4613f52aa0c2aa8f132b3f9fd3c1ea21248b6c8ef27
7
+ data.tar.gz: 94f07f32411ce57a786b2bb2e571c674b0173fe952738744efd62f95e464def377d977915bec3a282cac0926af352cc800c2de4f5c8497bb1750373168e86e91
@@ -25,12 +25,6 @@ module CapistranoMulticonfigParallel
25
25
  @config.resolve!
26
26
  end
27
27
 
28
- def default_config
29
- @default_config ||= Configliere::Param.new
30
- @default_config.read File.join(internal_config_directory, 'default.yml')
31
- @default_config.resolve!
32
- end
33
-
34
28
  def config_file
35
29
  File.join(CapistranoMulticonfigParallel.detect_root.to_s, 'config', 'multi_cap.yml')
36
30
  end
@@ -40,83 +34,17 @@ module CapistranoMulticonfigParallel
40
34
  end
41
35
 
42
36
  def command_line_params
43
- [
44
- {
45
- name: 'multi_debug',
46
- type: :boolean,
47
- description: 'if option is present and has value TRUE , will enable debugging of workers',
48
- default: default_config[:multi_debug]
49
- },
50
- {
51
- name: 'multi_secvential',
52
- type: :boolean,
53
- description: "If parallel executing does not work for you, you can use this option so that
54
- \t each process is executed normally and ouputted to the screen.
55
- \t However this means that all other tasks will have to wait for each other to finish before starting ",
56
- default: default_config[:multi_secvential]
57
- },
58
- {
59
- name: 'websocket_server.enable_debug',
60
- type: :boolean,
61
- description: "if option is present and has value TRUE
62
- \t will enable debugging of websocket communication between the workers",
63
- default: default_config[:websocket_server][:enable_debug]
64
- },
65
- {
66
- name: 'development_stages',
67
- type: Array,
68
- description: "if option is present and has value an ARRAY of STRINGS,
69
- \t each of them will be used as a development stage",
70
- default: default_config[:development_stages]
71
- },
72
- {
73
- name: 'task_confirmations',
74
- type: Array,
75
- description: "if option is present and has value TRUE, will enable user confirmation dialogs
76
- \t before executing each task from option **--task_confirmations**",
77
- default: default_config[:task_confirmations]
78
- },
79
- {
80
- name: 'task_confirmation_active',
81
- type: :boolean,
82
- description: "if option is present and has value an ARRAY of Strings, and --task_confirmation_active is TRUE ,
83
- \t then will require a confirmation from user before executing the task.
84
- \t This will syncronize all workers to wait before executing that task, then a confirmation will be displayed,
85
- \t and when user will confirm , all workers will resume their operation",
86
- default: default_config[:task_confirmation_active]
87
- },
88
- {
89
- name: 'syncronize_confirmation',
90
- type: :boolean,
91
- description: "if option is present and has value TRUE, all workers will be synchronized to wait for same task
92
- \t from the ***task_confirmations** Array before they execute it ",
93
- default: default_config[:syncronize_confirmation]
94
- },
95
- {
96
- name: 'apply_stage_confirmation',
97
- type: Array,
98
- description: "if option is present and has value TRUE, all workers will be synchronized to wait for same task
99
- \t from the ***task_confirmations** Array before they execute it ",
100
- default: default_config[:apply_stage_confirmation]
101
- },
102
- {
103
- name: 'track_dependencies',
104
- type: :boolean,
105
- description: "This should be useed only for Caphub-like applications ,
106
- \t in order to deploy dependencies of an application in parallel.
107
- \t This is used only in combination with option **--application_dependencies** which is described
108
- \t at section **[2.) Multiple applications](#multiple_apps)**",
109
- default: default_config[:track_dependencies]
110
- },
111
- {
112
- name: 'application_dependencies',
113
- type: Array,
114
- description: "This is an array of hashes. Each hash has only the keys
115
- \t 'app' ( app name), 'priority' and 'dependencies'
116
- \t ( an array of app names that this app is dependent to) ",
117
- default: default_config[:application_dependencies]
118
- }
119
- ]
37
+ @default_config ||= Configliere::Param.new
38
+ @default_config.read File.join(internal_config_directory, 'default.yml')
39
+ @default_config.resolve!
40
+ @default_config[:default_config].map do |item|
41
+ item[:type] = change_config_type(item[:type])
42
+ item
43
+ end
44
+ end
45
+
46
+ def change_config_type(type)
47
+ type.include?(':') ? type.delete(':').to_s.to_sym : type.to_s.constantize
120
48
  end
121
49
 
122
50
  def capistrano_options
@@ -124,7 +52,7 @@ module CapistranoMulticonfigParallel
124
52
  [
125
53
  "--#{param[:name]}[=CAP_VALUE]",
126
54
  "--#{param[:name]}",
127
- "[MULTI_CAP] #{param[:description]}",
55
+ "[MULTI_CAP] #{param[:description]}. By default #{param[:default]}",
128
56
  lambda do |_value|
129
57
  end
130
58
  ]
@@ -1,19 +1,79 @@
1
- multi_debug: true
2
- multi_progress: false
3
- multi_secvential: false
4
- websocket_server:
5
- enable_debug: false
6
-
7
- development_stages:
8
- - development
9
- - webdev
10
-
11
- syncronize_confirmation: true
12
- apply_stage_confirmation:
13
- - production
14
- task_confirmation_active: false
15
- task_confirmations:
16
- - deploy:symlink:release
17
-
18
- track_dependencies: false
19
- application_dependencies: []
1
+ default_config:
2
+ - name: 'multi_debug'
3
+ type: ':boolean'
4
+ description: >-
5
+ Enable debugging of workers, CAP_VALUE can be true or false
6
+ default: TRUE
7
+
8
+ - name: 'multi_secvential'
9
+ type: ':boolean'
10
+ description: >-
11
+ Forces execution of jobs in sequence, CAP_VALUE can be true or false
12
+ default: false
13
+
14
+ - name: 'websocket_server.enable_debug'
15
+ type: ':boolean'
16
+ description: >-
17
+ Enables debugging of websocket communication between the workers,
18
+ CAP_VALUE can be true or false
19
+ default: false
20
+
21
+ - name: 'development_stages'
22
+ type: 'Array'
23
+ description: >-
24
+ Each of the items is used to recognize it as a development stage,
25
+ CAP_VALUE can Array of String
26
+ default:
27
+ - development
28
+ - webdev
29
+
30
+ - name: 'task_confirmations'
31
+ type: 'Array'
32
+ description: >-
33
+ Enable user confirmation dialogs before executing each task
34
+ from option **--task_confirmations**
35
+ CAP_VALUE can be Array of strings ( task names with scope)
36
+ default:
37
+ - deploy:symlink:release
38
+
39
+ - name: 'task_confirmation_active'
40
+ type: ':boolean'
41
+ description: >-
42
+ Requires a confirmation from user before executing the task.
43
+ This will syncronize all workers to wait before executing that task, then a confirmation will be displayed,
44
+ and when user will confirm , all workers will resume their operation.
45
+ CAP_VALUE can be true or false
46
+ default: false
47
+
48
+ - name: 'syncronize_confirmation'
49
+ type: ':boolean'
50
+ description: >-
51
+ All workers will be synchronized to wait for same task
52
+ from the ***task_confirmations** 'Array' before they execute it
53
+ CAP_VALUE can be true or false
54
+ default: TRUE
55
+
56
+ - name: 'apply_stage_confirmation'
57
+ type: 'Array'
58
+ description: >-
59
+ Defines the stages for which option **--syncronize_confirmation** applies.
60
+ CAP_VALUE can be an Array of strings (stages)
61
+ default:
62
+ - production
63
+
64
+ - name: 'track_dependencies'
65
+ type: ':boolean'
66
+ description: >-
67
+ This should be useed only for Caphub-like applications ,
68
+ in order to deploy dependencies of an application in parallel.
69
+ This is used only in combination with option **--application_dependencies**
70
+ CAP_VALUE can be true or false
71
+ default: false
72
+
73
+ - name: 'application_dependencies'
74
+ type: 'Array'
75
+ description: >-
76
+ This is an 'Array' of hashes. Each hash has only the keys
77
+ 'app' ( app name), 'priority' and 'dependencies'
78
+ ( an 'Array' of app names that this app is dependent to)
79
+ default: []
@@ -8,7 +8,7 @@ module CapistranoMulticonfigParallel
8
8
  module VERSION
9
9
  MAJOR = 0
10
10
  MINOR = 12
11
- TINY = 7
11
+ TINY = 8
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.12.7
4
+ version: 0.12.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - bogdanRada