dorian-parallel 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/bin/parallel +14 -0
  3. metadata +62 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 2970677719471f5e06eb97691337e6c8c880625d621fe0382c3b971c59fbcbee
4
+ data.tar.gz: 59e6fd927bae79f89200a31a29e70d6e1b1c2c9d47a946102959db46f35b8901
5
+ SHA512:
6
+ metadata.gz: f449efb3daee749b66261802be471237f0c7dde9506772be63f8d4614f63909e525700b35e684689bbdc9146477e56215636d055ff72b85d4f853edec59b2951
7
+ data.tar.gz: 51cbb83c45d35797ac158f974345079724fc0a890226b5c926146e379ed4167cd9d7c3f5abef6a954147f71d68be93feb2a7bd91b759f5cc65d11ad4ec99b120
data/bin/parallel ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "parallel"
5
+
6
+ if ARGV.size != 1 || ARGV[0] == "--help" || ARGV[0] == "-h"
7
+ puts "USAGE: ... | parallel CODE"
8
+ exit
9
+ end
10
+
11
+ Parallel.each($stdin.each_line.to_a) do |it|
12
+ it.strip!
13
+ eval(ARGV.first)
14
+ end
metadata ADDED
@@ -0,0 +1,62 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dorian-parallel
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Dorian Marié
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-02-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: parallel
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: |-
28
+ Evaluates some code on each line of the input in parallel
29
+
30
+ e.g. `ls -l | parallel "puts it.split.first"`
31
+ email: dorian@dorianmarie.com
32
+ executables:
33
+ - parallel
34
+ extensions: []
35
+ extra_rdoc_files: []
36
+ files:
37
+ - bin/parallel
38
+ homepage: https://github.com/dorianmariecom/dorian-parallel
39
+ licenses:
40
+ - MIT
41
+ metadata:
42
+ rubygems_mfa_required: 'true'
43
+ post_install_message:
44
+ rdoc_options: []
45
+ require_paths:
46
+ - lib
47
+ required_ruby_version: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ required_rubygems_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ requirements: []
58
+ rubygems_version: 3.5.3
59
+ signing_key:
60
+ specification_version: 4
61
+ summary: Evaluates some code on each line of the input in parallel
62
+ test_files: []