dorian-each 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +7 -0
  2. data/bin/dorian-each +4 -0
  3. data/lib/dorian/each.rb +15 -0
  4. metadata +45 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d899fea4d6ff935455cfe1e55204f6cd1163e8aae3eb09444aaf4d4ce001132a
4
+ data.tar.gz: 8878217e2f40de46337b88cf1423693b34d5c8f5b8225b66ff6a6327a8f796cf
5
+ SHA512:
6
+ metadata.gz: 87f095d0566521e47c5829326dcd02ee501f09c17ab3a46624d268822f53bd6608cf17464c5be419c4fdb5c866ddb4a416e80216f113e6bef5013420f68a9778
7
+ data.tar.gz: 94b493a3eacbdf681ee79826ec5b57bf8c383e88008ac3f6a28b87dd3015b22255d33f9038789403d9620dd9950f505a8b768bb1f66473fa7b7d0aa2cdb11ede
data/bin/dorian-each ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'dorian/each'
4
+ Dorian::Each.run
@@ -0,0 +1,15 @@
1
+ module Dorian
2
+ class Each
3
+ def self.run
4
+ if ARGV.size != 1
5
+ puts "USAGE: dorian-each CODE"
6
+ exit
7
+ end
8
+
9
+ STDIN.each_line do |line|
10
+ l = line
11
+ eval(ARGV.first)
12
+ end
13
+ end
14
+ end
15
+ end
metadata ADDED
@@ -0,0 +1,45 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dorian-each
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: 2021-10-08 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: e.g. `ls -l | dorian-each "puts l.split.first"`
14
+ email: dorian@dorianmarie.fr
15
+ executables:
16
+ - dorian-each
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - bin/dorian-each
21
+ - lib/dorian/each.rb
22
+ homepage: https://github.com/dorianmariefr/each
23
+ licenses:
24
+ - MIT
25
+ metadata: {}
26
+ post_install_message:
27
+ rdoc_options: []
28
+ require_paths:
29
+ - lib
30
+ required_ruby_version: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ required_rubygems_version: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ requirements: []
41
+ rubygems_version: 3.2.19
42
+ signing_key:
43
+ specification_version: 4
44
+ summary: Evaluates some code on each line of the input
45
+ test_files: []