nexpose 0.6.5 → 0.7.0

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.
@@ -0,0 +1,45 @@
1
+ module Nexpose
2
+ class Tag
3
+
4
+ class Criterion < Nexpose::Criterion
5
+
6
+ def to_map
7
+ { 'operator' => operator,
8
+ 'values' => Array(value),
9
+ 'field_name' => field
10
+ }
11
+ end
12
+
13
+ def self.parse(json)
14
+ Criterion.new(json['field_name'],
15
+ json['operator'],
16
+ json['values'])
17
+ end
18
+
19
+ end
20
+
21
+ class Criteria < Nexpose::Criteria
22
+
23
+ def initialize(criteria = [], match = 'AND')
24
+ super(criteria, match)
25
+ end
26
+
27
+ def to_map
28
+ { 'criteria' => @criteria.map { |c| c.to_map },
29
+ 'operator' => @match
30
+ }
31
+ end
32
+
33
+ def self.parse(json)
34
+ ret = Criteria.new([], json['operator'])
35
+ json['criteria'].each do |c|
36
+ ret.criteria << Criterion.parse(c)
37
+ end
38
+ ret
39
+ end
40
+
41
+ end
42
+ end
43
+ end
44
+
45
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexpose
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - HD Moore
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-03-11 00:00:00.000000000 Z
13
+ date: 2014-03-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: librex
@@ -63,6 +63,7 @@ extensions: []
63
63
  extra_rdoc_files:
64
64
  - README.markdown
65
65
  files:
66
+ - COPYING
66
67
  - README.markdown
67
68
  - Rakefile
68
69
  - lib/README.md
@@ -77,12 +78,15 @@ files:
77
78
  - lib/nexpose/dag.rb
78
79
  - lib/nexpose/data_table.rb
79
80
  - lib/nexpose/device.rb
81
+ - lib/nexpose/discovery.rb
82
+ - lib/nexpose/discovery/filter.rb
80
83
  - lib/nexpose/engine.rb
81
84
  - lib/nexpose/error.rb
82
85
  - lib/nexpose/filter.rb
83
86
  - lib/nexpose/group.rb
84
87
  - lib/nexpose/maint.rb
85
88
  - lib/nexpose/manage.rb
89
+ - lib/nexpose/multi_tenant_user.rb
86
90
  - lib/nexpose/pool.rb
87
91
  - lib/nexpose/report.rb
88
92
  - lib/nexpose/report_template.rb
@@ -91,7 +95,10 @@ files:
91
95
  - lib/nexpose/scan_template.rb
92
96
  - lib/nexpose/shared_cred.rb
93
97
  - lib/nexpose/silo.rb
98
+ - lib/nexpose/silo_profile.rb
94
99
  - lib/nexpose/site.rb
100
+ - lib/nexpose/tag.rb
101
+ - lib/nexpose/tag/criteria.rb
95
102
  - lib/nexpose/ticket.rb
96
103
  - lib/nexpose/user.rb
97
104
  - lib/nexpose/util.rb