enparallel-bin 1.0.7 → 1.0.8

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
  SHA256:
3
- metadata.gz: 8081d1e4fe2054ccd7f26ff9241d43a77361c8bc635f8d28cfb1ab171978ad44
4
- data.tar.gz: a4f66a8a980602ae080878f07bf702086a607ceb64bf9a9adc0bd27a91fedb2b
3
+ metadata.gz: 86265b09bdd23652b3d3039c6f05a6a4f7e2704cf6d4a72e139c2d8b01d2d20a
4
+ data.tar.gz: eb64cbe3f9f310e852ac380e8780b1851d89e36b918ec91d7f5cf52a70c3ce91
5
5
  SHA512:
6
- metadata.gz: a474109ce87481792143ce537b074e06b1d0056c98daf1253425b2938c57df45d7f370ad2f6786afde0e2c9e4ed0381b6e9dcd077beb2add4458a12be346f2ca
7
- data.tar.gz: 66d84b2998e91022f2a385da33798d3f89f683e526e29459d9919054d4caf2d53b6484104422c4ecf61e3cd2582dd85455c402ff2b2dbb8e6256bcc7d9b9e464
6
+ metadata.gz: 81c85e040d396ddab4669c8a4d041e6251931998c5b99d46a030cd1a714613adb384a0135497bd9183584cdb395754f1817737bc7ee71bcde1a1ca5c154e430f
7
+ data.tar.gz: d30ef78977c32c99d89ff1cf70101177ff2452c46192ff8b5261e4426f76774e6d250c2b11f234f07544809a3eb301747e3551b009c96a676dc35fa8a3698584
data/bin/enparallel CHANGED
@@ -91,6 +91,6 @@ end
91
91
  begin
92
92
  Main.run
93
93
  rescue Docopt::Exit => e
94
- puts e.message
94
+ puts CLI.usage
95
95
  exit 1
96
96
  end
@@ -14,7 +14,14 @@ module Enparallel
14
14
  end
15
15
 
16
16
  def self.parse(argv, stdin)
17
- new(Docopt::docopt(usage, argv: argv, version: VERSION), stdin)
17
+ opts = Docopt::docopt(usage, argv: argv)
18
+
19
+ if opts['--version']
20
+ puts VERSION
21
+ exit
22
+ end
23
+
24
+ new(opts, stdin)
18
25
  end
19
26
 
20
27
  def self.basename
@@ -23,10 +30,11 @@ module Enparallel
23
30
 
24
31
  def self.usage
25
32
  <<~EOF
26
- #{'Usage:'.bold}
33
+ Usage:
27
34
  #{basename} [options] [--] <command>...
35
+ #{basename} ( --version | --help )
28
36
 
29
- #{'Description:'.bold}
37
+ Description:
30
38
  #{basename} operates by reading lines from standard input, and executing
31
39
  <command> once per entry, in parallel.
32
40
 
@@ -41,13 +49,13 @@ module Enparallel
41
49
 
42
50
  seq 1 10 | enparallel -- bash -c "sleep {} && echo Slept for {}"
43
51
 
44
- #{'Options:'.bold}
52
+ Options:
45
53
  -w, --workers <n> Batch into a pool of <n> workers [default: #{workers_default}].
46
54
  -p, --pick <type> Task-picking rule (see "Types") [default: #{pick_default}].
47
55
  -v, --version Version.
48
56
  -h, --help Help.
49
57
 
50
- #{'Types:'.bold}
58
+ Types:
51
59
  sequential The order in which the tasks were queued.
52
60
  random Random order.
53
61
  EOF
@@ -1,3 +1,3 @@
1
1
  module Enparallel
2
- VERSION = "1.0.7"
2
+ VERSION = "1.0.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enparallel-bin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - crdx
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-20 00:00:00.000000000 Z
11
+ date: 2021-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: require_all