tenable-ruby 0.4.0 → 0.4.1

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tenable-ruby.rb +6 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a0ad4945418eed9203a963b29176367b98faa3edd12883d97cc49d8cdc893fba
4
- data.tar.gz: 24c17741e683b65c0c3c2362d7414f099153a7222bad4af37b2f3cb54b99523c
3
+ metadata.gz: e2231c6ad080a26cb3bc60ccc22754bca82e48f3a3f44c4a660188174d785303
4
+ data.tar.gz: f0249380a5a091595c10c5a2b0025866cb3b78f27b993e46f091c9b213d09428
5
5
  SHA512:
6
- metadata.gz: 4f1a50612125ce469b30e90ec69bc88b307646a1765841564fd127a539dfd8e1c8004fd82ff9a6d6dec0832e298c756edaa4dc67abd85db54039df0d0ddb627e
7
- data.tar.gz: 9cd6b2b9b3462a0750104aded927326facfe1efe097ac0520a3118baf3b836803c69145600bac9395145f10f5aa70f463170cb43f59d7afd2278fe7edea70bc8
6
+ metadata.gz: e4d9ca21d8b64969a924a3ca5ed71a1cb7c93bfffbb69db11917427f72a4cf194e9b9290887436c798ddd866e7bf736aebcc20406c7f789b341d64d157625422
7
+ data.tar.gz: 7440641a013b70196b7105f67da2c5e1c83bd98fe69ea3161bad3a9290d661f10df11cdc1e9b5cd0c116dab6311ccb11568e535f34f724b708f94508870e4aa1
@@ -570,7 +570,12 @@ module TenableRuby
570
570
  #
571
571
  # Reference: https://developer.tenable.com/reference#scans-get-latest-status
572
572
  def scan_status(scan_id)
573
- http_get(:uri => "/scans/#{scan_id}/latest-status", :fields => header)['status']
573
+ response = http_get(:uri => "/scans/#{scan_id}/latest-status", :fields => header)
574
+ if response.is_a?(Hash) and response.has_key?('status')
575
+ response['status']
576
+ else
577
+ raise TenableRuby::Error::TenableError, "Tenable.io did not return a valid status response"
578
+ end
574
579
  end
575
580
 
576
581
  # Parse the scan status command to determine if a scan has finished
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tenable-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Craston
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-24 00:00:00.000000000 Z
11
+ date: 2020-04-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |-
14
14
  Ruby library for communicating with the tenable.io API.