metasploit_data_models 0.24.2 → 0.24.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/CONTRIBUTING.md +10 -52
- data/RELEASING.md +88 -0
- data/UPGRADING.md +1 -0
- data/lib/metasploit_data_models/version.rb +24 -10
- data/metasploit_data_models.gemspec +1 -0
- data/spec/lib/metasploit_data_models/version_spec.rb +2 -138
- data/spec/lib/metasploit_data_models_spec.rb +4 -0
- data/spec/spec_helper.rb +14 -6
- metadata +20 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b0e76e56575cde44eaaf8cccbb83510c1cd7bb1
|
4
|
+
data.tar.gz: 2ebe2f14cd9c7d467ac6e62e7424eae5bc141010
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7023e69695c3caaa489b057323d2c2d3011812d1d4db05a0c65287ad7f225fa00e74be18bd492131c3870b48f50af822b6cee43333732dcd78f32c9c49464199
|
7
|
+
data.tar.gz: 3d62cffcc384ec9a8ab347dc7ccc94cceb95a9cc9e1260dfb797d1ce391f9a5bb6b5e6b23efcbf494ccd0ea14a75ef4070d63a6bc836a8de3577a2d787f747cb
|
data/CHANGELOG.md
ADDED
data/CONTRIBUTING.md
CHANGED
@@ -25,19 +25,18 @@ issue tracking software.
|
|
25
25
|
|
26
26
|
### `PRERELEASE`
|
27
27
|
|
28
|
-
1. Update `PRERELEASE` to match the `SUMMARY` in the branch name. If you branched from `master`, and [version.rb](lib/metasploit_data_models/version.rb) does not have `PRERELEASE` defined, then adding the following lines after `PATCH`:
|
28
|
+
1. Update `PRERELEASE` to match the `SUMMARY` in the branch name. If you branched from `master`, and [version.rb](lib/metasploit_data_models/version.rb) does not have `PRERELEASE` defined, then adding the following lines after `PATCH`:
|
29
29
|
```
|
30
|
-
# The prerelease version, scoped to the {PATCH} version number.
|
30
|
+
# The prerelease version, scoped to the {MAJOR}, {MINOR}, and {PATCH} version number.
|
31
31
|
PRERELEASE = '<SUMMARY>'
|
32
32
|
```
|
33
33
|
2. `rake spec`
|
34
34
|
3. Verify the specs pass, which indicates that `PRERELEASE` was updated correctly.
|
35
35
|
4. Commit the change `git commit -a`
|
36
36
|
|
37
|
-
|
38
37
|
### Your changes
|
39
38
|
|
40
|
-
Make your changes or however many commits you like,
|
39
|
+
Make your changes or however many commits you like, committing each with `git commit`.
|
41
40
|
|
42
41
|
### Pre-Pull Request Testing
|
43
42
|
|
@@ -46,12 +45,12 @@ Make your changes or however many commits you like, commiting each with `git com
|
|
46
45
|
|
47
46
|
### Push
|
48
47
|
|
49
|
-
Push your branch to your fork on
|
48
|
+
Push your branch to your fork on github: `git push TYPE/ISSUE/SUMMARY`
|
50
49
|
|
51
50
|
### Pull Request
|
52
51
|
|
53
52
|
* [Create new Pull Request](https://github.com/rapid7/metasploit_data_models/compare/)
|
54
|
-
* Add a Verification Steps comment
|
53
|
+
* Add a Verification Steps to the description comment
|
55
54
|
|
56
55
|
```
|
57
56
|
# Verification Steps
|
@@ -62,11 +61,12 @@ Push your branch to your fork on gitub: `git push push TYPE/ISSUE/SUMMARY`
|
|
62
61
|
- [ ] `rake spec`
|
63
62
|
- [ ] VERIFY no failures
|
64
63
|
```
|
64
|
+
|
65
65
|
You should also include at least one scenario to manually check the changes outside of specs.
|
66
66
|
|
67
67
|
* Add a Post-merge Steps comment
|
68
68
|
|
69
|
-
The 'Post-merge Steps' are a reminder to the reviewer of the Pull Request of how to update the [`PRERELEASE`](lib/metasploit_data_models/version.rb) so that [version_spec.rb](spec/lib/metasploit_data_models/
|
69
|
+
The 'Post-merge Steps' are a reminder to the reviewer of the Pull Request of how to update the [`PRERELEASE`](lib/metasploit_data_models/version.rb) so that [version_spec.rb](spec/lib/metasploit_data_models/version.rb_spec.rb) passes on the target branch after the merge.
|
70
70
|
|
71
71
|
DESTINATION is the name of the destination branch into which the merge is being made. SOURCE_SUMMARY is the SUMMARY from TYPE/ISSUE/SUMMARY branch name for the SOURCE branch that is being made.
|
72
72
|
|
@@ -106,7 +106,7 @@ Perform these steps prior to pushing to DESTINATION or the build will be broke o
|
|
106
106
|
- [ ] Change `PRERELEASE` from `SOURCE_SUMMARY` to `DESTINATION_SUMMARY` to match the branch (DESTINATION) summary (DESTINATION_SUMMARY)
|
107
107
|
|
108
108
|
## Gem build
|
109
|
-
- [ ] gem build
|
109
|
+
- [ ] gem build metasploit_data_models.gemspec
|
110
110
|
- [ ] VERIFY the prerelease suffix has change on the gem.
|
111
111
|
|
112
112
|
## RSpec
|
@@ -118,47 +118,5 @@ Perform these steps prior to pushing to DESTINATION or the build will be broke o
|
|
118
118
|
- [ ] `git push origin DESTINATION`
|
119
119
|
```
|
120
120
|
|
121
|
-
|
122
|
-
|
123
|
-
The 'Release Steps' are a reminder to the reviewer of the Pull Request of how to release the gem.
|
124
|
-
|
125
|
-
```
|
126
|
-
# Release
|
127
|
-
|
128
|
-
Complete these steps on DESTINATION
|
129
|
-
|
130
|
-
## Version
|
131
|
-
|
132
|
-
### Compatible changes
|
133
|
-
|
134
|
-
If the change are compatible with the previous branch's API, then increment [`PATCH`](lib/metasploit_data_models/version.rb).
|
135
|
-
|
136
|
-
### Incompatible changes
|
137
|
-
|
138
|
-
If your changes are incompatible with the previous branch's API, then increment
|
139
|
-
[`MINOR`](lib/metasploit_data_models/version.rb) and reset [`PATCH`](lib/metasploit_data_models/version.rb) to `0`.
|
140
|
-
|
141
|
-
- [ ] Following the rules for [semantic versioning 2.0](http://semver.org/spec/v2.0.0.html), update
|
142
|
-
[`MINOR`](lib/metasploit_data_models/version.rb) and [`PATCH`](lib/metasploit_data_models/version.rb) and commit the changes.
|
143
|
-
|
144
|
-
## JRuby
|
145
|
-
- [ ] `rvm use jruby@metasploit_data_models`
|
146
|
-
- [ ] `rm Gemfile.lock`
|
147
|
-
- [ ] `bundle install`
|
148
|
-
- [ ] `rake release`
|
149
|
-
|
150
|
-
## MRI Ruby
|
151
|
-
- [ ] `rvm use ruby-2.1@metasploit_data_models`
|
152
|
-
- [ ] `rm Gemfile.lock`
|
153
|
-
- [ ] `bundle install`
|
154
|
-
- [ ] `rake release`
|
155
|
-
```
|
156
|
-
|
157
|
-
### Downstream dependencies
|
158
|
-
|
159
|
-
When releasing new versions, the following projects may need to be updated:
|
160
|
-
|
161
|
-
* [metasploit-credential](https://github.com/rapid7/metasploit-credential)
|
162
|
-
* [metasploit-framework](https://github.com/rapid7/metasploit-framework)
|
163
|
-
* [metasploit-pro-ui](https://github.com/rapid7/pro/tree/master/ui)
|
164
|
-
* [metasploit-pro-engine](https://github.com/rapid7/pro/tree/master/engine)
|
121
|
+
To update the [CHANGELOG.md](CHANGELOG.md) with the merged changes or release the merged code see
|
122
|
+
[RELEASING.md](RELEASING.md)
|
data/RELEASING.md
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
# Releasing
|
2
|
+
|
3
|
+
These steps can be added to the Pull Request description's task list to remind the reviewer of how to release the
|
4
|
+
gem.
|
5
|
+
|
6
|
+
```
|
7
|
+
# Release
|
8
|
+
|
9
|
+
Complete these steps on DESTINATION
|
10
|
+
|
11
|
+
## [CHANGELOG.md](CHANGELOG.md)
|
12
|
+
|
13
|
+
### Terminology
|
14
|
+
|
15
|
+
* "Enhancements" are widdening the API, such as by adding new classes or methods.
|
16
|
+
* "Bug Fixes" are fixes to the implementation that do not affect the public API. If the public API is affected then
|
17
|
+
the change should be listed as both a "Bug Fix" and either an "Enhancement" or "Incompatible Change" depending on how
|
18
|
+
the bug was fixed.
|
19
|
+
* "Deprecations" are changes to the implementation that cause deprecation warnings to be issued for APIs which will be
|
20
|
+
removed in a future major release. "Deprecations" are usually accompanied by an Enhancement that creates a new API
|
21
|
+
that is meant to be used in favor of the deprecated API.
|
22
|
+
* "Incompatbile Changes" are the removal of classes or methods or new required arguments or setup that shrink the API.
|
23
|
+
It is best practice to make a "Deprecation" for the API prior to its removal.
|
24
|
+
|
25
|
+
### Task List
|
26
|
+
|
27
|
+
- [ ] Generate the list of changes since the last release: `git log v<LAST_MAJOR>.<LAST_MINOR>.<LAST_PATCH>..HEAD`
|
28
|
+
- [ ] For each commit in the release, find the corresponding PR by search for the commit on Github.
|
29
|
+
- [ ] For each PR, determine whether it is an Enhancement, Bug Fix, Deprecation, and/or Incompatible Change. A PR can
|
30
|
+
be in more than one category, in which case it should be listed in each category it belongs, but with a category
|
31
|
+
specific description of the change.
|
32
|
+
- [ ] Add an item to each category's list in the following format: `[#<PR>](https://github.com/rapid7/metasploit_data_models/pull/<PR>) <consumer summary> - [@<github_user>](https://github.com/<github_user>)`
|
33
|
+
`consumer_summary` should be a summary of the Enhancement, Bug Fix, Deprecation, or Incompatible Change from a
|
34
|
+
downstream consumer's of the library's perspective. `github_user` should be Github handle of the author of the
|
35
|
+
PR.
|
36
|
+
- [ ] If you added any Deprecations or Incompatible Changes, then adding upgrading information to
|
37
|
+
[UPGRADING.md](UPGRADING.md)
|
38
|
+
|
39
|
+
## `VERSION`
|
40
|
+
|
41
|
+
The entries in the [CHANGELOG.md](CHANGELOG.md) can be used to help determine how the `VERSION` should be bumped.
|
42
|
+
|
43
|
+
### Compatible changes
|
44
|
+
|
45
|
+
If the [CHANGELOG.md](CHANGELOG.md) contains only Enhancements, Bug Fixes, and/or Deprecations for the Next Release then
|
46
|
+
increment [`PATCH`](lib/metasploit_data_models/version.rb).
|
47
|
+
|
48
|
+
### Incompatible changes
|
49
|
+
|
50
|
+
If the [CHANGELOG.md](CHANGELOG.md) contains any Incompatible Changes for the Next Release, then you can either (1)
|
51
|
+
decide to remain pre-1.0.0 or (2) advance to 1.0.0.
|
52
|
+
|
53
|
+
1. To remain pre-1..0.0, then increment [`MINOR`](lib/metasploit_data_models/version.rb) and reset
|
54
|
+
[`PATCH`](lib/metasploit_data_models/version.rb) to `0`.
|
55
|
+
2. To advance to 1.0.0, increment [`MAJOR`](lib/metasploit_data_models/version.rb) and reset
|
56
|
+
[`MINOR`](lib/metasploit_data_models/version.rb and [`PATCH`](lib/metasploit_data_models/version.rb) to `0`.
|
57
|
+
|
58
|
+
## Setup [CHANGELOG.md](CHANGELOG.md) for next release
|
59
|
+
|
60
|
+
- [ ] Change `Next Release` section name at the top of [CHANGELOG.md](CHANGELOG.md) to match the current `VERSION`.
|
61
|
+
- [ ] Add a new `Next Release` section above the `VERSION`'s section you just renamed:
|
62
|
+
<pre>
|
63
|
+
# Next Release
|
64
|
+
|
65
|
+
* Enhancements
|
66
|
+
* Bug Fixes
|
67
|
+
* Deprecations
|
68
|
+
* Incompatible Changes
|
69
|
+
</pre>
|
70
|
+
|
71
|
+
## Release to rubygems.org
|
72
|
+
|
73
|
+
## jruby
|
74
|
+
- [ ] `rvm use jruby@metasploit_data_models`
|
75
|
+
- [ ] `rm Gemfile.lock`
|
76
|
+
- [ ] `bundle install`
|
77
|
+
- [ ] `rake release`
|
78
|
+
|
79
|
+
## ruby-2.1
|
80
|
+
- [ ] `rvm use ruby-2.1@metasploit_data_models`
|
81
|
+
- [ ] `rm Gemfile.lock`
|
82
|
+
- [ ] `bundle install`
|
83
|
+
- [ ] `rake release`
|
84
|
+
```
|
85
|
+
|
86
|
+
### Downstream dependencies
|
87
|
+
|
88
|
+
There are currently no known downstream dependencies
|
data/UPGRADING.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
No Deprecations or Incompatible Changes have been introduced at this time
|
@@ -1,18 +1,29 @@
|
|
1
1
|
module MetasploitDataModels
|
2
2
|
# Holds components of {VERSION} as defined by {http://semver.org/spec/v2.0.0.html semantic versioning v2.0.0}.
|
3
3
|
module Version
|
4
|
+
#
|
5
|
+
# CONSTANTS
|
6
|
+
#
|
7
|
+
|
4
8
|
# The major version number.
|
5
9
|
MAJOR = 0
|
6
10
|
# The minor version number, scoped to the {MAJOR} version number.
|
7
11
|
MINOR = 24
|
8
|
-
# The patch number, scoped to the {MAJOR} and {MINOR} version numbers.
|
9
|
-
PATCH =
|
12
|
+
# The patch version number, scoped to the {MAJOR} and {MINOR} version numbers.
|
13
|
+
PATCH = 3
|
14
|
+
|
15
|
+
#
|
16
|
+
# Module Methods
|
17
|
+
#
|
10
18
|
|
11
|
-
# The full version string, including the {MAJOR},
|
19
|
+
# The full version string, including the {MetasploitDataModels::Version::MAJOR},
|
20
|
+
# {MetasploitDataModels::Version::MINOR}, {MetasploitDataModels::Version::PATCH}, and optionally, the
|
21
|
+
# `MetasploitDataModels::Version::PRERELEASE` in the
|
12
22
|
# {http://semver.org/spec/v2.0.0.html semantic versioning v2.0.0} format.
|
13
23
|
#
|
14
|
-
# @return [String] '{MAJOR}.{MINOR}.{PATCH}'
|
15
|
-
#
|
24
|
+
# @return [String] '{MetasploitDataModels::Version::MAJOR}.{MetasploitDataModels::Version::MINOR}.{MetasploitDataModels::Version::PATCH}'
|
25
|
+
# on master. '{MetasploitDataModels::Version::MAJOR}.{MetasploitDataModels::Version::MINOR}.{MetasploitDataModels::Version::PATCH}-PRERELEASE'
|
26
|
+
# on any branch other than master.
|
16
27
|
def self.full
|
17
28
|
version = "#{MAJOR}.#{MINOR}.#{PATCH}"
|
18
29
|
|
@@ -23,19 +34,22 @@ module MetasploitDataModels
|
|
23
34
|
version
|
24
35
|
end
|
25
36
|
|
26
|
-
# The full gem version string, including the {MAJOR},
|
37
|
+
# The full gem version string, including the {MetasploitDataModels::Version::MAJOR},
|
38
|
+
# {MetasploitDataModels::Version::MINOR}, {MetasploitDataModels::Version::PATCH}, and optionally, the
|
39
|
+
# `MetasploitDataModels::Version::PRERELEASE` in the
|
27
40
|
# {http://guides.rubygems.org/specification-reference/#version RubyGems versioning} format.
|
28
41
|
#
|
29
|
-
# @return [String] '{MAJOR}.{MINOR}.{PATCH}'
|
30
|
-
#
|
42
|
+
# @return [String] '{MetasploitDataModels::Version::MAJOR}.{MetasploitDataModels::Version::MINOR}.{MetasploitDataModels::Version::PATCH}'
|
43
|
+
# on master. '{MetasploitDataModels::Version::MAJOR}.{MetasploitDataModels::Version::MINOR}.{MetasploitDataModels::Version::PATCH}.PRERELEASE'
|
44
|
+
# on any branch other than master.
|
31
45
|
def self.gem
|
32
46
|
full.gsub('-', '.pre.')
|
33
47
|
end
|
34
48
|
end
|
35
49
|
|
36
|
-
#
|
50
|
+
# (see Version.gem)
|
37
51
|
GEM_VERSION = Version.gem
|
38
52
|
|
39
|
-
#
|
53
|
+
# (see Version.full)
|
40
54
|
VERSION = Version.full
|
41
55
|
end
|
@@ -29,6 +29,7 @@ Gem::Specification.new do |s|
|
|
29
29
|
s.required_ruby_version = '>= 2.1'
|
30
30
|
|
31
31
|
# ---- Dependencies ----
|
32
|
+
s.add_development_dependency 'metasploit-version', '~> 0.1.3'
|
32
33
|
# documentation
|
33
34
|
s.add_development_dependency 'metasploit-yard', '~> 1.0'
|
34
35
|
s.add_development_dependency 'yard-activerecord', '~> 0.0.14'
|
@@ -1,139 +1,3 @@
|
|
1
1
|
RSpec.describe MetasploitDataModels::Version do
|
2
|
-
|
3
|
-
|
4
|
-
subject(:major) do
|
5
|
-
described_class::MAJOR
|
6
|
-
end
|
7
|
-
|
8
|
-
it 'is 0 because the API is not locked yet' do
|
9
|
-
expect(major).to eq(0)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
context 'MINOR' do
|
14
|
-
subject(:minor) do
|
15
|
-
described_class::MINOR
|
16
|
-
end
|
17
|
-
|
18
|
-
it { is_expected.to be_a Integer }
|
19
|
-
end
|
20
|
-
|
21
|
-
context 'PATCH' do
|
22
|
-
subject(:patch) do
|
23
|
-
described_class::PATCH
|
24
|
-
end
|
25
|
-
|
26
|
-
it { is_expected.to be_a Integer }
|
27
|
-
end
|
28
|
-
|
29
|
-
pull_request = ENV['TRAVIS_PULL_REQUEST']
|
30
|
-
|
31
|
-
# a pull request cannot check PRERELEASE because it will be tested in the target branch, but the source itself
|
32
|
-
# is from the source branch and so has the source branch PRERELEASE.
|
33
|
-
#
|
34
|
-
# PRERELEASE can only be set appropriately for a merge by merging to the target branch and then updating PRERELEASE
|
35
|
-
# on the target branch before committing and/or pushing to github and travis-ci.
|
36
|
-
if pull_request.nil? || pull_request == 'false'
|
37
|
-
context 'PREPRELEASE' do
|
38
|
-
subject(:prerelease) do
|
39
|
-
described_class::PRERELEASE
|
40
|
-
end
|
41
|
-
|
42
|
-
branch = ENV['TRAVIS_BRANCH']
|
43
|
-
|
44
|
-
if branch.blank?
|
45
|
-
branch = `git rev-parse --abbrev-ref HEAD`.strip
|
46
|
-
end
|
47
|
-
|
48
|
-
if branch == 'master'
|
49
|
-
it 'does not have a PRERELEASE' do
|
50
|
-
expect(defined? described_class::PRERELEASE).to be_nil
|
51
|
-
end
|
52
|
-
else
|
53
|
-
branch_regex = /\A(?<type>bug|chore|feature|staging)(\/(?<story>[^\/]+))?\/(?<prerelease>[^\/]+)\z/
|
54
|
-
match = branch.match(branch_regex)
|
55
|
-
|
56
|
-
if match
|
57
|
-
it 'matches the branch relative name' do
|
58
|
-
expect(prerelease).to eq(match[:prerelease])
|
59
|
-
end
|
60
|
-
else
|
61
|
-
tag_regex = /\Av(?<major>\d+).(?<minor>\d+).(?<patch>\d+)(\.pre\.(?<prerelease>.*))?\z/
|
62
|
-
# travis-ci sets TRAVIS_BRANCH to the tag name for tag builds
|
63
|
-
match = branch.match(tag_regex)
|
64
|
-
|
65
|
-
if match
|
66
|
-
tag_prerelease = match[:prerelease]
|
67
|
-
|
68
|
-
if tag_prerelease
|
69
|
-
it 'matches the tag prerelease converted from a gem version to a VERSION' do
|
70
|
-
expect(prerelease).to eq(tag_prerelease.gsub('.pre.', '-'))
|
71
|
-
end
|
72
|
-
else
|
73
|
-
it 'does not have a PRERELEASE' do
|
74
|
-
expect(defined? described_class::PRERELEASE).to be_nil
|
75
|
-
end
|
76
|
-
end
|
77
|
-
else
|
78
|
-
it 'has a abbreviated reference that can be parsed for prerelease' do
|
79
|
-
fail "Do not know how to parse #{branch.inspect} for PRERELEASE"
|
80
|
-
end
|
81
|
-
end
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
87
|
-
|
88
|
-
context 'full' do
|
89
|
-
subject(:full) do
|
90
|
-
described_class.full
|
91
|
-
end
|
92
|
-
|
93
|
-
#
|
94
|
-
# lets
|
95
|
-
#
|
96
|
-
|
97
|
-
let(:major) do
|
98
|
-
1
|
99
|
-
end
|
100
|
-
|
101
|
-
let(:minor) do
|
102
|
-
2
|
103
|
-
end
|
104
|
-
|
105
|
-
let(:patch) do
|
106
|
-
3
|
107
|
-
end
|
108
|
-
|
109
|
-
before(:each) do
|
110
|
-
stub_const("#{described_class}::MAJOR", major)
|
111
|
-
stub_const("#{described_class}::MINOR", minor)
|
112
|
-
stub_const("#{described_class}::PATCH", patch)
|
113
|
-
end
|
114
|
-
|
115
|
-
context 'with PRERELEASE' do
|
116
|
-
let(:prerelease) do
|
117
|
-
'prerelease'
|
118
|
-
end
|
119
|
-
|
120
|
-
before(:each) do
|
121
|
-
stub_const("#{described_class}::PRERELEASE", prerelease)
|
122
|
-
end
|
123
|
-
|
124
|
-
it 'is <major>.<minor>.<patch>-<prerelease>' do
|
125
|
-
expect(full).to eq("#{major}.#{minor}.#{patch}-#{prerelease}")
|
126
|
-
end
|
127
|
-
end
|
128
|
-
|
129
|
-
context 'without PRERELEASE' do
|
130
|
-
before(:each) do
|
131
|
-
hide_const("#{described_class}::PRERELEASE")
|
132
|
-
end
|
133
|
-
|
134
|
-
it 'is <major>.<minor>.<patch>' do
|
135
|
-
expect(full).to eq("#{major}.#{minor}.#{patch}")
|
136
|
-
end
|
137
|
-
end
|
138
|
-
end
|
139
|
-
end
|
2
|
+
it_should_behave_like 'Metasploit::Version Version Module'
|
3
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -29,14 +29,22 @@ Rails.backtrace_cleaner.remove_silencers!
|
|
29
29
|
# Requires supporting ruby files with custom matchers and macros, etc,
|
30
30
|
# in spec/support/ and its subdirectories.
|
31
31
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
32
|
+
# Use find_all_by_name instead of find_by_name as find_all_by_name will return pre-release versions
|
33
|
+
gem_specification = Gem::Specification.find_all_by_name('metasploit-version').first
|
34
|
+
|
35
|
+
Dir[File.join(gem_specification.gem_dir, 'spec', 'support', '**', '*.rb')].each do |f|
|
36
|
+
require f
|
37
|
+
end
|
38
|
+
|
39
|
+
roots = [
|
40
|
+
gem_specification.gem_dir,
|
41
|
+
Metasploit::Concern::Engine.root,
|
42
|
+
Metasploit::Model::Engine.root,
|
43
|
+
MetasploitDataModels::Engine.root
|
36
44
|
]
|
37
45
|
|
38
|
-
|
39
|
-
support_glob =
|
46
|
+
roots.each do |root|
|
47
|
+
support_glob = File.join(root, 'spec', 'support', '**', '*.rb')
|
40
48
|
|
41
49
|
Dir.glob(support_glob) do |path|
|
42
50
|
require path
|
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.24.
|
4
|
+
version: 0.24.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Huckins
|
@@ -13,6 +13,20 @@ bindir: bin
|
|
13
13
|
cert_chain: []
|
14
14
|
date: 2015-05-11 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: metasploit-version
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - "~>"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.1.3
|
23
|
+
type: :development
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.1.3
|
16
30
|
- !ruby/object:Gem::Dependency
|
17
31
|
name: metasploit-yard
|
18
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -247,11 +261,14 @@ files:
|
|
247
261
|
- ".simplecov"
|
248
262
|
- ".travis.yml"
|
249
263
|
- ".yardopts"
|
264
|
+
- CHANGELOG.md
|
250
265
|
- CONTRIBUTING.md
|
251
266
|
- Gemfile
|
252
267
|
- LICENSE
|
253
268
|
- README.md
|
269
|
+
- RELEASING.md
|
254
270
|
- Rakefile
|
271
|
+
- UPGRADING.md
|
255
272
|
- app/models/mdm/api_key.rb
|
256
273
|
- app/models/mdm/client.rb
|
257
274
|
- app/models/mdm/cred.rb
|
@@ -648,6 +665,7 @@ files:
|
|
648
665
|
- spec/lib/metasploit_data_models/match/child_spec.rb
|
649
666
|
- spec/lib/metasploit_data_models/match/parent_spec.rb
|
650
667
|
- spec/lib/metasploit_data_models/version_spec.rb
|
668
|
+
- spec/lib/metasploit_data_models_spec.rb
|
651
669
|
- spec/spec_helper.rb
|
652
670
|
- spec/support/matchers/match_regex_exactly.rb
|
653
671
|
- spec/support/shared/contexts/rex/text.rb
|
@@ -853,6 +871,7 @@ test_files:
|
|
853
871
|
- spec/lib/metasploit_data_models/match/child_spec.rb
|
854
872
|
- spec/lib/metasploit_data_models/match/parent_spec.rb
|
855
873
|
- spec/lib/metasploit_data_models/version_spec.rb
|
874
|
+
- spec/lib/metasploit_data_models_spec.rb
|
856
875
|
- spec/spec_helper.rb
|
857
876
|
- spec/support/matchers/match_regex_exactly.rb
|
858
877
|
- spec/support/shared/contexts/rex/text.rb
|