capistrano_multiconfig_parallel 0.15.5 → 0.15.6

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: ce5c12b343517998bcc01bda3c1fe46d1ca24387
4
- data.tar.gz: 8cd1948ff8deb57abb6b793fc098296cf11db28d
3
+ metadata.gz: d670bac33692dac58e4499796c9b05998ce94b5f
4
+ data.tar.gz: 4b6618a06b135cd04261526a9973d0b43c4bb6d2
5
5
  SHA512:
6
- metadata.gz: 8ef0605ffdeec6fc0fcd926f9b327fa213200461fe57fd3187f8f5891698878420ebae80927ee802964447edaf042a486811c1b99619a25242e9c9ab82e22b39
7
- data.tar.gz: de674a4f61774088723d3c6cb60618ba657d81a1869940d0b9eca9855e4e43446c58e90f3ab11f7bca581c3f64fbd065dc427f796589b3525c4a60a475254449
6
+ metadata.gz: c8eaa6377ba9f5fbe842a15fb71461777b69be8d21c4d689c8cf8c43ae0a20259035a1d21ba15ff5eb1b5a18ccef58f1be48c62ca9ec1dd27bfe0a97e297b3d0
7
+ data.tar.gz: 749246e82c4795cb48aeebd9c7e9ea60a75a5dc4c95c4c1477990abd7433c44e6095fb7fbbba171d9024bc5f1b1bf5980bd3c0f4a92e8c631f543640dd8fdee5
@@ -94,7 +94,6 @@ module CapistranoMulticonfigParallel
94
94
  end
95
95
  end
96
96
 
97
-
98
97
  def try_detect_capfile
99
98
  root = Pathname.new(FileUtils.pwd)
100
99
  root = root.parent unless root.directory?
@@ -1,5 +1,6 @@
1
1
  module CapistranoMulticonfigParallel
2
2
  # class that handles the rake task and waits for approval from the celluloid worker
3
+ # rubocop:disable ClassLength
3
4
  class RakeWorker
4
5
  include Celluloid
5
6
  include Celluloid::Logger
@@ -17,14 +17,24 @@ module CapistranoMulticonfigParallel
17
17
  end
18
18
 
19
19
  def fetch_stages
20
+ fetch_stages_paths do |paths|
21
+ paths.reject! { |path| check_stage_path(paths, path) }.sort
22
+ end
23
+ end
24
+
25
+ def check_stage_path(paths, path)
26
+ paths.any? { |another| another != path && another.start_with?(path + ':') }
27
+ end
28
+
29
+ def stages_paths
20
30
  stages_root = 'config/deploy'
21
31
  Dir["#{stages_root}/**/*.rb"].map do |file|
22
32
  file.slice(stages_root.size + 1..-4).tr('/', ':')
23
- end.tap do |paths|
24
- paths.reject! do |path|
25
- paths.any? { |another| another != path && another.start_with?(path + ':') }
26
- end
27
- end.sort
33
+ end
34
+ end
35
+
36
+ def fetch_stages_paths
37
+ stages_paths.tap { |paths| yield paths if block_given? }
28
38
  end
29
39
 
30
40
  def run
@@ -280,8 +290,7 @@ module CapistranoMulticonfigParallel
280
290
  task_arguments: options['task_arguments'],
281
291
  env_options: job_env_options
282
292
  }
283
- job = job.stringify_keys
284
- @jobs << job
293
+ @jobs << job.stringify_keys
285
294
  end
286
295
 
287
296
  def prepare_options(options)
@@ -8,7 +8,7 @@ module CapistranoMulticonfigParallel
8
8
  module VERSION
9
9
  MAJOR = 0
10
10
  MINOR = 15
11
- TINY = 5
11
+ TINY = 6
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.15.5
4
+ version: 0.15.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - bogdanRada