metasploit-yard 1.0.2-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e8ead908270612fce275fe39a9fc8d48367ad12a
4
+ data.tar.gz: bd5abd6f072446ffd62001434da7bb8d294e733f
5
+ SHA512:
6
+ metadata.gz: d7c7ea17a98d93487312362da2c32fe7f60475c848488b7ec7a83c002a4755d5d8936e8dfaf8d3ca68d84757e6fbcfa9f758d2bf6d51c74ae0c6b9561d0814a3
7
+ data.tar.gz: 1a790f9eb46a0c681aa2d68d9ae57481e396f8d8ef5541c3eb0eb805592ce80e17eb9b51557902df2a21d2ae5411f7abe5f5c99c67727eaa33475cf4e97c5223
data/.coveralls.yml ADDED
@@ -0,0 +1 @@
1
+ service_name: travis-ci
data/.gitignore ADDED
@@ -0,0 +1,24 @@
1
+ # Rubymine
2
+ /.idea
3
+
4
+ *.gem
5
+ *.rbc
6
+ .bundle
7
+ .config
8
+ .yardoc
9
+ Gemfile.lock
10
+ InstalledFiles
11
+ _yardoc
12
+ coverage
13
+ doc/
14
+ lib/bundler/man
15
+ pkg
16
+ rdoc
17
+ spec/reports
18
+ test/tmp
19
+ test/version_tmp
20
+ tmp
21
+
22
+ # RVM
23
+ .ruby-version
24
+ .ruby-gemset
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format documentation
data/.simplecov ADDED
@@ -0,0 +1,42 @@
1
+ # RM_INFO is set when using Rubymine. In Rubymine, starting SimpleCov is
2
+ # controlled by running with coverage, so don't explicitly start coverage (and
3
+ # therefore generate a report) when in Rubymine. This _will_ generate a report
4
+ # whenever `rake spec` is run.
5
+ unless ENV['RM_INFO']
6
+ SimpleCov.start
7
+ end
8
+
9
+ SimpleCov.configure do
10
+ # ignore this file
11
+ add_filter '.simplecov'
12
+
13
+ # Rake tasks aren't tested with rspec
14
+ add_filter 'Rakefile'
15
+ add_filter 'lib/tasks'
16
+
17
+ #
18
+ # Changed Files in Git Group
19
+ # @see http://fredwu.me/post/35625566267/simplecov-test-coverage-for-changed-files-only
20
+ #
21
+
22
+ untracked = `git ls-files --exclude-standard --others`
23
+ unstaged = `git diff --name-only`
24
+ staged = `git diff --name-only --cached`
25
+ all = untracked + unstaged + staged
26
+ changed_filenames = all.split("\n")
27
+
28
+ add_group 'Changed' do |source_file|
29
+ changed_filenames.detect { |changed_filename|
30
+ source_file.filename.end_with?(changed_filename)
31
+ }
32
+ end
33
+
34
+ add_group 'Libraries', 'lib'
35
+
36
+ #
37
+ # Specs are reported on to ensure that all examples are being run and all
38
+ # lets, befores, afters, etc are being used.
39
+ #
40
+
41
+ add_group 'Specs', 'spec'
42
+ end
data/.travis.yml ADDED
@@ -0,0 +1,21 @@
1
+ env:
2
+ global:
3
+ - secure: "IxVtzpee/XU/Qkw9g88uXX9GtQkzeUNVx05LYpfBuZWjQZWggrTp4k91HyquBNZkg30I5l7iHLbuhMB2c2SyNPN1OfkkhWZjeerJzRtaGDn7RXTAfdKUCtDceZPnl9Kv4Wbk6I2pVsXpROOP0VaPjLgod7aJqHfnw4AvP8yZbDg="
4
+ matrix:
5
+ - RAKE_TASK=cucumber
6
+ - RAKE_TASK=spec
7
+ language: ruby
8
+ matrix:
9
+ # documentation coverage is not influenced by ruby implementation, so only run once
10
+ include:
11
+ - rvm: 2.1
12
+ env: RAKE_TASK=yard
13
+ rvm:
14
+ - '1.9.3'
15
+ - '2.0'
16
+ - '2.1'
17
+ - 'ruby-head'
18
+ # jruby fails rake cucumber (see MSP-11240)
19
+ # - 'jruby-19mode'
20
+ - 'rbx-2.2'
21
+ script: "bundle exec rake $RAKE_TASK"
data/.yardopts ADDED
@@ -0,0 +1,7 @@
1
+ --markup markdown
2
+ --private
3
+ --protected
4
+ {app,lib}/**/*.rb
5
+ -
6
+ CONTRIBUTING.md
7
+ README.md
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,178 @@
1
+ # Contributing
2
+
3
+ ## Forking
4
+
5
+ [Fork this repository](https://github.com/rapid7/metasploit-yard/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/metasploit-yard/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/metasploit/yard/version.rb) does not have `PRERELEASE` defined, then adding the following lines after `PATCH`:
29
+ ```
30
+ # The prerelease version, scoped to the {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, commiting 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 push TYPE/ISSUE/SUMMARY`
49
+
50
+ ### Pull Request
51
+
52
+ * [Create new Pull Request](https://github.com/rapid7/metasploit-yard/compare/)
53
+ * Add a Verification Steps comment
54
+
55
+ ```
56
+ # Verification Steps
57
+
58
+ - [ ] `bundle install`
59
+
60
+ ## `rake cucumber`
61
+ - [ ] `rake cucumber`
62
+ - [ ] VERIFY no failures
63
+
64
+ ## `rake spec`
65
+ - [ ] `rake spec`
66
+ - [ ] VERIFY no failures
67
+ ```
68
+ You should also include at least one scenario to manually check the changes outside of specs.
69
+
70
+ * Add a Post-merge Steps comment
71
+
72
+ The 'Post-merge Steps' are a reminder to the reviewer of the Pull Request of how to update the [`PRERELEASE`](lib/metasploit/yard/version.rb) so that [version_spec.rb](spec/lib/metasploit/yard/version_spec.rb) passes on the target branch after the merge.
73
+
74
+ 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.
75
+
76
+ When merging to `master`:
77
+
78
+ ```
79
+ # Post-merge Steps
80
+
81
+ Perform these steps prior to pushing to master or the build will be broke on master.
82
+
83
+ ## Version
84
+ - [ ] Edit `lib/metasploit/yard/version.rb`
85
+ - [ ] Remove `PRERELEASE` and its comment as `PRERELEASE` is not defined on master.
86
+
87
+ ## Gem build
88
+ - [ ] gem build *.gemspec
89
+ - [ ] VERIFY the gem has no '.pre' version suffix.
90
+
91
+ ## RSpec
92
+ - [ ] `rake spec`
93
+ - [ ] VERIFY version examples pass without failures
94
+
95
+ ## Commit & Push
96
+ - [ ] `git commit -a`
97
+ - [ ] `git push origin master`
98
+ ```
99
+
100
+ When merging to DESTINATION other than `master`:
101
+
102
+ ```
103
+ # Post-merge Steps
104
+
105
+ Perform these steps prior to pushing to DESTINATION or the build will be broke on DESTINATION.
106
+
107
+ ## Version
108
+ - [ ] Edit `lib/metasploit/yard/version.rb`
109
+ - [ ] Change `PRERELEASE` from `SOURCE_SUMMARY` to `DESTINATION_SUMMARY` to match the branch (DESTINATION) summary (DESTINATION_SUMMARY)
110
+
111
+ ## Gem build
112
+ - [ ] gem build *.gemspec
113
+ - [ ] VERIFY the prerelease suffix has change on the gem.
114
+
115
+ ## RSpec
116
+ - [ ] `rake spec`
117
+ - [ ] VERIFY version examples pass without failures
118
+
119
+ ## Commit & Push
120
+ - [ ] `git commit -a`
121
+ - [ ] `git push origin DESTINATION`
122
+ ```
123
+
124
+ * Add a 'Release Steps' comment
125
+
126
+ The 'Release Steps' are a reminder to the reviewer of the Pull Request of how to release the gem.
127
+
128
+ ```
129
+ # Release
130
+
131
+ Complete these steps on DESTINATION
132
+
133
+ ## `VERSION`
134
+
135
+ ### Incompatible API changes
136
+
137
+ If your changes are incompatible with the previous branch's API, such as removing APIs or removing parts of API
138
+ signatures:
139
+
140
+ - [ ] Increment [`MAJOR`](lib/metasploit/yard/version.rb)
141
+ - [ ] Reset [`MINOR`](lib/metasploit/yard/version.rb) to `0`
142
+ - [ ] Reset [`PATCH`](lib/metasploit/yard/version.rb) to `0`
143
+ - [ ] Commit
144
+
145
+ ### Compatible API changes
146
+
147
+ If your changes are compatible with the previous branch's API, such as adding an API or adding options or optional
148
+ positional arguments to an API:
149
+
150
+ - [ ] Increment [`MINOR`](lib/metasploit/yard/version.rb)
151
+ - [ ] Reset [`PATCH`](lib/metasploit/yard/version.rb) to `0`.
152
+ - [ ] Commit
153
+
154
+ ### Compatible bug fixes
155
+
156
+ If your changes are a bug fix that don't impact the APIs, then:
157
+
158
+ - [ ] Increment [`PATCH`](lib/metasploit/yard/version.rb)
159
+ - [ ] Commit
160
+
161
+ ## JRuby
162
+ - [ ] `rvm use jruby@metasploit-yard`
163
+ - [ ] `rm Gemfile.lock`
164
+ - [ ] `bundle install`
165
+ - [ ] `rake release`
166
+
167
+ ## MRI Ruby
168
+ - [ ] `rvm use ruby-2.1@metasploit-yard`
169
+ - [ ] `rm Gemfile.lock`
170
+ - [ ] `bundle install`
171
+ - [ ] `rake release`
172
+ ```
173
+
174
+ ### Downstream dependencies
175
+
176
+ When releasing new versions, the following projects may need to be updated:
177
+
178
+ (no current downstream dependents)
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in metasploit-yard.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,29 @@
1
+ BSD-3-clause License
2
+
3
+ Copyright (c) 2013-2014, Rapid7, Inc.
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without modification,
7
+ are permitted provided that the following conditions are met:
8
+ .
9
+ * Redistributions of source code must retain the above copyright notice,
10
+ this list of conditions and the following disclaimer.
11
+ .
12
+ * Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+ .
16
+ * Neither the name of Rapid7, Inc. nor the names of its contributors
17
+ may be used to endorse or promote products derived from this software
18
+ without specific prior written permission.
19
+ .
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
24
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
27
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README.md ADDED
@@ -0,0 +1,114 @@
1
+ # Metasploit::Yard [![Build Status](https://travis-ci.org/rapid7/metasploit-yard.svg?branch=master)](https://travis-ci.org/rapid7/metasploit-yard)[![Code Climate](https://codeclimate.com/github/rapid7/metasploit-yard.png)](https://codeclimate.com/github/rapid7/metasploit-yard)[![Test Coverage](https://codeclimate.com/github/rapid7/metasploit-yard/badges/coverage.svg)](https://codeclimate.com/github/rapid7/metasploit-yard)[![Coverage Status](https://img.shields.io/coveralls/rapid7/metasploit-yard.svg)](https://coveralls.io/r/rapid7/metasploit-yard)[![Dependency Status](https://gemnasium.com/rapid7/metasploit-yard.svg)](https://gemnasium.com/rapid7/metasploit-yard)[![Gem Version](https://badge.fury.io/rb/metasploit-yard.svg)](http://badge.fury.io/rb/metasploit-yard)[![Inline docs](http://inch-ci.org/github/rapid7/metasploit-yard.svg?branch=master)](http://inch-ci.org/github/rapid7/metasploit-yard)[![PullReview stats](https://www.pullreview.com/github/rapid7/metasploit-yard/badges/master.svg)](https://www.pullreview.com/github/rapid7/metasploit-yard/reviews/master)
2
+
3
+ `metasploit-yard` holds the YARD rake task, in [`lib/tasks/yard.rake`](lib/tasks.yard.rake) used across all
4
+ `metasploit-*` projects. The rake task is defined here to prevent code duplication and task redefinitions in a gem's
5
+ dependencies leading to duplicate task actions, which led to yard docs being generated up to 6 times in some projects.
6
+
7
+ ## Versioning
8
+
9
+ `Metasploit::Yard` is versioned using [semantic versioning 2.0](http://semver.org/spec/v2.0.0.html). Each branch
10
+ should set `Metasploit::Yard::Version::PRERELEASE` to the branch name, while master should have no `PRERELEASE`
11
+ and the `PRERELEASE` section of `Metasploit::Yard::VERSION` does not exist.
12
+
13
+ ## Documentation
14
+
15
+ `Metasploit::Yard` is documented using YARD. In fact, it uses the same rake task as it exports for other gems to use.
16
+
17
+ ### Generate
18
+
19
+ rake yard
20
+
21
+ ### Reading
22
+
23
+ open doc/frames.html
24
+
25
+ ## Installation
26
+
27
+ ### Project with only a Gemfile
28
+
29
+ Add this line to your application's `Gemfile`:
30
+
31
+ gem 'metasploit-yard', group: :development
32
+
33
+ And then execute:
34
+
35
+ $ bundle
36
+
37
+ ### Project with a gemspec
38
+
39
+ Add this line to your gem's gemspec:
40
+
41
+ spec.add_development_dependency 'metasploit-yard'
42
+
43
+ And then execute:
44
+
45
+ $ bundle
46
+
47
+ ### Otherwise
48
+
49
+ Or install it yourself as:
50
+
51
+ $ gem install metasploit-yard
52
+
53
+ ## Setup
54
+
55
+ ### In a Rails::Application
56
+
57
+ `metasploit-yard` has a `Rails::Railtie`, [`Metasploit::Yard::Railtie`](lib/metasploit/yard/railtie) that will
58
+ automatically be loaded if `Rails` is defined when `metasploit/yard` is required. `Metasploit::Yard::Railtie` will
59
+ automatically load [`yard.rake`](lib/tasks/yard.rake) for your Rails project.
60
+
61
+ ### In a Rails::Engine or non-Rails gem
62
+
63
+ Add the following to your `Rakefile` to load `yard.rake` from `metasploit-yard`
64
+
65
+ # Use find_all_by_name instead of find_by_name as find_all_by_name will return pre-release versions
66
+ gem_specification = Gem::Specification.find_all_by_name('metasploit-yard').first
67
+
68
+ Dir[File.join(gem_specification.gem_dir, 'lib', 'tasks', '**', '*.rake')].each do |rake|
69
+ load rake
70
+ end
71
+
72
+ ## Usage
73
+
74
+ $ rake yard
75
+
76
+ ### CI Integration
77
+
78
+ `rake yard` will automatically call `rake yard:stats`. `rake yard:stats` will exit with status `0` only if there are
79
+ no undocumented objects. If there are undocumented objects, then `rake yard:stats` will exist with status `1`. If
80
+ you want to lower the threshold of undocumented objects that are allowed from `100.0` percentage, set the value in
81
+ `config/yard-stats-threshold` as a float.
82
+
83
+ By adding `rake yard:stats` to the tasks run by your CI server, you can have your build fail if documentation slips
84
+ below the threshold.
85
+
86
+ ## Contributing
87
+
88
+ See [CONTRIBUTING.md](CONTRIBUTING.md)
89
+
90
+ ## Testing
91
+
92
+ `Metasploit::Yard` is tested using [RSpec](https://github.com/rspec/rspec)
93
+
94
+ ### Dependencies
95
+
96
+ Remove your `Gemfile.lock` so you test with the latest compatible dependencies as will be done on
97
+ [travis-ci](https://travis-ci.org/rapid7/metasploit-yard)
98
+
99
+ rm Gemfile.lock
100
+ bundle install
101
+
102
+ ### Database Setup
103
+
104
+ To run the specs, access to the database is required, so setup the `database.yml`, create the database, and run the
105
+ migrations:
106
+
107
+ cp spec/dummy/config/database.yml.example spec/dummy/config/database.yml
108
+ # fill in passwords
109
+ edit spec/dummy/config/database.yml
110
+ rake db:create db:migrate
111
+
112
+ ### Running
113
+
114
+ rake spec