dorian-parallel 0.2.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/parallel +11 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfba0dfc150be77a2e94518e0fd646854c99a63e7cc827d09ee7b0fb7b4cc184
|
4
|
+
data.tar.gz: 81097441dc78243c09aa0d3e409673cb9a98503162cac668aa850d378d225d2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b97aae3db16d4e7bf7f8e06f708775ae45dcb5917d7b2d14c359df22104bfd94adc5655023679b6c38dfac98c17b26b8af4e90d1839845c0856c16186ef65c6e
|
7
|
+
data.tar.gz: e6c1f41262ca9a458ac06a78fd423da13578280c3ef932284d7b6180fd3f663c4781803670481af626b5a22c6a6c6f8206f237bbe3771e4484b3bf3467b268db
|
data/bin/parallel
CHANGED
@@ -1,14 +1,19 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
+
require "dorian/arguments"
|
4
5
|
require "parallel"
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
7
|
+
parsed = Dorian::Arguments.parse(version: { alias: :v }, help: { alias: :h })
|
8
|
+
|
9
|
+
abort parsed.help if parsed.options.help
|
10
|
+
|
11
|
+
if parsed.options.version
|
12
|
+
abort File.read(File.expand_path("../../VERSION", __FILE__))
|
9
13
|
end
|
10
14
|
|
11
|
-
|
12
|
-
|
13
|
-
|
15
|
+
input = parsed.files.map { |file| File.read(file) }.join("\n")
|
16
|
+
input = $stdin.each_line.to_a.map(&:strip).join("\n") if input.empty?
|
17
|
+
Parallel.each(input.lines.map(&:strip)) do |it|
|
18
|
+
eval(parsed.arguments.join(" "))
|
14
19
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dorian-parallel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dorian Marié
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|