sonar-client 0.0.4 → 0.0.5

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: 7d8b3759eb0d676fdbcfff3fac747291e8371b0d
4
- data.tar.gz: 8f28065237179666a832d1cf3e6f3f3f4a3dc91e
3
+ metadata.gz: dd483db5d8395939220af92349ac4ee6e769a324
4
+ data.tar.gz: 5fc1f42beb33dd3301c8372c7426414f310a93b4
5
5
  SHA512:
6
- metadata.gz: c34e45704359cdd73976d7982e71e24e9791a7af1ada099411f6d40e8325c020de6ab10adf2c570d54c275d3f172d9f4f3ab2076202ef6babd1a2a83cace7fab
7
- data.tar.gz: a913134e524d16c906ca1d92370737ddc4d92e3fc1d71a2d9229e6e090fed248c9d2c9fbda1c8777da6ef3e1ceb14080379bafa63353dbe88afc488cf179d9f2
6
+ metadata.gz: 71c312bef170b2d717a02fa7e6e7495fd2c7f63d94f646e88f4a04b63c17f5a4b0381a5247ea09a5f05d14b7741f8f994812748c0e9a0c633672739e0a4736ac
7
+ data.tar.gz: a883d0cf48e83e9a61b3b61135051a2efe84b1b38335191d80a4de85fc8a424dc47a38e99ccf0273b580c0703000c84dbb7d55f6b45a8a63a696af96837f325e
@@ -86,7 +86,7 @@ module Sonar
86
86
  e = safe_parse_json(e)
87
87
  end
88
88
  else
89
- v = safe_parse_json(v)
89
+ item[k] = safe_parse_json(v)
90
90
  end
91
91
  end
92
92
  end
@@ -1,3 +1,3 @@
1
1
  module Sonar
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -37,6 +37,17 @@ describe Sonar::CLI do
37
37
  expect(JSON.parse(output)['collection'].first['details'].first['subject']['ST']).to eq('California')
38
38
  end
39
39
  end
40
+ context 'client that returns processed reply with nested json' do
41
+ before do
42
+ allow_any_instance_of(Sonar::Client).to receive(:search).and_return(
43
+ Sonar::Client.new.search(processed: '8.8.8.')
44
+ )
45
+ end
46
+ it 'parses the nested value as a string' do
47
+ output = run_command('search processed 8.8.8.')
48
+ expect(JSON.parse(output)['collection'].first['value']['ip']).to eq('8.8.8.8')
49
+ end
50
+ end
40
51
  end
41
52
 
42
53
  def run_command(args)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sonar-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Deardorff & HD Moore