capistrano_multiconfig_parallel 2.0.0.rc2 → 2.0.0.rc3
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: 37e1fd5e54ce834910e9d5a10bc8b8fda48d7fcc
|
4
|
+
data.tar.gz: 26042aa56996fccd7368b8cabff50d085b1f6014
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98552410ce19198066f3b6d5c13750e398a550cbc30261531f923b38909286e3cdc8ce73be8b7a9d449cb9cb24b06ab520ee113861221f7d85a125c287fb803c
|
7
|
+
data.tar.gz: 1ceb4b40efe8193f5a9ed568685f36c86c6f5e39fa82d5174eb5c5d8b6255546d600880807833ed4893a7edbeb277922ade06ae4edb95be6d48d56c4c28893e5
|
data/README.md
CHANGED
@@ -76,7 +76,7 @@ Add the following to your Capfile after requiring **capistrano** and **capistran
|
|
76
76
|
Install locally on your system the capistrano_multiconfig_parallel gem using this command :
|
77
77
|
|
78
78
|
```ruby
|
79
|
-
gem install capistrano_multiconfig_parallel -v 2.0.0.
|
79
|
+
gem install capistrano_multiconfig_parallel -v 2.0.0.rc2
|
80
80
|
```
|
81
81
|
|
82
82
|
Please read [Release Details](https://github.com/bogdanRada/capistrano_multiconfig_parallel/releases) if you are upgrading. We break backward compatibility between large ticks but you can expect it to be specified at release notes.
|
@@ -6,7 +6,7 @@ module CapistranoMulticonfigParallel
|
|
6
6
|
include FileUtils
|
7
7
|
include CapistranoMulticonfigParallel::ApplicationHelper
|
8
8
|
|
9
|
-
attr_reader :job, :job_capistrano_version, :legacy_capistrano, :tempfile, :job_final_gemfile
|
9
|
+
attr_reader :job, :job_capistrano_version, :legacy_capistrano, :tempfile, :job_final_gemfile, :job_final_capfile
|
10
10
|
delegate :id, :app, :stage, :action, :task_arguments, :env_options, :path, to: :job
|
11
11
|
|
12
12
|
def initialize(job)
|
@@ -229,6 +229,10 @@ module CapistranoMulticonfigParallel
|
|
229
229
|
environment_options = setup_command_line.join(' ')
|
230
230
|
command = "#{fetch_bundler_check_command(@job_final_gemfile)} && WEBSOCKET_LOGGING=#{true} LOG_FILE=#{websocket_config.fetch('log_file_path', nil)} #{bundle_gemfile_env(@job_final_gemfile)} bundle exec cap #{job_stage} #{capistrano_action} #{environment_options}"
|
231
231
|
|
232
|
+
if @job_final_capfile != job_capfile
|
233
|
+
command += " -f #{@job_final_capfile}"
|
234
|
+
end
|
235
|
+
|
232
236
|
get_command_script(command)
|
233
237
|
end
|
234
238
|
|
@@ -237,6 +241,10 @@ module CapistranoMulticonfigParallel
|
|
237
241
|
File.join(job_path, capfile_name.to_s)
|
238
242
|
end
|
239
243
|
|
244
|
+
def job_capfile_multi
|
245
|
+
"#{job_capfile}.multi_cap"
|
246
|
+
end
|
247
|
+
|
240
248
|
def job_gemfile_multi
|
241
249
|
File.join(job_path, "Gemfile.multi_cap")
|
242
250
|
end
|
@@ -253,7 +261,7 @@ module CapistranoMulticonfigParallel
|
|
253
261
|
def check_capistrano_sentinel_availability
|
254
262
|
# '#{find_loaded_gem_property(capistrano_sentinel_name)}'
|
255
263
|
# path: '/home/raul/workspace/github/capistrano_sentinel'
|
256
|
-
if capistrano_sentinel_available?
|
264
|
+
if capistrano_sentinel_available?
|
257
265
|
@job_final_gemfile = job_gemfile
|
258
266
|
else
|
259
267
|
FileUtils.rm_rf(job_gemfile_multi) if File.exists?(job_gemfile_multi)
|
@@ -272,12 +280,26 @@ module CapistranoMulticonfigParallel
|
|
272
280
|
end
|
273
281
|
|
274
282
|
def prepare_capfile
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
283
|
+
capfile_valid = File.foreach(job_capfile).grep(/#{capistrano_sentinel_name}/).any?
|
284
|
+
if capistrano_sentinel_available? && capfile_valid.present?
|
285
|
+
@job_final_capfile = job_capfile
|
286
|
+
elsif capfile_valid.blank? && capistrano_sentinel_available?
|
287
|
+
@job_final_capfile = job_capfile
|
288
|
+
File.open(job_capfile, 'a+') do |f|
|
289
|
+
cmd=<<-CMD
|
290
|
+
require "#{capistrano_sentinel_name}"
|
291
|
+
CMD
|
292
|
+
f.write(cmd)
|
293
|
+
end
|
294
|
+
elsif capistrano_sentinel_available? == false
|
295
|
+
@job_final_capfile = job_capfile_multi
|
296
|
+
FileUtils.copy(job_capfile, job_capfile_multi)
|
297
|
+
File.open(job_capfile_multi, 'a+') do |f|
|
298
|
+
cmd=<<-CMD
|
299
|
+
require "#{capistrano_sentinel_name}"
|
300
|
+
CMD
|
301
|
+
f.write(cmd)
|
302
|
+
end
|
281
303
|
end
|
282
304
|
end
|
283
305
|
|
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: 2.0.0.
|
4
|
+
version: 2.0.0.rc3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bogdanRada
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: celluloid
|