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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 00eec36fcd51834547c2f0e9e54ad0f0860bae74
4
- data.tar.gz: 35b476caa8199ba8188c30853e0bb79960299bb9
3
+ metadata.gz: 7e754520393fbf2f8eb6180843fd14885a97b47c
4
+ data.tar.gz: 910d8ad71b0a4eb8e473f5990c0214d24254dc7d
5
5
  SHA512:
6
- metadata.gz: b0abaf2a791f0fc8a7bd4a2b436d63f5fc669790966cd5a3c8fd02a93dedcd7df26ada715435c5e1fe3be352ef2319293dab2484fe4f0c5957bf8476e11601b3
7
- data.tar.gz: 58c95c6787f9cdf5fe6746d2caf396ca253ffd9a4e8a373acfd862cf8fd201a5725380bca747b551a5e11e79f4df650e1ee132ce7a81e50b7b0884873f1133ae
6
+ metadata.gz: 286fbdd9e5d8e4a902ac7991f1ea71a3a188675a043326b1c16a78058b6cca5b1e5ab61ec4dcb02cbc95000a55b4949a582bbc559e9a42dfae511ef91041c463
7
+ data.tar.gz: 604d275ca06629cabdc2836220d2507ea4513690521d39ae9182f38605d1cc18eff7fa9f878a6db0117dc8511d109af5be7aa6164e3f31584c37e77b077e8cc7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## [0.5.1] - 2017-07-02
4
+
5
+ ### Fixed
6
+
7
+ * `--raw-output` option to show `Symbol` as a raw `String` [#19](https://github.com/yuya-takeyama/jr/pull/19)
8
+
3
9
  ## [0.5.0] - 2016-12-28
4
10
 
5
11
  ### 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 and data.is_a? String
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
  """
@@ -1,5 +1,5 @@
1
1
  module Jr
2
2
  module Cli
3
- VERSION = "0.5.0"
3
+ VERSION = "0.5.1"
4
4
  end
5
5
  end
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.0
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: 2016-12-27 00:00:00.000000000 Z
11
+ date: 2017-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yajl-ruby