dorian-csv-each 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/csv-each +6 -4
- metadata +5 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 440e5a06b361853b93805090439f123723b4e82b8e64d0a66c50f90ec352f8ad
|
|
4
|
+
data.tar.gz: 92863c9542f2b3372d5e223ca8dccb65f21cba4ba0f8c1cf592194c9cc167396
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1d97ef1b51b168c8feeb42fd951365cedb85f0c1d2bc0003a3e2f413aac185b1da3b459434b5bb72e474f98ccb0844af56b1a15d75562321002f67400c39b86c
|
|
7
|
+
data.tar.gz: e0997468eba3092217cc1159c1b97e5590c23a72df0bb6ab66726d6a7c23bae54968d128caffcd95f5b433be0caaa212f70a9b5664af19b04a82ad0278694b4d
|
data/bin/csv-each
CHANGED
|
@@ -21,7 +21,9 @@ argv =
|
|
|
21
21
|
|
|
22
22
|
abort "See --help" if argv.size != 1
|
|
23
23
|
|
|
24
|
-
CSV
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
CSV
|
|
25
|
+
.parse($stdin.each_line.to_a.join, headers: options[:headers])
|
|
26
|
+
.each do |it|
|
|
27
|
+
it = options[:headers] ? it.to_h.with_indifferent_access : it.to_a
|
|
28
|
+
eval(argv.first)
|
|
29
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dorian-csv-each
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dorian Marié
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-08-
|
|
11
|
+
date: 2024-08-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: csv
|
|
@@ -25,7 +25,7 @@ dependencies:
|
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
28
|
+
name: dorian-to_struct
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - ">="
|
|
@@ -38,10 +38,7 @@ dependencies:
|
|
|
38
38
|
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
|
-
description:
|
|
42
|
-
Evaluates some code on each line of the csv input
|
|
43
|
-
|
|
44
|
-
e.g. `cat users.csv | csv-each --headers "puts it[:name]"`
|
|
41
|
+
description: evaluates some ruby code on each line of the csv input
|
|
45
42
|
email: dorian@dorianmarie.com
|
|
46
43
|
executables:
|
|
47
44
|
- csv-each
|
|
@@ -72,5 +69,5 @@ requirements: []
|
|
|
72
69
|
rubygems_version: 3.5.11
|
|
73
70
|
signing_key:
|
|
74
71
|
specification_version: 4
|
|
75
|
-
summary:
|
|
72
|
+
summary: evaluates some ruby code on each line of the csv input
|
|
76
73
|
test_files: []
|