capistrano_multiconfig_parallel 1.2.9 → 1.3.0
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: ad818dec1e400fbf987547ee9f73b418e2717039
|
4
|
+
data.tar.gz: d89e2681e842160eef7ff03df18edbcc73593dcb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fefdfa881e03d9278bb8789dc663edb312159760a709cd7bb07111fe7c99734ec3b0a7453df7c14ed9f4f06fd5e4a243a7ffa606fede326ef99423e7d4f5cb6a
|
7
|
+
data.tar.gz: 8d4e10d4d7295e9a91231201e59f94783a7ad0c4918b7da817cedfedb5ec7677a98e488f9f3f9dbae6f5d17d4a487ec5e88a0796e0c7fdc4ecea448dadb22b7b
|
data/Rakefile
CHANGED
@@ -19,6 +19,11 @@ end
|
|
19
19
|
YARD::Config.options[:load_plugins] = true
|
20
20
|
YARD::Config.load_plugins
|
21
21
|
|
22
|
+
# dirty hack for YardocTask
|
23
|
+
::Rake.application.class.class_eval do
|
24
|
+
alias_method :last_comment, :last_description
|
25
|
+
end
|
26
|
+
|
22
27
|
YARD::Rake::YardocTask.new do |t|
|
23
28
|
t.files = ['lib/**/*.rb', 'spec/**/*_spec.rb'] # optional
|
24
29
|
t.options = ['--any', '--extra', '--opts', '--markup-provider=redcarpet', '--markup=markdown', '--debug'] # optional
|
@@ -50,10 +50,13 @@ module CapistranoMulticonfigParallel
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def verify_valid_data
|
53
|
-
|
53
|
+
return if @top_level_tasks != ['default']
|
54
|
+
raise_invalid_job_config
|
55
|
+
end
|
56
|
+
|
57
|
+
def raise_invalid_job_config
|
54
58
|
puts 'Invalid execution, please call something such as `multi_cap production deploy`, where production is a stage you have defined'.red
|
55
59
|
exit(false)
|
56
|
-
end
|
57
60
|
end
|
58
61
|
|
59
62
|
def initialize_data
|
@@ -201,6 +204,7 @@ module CapistranoMulticonfigParallel
|
|
201
204
|
|
202
205
|
def prepare_job(options)
|
203
206
|
options = options.stringify_keys
|
207
|
+
return raise_invalid_job_config if !job_stage_valid?(options)
|
204
208
|
app = options.fetch('app', '')
|
205
209
|
box = options['env_options'][boxes_key]
|
206
210
|
message = box.present? ? "BOX #{box}:" : "stage #{options['stage']}:"
|
@@ -223,6 +227,19 @@ module CapistranoMulticonfigParallel
|
|
223
227
|
can_tag_staging? && job.stage == 'production' && job.gitflow.present?
|
224
228
|
end
|
225
229
|
|
230
|
+
def job_path(options)
|
231
|
+
options.fetch("path", detect_root)
|
232
|
+
end
|
233
|
+
|
234
|
+
def job_stage_valid?(options)
|
235
|
+
stages(job_path(options)).include?(job_stage(options))
|
236
|
+
end
|
237
|
+
|
238
|
+
def job_stage(options)
|
239
|
+
multi_apps?(job_path(options)) && options.fetch('app', nil).present? ? "#{options['app']}:#{options['stage']}" : "#{options['stage']}"
|
240
|
+
end
|
241
|
+
|
242
|
+
|
226
243
|
def prepare_options(options)
|
227
244
|
options = options.stringify_keys
|
228
245
|
options['app'] = options.fetch('app', @application.to_s.clone)
|
@@ -24,9 +24,10 @@ module CapistranoMulticonfigParallel
|
|
24
24
|
def fetch_application_dependencies(application, action)
|
25
25
|
return [[], {}] if configuration.application_dependencies.blank? || application.blank?
|
26
26
|
applications = get_applications_to_deploy(action, [application.camelcase])
|
27
|
-
|
27
|
+
applications = applications.present? ? applications : []
|
28
|
+
app_options = applications.find { |hash| hash['app'] == application }.try(:dup)
|
28
29
|
applications.delete_if { |hash| hash['app'] == application }
|
29
|
-
[applications, app_options]
|
30
|
+
[applications, (app_options || {})]
|
30
31
|
end
|
31
32
|
|
32
33
|
def show_interactive_menu(action)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano_multiconfig_parallel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bogdanRada
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: celluloid
|