metasploit_data_models 2.0.17 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/.travis.yml +1 -1
  4. data/Gemfile +3 -8
  5. data/lib/mdm/host/operating_system_normalization.rb +2 -1
  6. data/lib/metasploit_data_models/engine.rb +7 -7
  7. data/lib/metasploit_data_models/version.rb +1 -1
  8. data/metasploit_data_models.gemspec +3 -1
  9. data/spec/app/models/mdm/client_spec.rb +3 -3
  10. data/spec/app/models/mdm/cred_spec.rb +34 -34
  11. data/spec/app/models/mdm/event_spec.rb +9 -9
  12. data/spec/app/models/mdm/exploit_attempt_spec.rb +5 -5
  13. data/spec/app/models/mdm/exploited_host_spec.rb +3 -3
  14. data/spec/app/models/mdm/host_detail_spec.rb +4 -4
  15. data/spec/app/models/mdm/host_spec.rb +47 -47
  16. data/spec/app/models/mdm/host_tag_spec.rb +5 -5
  17. data/spec/app/models/mdm/listener_spec.rb +12 -12
  18. data/spec/app/models/mdm/loot_spec.rb +8 -8
  19. data/spec/app/models/mdm/module/action_spec.rb +2 -2
  20. data/spec/app/models/mdm/module/arch_spec.rb +2 -2
  21. data/spec/app/models/mdm/module/author_spec.rb +3 -3
  22. data/spec/app/models/mdm/module/detail_spec.rb +71 -71
  23. data/spec/app/models/mdm/module/mixin_spec.rb +2 -2
  24. data/spec/app/models/mdm/module/platform_spec.rb +2 -2
  25. data/spec/app/models/mdm/module/ref_spec.rb +5 -5
  26. data/spec/app/models/mdm/module/target_spec.rb +2 -2
  27. data/spec/app/models/mdm/nexpose_console_spec.rb +15 -15
  28. data/spec/app/models/mdm/note_spec.rb +11 -11
  29. data/spec/app/models/mdm/ref_spec.rb +6 -6
  30. data/spec/app/models/mdm/route_spec.rb +3 -3
  31. data/spec/app/models/mdm/service_spec.rb +20 -20
  32. data/spec/app/models/mdm/session_event_spec.rb +3 -3
  33. data/spec/app/models/mdm/session_spec.rb +14 -14
  34. data/spec/app/models/mdm/tag_spec.rb +12 -12
  35. data/spec/app/models/mdm/task_cred_spec.rb +6 -6
  36. data/spec/app/models/mdm/task_host_spec.rb +6 -6
  37. data/spec/app/models/mdm/task_service_spec.rb +6 -6
  38. data/spec/app/models/mdm/task_session_spec.rb +6 -6
  39. data/spec/app/models/mdm/task_spec.rb +3 -3
  40. data/spec/app/models/mdm/user_spec.rb +3 -3
  41. data/spec/app/models/mdm/vuln_attempt_spec.rb +4 -4
  42. data/spec/app/models/mdm/vuln_detail_spec.rb +3 -3
  43. data/spec/app/models/mdm/vuln_ref_spec.rb +4 -4
  44. data/spec/app/models/mdm/vuln_spec.rb +20 -20
  45. data/spec/app/models/mdm/web_form_spec.rb +3 -3
  46. data/spec/app/models/mdm/web_page_spec.rb +4 -4
  47. data/spec/app/models/mdm/web_site_spec.rb +15 -15
  48. data/spec/app/models/mdm/web_vuln_spec.rb +4 -4
  49. data/spec/app/models/mdm/workspace_spec.rb +25 -25
  50. data/spec/app/models/metasploit_data_models/automatic_exploitation/match_result_spec.rb +4 -4
  51. data/spec/app/models/metasploit_data_models/automatic_exploitation/match_set_spec.rb +2 -2
  52. data/spec/app/models/metasploit_data_models/automatic_exploitation/match_spec.rb +3 -3
  53. data/spec/app/models/metasploit_data_models/automatic_exploitation/run_spec.rb +5 -5
  54. data/spec/app/models/metasploit_data_models/module_run_spec.rb +3 -3
  55. data/spec/app/models/metasploit_data_models/search/visitor/includes_spec.rb +4 -8
  56. data/spec/app/models/metasploit_data_models/search/visitor/joins_spec.rb +12 -12
  57. data/spec/app/models/metasploit_data_models/search/visitor/relation_spec.rb +16 -16
  58. data/spec/app/models/metasploit_data_models/search/visitor/where_spec.rb +3 -3
  59. data/spec/dummy/config/environments/test.rb +1 -1
  60. data/spec/dummy/db/structure.sql +2 -2
  61. data/spec/factories/mdm/addresses.rb +2 -2
  62. data/spec/factories/mdm/clients.rb +2 -2
  63. data/spec/factories/mdm/creds.rb +2 -2
  64. data/spec/factories/mdm/events.rb +3 -3
  65. data/spec/factories/mdm/exploit_attempts.rb +2 -2
  66. data/spec/factories/mdm/exploited_hosts.rb +1 -1
  67. data/spec/factories/mdm/fingerprints/nessus_fingerprints.rb +2 -2
  68. data/spec/factories/mdm/fingerprints/nexpose_fingerprints.rb +2 -2
  69. data/spec/factories/mdm/fingerprints/nmap_fingerprints.rb +2 -2
  70. data/spec/factories/mdm/fingerprints/retina_fingerprints.rb +2 -2
  71. data/spec/factories/mdm/fingerprints/session_fingerprints.rb +2 -2
  72. data/spec/factories/mdm/host_details.rb +2 -2
  73. data/spec/factories/mdm/host_tags.rb +2 -2
  74. data/spec/factories/mdm/hosts.rb +2 -2
  75. data/spec/factories/mdm/listeners.rb +2 -2
  76. data/spec/factories/mdm/loots.rb +2 -2
  77. data/spec/factories/mdm/module/actions.rb +2 -2
  78. data/spec/factories/mdm/module/archs.rb +2 -2
  79. data/spec/factories/mdm/module/authors.rb +2 -2
  80. data/spec/factories/mdm/module/details.rb +1 -1
  81. data/spec/factories/mdm/module/mixins.rb +2 -2
  82. data/spec/factories/mdm/module/platforms.rb +2 -2
  83. data/spec/factories/mdm/module/refs.rb +2 -2
  84. data/spec/factories/mdm/module/targets.rb +2 -2
  85. data/spec/factories/mdm/nexpose_consoles.rb +2 -2
  86. data/spec/factories/mdm/notes.rb +2 -2
  87. data/spec/factories/mdm/refs.rb +2 -2
  88. data/spec/factories/mdm/routes.rb +2 -2
  89. data/spec/factories/mdm/services.rb +3 -3
  90. data/spec/factories/mdm/session_events.rb +1 -1
  91. data/spec/factories/mdm/sessions.rb +2 -2
  92. data/spec/factories/mdm/tags.rb +2 -2
  93. data/spec/factories/mdm/task.rb +2 -2
  94. data/spec/factories/mdm/task_creds.rb +2 -2
  95. data/spec/factories/mdm/task_hosts.rb +2 -2
  96. data/spec/factories/mdm/task_services.rb +2 -2
  97. data/spec/factories/mdm/task_sessions.rb +2 -2
  98. data/spec/factories/mdm/users.rb +2 -2
  99. data/spec/factories/mdm/vuln_attempts.rb +2 -2
  100. data/spec/factories/mdm/vuln_details.rb +2 -2
  101. data/spec/factories/mdm/vuln_refs.rb +2 -2
  102. data/spec/factories/mdm/vulns.rb +2 -2
  103. data/spec/factories/mdm/web_forms.rb +1 -1
  104. data/spec/factories/mdm/web_pages.rb +2 -2
  105. data/spec/factories/mdm/web_sites.rb +2 -2
  106. data/spec/factories/mdm/web_vulns.rb +2 -2
  107. data/spec/factories/mdm/workspaces.rb +2 -2
  108. data/spec/factories/metasploit_data_models/automatic_exploitation/match_results.rb +1 -1
  109. data/spec/factories/metasploit_data_models/automatic_exploitation/match_sets.rb +2 -2
  110. data/spec/factories/metasploit_data_models/automatic_exploitation/matches.rb +1 -1
  111. data/spec/factories/metasploit_data_models/automatic_exploitation/runs.rb +1 -1
  112. data/spec/factories/module_runs.rb +1 -1
  113. data/spec/spec_helper.rb +2 -2
  114. data.tar.gz.sig +0 -0
  115. metadata +7 -7
  116. metadata.gz.sig +0 -0
@@ -82,9 +82,9 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Joins, type: :model do
82
82
  it { is_expected.to eq([]) }
83
83
  end
84
84
 
85
- context 'with association and attribute' do
85
+ context 'with association and attribute', pending: 'FactoryBot update' do
86
86
  let(:association) do
87
- FactoryGirl.generate :metasploit_model_search_operator_association_association
87
+ FactoryBot.generate :metasploit_model_search_operator_association_association
88
88
  end
89
89
 
90
90
  let(:association_operation) {
@@ -118,9 +118,9 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Joins, type: :model do
118
118
  it { is_expected.to eq([]) }
119
119
  end
120
120
 
121
- context 'with the same child join for all' do
121
+ context 'with the same child join for all', pending: "FactoryBot update" do
122
122
  let(:association) do
123
- FactoryGirl.generate :metasploit_model_search_operator_association_association
123
+ FactoryBot.generate :metasploit_model_search_operator_association_association
124
124
  end
125
125
 
126
126
  let(:association_operation) {
@@ -147,10 +147,10 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Joins, type: :model do
147
147
  end
148
148
  end
149
149
 
150
- context 'with union of intersections' do
150
+ context 'with union of intersections', pending: "FactoryBot update" do
151
151
  let(:disjoint_associations) do
152
152
  Array.new(2) {
153
- FactoryGirl.generate :metasploit_model_search_operator_association_association
153
+ FactoryBot.generate :metasploit_model_search_operator_association_association
154
154
  }
155
155
  end
156
156
 
@@ -207,7 +207,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Joins, type: :model do
207
207
  context 'with a common subset of child join' do
208
208
  let(:common_associations) do
209
209
  Array.new(2) {
210
- FactoryGirl.generate :metasploit_model_search_operator_association_association
210
+ FactoryBot.generate :metasploit_model_search_operator_association_association
211
211
  }
212
212
  end
213
213
 
@@ -316,9 +316,9 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Joins, type: :model do
316
316
  end
317
317
  end
318
318
 
319
- context 'with Metasploit::Model::Search::Operator::Association' do
319
+ context 'with Metasploit::Model::Search::Operator::Association', pending: "FactoryBot update" do
320
320
  let(:association) do
321
- FactoryGirl.generate :metasploit_model_search_operator_association_association
321
+ FactoryBot.generate :metasploit_model_search_operator_association_association
322
322
  end
323
323
 
324
324
  let(:node) do
@@ -368,7 +368,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Joins, type: :model do
368
368
 
369
369
  context 'with name' do
370
370
  let(:name) do
371
- FactoryGirl.generate :mdm_host_name
371
+ FactoryBot.generate :mdm_host_name
372
372
  end
373
373
 
374
374
  let(:formatted) do
@@ -380,7 +380,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Joins, type: :model do
380
380
 
381
381
  context 'with services.name' do
382
382
  let(:name) do
383
- FactoryGirl.generate :mdm_service_name
383
+ FactoryBot.generate :mdm_service_name
384
384
  end
385
385
 
386
386
  let(:formatted) do
@@ -393,4 +393,4 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Joins, type: :model do
393
393
  end
394
394
  end
395
395
  end
396
- end
396
+ end
@@ -22,7 +22,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
22
22
  end
23
23
 
24
24
  let(:value) {
25
- FactoryGirl.generate :mdm_host_name
25
+ FactoryBot.generate :mdm_host_name
26
26
  }
27
27
 
28
28
  it_should_behave_like 'Metasploit::Concern.run'
@@ -171,7 +171,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
171
171
  #
172
172
 
173
173
  let(:non_matching_host) {
174
- FactoryGirl.create(
174
+ FactoryBot.create(
175
175
  :mdm_host,
176
176
  address: non_matching_host_address,
177
177
  name: non_matching_host_name,
@@ -179,7 +179,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
179
179
  os_name: non_matching_host_os_name,
180
180
  os_sp: non_matching_host_os_sp
181
181
  ).tap { |host|
182
- FactoryGirl.create(
182
+ FactoryBot.create(
183
183
  :mdm_host_tag,
184
184
  host: host,
185
185
  tag: non_matching_tag
@@ -224,7 +224,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
224
224
  }
225
225
 
226
226
  let(:non_matching_tag) {
227
- FactoryGirl.create(
227
+ FactoryBot.create(
228
228
  :mdm_tag,
229
229
  desc: non_matching_tag_desc,
230
230
  name: non_matching_tag_name
@@ -244,7 +244,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
244
244
  #
245
245
 
246
246
  let!(:non_matching_record) {
247
- FactoryGirl.create(
247
+ FactoryBot.create(
248
248
  :mdm_service,
249
249
  host: non_matching_host,
250
250
  info: non_matching_info,
@@ -276,7 +276,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
276
276
 
277
277
  let!(:matching_record_by_port) {
278
278
  matching_ports.each_with_object({}) { |matching_port, matching_record_by_port|
279
- matching_record_by_port[matching_port] = FactoryGirl.create(
279
+ matching_record_by_port[matching_port] = FactoryBot.create(
280
280
  :mdm_service,
281
281
  port: matching_port
282
282
  )
@@ -346,7 +346,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
346
346
  #
347
347
 
348
348
  let(:matching_host) {
349
- FactoryGirl.create(
349
+ FactoryBot.create(
350
350
  :mdm_host,
351
351
  address: matching_host_address,
352
352
  name: matching_host_name,
@@ -354,7 +354,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
354
354
  os_name: matching_host_os_name,
355
355
  os_sp: matching_host_os_sp
356
356
  ).tap { |host|
357
- FactoryGirl.create(
357
+ FactoryBot.create(
358
358
  :mdm_host_tag,
359
359
  host: host,
360
360
  tag: matching_tag
@@ -399,7 +399,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
399
399
  }
400
400
 
401
401
  let(:matching_tag) {
402
- FactoryGirl.create(
402
+ FactoryBot.create(
403
403
  :mdm_tag,
404
404
  desc: matching_tag_desc,
405
405
  name: matching_tag_name
@@ -419,7 +419,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
419
419
  #
420
420
 
421
421
  let!(:matching_record) {
422
- FactoryGirl.create(
422
+ FactoryBot.create(
423
423
  :mdm_service,
424
424
  host: matching_host,
425
425
  info: matching_info,
@@ -636,7 +636,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
636
636
  #
637
637
 
638
638
  let!(:matching_record) do
639
- FactoryGirl.build(
639
+ FactoryBot.build(
640
640
  :mdm_host,
641
641
  address: matching_record_address,
642
642
  name: matching_record_name,
@@ -647,7 +647,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
647
647
  end
648
648
 
649
649
  let!(:matching_service) do
650
- FactoryGirl.create(
650
+ FactoryBot.create(
651
651
  :mdm_service,
652
652
  host: matching_record,
653
653
  name: matching_service_name
@@ -655,7 +655,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
655
655
  end
656
656
 
657
657
  let!(:non_matching_record) do
658
- FactoryGirl.build(
658
+ FactoryBot.build(
659
659
  :mdm_host,
660
660
  address: non_matching_record_address,
661
661
  name: non_matching_record_name,
@@ -666,7 +666,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
666
666
  end
667
667
 
668
668
  let!(:non_matching_service) do
669
- FactoryGirl.create(
669
+ FactoryBot.create(
670
670
  :mdm_service,
671
671
  host: non_matching_record,
672
672
  name: non_matching_service_name
@@ -828,7 +828,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
828
828
  #
829
829
 
830
830
  let!(:matching_record) {
831
- FactoryGirl.create(
831
+ FactoryBot.create(
832
832
  :mdm_tag,
833
833
  desc: matching_desc,
834
834
  name: matching_name
@@ -836,7 +836,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
836
836
  }
837
837
 
838
838
  let!(:non_matching_record) {
839
- FactoryGirl.create(
839
+ FactoryBot.create(
840
840
  :mdm_tag,
841
841
  desc: non_matching_desc,
842
842
  name: non_matching_name
@@ -155,7 +155,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Where, type: :model do
155
155
 
156
156
  context 'with name' do
157
157
  let(:name) do
158
- FactoryGirl.generate :mdm_host_name
158
+ FactoryBot.generate :mdm_host_name
159
159
  end
160
160
 
161
161
  let(:formatted) do
@@ -169,7 +169,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Where, type: :model do
169
169
 
170
170
  context 'with services.name' do
171
171
  let(:name) do
172
- FactoryGirl.generate :mdm_service_name
172
+ FactoryBot.generate :mdm_service_name
173
173
  end
174
174
 
175
175
  let(:formatted) do
@@ -184,4 +184,4 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Where, type: :model do
184
184
  end
185
185
  end
186
186
  end
187
- end
187
+ end
@@ -13,7 +13,7 @@ Rails.application.configure do
13
13
  config.eager_load = false
14
14
 
15
15
  # Configure static asset server for tests with Cache-Control for performance.
16
- config.serve_static_assets = true
16
+ config.serve_static_files = true
17
17
  config.static_cache_control = 'public, max-age=3600'
18
18
 
19
19
  # Show full error reports and disable caching.
@@ -2,8 +2,8 @@
2
2
  -- PostgreSQL database dump
3
3
  --
4
4
 
5
- -- Dumped from database version 9.6.6
6
- -- Dumped by pg_dump version 9.6.6
5
+ -- Dumped from database version 9.6.1
6
+ -- Dumped by pg_dump version 9.6.1
7
7
 
8
8
  SET statement_timeout = 0;
9
9
  SET lock_timeout = 0;
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  sequence :mdm_ipv4_address do |n|
3
3
  max = 255
4
4
 
@@ -9,4 +9,4 @@ FactoryGirl.define do
9
9
  max = 65535
10
10
  n % max
11
11
  end
12
- end
12
+ end
@@ -1,8 +1,8 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_client, :class => Mdm::Client do
3
3
  #
4
4
  # Associations
5
5
  #
6
6
  association :host, :factory => :mdm_host
7
7
  end
8
- end
8
+ end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_cred, :aliases => [:cred], :class => Mdm::Cred do
3
3
  #
4
4
  # Associations
@@ -14,4 +14,4 @@ FactoryGirl.define do
14
14
  sequence :mdm_cred_pass do |n|
15
15
  "mahp455w3rd!-#{n}"
16
16
  end
17
- end
17
+ end
@@ -1,6 +1,6 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_event, :aliases => [:event], :class => Mdm::Event do
3
- name { FactoryGirl.generate :mdm_event_name }
3
+ name { FactoryBot.generate :mdm_event_name }
4
4
 
5
5
  trait :workspace do
6
6
  association :workspace, :factory => :mdm_workspace
@@ -12,4 +12,4 @@ FactoryGirl.define do
12
12
  sequence :mdm_event_name do |n|
13
13
  "Event #{n}"
14
14
  end
15
- end
15
+ end
@@ -1,8 +1,8 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_exploit_attempt, :class => Mdm::ExploitAttempt do
3
3
  #
4
4
  # Associations
5
5
  #
6
6
  association :host, :factory => :mdm_host
7
7
  end
8
- end
8
+ end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_exploited_host, :class => Mdm::ExploitedHost do
3
3
 
4
4
  association :host, :factory => :mdm_host
@@ -1,6 +1,6 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_nessus_fingerprint, :parent => :mdm_note do
3
3
  ntype { 'host.os.nessus_fingerprint' }
4
4
  data { {:os=>"Microsoft Windows XP SP3"} }
5
5
  end
6
- end
6
+ end
@@ -1,6 +1,6 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_nexpose_fingerprint, :parent => :mdm_note do
3
3
  ntype { 'host.os.nexpose_fingerprint' }
4
4
  data { {:family=>"Windows", :certainty=>"0.67", :vendor=>"Microsoft", :arch=>"x86"} }
5
5
  end
6
- end
6
+ end
@@ -1,6 +1,6 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_nmap_fingerprint, :parent => :mdm_note do
3
3
  ntype { 'host.os.nmap_fingerprint' }
4
4
  data { { :os_accuracy => 100, :os_family=> 'Windows', :os_vendor=> 'Microsoft', :os_version => 'XP' } }
5
5
  end
6
- end
6
+ end
@@ -1,6 +1,6 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_retina_fingerprint, :parent => :mdm_note do
3
3
  ntype { 'host.os.retina_fingerprint' }
4
4
  data { { :os=>"Windows Server 2003 (X64), Service Pack 2"} }
5
5
  end
6
- end
6
+ end
@@ -1,6 +1,6 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_session_fingerprint, :parent => :mdm_note do
3
3
  ntype { 'host.os.session_fingerprint' }
4
4
  data { { :os => "Microsoft Windows XP SP3", :arch => 'x86' } }
5
5
  end
6
- end
6
+ end
@@ -1,8 +1,8 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_host_detail, :class => Mdm::HostDetail do
3
3
  #
4
4
  # Associations
5
5
  #
6
6
  association :host, :factory => :mdm_host
7
7
  end
8
- end
8
+ end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_host_tag, :class => Mdm::HostTag do
3
3
  #
4
4
  # Associations
@@ -6,4 +6,4 @@ FactoryGirl.define do
6
6
  association :host, :factory => :mdm_host
7
7
  association :tag, :factory => :mdm_tag
8
8
  end
9
- end
9
+ end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_host, :class => Mdm::Host do
3
3
  #
4
4
  # Associations
@@ -82,4 +82,4 @@ FactoryGirl.define do
82
82
 
83
83
  virtual_hosts = ['VMWare', 'QEMU', 'XEN']
84
84
  sequence :mdm_host_virtual_host, virtual_hosts.cycle
85
- end
85
+ end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_listener, :aliases => [:listener], :class => Mdm::Listener do
3
3
  #
4
4
  # Associations
@@ -9,4 +9,4 @@ FactoryGirl.define do
9
9
  address { generate :mdm_ipv4_address }
10
10
  port { generate :mdm_tcp_port }
11
11
  end
12
- end
12
+ end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_loot, :aliases => [:loot], :class => Mdm::Loot do
3
3
  #
4
4
  # Associations
@@ -8,4 +8,4 @@ FactoryGirl.define do
8
8
  association :host, :factory => :mdm_host
9
9
 
10
10
  end
11
- end
11
+ end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_module_action, :class => Mdm::Module::Action do
3
3
  name { generate :mdm_module_action_name }
4
4
 
@@ -11,4 +11,4 @@ FactoryGirl.define do
11
11
  sequence :mdm_module_action_name do |n|
12
12
  "Mdm::Module::Action#name #{n}"
13
13
  end
14
- end
14
+ end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_module_arch, :class => Mdm::Module::Arch do
3
3
  name { generate :mdm_module_arch_name }
4
4
 
@@ -11,4 +11,4 @@ FactoryGirl.define do
11
11
  sequence :mdm_module_arch_name do |n|
12
12
  "Mdm::Module::Arch#name #{n}"
13
13
  end
14
- end
14
+ end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_module_author, :class => Mdm::Module::Author do
3
3
  name { generate :mdm_module_author_name }
4
4
 
@@ -19,4 +19,4 @@ FactoryGirl.define do
19
19
  sequence :mdm_module_author_email do |n|
20
20
  "Mdm::Module::Author#email #{n}"
21
21
  end
22
- end
22
+ end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_module_detail, :class => Mdm::Module::Detail do
3
3
  transient do
4
4
  root {
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_module_mixin, :class => Mdm::Module::Mixin do
3
3
  name { generate :mdm_module_mixin_name }
4
4
 
@@ -11,4 +11,4 @@ FactoryGirl.define do
11
11
  sequence :mdm_module_mixin_name do |n|
12
12
  "Mdm::Module::Mixin#name #{n}"
13
13
  end
14
- end
14
+ end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_module_platform, :class => Mdm::Module::Platform do
3
3
  name { generate :mdm_module_platform_name }
4
4
 
@@ -11,4 +11,4 @@ FactoryGirl.define do
11
11
  sequence :mdm_module_platform_name do |n|
12
12
  "Mdm::Module::Platform#name #{n}"
13
13
  end
14
- end
14
+ end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_module_ref, :class => Mdm::Module::Ref do
3
3
  name { generate :mdm_module_ref_name }
4
4
 
@@ -11,4 +11,4 @@ FactoryGirl.define do
11
11
  sequence :mdm_module_ref_name do |n|
12
12
  "Mdm::Module::Ref#name #{n}"
13
13
  end
14
- end
14
+ end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_module_target, :class => Mdm::Module::Target do
3
3
  index { generate :mdm_module_target_index }
4
4
  name { generate :mdm_module_target_name }
@@ -16,4 +16,4 @@ FactoryGirl.define do
16
16
  sequence :mdm_module_target_name do |n|
17
17
  "Mdm::Module::Target#name #{n}"
18
18
  end
19
- end
19
+ end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_nexpose_console, :aliases => [:nexpose_console], :class => Mdm::NexposeConsole do
3
3
  name { generate :mdm_nexpose_console_name }
4
4
  port { generate :mdm_tcp_port }
@@ -12,4 +12,4 @@ FactoryGirl.define do
12
12
  end
13
13
 
14
14
 
15
- end
15
+ end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_note, :aliases => [:note], :class => Mdm::Note do
3
3
  #
4
4
  # Associations
@@ -9,4 +9,4 @@ FactoryGirl.define do
9
9
 
10
10
 
11
11
  end
12
- end
12
+ end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_ref, :class => Mdm::Ref do
3
3
  name { generate :mdm_ref_name }
4
4
  end
@@ -6,4 +6,4 @@ FactoryGirl.define do
6
6
  sequence :mdm_ref_name do |n|
7
7
  "Mdm::Ref#name #{n}"
8
8
  end
9
- end
9
+ end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_route, :aliases => [:route], :class => Mdm::Route do
3
3
  #
4
4
  # Associations
@@ -33,4 +33,4 @@ FactoryGirl.define do
33
33
  end
34
34
 
35
35
 
36
- end
36
+ end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_service, :class => Mdm::Service do
3
3
  #
4
4
  # Associations
@@ -15,7 +15,7 @@ FactoryGirl.define do
15
15
 
16
16
  factory :web_service do
17
17
  proto 'tcp'
18
- name { FactoryGirl.generate(:web_service_name) }
18
+ name { FactoryBot.generate(:web_service_name) }
19
19
  end
20
20
  end
21
21
 
@@ -38,4 +38,4 @@ FactoryGirl.define do
38
38
  sequence :web_service_name do |n|
39
39
  web_service_names[n % web_service_name_count]
40
40
  end
41
- end
41
+ end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_session_event, :aliases => [:session_event], :class => Mdm::SessionEvent do
3
3
  #
4
4
  # Associations
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_session, :aliases => [:session], :class => Mdm::Session do
3
3
  #
4
4
  # Associations
@@ -10,4 +10,4 @@ FactoryGirl.define do
10
10
  #
11
11
  opened_at { DateTime.now }
12
12
  end
13
- end
13
+ end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_tag, :class => Mdm::Tag do
3
3
  desc { generate :mdm_tag_desc }
4
4
  name { generate :mdm_tag_name }
@@ -11,4 +11,4 @@ FactoryGirl.define do
11
11
  sequence :mdm_tag_name do |n|
12
12
  "mdm_tag_name#{n}"
13
13
  end
14
- end
14
+ end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :mdm_task, :aliases => [:task], :class => 'Mdm::Task' do
3
3
  #
4
4
  # Associations
@@ -13,4 +13,4 @@ FactoryGirl.define do
13
13
 
14
14
 
15
15
  end
16
- end
16
+ end