yard-metasploit-erd 0.0.2 → 0.0.4.pre.required.pre.keyword.pre.arguments
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 +5 -13
- data/.rspec +2 -1
- data/.travis.yml +0 -2
- data/CHANGELOG.md +11 -0
- data/CONTRIBUTING.md +122 -0
- data/RELEASING.md +86 -0
- data/Rakefile +2 -1
- data/UPGRADING.md +1 -0
- data/lib/yard/metasploit/erd/version.rb +35 -6
- data/lib/yard/metasploit/erd.rb +6 -0
- data/spec/lib/yard/metasploit/erd/version_spec.rb +3 -0
- data/spec/lib/yard/metasploit/erd_spec.rb +4 -0
- data/spec/spec_helper.rb +75 -2
- data/yard-metasploit-erd.gemspec +6 -5
- metadata +49 -31
- data/spec/yard/metasploit/erd/version_spec.rb +0 -143
- data/spec/yard/metasploit/erd_spec.rb +0 -15
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
ZTIzNWQ5ZjgzNzU4ZjM4MzQ3NWY2MWQ4OWU5MzM4MzcxZjIwODk1Mw==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5c61a530bc1c3d17ca72f3cb658f2df8b44ad784
|
4
|
+
data.tar.gz: de879ae210aa85251a1c0ec9c9e3d69291fd9029
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
OWJiY2Y1MmE5OWRkN2MzYjMxNTgxZTFmYzZkZTM1Yzk0MTJlYjk4YzU4MjM4
|
11
|
-
YmI1ZmQ5NzYwMmRkMTE5NmViODcxYjBjNDNhMmI2N2U0NmNiMzY=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
NjQ2YjhkNDVmMTFkNTRmYWY2OGRiNjI5ZjNlMmQ4OWU2OWRlZTkxMjM5YTIz
|
14
|
-
OGZhNTJkOTVhOTE0YzgxMmU1MTVhMjdjYjIxZTY4NDliNjgzOTBmNWI1MDNj
|
15
|
-
ZjhlZDQ0NTEyYjY0OGE2ZTEzZGZjMDExZDkwNjJlNzkyNTAxZDI=
|
6
|
+
metadata.gz: 5107757ee463db909184909d78ce0eeb704b9549daa0b9109ec9dbe1eef8bfd73b796154f7717e7bda52f7512df5d0d65b2c861b0735b91bf83e39fe80a5c3da
|
7
|
+
data.tar.gz: 16ab45759d436068bc58d489a10492b5f6dcb9ddb819caaef0fd2a3c2ae9522adf1a486e87e8b43a7f962d94bcf6ba7812685e4c23187ca41612e28ca3d45a02
|
data/.rspec
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# Next Release
|
2
|
+
|
3
|
+
* Enhancements
|
4
|
+
* Bug Fixes
|
5
|
+
* Deprecations
|
6
|
+
* Incompatible Changes
|
7
|
+
|
8
|
+
# v0.0.4
|
9
|
+
|
10
|
+
* Bug fixes
|
11
|
+
* [#6](https://github.com/rapid7/yard-metasploit-erd/pull/6): Remove version restriction on YARD to enable YARD (> 0.8.7.4) that supports required keyword arguments - [@limhoff-r7](https://github.com/limhoff-r7)
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,122 @@
|
|
1
|
+
# Contributing
|
2
|
+
|
3
|
+
## Forking
|
4
|
+
|
5
|
+
[Fork this repository](https://github.com/rapid7/yard-metasploit-erd/fork)
|
6
|
+
|
7
|
+
## Branching
|
8
|
+
|
9
|
+
Branch names follow the format `TYPE/ISSUE/SUMMARY`. You can create it with `git checkout -b TYPE/ISSUE/SUMMARY`.
|
10
|
+
|
11
|
+
### `TYPE`
|
12
|
+
|
13
|
+
`TYPE` can be `bug`, `chore`, or `feature`.
|
14
|
+
|
15
|
+
### `ISSUE`
|
16
|
+
|
17
|
+
`ISSUE` is either a [Github issue](https://github.com/rapid7/yard-metasploit-erd/issues) or an issue from some other
|
18
|
+
issue tracking software.
|
19
|
+
|
20
|
+
### `SUMMARY`
|
21
|
+
|
22
|
+
`SUMMARY` is is short summary of the purpose of the branch composed of lower case words separated by '-' so that it is a valid `PRERELEASE` for the Gem version.
|
23
|
+
|
24
|
+
## Changes
|
25
|
+
|
26
|
+
### `PRERELEASE`
|
27
|
+
|
28
|
+
1. Update `PRERELEASE` to match the `SUMMARY` in the branch name. If you branched from `master`, and [version.rb](lib/yard/metasploit/erd/version.rb) does not have `PRERELEASE` defined, then adding the following lines after `PATCH`:
|
29
|
+
```
|
30
|
+
# The prerelease version, scoped to the {MAJOR}, {MINOR}, and {PATCH} version number.
|
31
|
+
PRERELEASE = '<SUMMARY>'
|
32
|
+
```
|
33
|
+
2. `rake spec`
|
34
|
+
3. Verify the specs pass, which indicates that `PRERELEASE` was updated correctly.
|
35
|
+
4. Commit the change `git commit -a`
|
36
|
+
|
37
|
+
### Your changes
|
38
|
+
|
39
|
+
Make your changes or however many commits you like, committing each with `git commit`.
|
40
|
+
|
41
|
+
### Pre-Pull Request Testing
|
42
|
+
|
43
|
+
1. Run specs one last time before opening the Pull Request: `rake spec`
|
44
|
+
2. Verify there was no failures.
|
45
|
+
|
46
|
+
### Push
|
47
|
+
|
48
|
+
Push your branch to your fork on gitub: `git push TYPE/ISSUE/SUMMARY`
|
49
|
+
|
50
|
+
### Pull Request
|
51
|
+
|
52
|
+
* [Create new Pull Request](https://github.com/rapid7/yard-metasploit-erd/compare/)
|
53
|
+
* Add a Verification Steps to the description comment
|
54
|
+
|
55
|
+
```
|
56
|
+
# Verification Steps
|
57
|
+
|
58
|
+
- [ ] `bundle install`
|
59
|
+
|
60
|
+
## `rake spec`
|
61
|
+
- [ ] `rake spec`
|
62
|
+
- [ ] VERIFY no failures
|
63
|
+
```
|
64
|
+
|
65
|
+
You should also include at least one scenario to manually check the changes outside of specs.
|
66
|
+
|
67
|
+
* Add Post-merge Steps to the description comment
|
68
|
+
|
69
|
+
The 'Post-merge Steps' are a reminder to the reviewer of the Pull Request of how to update the [`PRERELEASE`](lib/yard/metasploit/erd/version.rb) so that [version_spec.rb](spec/lib/yard/metasploit/erd/version.rb_spec.rb) passes on the target branch after the merge.
|
70
|
+
|
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
|
+
|
73
|
+
When merging to `master`:
|
74
|
+
|
75
|
+
```
|
76
|
+
# Post-merge Steps
|
77
|
+
|
78
|
+
Perform these steps prior to pushing to master or the build will be broke on master.
|
79
|
+
|
80
|
+
## Version
|
81
|
+
- [ ] Edit `lib/yard/metasploit/erd/version.rb`
|
82
|
+
- [ ] Remove `PRERELEASE` and its comment as `PRERELEASE` is not defined on master.
|
83
|
+
|
84
|
+
## Gem build
|
85
|
+
- [ ] gem build *.gemspec
|
86
|
+
- [ ] VERIFY the gem has no '.pre' version suffix.
|
87
|
+
|
88
|
+
## RSpec
|
89
|
+
- [ ] `rake spec`
|
90
|
+
- [ ] VERIFY version examples pass without failures
|
91
|
+
|
92
|
+
## Commit & Push
|
93
|
+
- [ ] `git commit -a`
|
94
|
+
- [ ] `git push origin master`
|
95
|
+
```
|
96
|
+
|
97
|
+
When merging to DESTINATION other than `master`:
|
98
|
+
|
99
|
+
```
|
100
|
+
# Post-merge Steps
|
101
|
+
|
102
|
+
Perform these steps prior to pushing to DESTINATION or the build will be broke on DESTINATION.
|
103
|
+
|
104
|
+
## Version
|
105
|
+
- [ ] Edit `lib/yard/metasploit/erd/version.rb`
|
106
|
+
- [ ] Change `PRERELEASE` from `SOURCE_SUMMARY` to `DESTINATION_SUMMARY` to match the branch (DESTINATION) summary (DESTINATION_SUMMARY)
|
107
|
+
|
108
|
+
## Gem build
|
109
|
+
- [ ] gem build yard-metasploit-erd.gemspec
|
110
|
+
- [ ] VERIFY the prerelease suffix has change on the gem.
|
111
|
+
|
112
|
+
## RSpec
|
113
|
+
- [ ] `rake spec`
|
114
|
+
- [ ] VERIFY version examples pass without failures
|
115
|
+
|
116
|
+
## Commit & Push
|
117
|
+
- [ ] `git commit -a`
|
118
|
+
- [ ] `git push origin DESTINATION`
|
119
|
+
```
|
120
|
+
|
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,86 @@
|
|
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/yard-metasploit-erd/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/yard/metasploit/erd/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/yard/metasploit/erd/version.rb) and reset [`PATCH`](lib/yard/metasploit/erd/version.rb) to `0`.
|
54
|
+
2. To advance to 1.0.0, increment [`MAJOR`](lib/yard/metasploit/erd/version.rb) and reset [`MINOR`](lib/yard/metasploit/erd/version.rb and [`PATCH`](lib/yard/metasploit/erd/version.rb) to `0`.
|
55
|
+
|
56
|
+
## Setup [CHANGELOG.md](CHANGELOG.md) for next release
|
57
|
+
|
58
|
+
- [ ] Change `Next Release` section name at the top of [CHANGELOG.md](CHANGELOG.md) to match the current `VERSION`.
|
59
|
+
- [ ] Add a new `Next Release` section above the `VERSION`'s section you just renamed:
|
60
|
+
<pre>
|
61
|
+
# Next Release
|
62
|
+
|
63
|
+
* Enhancements
|
64
|
+
* Bug Fixes
|
65
|
+
* Deprecations
|
66
|
+
* Incompatible Changes
|
67
|
+
</pre>
|
68
|
+
|
69
|
+
## Release to rubygems.org
|
70
|
+
|
71
|
+
## jruby
|
72
|
+
- [ ] `rvm use jruby@yard-metasploit-erd`
|
73
|
+
- [ ] `rm Gemfile.lock`
|
74
|
+
- [ ] `bundle install`
|
75
|
+
- [ ] `rake release`
|
76
|
+
|
77
|
+
## ruby-2.1
|
78
|
+
- [ ] `rvm use ruby-2.1@yard-metasploit-erd`
|
79
|
+
- [ ] `rm Gemfile.lock`
|
80
|
+
- [ ] `bundle install`
|
81
|
+
- [ ] `rake release`
|
82
|
+
```
|
83
|
+
|
84
|
+
### Downstream dependencies
|
85
|
+
|
86
|
+
There are currently no known downstream dependencies
|
data/Rakefile
CHANGED
data/UPGRADING.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
No Deprecations or Incompatible Changes have been introduced at this time
|
@@ -3,18 +3,32 @@ module YARD
|
|
3
3
|
module ERD
|
4
4
|
# Holds components of {VERSION} as defined by {http://semver.org/spec/v2.0.0.html semantic versioning v2.0.0}.
|
5
5
|
module Version
|
6
|
+
#
|
7
|
+
# CONSTANTS
|
8
|
+
#
|
9
|
+
|
6
10
|
# The major version number.
|
7
11
|
MAJOR = 0
|
8
12
|
# The minor version number, scoped to the {MAJOR} version number.
|
9
13
|
MINOR = 0
|
10
|
-
# The patch number, scoped to the {MINOR} version
|
11
|
-
PATCH =
|
14
|
+
# The patch version number, scoped to the {MAJOR} and {MINOR} version numbers.
|
15
|
+
PATCH = 4
|
16
|
+
# The pre-release version, scoped to {MAJOR}, {MINOR}, and {PATCH} version numbers.
|
17
|
+
PRERELEASE = 'required-keyword-arguments'
|
18
|
+
|
19
|
+
#
|
20
|
+
# Module Methods
|
21
|
+
#
|
12
22
|
|
13
|
-
# The full version string, including the {MAJOR},
|
23
|
+
# The full version string, including the {YARD::Metasploit::ERD::Version::MAJOR},
|
24
|
+
# {YARD::Metasploit::ERD::Version::MINOR}, {YARD::Metasploit::ERD::Version::PATCH}, and optionally, the
|
25
|
+
# `YARD::Metasploit::ERD::Version::PRERELEASE` in the
|
14
26
|
# {http://semver.org/spec/v2.0.0.html semantic versioning v2.0.0} format.
|
15
27
|
#
|
16
|
-
# @return [String] '{MAJOR}.{MINOR}.
|
17
|
-
#
|
28
|
+
# @return [String] '{YARD::Metasploit::ERD::Version::MAJOR}.{YARD::Metasploit::ERD::Version::MINOR}.
|
29
|
+
# {YARD::Metasploit::ERD::Version::PATCH}' on master.
|
30
|
+
# '{YARD::Metasploit::ERD::Version::MAJOR}.{YARD::Metasploit::ERD::Version::MINOR}.{YARD::Metasploit::ERD::Version::PATCH}-PRERELEASE'
|
31
|
+
# on any branch other than master.
|
18
32
|
def self.full
|
19
33
|
version = "#{MAJOR}.#{MINOR}.#{PATCH}"
|
20
34
|
|
@@ -24,9 +38,24 @@ module YARD
|
|
24
38
|
|
25
39
|
version
|
26
40
|
end
|
41
|
+
|
42
|
+
# The full gem version string, including the {YARD::Metasploit::ERD::Version::MAJOR},
|
43
|
+
# {YARD::Metasploit::ERD::Version::MINOR}, {YARD::Metasploit::ERD::Version::PATCH}, and optionally, the
|
44
|
+
# `YARD::Metasploit::ERD::Version::PRERELEASE` in the
|
45
|
+
# {http://guides.rubygems.org/specification-reference/#version RubyGems versioning} format.
|
46
|
+
#
|
47
|
+
# @return [String] '{YARD::Metasploit::ERD::Version::MAJOR}.{YARD::Metasploit::ERD::Version::MINOR}.{YARD::Metasploit::ERD::Version::PATCH}'
|
48
|
+
# on master. '{YARD::Metasploit::ERD::Version::MAJOR}.{YARD::Metasploit::ERD::Version::MINOR}.{YARD::Metasploit::ERD::Version::PATCH}.PRERELEASE'
|
49
|
+
# on any branch other than master.
|
50
|
+
def self.gem
|
51
|
+
full.gsub('-', '.pre.')
|
52
|
+
end
|
27
53
|
end
|
28
54
|
|
29
|
-
#
|
55
|
+
# (see Version.gem)
|
56
|
+
GEM_VERSION = Version.gem
|
57
|
+
|
58
|
+
# (see Version.full)
|
30
59
|
VERSION = Version.full
|
31
60
|
end
|
32
61
|
end
|
data/lib/yard/metasploit/erd.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
require 'bundler/setup'
|
2
2
|
|
3
3
|
# require before 'metasploit/erd' so coverage is shown for files required by 'yard/metasploit/erd'
|
4
4
|
require 'simplecov'
|
@@ -14,4 +14,77 @@ else
|
|
14
14
|
]
|
15
15
|
end
|
16
16
|
|
17
|
-
|
17
|
+
#
|
18
|
+
# Gems
|
19
|
+
#
|
20
|
+
|
21
|
+
require 'metasploit/version'
|
22
|
+
|
23
|
+
#
|
24
|
+
# Project
|
25
|
+
#
|
26
|
+
|
27
|
+
require 'yard/metasploit/erd'
|
28
|
+
|
29
|
+
# Use find_all_by_name instead of find_by_name as find_all_by_name will return pre-release versions
|
30
|
+
gem_specification = Gem::Specification.find_all_by_name('metasploit-version').first
|
31
|
+
|
32
|
+
Dir[File.join(gem_specification.gem_dir, 'spec', 'support', '**', '*.rb')].each do |f|
|
33
|
+
require f
|
34
|
+
end
|
35
|
+
|
36
|
+
RSpec.configure do |config|
|
37
|
+
config.expose_dsl_globally = false
|
38
|
+
|
39
|
+
# These two settings work together to allow you to limit a spec run
|
40
|
+
# to individual examples or groups you care about by tagging them with
|
41
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
42
|
+
# get run.
|
43
|
+
config.filter_run :focus
|
44
|
+
config.run_all_when_everything_filtered = true
|
45
|
+
|
46
|
+
# allow more verbose output when running an individual spec file.
|
47
|
+
if config.files_to_run.one?
|
48
|
+
# RSpec filters the backtrace by default so as not to be so noisy.
|
49
|
+
# This causes the full backtrace to be printed when running a single
|
50
|
+
# spec file (e.g. to troubleshoot a particular spec failure).
|
51
|
+
config.full_backtrace = true
|
52
|
+
end
|
53
|
+
|
54
|
+
# Print the 10 slowest examples and example groups at the
|
55
|
+
# end of the spec run, to help surface which specs are running
|
56
|
+
# particularly slow.
|
57
|
+
config.profile_examples = 10
|
58
|
+
|
59
|
+
# Run specs in random order to surface order dependencies. If you find an
|
60
|
+
# order dependency and want to debug it, you can fix the order by providing
|
61
|
+
# the seed, which is printed after each run.
|
62
|
+
# --seed 1234
|
63
|
+
config.order = :random
|
64
|
+
|
65
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
66
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
67
|
+
# test failures related to randomization by passing the same `--seed` value
|
68
|
+
# as the one that triggered the failure.
|
69
|
+
Kernel.srand config.seed
|
70
|
+
|
71
|
+
config.expect_with :rspec do |expectations|
|
72
|
+
# Enable only the newer, non-monkey-patching expect syntax.
|
73
|
+
expectations.syntax = :expect
|
74
|
+
end
|
75
|
+
|
76
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
77
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
78
|
+
config.mock_with :rspec do |mocks|
|
79
|
+
# Enable only the newer, non-monkey-patching expect syntax.
|
80
|
+
# For more details, see:
|
81
|
+
# - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
82
|
+
mocks.syntax = :expect
|
83
|
+
|
84
|
+
mocks.patch_marshal_to_support_partial_doubles = false
|
85
|
+
|
86
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
87
|
+
# a real object.
|
88
|
+
mocks.verify_partial_doubles = true
|
89
|
+
end
|
90
|
+
end
|
data/yard-metasploit-erd.gemspec
CHANGED
@@ -5,7 +5,7 @@ require 'yard/metasploit/erd/version'
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = 'yard-metasploit-erd'
|
8
|
-
spec.version = YARD::Metasploit::ERD::
|
8
|
+
spec.version = YARD::Metasploit::ERD::GEM_VERSION
|
9
9
|
spec.authors = ['Luke Imhoff']
|
10
10
|
spec.email = ['luke_imhoff@rapid7.com']
|
11
11
|
spec.summary = 'YARD plugin that add Metasploit::ERDs to namespaces and classes'
|
@@ -19,15 +19,16 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
|
+
spec.required_ruby_version = '>= 2.1'
|
23
|
+
|
22
24
|
spec.add_development_dependency 'bundler', '~> 1.5'
|
25
|
+
spec.add_development_dependency 'metasploit-version', '~> 0.1.3'
|
23
26
|
spec.add_development_dependency 'rake', '~> 10.3'
|
24
|
-
spec.add_development_dependency 'rspec', '~>
|
27
|
+
spec.add_development_dependency 'rspec', '~> 3.1'
|
25
28
|
|
26
29
|
# Generates namespace Module and Class<ActiveRecord::Base> specific ERDs for use in templates
|
27
30
|
spec.add_runtime_dependency 'metasploit-erd', '0.0.1'
|
28
31
|
# RailsERD::Domain is used directly to generate the _index.html ERD.
|
29
32
|
spec.add_runtime_dependency 'rails-erd'
|
30
|
-
|
31
|
-
# 0.8.7.4 has a bug where setters are not documented when @!attribute is used
|
32
|
-
spec.add_runtime_dependency 'yard', '<= 0.8.7.4'
|
33
|
+
spec.add_runtime_dependency 'yard'
|
33
34
|
end
|
metadata
CHANGED
@@ -1,57 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yard-metasploit-erd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4.pre.required.pre.keyword.pre.arguments
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luke Imhoff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.5'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.5'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: metasploit-version
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.1.3
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.1.3
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rake
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
|
-
- - ~>
|
45
|
+
- - "~>"
|
32
46
|
- !ruby/object:Gem::Version
|
33
47
|
version: '10.3'
|
34
48
|
type: :development
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
|
-
- - ~>
|
52
|
+
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '10.3'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rspec
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
|
-
- - ~>
|
59
|
+
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
61
|
+
version: '3.1'
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
|
-
- - ~>
|
66
|
+
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
68
|
+
version: '3.1'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: metasploit-erd
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -70,30 +84,30 @@ dependencies:
|
|
70
84
|
name: rails-erd
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
|
-
- -
|
87
|
+
- - ">="
|
74
88
|
- !ruby/object:Gem::Version
|
75
89
|
version: '0'
|
76
90
|
type: :runtime
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
|
-
- -
|
94
|
+
- - ">="
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: yard
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
|
-
- -
|
101
|
+
- - ">="
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0
|
103
|
+
version: '0'
|
90
104
|
type: :runtime
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
|
-
- -
|
108
|
+
- - ">="
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0
|
110
|
+
version: '0'
|
97
111
|
description: YARD plugin that uses metasploit-erd to add Entity-Relationship Diagrams
|
98
112
|
to each namespace Module and ActiveRecord::Base subclass's documentation.
|
99
113
|
email:
|
@@ -102,25 +116,29 @@ executables: []
|
|
102
116
|
extensions: []
|
103
117
|
extra_rdoc_files: []
|
104
118
|
files:
|
105
|
-
- .coveralls.yml
|
106
|
-
- .gitignore
|
107
|
-
- .rspec
|
108
|
-
- .simplecov
|
109
|
-
- .travis.yml
|
110
|
-
- .yardopts
|
119
|
+
- ".coveralls.yml"
|
120
|
+
- ".gitignore"
|
121
|
+
- ".rspec"
|
122
|
+
- ".simplecov"
|
123
|
+
- ".travis.yml"
|
124
|
+
- ".yardopts"
|
125
|
+
- CHANGELOG.md
|
126
|
+
- CONTRIBUTING.md
|
111
127
|
- Gemfile
|
112
128
|
- LICENSE
|
113
129
|
- README.md
|
130
|
+
- RELEASING.md
|
114
131
|
- Rakefile
|
132
|
+
- UPGRADING.md
|
115
133
|
- doc/example/images/mdm/module.erd.png
|
116
134
|
- doc/example/images/mdm/module/author.erd.png
|
117
135
|
- lib/tasks/yard.rake
|
118
136
|
- lib/yard-metasploit-erd.rb
|
119
137
|
- lib/yard/metasploit/erd.rb
|
120
138
|
- lib/yard/metasploit/erd/version.rb
|
139
|
+
- spec/lib/yard/metasploit/erd/version_spec.rb
|
140
|
+
- spec/lib/yard/metasploit/erd_spec.rb
|
121
141
|
- spec/spec_helper.rb
|
122
|
-
- spec/yard/metasploit/erd/version_spec.rb
|
123
|
-
- spec/yard/metasploit/erd_spec.rb
|
124
142
|
- templates/default/class/html/entity_relationship_diagram.erb
|
125
143
|
- templates/default/class/html/setup.rb
|
126
144
|
- templates/default/layout/html/entity_relationship_diagram.erb
|
@@ -138,22 +156,22 @@ require_paths:
|
|
138
156
|
- lib
|
139
157
|
required_ruby_version: !ruby/object:Gem::Requirement
|
140
158
|
requirements:
|
141
|
-
- -
|
159
|
+
- - ">="
|
142
160
|
- !ruby/object:Gem::Version
|
143
|
-
version: '
|
161
|
+
version: '2.1'
|
144
162
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
163
|
requirements:
|
146
|
-
- -
|
164
|
+
- - ">"
|
147
165
|
- !ruby/object:Gem::Version
|
148
|
-
version:
|
166
|
+
version: 1.3.1
|
149
167
|
requirements: []
|
150
168
|
rubyforge_project:
|
151
|
-
rubygems_version: 2.
|
169
|
+
rubygems_version: 2.4.3
|
152
170
|
signing_key:
|
153
171
|
specification_version: 4
|
154
172
|
summary: YARD plugin that add Metasploit::ERDs to namespaces and classes
|
155
173
|
test_files:
|
174
|
+
- spec/lib/yard/metasploit/erd/version_spec.rb
|
175
|
+
- spec/lib/yard/metasploit/erd_spec.rb
|
156
176
|
- spec/spec_helper.rb
|
157
|
-
- spec/yard/metasploit/erd/version_spec.rb
|
158
|
-
- spec/yard/metasploit/erd_spec.rb
|
159
177
|
has_rdoc:
|
@@ -1,143 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
require 'active_support/core_ext/object/blank'
|
4
|
-
|
5
|
-
describe YARD::Metasploit::ERD::Version do
|
6
|
-
context 'CONSTANTS' do
|
7
|
-
context 'MAJOR' do
|
8
|
-
subject(:major) do
|
9
|
-
described_class::MAJOR
|
10
|
-
end
|
11
|
-
|
12
|
-
it 'is 0 because the API is not locked yet' do
|
13
|
-
expect(major).to eq(0)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
context 'MINOR' do
|
18
|
-
subject(:minor) do
|
19
|
-
described_class::MINOR
|
20
|
-
end
|
21
|
-
|
22
|
-
it { should be_a Integer }
|
23
|
-
end
|
24
|
-
|
25
|
-
context 'PATCH' do
|
26
|
-
subject(:patch) do
|
27
|
-
described_class::PATCH
|
28
|
-
end
|
29
|
-
|
30
|
-
it { should be_a Integer }
|
31
|
-
end
|
32
|
-
|
33
|
-
pull_request = ENV['TRAVIS_PULL_REQUEST']
|
34
|
-
|
35
|
-
# a pull request cannot check PRERELEASE because it will be tested in the target branch, but the source itself
|
36
|
-
# is from the source branch and so has the source branch PRERELEASE.
|
37
|
-
#
|
38
|
-
# PRERELEASE can only be set appropriately for a merge by merging to the target branch and then updating PRERELEASE
|
39
|
-
# on the target branch before committing and/or pushing to github and travis-ci.
|
40
|
-
if pull_request.nil? || pull_request == 'false'
|
41
|
-
context 'PREPRELEASE' do
|
42
|
-
subject(:prerelease) do
|
43
|
-
described_class::PRERELEASE
|
44
|
-
end
|
45
|
-
|
46
|
-
branch = ENV['TRAVIS_BRANCH']
|
47
|
-
|
48
|
-
if branch.blank?
|
49
|
-
branch = `git rev-parse --abbrev-ref HEAD`.strip
|
50
|
-
end
|
51
|
-
|
52
|
-
if branch == 'master'
|
53
|
-
it 'does not have a PRERELEASE' do
|
54
|
-
expect(defined? described_class::PRERELEASE).to be_nil
|
55
|
-
end
|
56
|
-
else
|
57
|
-
branch_regex = /\A(feature|staging)\/(?<prerelease>.*)\z/
|
58
|
-
match = branch.match(branch_regex)
|
59
|
-
|
60
|
-
if match
|
61
|
-
it 'matches the branch relative name' do
|
62
|
-
expect(prerelease).to eq(match[:prerelease])
|
63
|
-
end
|
64
|
-
else
|
65
|
-
tag_regex = /\Av(?<major>\d+).(?<minor>\d+).(?<patch>\d+)(-(?<prerelease>.*))?\z/
|
66
|
-
# travis-ci sets TRAVIS_BRANCH to the tag name for tag builds
|
67
|
-
match = branch.match(tag_regex)
|
68
|
-
|
69
|
-
if match
|
70
|
-
tag_prerelease = match[:prerelease]
|
71
|
-
|
72
|
-
if tag_prerelease
|
73
|
-
it 'matches the tag prerelease' do
|
74
|
-
expect(prerelease).to eq(tag_prerelease)
|
75
|
-
end
|
76
|
-
else
|
77
|
-
it 'does not have a PRERELEASE' do
|
78
|
-
expect(defined? described_class::PRERELEASE).to be_nil
|
79
|
-
end
|
80
|
-
end
|
81
|
-
else
|
82
|
-
it 'has a abbreviated reference that can be parsed for prerelease' do
|
83
|
-
fail "Do not know how to parse #{branch.inspect} for PRERELEASE"
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
87
|
-
end
|
88
|
-
end
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
|
-
context 'full' do
|
93
|
-
subject(:full) do
|
94
|
-
described_class.full
|
95
|
-
end
|
96
|
-
|
97
|
-
#
|
98
|
-
# lets
|
99
|
-
#
|
100
|
-
|
101
|
-
let(:major) do
|
102
|
-
1
|
103
|
-
end
|
104
|
-
|
105
|
-
let(:minor) do
|
106
|
-
2
|
107
|
-
end
|
108
|
-
|
109
|
-
let(:patch) do
|
110
|
-
3
|
111
|
-
end
|
112
|
-
|
113
|
-
before(:each) do
|
114
|
-
stub_const("#{described_class}::MAJOR", major)
|
115
|
-
stub_const("#{described_class}::MINOR", minor)
|
116
|
-
stub_const("#{described_class}::PATCH", patch)
|
117
|
-
end
|
118
|
-
|
119
|
-
context 'with PRERELEASE' do
|
120
|
-
let(:prerelease) do
|
121
|
-
'prerelease'
|
122
|
-
end
|
123
|
-
|
124
|
-
before(:each) do
|
125
|
-
stub_const("#{described_class}::PRERELEASE", prerelease)
|
126
|
-
end
|
127
|
-
|
128
|
-
it 'is <major>.<minor>.<patch>-<prerelease>' do
|
129
|
-
expect(full).to eq("#{major}.#{minor}.#{patch}-#{prerelease}")
|
130
|
-
end
|
131
|
-
end
|
132
|
-
|
133
|
-
context 'without PRERELEASE' do
|
134
|
-
before(:each) do
|
135
|
-
hide_const("#{described_class}::PRERELEASE")
|
136
|
-
end
|
137
|
-
|
138
|
-
it 'is <major>.<minor>.<patch>' do
|
139
|
-
expect(full).to eq("#{major}.#{minor}.#{patch}")
|
140
|
-
end
|
141
|
-
end
|
142
|
-
end
|
143
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe YARD::Metasploit::ERD do
|
4
|
-
context 'CONSTANTS' do
|
5
|
-
context 'VERSION' do
|
6
|
-
subject(:version) do
|
7
|
-
described_class::VERSION
|
8
|
-
end
|
9
|
-
|
10
|
-
it 'is YARD::Metasploit::ERD::Version.full' do
|
11
|
-
expect(version).to eq(YARD::Metasploit::ERD::Version.full)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|