metasploit_data_models 0.11.2-java → 0.12.0-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,18 +30,6 @@ class Mdm::Host < ActiveRecord::Base
30
30
  'x86_64'
31
31
  ]
32
32
 
33
- # Valid values for {#os_name}.
34
- OPERATING_SYSTEM_NAMES = [
35
- 'FreeBSD',
36
- 'Linux',
37
- 'Mac OS X',
38
- 'Microsoft Windows',
39
- 'NetBSD',
40
- 'OpenBSD',
41
- 'Unknown',
42
- 'VMWare'
43
- ]
44
-
45
33
  # Fields searched for the search scope
46
34
  SEARCH_FIELDS = [
47
35
  'address::text',
@@ -297,7 +285,7 @@ class Mdm::Host < ActiveRecord::Base
297
285
  # @!attribute [rw] os_name
298
286
  # The name of the operating system.
299
287
  #
300
- # @return [String] an element of {OPERATING_SYSTEM_NAMES}.
288
+ # @return [String]
301
289
 
302
290
  # @!attribute [rw] os_sp
303
291
  # The service pack of the {#os_flavor} of the {#os_name}.
@@ -377,11 +365,6 @@ class Mdm::Host < ActiveRecord::Base
377
365
  :inclusion => {
378
366
  :in => ARCHITECTURES
379
367
  }
380
- validates :os_name,
381
- :allow_nil => true,
382
- :inclusion => {
383
- :in => OPERATING_SYSTEM_NAMES
384
- }
385
368
  validates :state,
386
369
  :allow_nil => true,
387
370
  :inclusion => {
@@ -4,5 +4,5 @@ module MetasploitDataModels
4
4
  # metasploit-framework/data/sql/migrate to db/migrate in this project, not all models have specs that verify the
5
5
  # migrations (with have_db_column and have_db_index) and certain models may not be shared between metasploit-framework
6
6
  # and pro, so models may be removed in the future. Because of the unstable API the version should remain below 1.0.0
7
- VERSION = '0.11.2'
7
+ VERSION = '0.12.0'
8
8
  end
@@ -28,19 +28,6 @@ describe Mdm::Host do
28
28
  ]
29
29
  end
30
30
 
31
- let(:operating_system_names) do
32
- [
33
- 'FreeBSD',
34
- 'Linux',
35
- 'Mac OS X',
36
- 'Microsoft Windows',
37
- 'NetBSD',
38
- 'OpenBSD',
39
- 'Unknown',
40
- 'VMWare'
41
- ]
42
- end
43
-
44
31
  let(:states) do
45
32
  [
46
33
  'alive',
@@ -287,10 +274,6 @@ describe Mdm::Host do
287
274
  end
288
275
  end
289
276
 
290
- it 'should define OPERATING_SYSTEM_NAMES in any order' do
291
- described_class::OPERATING_SYSTEM_NAMES.should =~ operating_system_names
292
- end
293
-
294
277
  context 'SEARCH_FIELDS' do
295
278
  subject(:search_fields) do
296
279
  described_class::SEARCH_FIELDS
@@ -404,7 +387,6 @@ describe Mdm::Host do
404
387
  end
405
388
 
406
389
  it { should ensure_inclusion_of(:arch).in_array(architectures).allow_nil }
407
- it { should ensure_inclusion_of(:os_name).in_array(operating_system_names).allow_nil }
408
390
  it { should ensure_inclusion_of(:state).in_array(states).allow_nil }
409
391
  it { should validate_presence_of(:workspace) }
410
392
  end
@@ -62,7 +62,9 @@ FactoryGirl.define do
62
62
  "Mdm::Host#os_lang #{n}"
63
63
  end
64
64
 
65
- sequence :mdm_host_os_name, Mdm::Host::OPERATING_SYSTEM_NAMES.cycle
65
+ sequence :mdm_host_os_name do |n|
66
+ "Mdm::Host#os_name #{n}"
67
+ end
66
68
 
67
69
  sequence :mdm_host_os_sp do |n|
68
70
  "Mdm::Host#os_sp #{n}"
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: metasploit_data_models
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.11.2
5
+ version: 0.12.0
6
6
  platform: java
7
7
  authors:
8
8
  - Samuel Huckins
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-05-13 00:00:00.000000000 Z
14
+ date: 2013-05-14 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rake