dorian-each 0.2.0 → 0.3.1

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 +9 -2
  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: 438d02cd7a8f7b2742d058209d473b640648f29f6f28ceb957a5cd2bd46fe8a9
4
+ data.tar.gz: 74fbaa324937cdabd7e9269bc0735154a6b7d3c9b35895faaf1a9bda1b0a86d2
5
5
  SHA512:
6
- metadata.gz: 00c4c38338531668b2474bded1739fa4bdfc950d4e3509e948d72824a040001752c7abfa67dbba110be25ad6a220c19f335082d4c1e355a5922ab87f14bb2f2f
7
- data.tar.gz: a03942ebbaa10730192cd956e363565164f56c1d7a60350ca0dfd5d36d40e4a144b7a1cd8102c8a33cd779d57e66842e42a1155d747fcbf3be05eb90fbac782d
6
+ metadata.gz: cd77c7f5d6e3e02eebaea5ec2b4bd4ce89a4dc9627c7418effc3e880e395d1ff20089a59d3cc087e9e47b96cc8bc862ebab1dd45b5fe6be6250eaa11567c72f6
7
+ data.tar.gz: 4c8252a29c74a77a7414b4bd3beae900f027be6bcef9b3914a69b5d7580643dca033e6fb51c3cd72d3dea8d8362dbd7bbcb727ef7bc82180e011ea7d3b142d9d
data/bin/each CHANGED
@@ -1,4 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'dorian/each'
4
- Dorian::Each.run
3
+ if ARGV.size != 1 || ARGV[0] == "--help" || ARGV[0] == "-h"
4
+ puts "USAGE: ... | each CODE"
5
+ exit
6
+ end
7
+
8
+ STDIN.each_line do |it|
9
+ it.strip!
10
+ eval(ARGV.first)
11
+ 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.1
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-26 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