dorian-each 0.1.3 → 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 +6 -6
  4. data/lib/dorian/each.rb +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2be10d5fefb239832c9dd583ace2ce3d973623f3251a48a3dda5ad76feb531bf
4
- data.tar.gz: 4bc5a62aebd64edac2c59f5347d955e72e0fafd83570b134d8ec4c927eecd9b2
3
+ metadata.gz: d4fa7f12467fae6b967f363f52f6d6ef9dfd43afd3f284714554189530d3a1ee
4
+ data.tar.gz: dadbb7ae44734f0e21908f6c56ff9c6038a3b70b031b72e24312dcc3aaa446a8
5
5
  SHA512:
6
- metadata.gz: 79b338ea8feec3dcb8b67d96b63685c9b15335f7cd7ca36d81ef53a025d9e59ac2022e8a234007934bdf9ba47a47c409ac0beaeda8d73e5c7e3436c1c91722f0
7
- data.tar.gz: 30431c9617d11397df9cf7e03c636de5cd239fd122f6d8dbdb0c717011823657a95ef2187b5f3d12422bb2e47f6b747606b33535389628404af7992ff53957a7
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.1.3
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-10-10 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,11 +21,11 @@ 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
28
- metadata: {}
27
+ metadata:
28
+ rubygems_mfa_required: 'true'
29
29
  post_install_message:
30
30
  rdoc_options: []
31
31
  require_paths:
@@ -41,7 +41,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
41
41
  - !ruby/object:Gem::Version
42
42
  version: '0'
43
43
  requirements: []
44
- rubygems_version: 3.2.22
44
+ rubygems_version: 3.4.10
45
45
  signing_key:
46
46
  specification_version: 4
47
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
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