metasploit_data_models 2.0.13 → 2.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/app/models/mdm/service.rb +3 -0
- data/lib/metasploit_data_models/version.rb +1 -1
- data/spec/app/models/mdm/service_spec.rb +33 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e9e82390876e9b9ae870c927f96a7602c26fbfa
|
4
|
+
data.tar.gz: d6d4b533e723dc98cb52623c8036cdd5ac57d49a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 551d6d7340d8c66dddeb5f8e530ea5e21f408da8945b8d25fed323c006f52a0df9f7e36399f87340bfbd281ff2ba288b42973dd97ba895d034c2d99a18c2c882
|
7
|
+
data.tar.gz: c77c464e15d3d4d41c336244842ddd2ba5c7cf6b41934114230a551ed3ddee1e9ca8caabe136f0bc032a1a9428d96d8dbffa5eeacd0ab9cff2afa0ad48ad28ad
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/app/models/mdm/service.rb
CHANGED
@@ -176,6 +176,39 @@ RSpec.describe Mdm::Service, type: :model do
|
|
176
176
|
end
|
177
177
|
|
178
178
|
context "validations" do
|
179
|
+
|
180
|
+
context 'port' do
|
181
|
+
it 'should require a port' do
|
182
|
+
portless_service= FactoryGirl.build(:mdm_service, :port => nil)
|
183
|
+
expect(portless_service).not_to be_valid
|
184
|
+
expect(portless_service.errors[:port]).to include("is not a number")
|
185
|
+
end
|
186
|
+
|
187
|
+
it 'should not be valid for out-of-range numbers' do
|
188
|
+
out_of_range = FactoryGirl.build(:mdm_service, :port => 70000)
|
189
|
+
expect(out_of_range).not_to be_valid
|
190
|
+
expect(out_of_range.errors[:port]).to include("is not included in the list")
|
191
|
+
end
|
192
|
+
|
193
|
+
it 'should not be valid for port 0' do
|
194
|
+
out_of_range = FactoryGirl.build(:mdm_service, :port => 0)
|
195
|
+
expect(out_of_range).not_to be_valid
|
196
|
+
expect(out_of_range.errors[:port]).to include("is not included in the list")
|
197
|
+
end
|
198
|
+
|
199
|
+
it 'should not be valid for decimal numbers' do
|
200
|
+
out_of_range = FactoryGirl.build(:mdm_service, :port => 5.67)
|
201
|
+
expect(out_of_range).not_to be_valid
|
202
|
+
expect(out_of_range.errors[:port]).to include("must be an integer")
|
203
|
+
end
|
204
|
+
|
205
|
+
it 'should not be valid for a negative number' do
|
206
|
+
out_of_range = FactoryGirl.build(:mdm_service, :port => -8)
|
207
|
+
expect(out_of_range).not_to be_valid
|
208
|
+
expect(out_of_range.errors[:port]).to include("is not included in the list")
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
179
212
|
subject(:mdm_service) {
|
180
213
|
FactoryGirl.build(:mdm_service)
|
181
214
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metasploit_data_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Huckins
|
@@ -91,7 +91,7 @@ cert_chain:
|
|
91
91
|
G+Hmcg1v810agasPdoydE0RTVZgEOOMoQ07qu7JFXVWZ9ZQpHT7qJATWL/b2csFG
|
92
92
|
8mVuTXnyJOKRJA==
|
93
93
|
-----END CERTIFICATE-----
|
94
|
-
date:
|
94
|
+
date: 2017-01-23 00:00:00.000000000 Z
|
95
95
|
dependencies:
|
96
96
|
- !ruby/object:Gem::Dependency
|
97
97
|
name: metasploit-yard
|
metadata.gz.sig
CHANGED
Binary file
|