jr-cli 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/bin/jr +1 -1
- data/features/json_processing.feature +19 -0
- data/lib/jr/cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e754520393fbf2f8eb6180843fd14885a97b47c
|
4
|
+
data.tar.gz: 910d8ad71b0a4eb8e473f5990c0214d24254dc7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 286fbdd9e5d8e4a902ac7991f1ea71a3a188675a043326b1c16a78058b6cca5b1e5ab61ec4dcb02cbc95000a55b4949a582bbc559e9a42dfae511ef91041c463
|
7
|
+
data.tar.gz: 604d275ca06629cabdc2836220d2507ea4513690521d39ae9182f38605d1cc18eff7fa9f878a6db0117dc8511d109af5be7aa6164e3f31584c37e77b077e8cc7
|
data/CHANGELOG.md
CHANGED
data/bin/jr
CHANGED
@@ -71,7 +71,7 @@ result = input_enumerator.instance_eval(jr_filter)
|
|
71
71
|
|
72
72
|
encoder = Yajl::Encoder.new(pretty: pretty)
|
73
73
|
print_json = ->(data) do
|
74
|
-
if raw_output
|
74
|
+
if raw_output && (data.is_a?(String) || data.is_a?(Symbol))
|
75
75
|
puts data
|
76
76
|
else
|
77
77
|
if color_output
|
@@ -268,6 +268,25 @@ Feature: JSON processing
|
|
268
268
|
|
269
269
|
"""
|
270
270
|
|
271
|
+
Scenario: Output symbols as raw output using --raw-output option
|
272
|
+
Given a file named "input.json" with:
|
273
|
+
"""
|
274
|
+
{
|
275
|
+
"foo": true,
|
276
|
+
"bar": true,
|
277
|
+
"baz": true
|
278
|
+
}
|
279
|
+
|
280
|
+
"""
|
281
|
+
When I run `jr --raw-output 'map(&:keys).unwrap' input.json`
|
282
|
+
Then the output should contain exactly:
|
283
|
+
"""
|
284
|
+
foo
|
285
|
+
bar
|
286
|
+
baz
|
287
|
+
|
288
|
+
"""
|
289
|
+
|
271
290
|
Scenario: Read each line as string using --raw-input option
|
272
291
|
Given a file named "input.json" with:
|
273
292
|
"""
|
data/lib/jr/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jr-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuya Takeyama
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yajl-ruby
|