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 +4 -4
- data/lib/sonar/cli/cli.rb +1 -1
- data/lib/sonar/version.rb +1 -1
- data/spec/sonar/cli_spec.rb +11 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd483db5d8395939220af92349ac4ee6e769a324
|
4
|
+
data.tar.gz: 5fc1f42beb33dd3301c8372c7426414f310a93b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71c312bef170b2d717a02fa7e6e7495fd2c7f63d94f646e88f4a04b63c17f5a4b0381a5247ea09a5f05d14b7741f8f994812748c0e9a0c633672739e0a4736ac
|
7
|
+
data.tar.gz: a883d0cf48e83e9a61b3b61135051a2efe84b1b38335191d80a4de85fc8a424dc47a38e99ccf0273b580c0703000c84dbb7d55f6b45a8a63a696af96837f325e
|
data/lib/sonar/cli/cli.rb
CHANGED
data/lib/sonar/version.rb
CHANGED
data/spec/sonar/cli_spec.rb
CHANGED
@@ -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)
|