metasploit-model 1.0.0.pre.rails.pre.4.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +2 -4
- data/CHANGELOG.md +6 -0
- data/CONTRIBUTING.md +9 -49
- data/Gemfile +1 -6
- data/RELEASING.md +89 -0
- data/UPGRADING.md +1 -0
- data/lib/metasploit/model/version.rb +23 -11
- data/metasploit-model.gemspec +3 -1
- data/spec/app/models/metasploit/model/association/reflection_spec.rb +5 -7
- data/spec/app/models/metasploit/model/search/group/base_spec.rb +2 -4
- data/spec/app/models/metasploit/model/search/group/intersection_spec.rb +2 -4
- data/spec/app/models/metasploit/model/search/group/union_spec.rb +2 -4
- data/spec/app/models/metasploit/model/search/operation/association_spec.rb +7 -9
- data/spec/app/models/metasploit/model/search/operation/base_spec.rb +5 -7
- data/spec/app/models/metasploit/model/search/operation/boolean_spec.rb +14 -11
- data/spec/app/models/metasploit/model/search/operation/date_spec.rb +6 -8
- data/spec/app/models/metasploit/model/search/operation/group/base_spec.rb +12 -14
- data/spec/app/models/metasploit/model/search/operation/group/intersection_spec.rb +2 -4
- data/spec/app/models/metasploit/model/search/operation/group/union_spec.rb +2 -4
- data/spec/app/models/metasploit/model/search/operation/integer_spec.rb +2 -4
- data/spec/app/models/metasploit/model/search/operation/null_spec.rb +4 -6
- data/spec/app/models/metasploit/model/search/operation/set/integer_spec.rb +2 -4
- data/spec/app/models/metasploit/model/search/operation/set/string_spec.rb +2 -4
- data/spec/app/models/metasploit/model/search/operation/set_spec.rb +4 -6
- data/spec/app/models/metasploit/model/search/operation/string_spec.rb +2 -4
- data/spec/app/models/metasploit/model/search/operator/association_spec.rb +6 -8
- data/spec/app/models/metasploit/model/search/operator/attribute_spec.rb +13 -15
- data/spec/app/models/metasploit/model/search/operator/base_spec.rb +3 -5
- data/spec/app/models/metasploit/model/search/operator/delegation_spec.rb +13 -11
- data/spec/app/models/metasploit/model/search/operator/group/base_spec.rb +5 -7
- data/spec/app/models/metasploit/model/search/operator/group/intersection_spec.rb +3 -5
- data/spec/app/models/metasploit/model/search/operator/group/union_spec.rb +3 -5
- data/spec/app/models/metasploit/model/search/operator/null_spec.rb +5 -7
- data/spec/app/models/metasploit/model/search/operator/single_spec.rb +26 -28
- data/spec/app/models/metasploit/model/search/query_spec.rb +48 -50
- data/spec/app/models/metasploit/model/visitation/visitor_spec.rb +7 -9
- data/spec/app/validators/ip_format_validator_spec.rb +7 -9
- data/spec/app/validators/nil_validator_spec.rb +3 -5
- data/spec/app/validators/parameters_validator_spec.rb +29 -29
- data/spec/app/validators/password_is_strong_validator_spec.rb +17 -19
- data/spec/lib/metasploit/model/association/error_spec.rb +1 -3
- data/spec/lib/metasploit/model/association_spec.rb +8 -10
- data/spec/lib/metasploit/model/base_spec.rb +3 -5
- data/spec/lib/metasploit/model/engine_spec.rb +48 -11
- data/spec/lib/metasploit/model/file_spec.rb +3 -5
- data/spec/lib/metasploit/model/invalid_spec.rb +7 -9
- data/spec/lib/metasploit/model/login/status_spec.rb +1 -3
- data/spec/lib/metasploit/model/nilify_blanks_spec.rb +11 -13
- data/spec/lib/metasploit/model/realm/key_spec.rb +15 -17
- data/spec/lib/metasploit/model/search/association/tree_spec.rb +3 -5
- data/spec/lib/metasploit/model/search/association_spec.rb +2 -4
- data/spec/lib/metasploit/model/search/attribute_spec.rb +6 -8
- data/spec/lib/metasploit/model/search/operation/value/integer_spec.rb +1 -3
- data/spec/lib/metasploit/model/search/operation/value/string_spec.rb +1 -3
- data/spec/lib/metasploit/model/search/operation_spec.rb +11 -13
- data/spec/lib/metasploit/model/search/operator/help_spec.rb +1 -3
- data/spec/lib/metasploit/model/search/with_spec.rb +7 -9
- data/spec/lib/metasploit/model/search_spec.rb +11 -13
- data/spec/lib/metasploit/model/spec/error_spec.rb +2 -4
- data/spec/lib/metasploit/model/spec/i18n_exception_handler_spec.rb +5 -7
- data/spec/lib/metasploit/model/spec/pathname_collision_spec.rb +4 -6
- data/spec/lib/metasploit/model/spec_spec.rb +9 -7
- data/spec/lib/metasploit/model/translation_spec.rb +10 -12
- data/spec/lib/metasploit/model/version_spec.rb +3 -139
- data/spec/lib/metasploit/model/visitation/visit_spec.rb +28 -26
- data/spec/lib/metasploit/model_spec.rb +4 -0
- data/spec/matchers/validate_nilness_of_spec.rb +0 -2
- data/spec/spec_helper.rb +80 -10
- data/spec/support/shared/contexts/metasploit/model/search/operator/union/children.rb +1 -1
- data/spec/support/shared/examples/metasploit/model/search/operation/value/integer.rb +8 -8
- data/spec/support/shared/examples/metasploit/model/search/operation/value/string.rb +5 -5
- data/spec/support/shared/examples/metasploit/model/search/operator/help.rb +18 -16
- data/spec/support/shared/examples/metasploit/model/translation.rb +4 -4
- data/spec/support/shared/examples/search/query.rb +3 -3
- data/spec/support/shared/examples/search_association.rb +2 -2
- data/spec/support/shared/examples/search_attribute.rb +3 -3
- data/spec/support/shared/examples/search_with.rb +3 -3
- metadata +43 -4
@@ -1,4 +1,4 @@
|
|
1
|
-
shared_examples_for 'Metasploit::Model::Translation' do |options={}|
|
1
|
+
RSpec.shared_examples_for 'Metasploit::Model::Translation' do |options={}|
|
2
2
|
options.assert_valid_keys(:metasploit_model_ancestor)
|
3
3
|
|
4
4
|
metasploit_model_ancestor = options.fetch(:metasploit_model_ancestor)
|
@@ -14,7 +14,7 @@ shared_examples_for 'Metasploit::Model::Translation' do |options={}|
|
|
14
14
|
metasploit_model_ancestor.instance_variable_get :@_dependencies
|
15
15
|
end
|
16
16
|
|
17
|
-
it {
|
17
|
+
it { is_expected.to include Metasploit::Model::Translation }
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -24,7 +24,7 @@ shared_examples_for 'Metasploit::Model::Translation' do |options={}|
|
|
24
24
|
base_class.i18n_scope
|
25
25
|
end
|
26
26
|
|
27
|
-
it {
|
27
|
+
it { is_expected.to eq('metasploit.model') }
|
28
28
|
end
|
29
29
|
|
30
30
|
context 'lookup_ancestors' do
|
@@ -32,6 +32,6 @@ shared_examples_for 'Metasploit::Model::Translation' do |options={}|
|
|
32
32
|
base_class.lookup_ancestors
|
33
33
|
end
|
34
34
|
|
35
|
-
it {
|
35
|
+
it { is_expected.to include metasploit_model_ancestor }
|
36
36
|
end
|
37
37
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
shared_examples_for 'search query' do |options={}|
|
1
|
+
RSpec.shared_examples_for 'search query' do |options={}|
|
2
2
|
options.assert_valid_keys(:formatted_operator)
|
3
3
|
|
4
4
|
formatted_operator = options.fetch(:formatted_operator)
|
@@ -35,8 +35,8 @@ shared_examples_for 'search query' do |options={}|
|
|
35
35
|
}
|
36
36
|
end
|
37
37
|
|
38
|
-
it {
|
39
|
-
it {
|
38
|
+
it { is_expected.not_to be_nil }
|
39
|
+
it { is_expected.to be_valid }
|
40
40
|
end
|
41
41
|
end
|
42
42
|
end
|
@@ -1,5 +1,5 @@
|
|
1
|
-
shared_examples_for 'search_association' do |association|
|
2
|
-
context association do
|
1
|
+
RSpec.shared_examples_for 'search_association' do |association|
|
2
|
+
context association.to_s do
|
3
3
|
let(:association_operators) do
|
4
4
|
base_class.search_operator_by_name.select { |_name, operator|
|
5
5
|
operator.respond_to?(:association) and operator.association == association
|
@@ -1,4 +1,4 @@
|
|
1
|
-
shared_examples_for 'search_attribute' do |name, options={}|
|
1
|
+
RSpec.shared_examples_for 'search_attribute' do |name, options={}|
|
2
2
|
options.assert_valid_keys(:type)
|
3
3
|
type = options.fetch(:type)
|
4
4
|
|
@@ -19,8 +19,8 @@ shared_examples_for 'search_attribute' do |name, options={}|
|
|
19
19
|
base_class.send(attribute_set_method_name)
|
20
20
|
end
|
21
21
|
|
22
|
-
it {
|
23
|
-
it {
|
22
|
+
it { is_expected.to be_a Set }
|
23
|
+
it { is_expected.not_to be_empty }
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -1,12 +1,12 @@
|
|
1
|
-
shared_examples_for 'search_with' do |operation_class, options={}|
|
1
|
+
RSpec.shared_examples_for 'search_with' do |operation_class, options={}|
|
2
2
|
name = options.fetch(:name)
|
3
3
|
|
4
|
-
context name do
|
4
|
+
context name.to_s do
|
5
5
|
subject(:with_operator) do
|
6
6
|
base_class.search_with_operator_by_name[name]
|
7
7
|
end
|
8
8
|
|
9
|
-
it {
|
9
|
+
it { is_expected.to be_a operation_class }
|
10
10
|
|
11
11
|
options.each do |key, value|
|
12
12
|
# skip :name since it use used to look up operator, so it's already been checked or with_operator would be `nil`
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metasploit-model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luke Imhoff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: metasploit-version
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.1.3
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.1.3
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: metasploit-yard
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +80,26 @@ dependencies:
|
|
66
80
|
- - "<"
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: 0.8.7.4
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: activemodel
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 4.0.9
|
90
|
+
- - "<"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: 4.1.0
|
93
|
+
type: :runtime
|
94
|
+
prerelease: false
|
95
|
+
version_requirements: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: 4.0.9
|
100
|
+
- - "<"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 4.1.0
|
69
103
|
- !ruby/object:Gem::Dependency
|
70
104
|
name: activesupport
|
71
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,11 +168,14 @@ files:
|
|
134
168
|
- ".simplecov"
|
135
169
|
- ".travis.yml"
|
136
170
|
- ".yardopts"
|
171
|
+
- CHANGELOG.md
|
137
172
|
- CONTRIBUTING.md
|
138
173
|
- Gemfile
|
139
174
|
- LICENSE
|
140
175
|
- README.md
|
176
|
+
- RELEASING.md
|
141
177
|
- Rakefile
|
178
|
+
- UPGRADING.md
|
142
179
|
- app/models/metasploit/model/association/reflection.rb
|
143
180
|
- app/models/metasploit/model/search/group/base.rb
|
144
181
|
- app/models/metasploit/model/search/group/intersection.rb
|
@@ -310,6 +347,7 @@ files:
|
|
310
347
|
- spec/lib/metasploit/model/translation_spec.rb
|
311
348
|
- spec/lib/metasploit/model/version_spec.rb
|
312
349
|
- spec/lib/metasploit/model/visitation/visit_spec.rb
|
350
|
+
- spec/lib/metasploit/model_spec.rb
|
313
351
|
- spec/matchers/validate_nilness_of_spec.rb
|
314
352
|
- spec/spec_helper.rb
|
315
353
|
- spec/support/matchers/allow_attribute.rb
|
@@ -339,9 +377,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
339
377
|
version: '2.1'
|
340
378
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
341
379
|
requirements:
|
342
|
-
- - "
|
380
|
+
- - ">="
|
343
381
|
- !ruby/object:Gem::Version
|
344
|
-
version:
|
382
|
+
version: '0'
|
345
383
|
requirements: []
|
346
384
|
rubyforge_project:
|
347
385
|
rubygems_version: 2.4.3
|
@@ -441,6 +479,7 @@ test_files:
|
|
441
479
|
- spec/lib/metasploit/model/translation_spec.rb
|
442
480
|
- spec/lib/metasploit/model/version_spec.rb
|
443
481
|
- spec/lib/metasploit/model/visitation/visit_spec.rb
|
482
|
+
- spec/lib/metasploit/model_spec.rb
|
444
483
|
- spec/matchers/validate_nilness_of_spec.rb
|
445
484
|
- spec/spec_helper.rb
|
446
485
|
- spec/support/matchers/allow_attribute.rb
|