Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
376 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
--format documentation | ||
--color | ||
--backtrace | ||
--require spec_helper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Next Release | ||
|
||
* Enhancements | ||
* Bug Fixes | ||
* Deprecations | ||
* Incompatible Changes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
# Contributing | ||
|
||
## Forking | ||
|
||
[Fork this repository](https://github.com/rapid7/metasploit-erd/fork) | ||
|
||
## Branching | ||
|
||
Branch names follow the format `TYPE/ISSUE/SUMMARY`. You can create it with `git checkout -b TYPE/ISSUE/SUMMARY`. | ||
|
||
### `TYPE` | ||
|
||
`TYPE` can be `bug`, `chore`, or `feature`. | ||
|
||
### `ISSUE` | ||
|
||
`ISSUE` is either a [Github issue](https://github.com/rapid7/metasploit-erd/issues) or an issue from some other | ||
issue tracking software. | ||
|
||
### `SUMMARY` | ||
|
||
`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. | ||
|
||
## Changes | ||
|
||
### `PRERELEASE` | ||
|
||
1. Update `PRERELEASE` to match the `SUMMARY` in the branch name. If you branched from `master`, and [version.rb](lib/metasploit/erd/version.rb) does not have `PRERELEASE` defined, then adding the following lines after `PATCH`: | ||
``` | ||
# The prerelease version, scoped to the {MAJOR}, {MINOR}, and {PATCH} version number. | ||
PRERELEASE = '<SUMMARY>' | ||
``` | ||
2. `rake spec` | ||
3. Verify the specs pass, which indicates that `PRERELEASE` was updated correctly. | ||
4. Commit the change `git commit -a` | ||
|
||
### Your changes | ||
|
||
Make your changes or however many commits you like, committing each with `git commit`. | ||
|
||
### Pre-Pull Request Testing | ||
|
||
1. Run specs one last time before opening the Pull Request: `rake spec` | ||
2. Verify there was no failures. | ||
|
||
### Push | ||
|
||
Push your branch to your fork on gitub: `git push TYPE/ISSUE/SUMMARY` | ||
|
||
### Pull Request | ||
|
||
* [Create new Pull Request](https://github.com/rapid7/metasploit-erd/compare/) | ||
* Add a Verification Steps to the description comment | ||
|
||
``` | ||
# Verification Steps | ||
- [ ] `bundle install` | ||
## `rake spec` | ||
- [ ] `rake spec` | ||
- [ ] VERIFY no failures | ||
``` | ||
|
||
You should also include at least one scenario to manually check the changes outside of specs. | ||
|
||
* Add a Post-merge Steps comment | ||
|
||
The 'Post-merge Steps' are a reminder to the reviewer of the Pull Request of how to update the [`PRERELEASE`](lib/metasploit/erd/version.rb) so that [version_spec.rb](spec/lib/metasploit/erd/version.rb_spec.rb) passes on the target branch after the merge. | ||
|
||
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. | ||
|
||
When merging to `master`: | ||
|
||
``` | ||
# Post-merge Steps | ||
Perform these steps prior to pushing to master or the build will be broke on master. | ||
## Version | ||
- [ ] Edit `lib/metasploit/erd/version.rb` | ||
- [ ] Remove `PRERELEASE` and its comment as `PRERELEASE` is not defined on master. | ||
## Gem build | ||
- [ ] gem build *.gemspec | ||
- [ ] VERIFY the gem has no '.pre' version suffix. | ||
## RSpec | ||
- [ ] `rake spec` | ||
- [ ] VERIFY version examples pass without failures | ||
## Commit & Push | ||
- [ ] `git commit -a` | ||
- [ ] `git push origin master` | ||
``` | ||
|
||
When merging to DESTINATION other than `master`: | ||
|
||
``` | ||
# Post-merge Steps | ||
Perform these steps prior to pushing to DESTINATION or the build will be broke on DESTINATION. | ||
## Version | ||
- [ ] Edit `lib/metasploit/erd/version.rb` | ||
- [ ] Change `PRERELEASE` from `SOURCE_SUMMARY` to `DESTINATION_SUMMARY` to match the branch (DESTINATION) summary (DESTINATION_SUMMARY) | ||
## Gem build | ||
- [ ] gem build metasploit-erd.gemspec | ||
- [ ] VERIFY the prerelease suffix has change on the gem. | ||
## RSpec | ||
- [ ] `rake spec` | ||
- [ ] VERIFY version examples pass without failures | ||
## Commit & Push | ||
- [ ] `git commit -a` | ||
- [ ] `git push origin DESTINATION` | ||
``` | ||
|
||
To update the [CHANGELOG.md](CHANGELOG.md) with the merged changes or release the merged code see | ||
[RELEASING.md](RELEASING.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Releasing | ||
|
||
These steps can be added to the Pull Request description's task list to remind the reviewer of how to release the | ||
gem. | ||
|
||
``` | ||
# Release | ||
Complete these steps on DESTINATION | ||
## [CHANGELOG.md](CHANGELOG.md) | ||
### Terminology | ||
* "Enhancements" are widdening the API, such as by adding new classes or methods. | ||
* "Bug Fixes" are fixes to the implementation that do not affect the public API. If the public API is affected then | ||
the change should be listed as both a "Bug Fix" and either an "Enhancement" or "Incompatible Change" depending on how | ||
the bug was fixed. | ||
* "Deprecations" are changes to the implementation that cause deprecation warnings to be issued for APIs which will be | ||
removed in a future major release. "Deprecations" are usually accompanied by an Enhancement that creates a new API | ||
that is meant to be used in favor of the deprecated API. | ||
* "Incompatbile Changes" are the removal of classes or methods or new required arguments or setup that shrink the API. | ||
It is best practice to make a "Deprecation" for the API prior to its removal. | ||
### Task List | ||
- [ ] Generate the list of changes since the last release: `git log v<LAST_MAJOR>.<LAST_MINOR>.<LAST_PATCH>..HEAD` | ||
- [ ] For each commit in the release, find the corresponding PR by search for the commit on Github. | ||
- [ ] For each PR, determine whether it is an Enhancement, Bug Fix, Deprecation, and/or Incompatible Change. A PR can | ||
be in more than one category, in which case it should be listed in each category it belongs, but with a category | ||
specific description of the change. | ||
- [ ] Add an item to each category's list in the following format: `[#<PR>](https://github.com/rapid7/metasploit-erd/pull/<PR>) <consumer summary> - [@<github_user>](https://github.com/<github_user>)` | ||
`consumer_summary` should be a summary of the Enhancement, Bug Fix, Deprecation, or Incompatible Change from a | ||
downstream consumer's of the library's perspective. `github_user` should be Github handle of the author of the | ||
PR. | ||
- [ ] If you added any Deprecations or Incompatible Changes, then adding upgrading information to | ||
[UPGRADING.md](UPGRADING.md) | ||
## `VERSION` | ||
The entries in the [CHANGELOG.md](CHANGELOG.md) can be used to help determine how the `VERSION` should be bumped. | ||
### Compatible changes | ||
If the [CHANGELOG.md](CHANGELOG.md) contains only Enhancements, Bug Fixes, and/or Deprecations for the Next Release then | ||
increment [`PATCH`](lib/metasploit/erd/version.rb). | ||
### Incompatible changes | ||
If the [CHANGELOG.md](CHANGELOG.md) contains any Incompatible Changes for the Next Release, then you can either (1) | ||
decide to remain pre-1.0.0 or (2) advance to 1.0.0. | ||
1. To remain pre-1..0.0, then increment [`MINOR`](lib/metasploit/erd/version.rb) and reset [`PATCH`](lib/metasploit/erd/version.rb) to `0`. | ||
2. To advance to 1.0.0, increment [`MAJOR`](lib/metasploit/erd/version.rb) and reset [`MINOR`](lib/metasploit/erd/version.rb and [`PATCH`](lib/metasploit/erd/version.rb) to `0`. | ||
## Setup [CHANGELOG.md](CHANGELOG.md) for next release | ||
- [ ] Change `Next Release` section name at the top of [CHANGELOG.md](CHANGELOG.md) to match the current `VERSION`. | ||
- [ ] Add a new `Next Release` section above the `VERSION`'s section you just renamed: | ||
<pre> | ||
# Next Release | ||
* Enhancements | ||
* Bug Fixes | ||
* Deprecations | ||
* Incompatible Changes | ||
</pre> | ||
## Release to rubygems.org | ||
## ruby-2.1 | ||
- [ ] `rvm use ruby-2.1@metasploit-erd` | ||
- [ ] `rm Gemfile.lock` | ||
- [ ] `bundle install` | ||
- [ ] `rake release` | ||
``` | ||
|
||
### Downstream dependencies | ||
|
||
There are currently no known downstream dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
require "bundler/gem_tasks" | ||
require "rspec/core/rake_task" | ||
|
||
require 'yard' | ||
load 'tasks/yard.rake' | ||
require 'bundler/gem_tasks' | ||
require 'bundler/setup' | ||
require 'rspec/core/rake_task' | ||
|
||
RSpec::Core::RakeTask.new(:spec) | ||
|
||
task :default => :spec | ||
task default: :spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
No Deprecations or Incompatible Changes have been introduced at this time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
RSpec.describe Metasploit::ERD::Version do | ||
it_should_behave_like 'Metasploit::Version Version Module' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
RSpec.describe Metasploit::ERD do | ||
it_should_behave_like 'Metasploit::Version GEM_VERSION constant' | ||
it_should_behave_like 'Metasploit::Version VERSION constant' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.