dorian-each 0.2.0 → 0.3.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 +4 -4
  2. data/bin/each +10 -1
  3. metadata +4 -5
  4. data/lib/dorian/each.rb +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 845c92960d2b59f826aa3b4e7c004519a74c68ce2df063c1269c660cb83a7e5c
4
- data.tar.gz: ad41c4fe64dd7656a2a91dd648d4c629ef0d2de1d523b9f74f6b5cf746e71eff
3
+ metadata.gz: d4fa7f12467fae6b967f363f52f6d6ef9dfd43afd3f284714554189530d3a1ee
4
+ data.tar.gz: dadbb7ae44734f0e21908f6c56ff9c6038a3b70b031b72e24312dcc3aaa446a8
5
5
  SHA512:
6
- metadata.gz: 00c4c38338531668b2474bded1739fa4bdfc950d4e3509e948d72824a040001752c7abfa67dbba110be25ad6a220c19f335082d4c1e355a5922ab87f14bb2f2f
7
- data.tar.gz: a03942ebbaa10730192cd956e363565164f56c1d7a60350ca0dfd5d36d40e4a144b7a1cd8102c8a33cd779d57e66842e42a1155d747fcbf3be05eb90fbac782d
6
+ metadata.gz: 5050c5d61e4b7878226fcf1a028ce2aa8e40d8fa094b2ee08ac4b6a2336efd268b3fe78608c0fab283f55a750b6587306fb8ab978a3ef76f3af83211e6f6fd33
7
+ data.tar.gz: c692544da3c8a9eedb15e2f482c4398dae9b135282e54ba4de1a62d84670b661e9e53738c65e343ce4cc1b73b56691cc770b4d2a7d11ffec0c03831fd1281f93
data/bin/each CHANGED
@@ -1,4 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'dorian/each'
4
- Dorian::Each.run
4
+
5
+ if ARGV.size != 1 || ARGV[0] == "--help" || ARGV[0] == "-h"
6
+ puts "USAGE: ... | each CODE"
7
+ exit
8
+ end
9
+
10
+ STDIN.each_line do |it|
11
+ it.strip!
12
+ eval(ARGV.first)
13
+ end
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dorian-each
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.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: 2021-11-19 00:00:00.000000000 Z
11
+ date: 2024-01-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |-
14
14
  Evaluates some code on each line of the input
15
15
 
16
- e.g. `ls -l | each "puts l.split.first"`
16
+ e.g. `ls -l | each "puts it.split.first"`
17
17
  email: dorian@dorianmarie.fr
18
18
  executables:
19
19
  - each
@@ -21,7 +21,6 @@ extensions: []
21
21
  extra_rdoc_files: []
22
22
  files:
23
23
  - bin/each
24
- - lib/dorian/each.rb
25
24
  homepage: https://github.com/dorianmariefr/each
26
25
  licenses:
27
26
  - MIT
@@ -42,7 +41,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
42
41
  - !ruby/object:Gem::Version
43
42
  version: '0'
44
43
  requirements: []
45
- rubygems_version: 3.2.22
44
+ rubygems_version: 3.4.10
46
45
  signing_key:
47
46
  specification_version: 4
48
47
  summary: Evaluates some code on each line of the input
data/lib/dorian/each.rb DELETED
@@ -1,15 +0,0 @@
1
- module Dorian
2
- class Each
3
- def self.run
4
- if ARGV.size != 1 || ARGV[0] == "--help" || ARGV[0] == "-h"
5
- puts "USAGE: ... | 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