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: c7cc02538db7ad911dd5b61aa6eab9f9d651ac64
4
- data.tar.gz: e81e18d1337ccfeae94260e8ed40e2319377f7aa
3
+ metadata.gz: 37e1fd5e54ce834910e9d5a10bc8b8fda48d7fcc
4
+ data.tar.gz: 26042aa56996fccd7368b8cabff50d085b1f6014
5
5
  SHA512:
6
- metadata.gz: 4f69ea91b5e891f4bd5186506734582c6d70785650f7ea9c08c9cc091bbe1bc084739084fe5c8a3277d99038f74d206087335714bacdebf2da11c41c8baa74ee
7
- data.tar.gz: 4848c50cabcf6a0daa0f72bb9358f81aa49769746c9748e761954510b42c4682f4dbce620943adcdc06047679c39028dfb9fb82c3409376279007add787a6425
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.rc1
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? && capistrano_sentinel_needs_updating?
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
- return if File.foreach(job_capfile).grep(/#{capistrano_sentinel_name}/).any?
276
- File.open(job_capfile, 'a+') do |f|
277
- cmd=<<-CMD
278
- require "#{capistrano_sentinel_name}"
279
- CMD
280
- f.write(cmd)
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
 
@@ -10,7 +10,7 @@ module CapistranoMulticonfigParallel
10
10
  MAJOR = 2
11
11
  MINOR = 0
12
12
  TINY = 0
13
- PRE = 'rc2'
13
+ PRE = 'rc3'
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
16
16
  end
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.rc2
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-15 00:00:00.000000000 Z
11
+ date: 2016-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: celluloid