metasploit_data_models 0.20.1 → 0.21.0.pre.engine.pre.requires

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZmM0ZmRiYjg4NWVhNWI5NzY1ZDk4Y2JjMTQwMGJiNTVmMmNhODVjZQ==
4
+ NGE0OTY0MGZmZjg4MDE2ZGVjMjRlOGVhOThiN2U1YjAxY2E0YTZjZQ==
5
5
  data.tar.gz: !binary |-
6
- MmFmNzA2YTJjYjZkNjI3ZjBlNGNhYzQxOTU4N2MwMzA2MDdiNjUwOA==
6
+ YjUzYzQ5NjNkZmZkYTUwNjExZGYzZGIwNTg2YmMzYTMxYzgxMjg1OQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZTlkNjNkMjE0ZmU4ZWRhY2MwZWIyMmE3M2M3YzRhZjg3OTg2MmU1YmY3MmJj
10
- NWNmNTk4MWM0MzM5ZGRjZTg4OGFiYWMwNTMzOWY0ZGMwNWMwZjgwZjc3ODI3
11
- NjdkNWExZThkNGE0MzY2ZTkwZGJlYTcxOTlhMjEyZWQ4ODFmNTA=
9
+ YTc4NDQwNTVlYmY0MDFmODU0ZjQ5ZmRhNTg5Yjc3MjQxNGI1ZWI4ZWY1NTEw
10
+ M2FiOTA2NDkwODU5ZGMyOWNjODU2MGEyMTljZDFkZmQ4Yjg3YjBlZmRiZGQ3
11
+ ZTNjMmNkMzEzZmIzMTYzZjVjMmJkMDE0ZmRiNTBlYzVjMmMwYjI=
12
12
  data.tar.gz: !binary |-
13
- ZmE4YzgzZjUwNDM5YjJjMzUwOGYwYjk0NzJhYTNmZDkzNDA1ZjhlOGZjMTBl
14
- NjJlZDlmZjlmNTNlZDlmOWQ5YTM0MmQ4MzRlZjQyYjVkMGQ5NWIxYzZhMWRm
15
- ZWJiMDRiNDY2Nzk0MmI2ZmI3ZGJkZmE2ZTk3MTY2M2NiNDJkMjE=
13
+ OTUyZDVkMGYyOTE1ZGE0MTMzZGYwZWZhZDE1NjIwNDQ2NjhiMWI3N2Q0YTlk
14
+ ZTY2YzJlYmE3YmM5ODg4M2FhNWZhMDE4OWU5ZjA3ZTJjZDg4ZTQ0Yzc5ODJk
15
+ ODg0ZDNhZTRmZmY4NjE0NDQ2YTA3ZGQzOTY5ZjBiNGVmNzk0NDc=
data/Gemfile CHANGED
@@ -8,6 +8,9 @@ group :development do
8
8
  gem 'yard-metasploit-erd', '~> 0.0.2'
9
9
  end
10
10
 
11
+ gem 'metasploit-concern', git: 'https://github.com/rapid7/metasploit-concern.git', branch: 'bug/MSP-11412/engine-requires'
12
+ gem 'metasploit-model', git: 'https://github.com/rapid7/metasploit-model.git', branch: 'bug/MSP-11412/engine-requires'
13
+
11
14
  # used by dummy application
12
15
  group :development, :test do
13
16
  # supplies factories for producing model instance for specs
data/README.md CHANGED
@@ -19,24 +19,28 @@ __MetasploitDataModels__ exists to do several key things:
19
19
 
20
20
  In a Rails application, MetasploitDataModels acts a
21
21
  [Rails Engine](http://edgeapi.rubyonrails.org/classes/Rails/Engine.html) and the models are available to application
22
- just as if they were defined under app/models. If your Rails appliation needs to modify the models, this can be done
23
- using ActiveSupport.on_load hooks in initializers. The block passed to on_load hook is evaluated in the context of the
22
+ just as if they were defined under `app/models`. If your Rails appliation needs to modify the models, this can be done
23
+ using `ActiveSupport.on_load` hooks in initializers. The block passed to on_load hook is evaluated in the context of the
24
24
  model class, so defining method and including modules will work just like reopeninng the class, but
25
- ActiveSupport.on_load ensures that the monkey patches will work after reloading in development mode. Each class has a
26
- different on_load name, which is just the class name converted to an underscored symbol, so Mdm::ApiKey runs the
27
- :mdm_api_key load hooks, etc.
25
+ `ActiveSupport.on_load` ensures that the monkey patches will work after reloading in development mode. Each class has a
26
+ different `on_load` name, which is just the class name converted to an underscored symbol, so `Mdm::ApiKey` runs the
27
+ `:mdm_api_key` load hooks, etc.
28
28
 
29
29
  # Gemfile
30
30
  gem :metasploiit_data_models, :git => git://github.com/rapid7/metasploit_data_models.git, :tag => 'v0.3.0'
31
31
 
32
32
  # config/initializers/metasploit_data_models.rb
33
33
  ActiveSupport.on_load(:mdm_api_key) do
34
- # Returns the String obfuscated token for display. Meant to avoid CSRF
35
- # api-key stealing attackes.
36
- def obfuscated_token
37
- token[0..3] + "****************************"
38
- end
34
+ # Returns the String obfuscated token for display. Meant to avoid CSRF
35
+ # api-key stealing attackes.
36
+ def obfuscated_token
37
+ token[0..3] + "****************************"
38
+ end
39
39
  end
40
+
41
+ **This gem's `Rails::Engine` is not required automatically.** You'll need to also add the following to your `config/application.rb`:
42
+
43
+ require 'metasploit_data_models/engine'
40
44
 
41
45
  ### Metasploit Framework
42
46
 
@@ -24,7 +24,6 @@ require 'arel-helpers'
24
24
  require 'mdm'
25
25
  require 'mdm/module'
26
26
  require 'metasploit_data_models/base64_serializer'
27
- require 'metasploit_data_models/engine'
28
27
  require 'metasploit_data_models/serialized_prefs'
29
28
  require 'metasploit_data_models/version'
30
29
 
@@ -4,9 +4,10 @@ module MetasploitDataModels
4
4
  # The major version number.
5
5
  MAJOR = 0
6
6
  # The minor version number, scoped to the {MAJOR} version number.
7
- MINOR = 20
7
+ MINOR = 21
8
8
  # The patch number, scoped to the {MINOR} version number.
9
- PATCH = 1
9
+ PATCH = 0
10
+ PRERELEASE = 'engine-requires'
10
11
 
11
12
  # The full version string, including the {MAJOR}, {MINOR}, {PATCH}, and optionally, the `PRERELEASE` in the
12
13
  # {http://semver.org/spec/v2.0.0.html semantic versioning v2.0.0} format.
@@ -39,8 +39,8 @@ Gem::Specification.new do |s|
39
39
  # @see MSP-2971
40
40
  s.add_runtime_dependency 'activerecord', '>= 3.2.13', '< 4.0.0'
41
41
  s.add_runtime_dependency 'activesupport'
42
- s.add_runtime_dependency 'metasploit-concern', '~> 0.2.1'
43
- s.add_runtime_dependency 'metasploit-model', '~> 0.27.0'
42
+ s.add_runtime_dependency 'metasploit-concern'#, '~> 0.3.0'
43
+ s.add_runtime_dependency 'metasploit-model'#, '~> 0.28.0'
44
44
  s.add_runtime_dependency 'railties', '< 4.0.0'
45
45
 
46
46
  # arel-helpers: Useful tools to help construct database queries with ActiveRecord and Arel.
@@ -6,6 +6,9 @@ Bundler.require(*Rails.groups)
6
6
  # require the engine being tested. In a non-dummy app this would be handled by the engine's gem being in the Gemfile
7
7
  # for real app and Bundler.require requiring the gem.
8
8
  require 'metasploit_data_models'
9
+ require 'metasploit_data_models/engine'
10
+ require 'metasploit/concern/engine'
11
+ require 'metasploit/model/engine'
9
12
 
10
13
  module Dummy
11
14
  class Application < Rails::Application
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.20.1
4
+ version: 0.21.0.pre.engine.pre.requires
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Huckins
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-09-18 00:00:00.000000000 Z
14
+ date: 2014-10-03 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rake
@@ -93,30 +93,30 @@ dependencies:
93
93
  name: metasploit-concern
94
94
  requirement: !ruby/object:Gem::Requirement
95
95
  requirements:
96
- - - ~>
96
+ - - ! '>='
97
97
  - !ruby/object:Gem::Version
98
- version: 0.2.1
98
+ version: '0'
99
99
  type: :runtime
100
100
  prerelease: false
101
101
  version_requirements: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - ~>
103
+ - - ! '>='
104
104
  - !ruby/object:Gem::Version
105
- version: 0.2.1
105
+ version: '0'
106
106
  - !ruby/object:Gem::Dependency
107
107
  name: metasploit-model
108
108
  requirement: !ruby/object:Gem::Requirement
109
109
  requirements:
110
- - - ~>
110
+ - - ! '>='
111
111
  - !ruby/object:Gem::Version
112
- version: 0.27.0
112
+ version: '0'
113
113
  type: :runtime
114
114
  prerelease: false
115
115
  version_requirements: !ruby/object:Gem::Requirement
116
116
  requirements:
117
- - - ~>
117
+ - - ! '>='
118
118
  - !ruby/object:Gem::Version
119
- version: 0.27.0
119
+ version: '0'
120
120
  - !ruby/object:Gem::Dependency
121
121
  name: railties
122
122
  requirement: !ruby/object:Gem::Requirement
@@ -582,9 +582,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
582
582
  version: '0'
583
583
  required_rubygems_version: !ruby/object:Gem::Requirement
584
584
  requirements:
585
- - - ! '>='
585
+ - - ! '>'
586
586
  - !ruby/object:Gem::Version
587
- version: '0'
587
+ version: 1.3.1
588
588
  requirements: []
589
589
  rubyforge_project:
590
590
  rubygems_version: 2.2.2