metasploit_data_models 0.11.2 → 0.12.0

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
@@ -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: 0.11.2
4
+ version: 0.12.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -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
@@ -385,7 +385,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
385
385
  version: '0'
386
386
  segments:
387
387
  - 0
388
- hash: -2449468095593204156
388
+ hash: -2112658304388993292
389
389
  required_rubygems_version: !ruby/object:Gem::Requirement
390
390
  none: false
391
391
  requirements:
@@ -394,7 +394,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
394
394
  version: '0'
395
395
  segments:
396
396
  - 0
397
- hash: -2449468095593204156
397
+ hash: -2112658304388993292
398
398
  requirements: []
399
399
  rubyforge_project:
400
400
  rubygems_version: 1.8.25