mvn2chain 1.0.2 → 1.1.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: 517adb7e4558bb8d4a0db6c008b0ef7490cd7938
4
- data.tar.gz: d05801008a89390d3c53c5d25a2f66288d3e7158
3
+ metadata.gz: aed256e3b2896de1a49620a235ef1cdf53838d2a
4
+ data.tar.gz: d7b49e1a679b8856ec3b6d467c7464fd8585dd44
5
5
  SHA512:
6
- metadata.gz: 3d369c9d37db0d32b68149dbcbe500347ecbfec55ba3f2d2e9b0abc03884f7d0eeacbe8992e78e6eb8079b701021851e020909a31ab6497d360cef267d0f4118
7
- data.tar.gz: 37a12473d378893ca15aee953d212e60011149d015252827277b85ecf99db19890ff04101e13bf45945b1c08e5e0f3949f28548a54a1d4b781158efdd903f8c5
6
+ metadata.gz: 45b2a8824920c249cf8401e6497b2b2ab6f15560470e13b5e89f7196d554f8f730354bc4eb6b4815cbd9841fecddc08975182e2d15cf75b70797249ddf9c10f8
7
+ data.tar.gz: 4823328f94c473fc3ea96fa41537869eccf37fb5f050dc25b1a21179496f2fade9fdf11bb2a0166d40c681798546f902b5b6d2991fac3023512ee12608a40632
data/bin/mvn2chain CHANGED
@@ -23,7 +23,7 @@ module Mvn2Chain
23
23
 
24
24
  def deps(exclude = [])
25
25
  @deps ||= load
26
- (exclude.nil? || exclude.empty?) ? @deps : @deps.select { |k,_| !exclude.include?(k) }
26
+ (exclude.nil? || exclude.empty?) ? @deps : @deps.select { |k, _| !exclude.include?(k) }
27
27
  end
28
28
 
29
29
  def load
@@ -187,30 +187,39 @@ LONGDESC
187
187
  ) { |*args|
188
188
  arg_hash, exclude = args_to_hash(*args)
189
189
  mine = arg_hash.delete(:me)
190
- dir = Dir.getwd
191
- if DataStore.deps(exclude).nil? || DataStore.deps(exclude).empty?
192
- DataStore.deps.each { |v|
193
- puts "Skipping '#{v[0]}'"
194
- }
195
- else
196
- puts "Starting in #{dir}"
197
- DataStore.deps.each { |v|
198
- if exclude.include?(v[0])
190
+ times = 1
191
+ r = /^\*\*(\d+)$/
192
+ mine.each { |v| times = $1.to_i if v =~ r }
193
+ mine.delete_if { |v| v =~ r}
194
+ (1..times).each { |i|
195
+ if times > 1
196
+ puts "Starting run #{i} of #{times}"
197
+ end
198
+ dir = Dir.getwd
199
+ if DataStore.deps(exclude).nil? || DataStore.deps(exclude).empty?
200
+ DataStore.deps.each { |v|
199
201
  puts "Skipping '#{v[0]}'"
200
- else
201
- puts "Switching to #{v[1]}"
202
- Dir.chdir(v[1])
203
- chain_command = make_chain_command(v[0], arg_hash, exclude)
204
- puts "> #{chain_command}"
205
- system(chain_command)
206
- end
207
- }
208
- puts "Switching back to #{dir}"
209
- Dir.chdir(dir)
210
- end
211
- mvn2_command = make_mvn2_command(mine)
212
- puts "> #{mvn2_command}"
213
- system(mvn2_command)
202
+ }
203
+ else
204
+ puts "Starting in #{dir}"
205
+ DataStore.deps.each { |v|
206
+ if exclude.include?(v[0])
207
+ puts "Skipping '#{v[0]}'"
208
+ else
209
+ puts "Switching to #{v[1]}"
210
+ Dir.chdir(v[1])
211
+ chain_command = make_chain_command(v[0], arg_hash, exclude)
212
+ puts "> #{chain_command}"
213
+ system(chain_command)
214
+ end
215
+ }
216
+ puts "Switching back to #{dir}"
217
+ Dir.chdir(dir)
218
+ end
219
+ mvn2_command = make_mvn2_command(mine)
220
+ puts "> #{mvn2_command}"
221
+ system(mvn2_command)
222
+ }
214
223
  }
215
224
  end
216
225
  end
@@ -1,3 +1,3 @@
1
1
  module Mvn2chain
2
- VERSION = '1.0.2'
2
+ VERSION = '1.1.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mvn2chain
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Henderson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-14 00:00:00.000000000 Z
11
+ date: 2014-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler