controls 2.0.0.beta.4 → 2.0.0.beta.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b71679e3befcb66e4907c2bd40e9b0108b6ced8
4
- data.tar.gz: ed1b98a103b1f5db214a93df36b4cc4f741a7ecf
3
+ metadata.gz: 1b96f21b23b7cc17157506dbd7504ea8a3392d15
4
+ data.tar.gz: d3cbaed6b09011974930d46f7a74988f4dc3055a
5
5
  SHA512:
6
- metadata.gz: 3ec3cdc04930764dbdd959543334093375b0829897e4a7119e8540e460e458b02d6966e4cc3cf5c29ec5754796ebde9141aa4263b80eef596b1a15552376e908
7
- data.tar.gz: 4e11350d81835cb84fe412da09ebffac6aae668374ac50538af9095f5f02077ce0935a80a36304c47faf6978ebbbd944be64dce6d99b8f147f6f0d3b7b960921
6
+ metadata.gz: beb26b319e32c23add78b3b7e2206b1c60cb8ecadd24a3a9b6be6f5f46f773cfe876fa968438e5ec31805edf59d12640cd8ecf76c8752c44aa4bf04ff74aee47
7
+ data.tar.gz: 0d2248387d0623c27d2ad12ba428102b33e3e69ed43e0eaeffd620401f90df63471658b6c380c227e661b71a8a097101ef6845abe53abdd99e4ef11b0298c5b2
@@ -1,7 +1,7 @@
1
1
  module Dish
2
2
  class Plate
3
3
  def methods(all = true)
4
- valid_keys = as_hash.keys.map do |key|
4
+ valid_keys = to_h.keys.map do |key|
5
5
  key.to_s.gsub(/([^A-Z])([A-Z]+)/, '\1_\2').downcase.to_sym
6
6
  end
7
7
 
@@ -9,7 +9,7 @@ module Dish
9
9
  end
10
10
 
11
11
  def inspect
12
- hash = as_hash
12
+ hash = to_h
13
13
  keys_to_snake_case = hash.keys.map { |key|
14
14
  [key, key.to_s.gsub(/([^A-Z])([A-Z]+)/, '\1_\2').downcase]
15
15
  }
@@ -22,10 +22,10 @@ module Dish
22
22
  "#<#{self.class}: #{vars.join(', ')}>"
23
23
  end
24
24
 
25
- alias_method :to_h, :as_hash
25
+ alias_method :to_h, :to_h
26
26
 
27
27
  def to_json(*args)
28
- as_hash.to_json(*args)
28
+ to_h.to_json(*args)
29
29
  end
30
30
 
31
31
  private
@@ -1,4 +1,4 @@
1
1
  module Controls
2
2
  # The version of the Controls gem
3
- VERSION = '2.0.0.beta.4'
3
+ VERSION = '2.0.0.beta.5'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: controls
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta.4
4
+ version: 2.0.0.beta.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erran Carey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-16 00:00:00.000000000 Z
11
+ date: 2015-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dish
@@ -95,7 +95,6 @@ files:
95
95
  - LICENSE.md
96
96
  - README.md
97
97
  - Rakefile
98
- - apiary.apib
99
98
  - controls.gemspec
100
99
  - lib/controls.rb
101
100
  - lib/controls/authentication.rb
@@ -1,61 +0,0 @@
1
- FORMAT: 1A
2
- HOST: https://nexpose.local:3780/insight/controls/api/
3
-
4
- # ControlsInsight
5
-
6
- # Group Assessments
7
- ## Assessment Collection [/assessments]
8
- ### Assessments [GET]
9
-
10
- + Response 200 (application/json)
11
-
12
- [
13
- {
14
- "id": 1,
15
- "assessing": false,
16
- "highRiskAssetCount": 0,
17
- "mediumRiskAssetCount": 24,
18
- "lowRiskAssetCount": 0,
19
- "totalAssetCount": 24,
20
- "overallRiskScore": 4.004146038088617,
21
- "timestamp": 1393184605912
22
- }
23
- ]
24
-
25
- ## Assessment [/assessments/{assessment_id}]
26
- ### Assessment by ID [GET]
27
-
28
- + Parameters
29
- + assessment_id (optional, integer, `1`) ... The ID of the assessment to retreive.
30
-
31
- + Response 200 (application/json)
32
-
33
- {
34
- "id": 1,
35
- "assessing": false,
36
- "highRiskAssetCount": 0,
37
- "mediumRiskAssetCount": 24,
38
- "lowRiskAssetCount": 0,
39
- "totalAssetCount": 24,
40
- "overallRiskScore": 4.004146038088617,
41
- "timestamp": 1393184605912
42
- }
43
-
44
- # Group Search
45
- ## Assets [/assets/search?query={query}]
46
- ### Asset Search [GET]
47
-
48
- + Parameters
49
- + query (required, string, `10.4.19`) ... The free text query. This can be a full/partial hostname or IP address.
50
-
51
- + Response 200 (application/json)
52
-
53
- {
54
- "resources": {
55
- "uuid": "db899a57-347c-4df9-9ce2-6932dc4adf38>",
56
- "riskScore": 5.554266115196547,
57
- "riskLevel": "MEDIUM",
58
- "hostName": "CMMNCTR2K7R2-U",
59
- "ipaddress": "10.4.19.25"
60
- }
61
- }