Skip to content

Commit

Permalink
Merge branch 'chore/MSP-10800/public-integrations'
Browse files Browse the repository at this point in the history
MSP-10800
  • Loading branch information
limhoff-r7 committed Jul 21, 2014
2 parents 61d8056 + 17d7076 commit 114d17c
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 11 deletions.
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
before_script:
- cp spec/dummy/config/database.yml.travis spec/dummy/config/database.yml
- rake db:setup
language: ruby
matrix:
allow_failures:
# Rubinius.mri_backtrace primitive failed (PrimitiveFailure)
- rvm: 'rbx-2.2'
rvm:
- '1.9.3'
- '2.0'
- '2.1'
- 'jruby-19mode'
- 'rbx-2.2'
17 changes: 10 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,17 @@ If your changes are incompatible with the previous branch's API, then increment
- [ ] Following the rules for [semantic versioning 2.0](http://semver.org/spec/v2.0.0.html), update [`MINOR`](lib/metasploit/credential/version.rb) and [`PATCH`](lib/metasploit/credential/version.rb) and commit the changes.
## Tagging
metasploit-credential is currently, private, so it is only tagged for internal use, instead of being released to
rubygems.
## JRuby
- [ ] `rvm use jruby@metasploit_data_models`
- [ ] `rm Gemfile.lock`
- [ ] `bundle install`
- [ ] `rake release`
- [ ] `git tag --message 'Version MAJOR.MINOR.PATCH on the DESTINATION branch' 'vMAJOR.MINOR.PATCH-PRERELEASE'
- [ ] `git push`
- [ ] `git push --tags`
## MRI Ruby
- [ ] `rvm use ruby-1.9.3@metasploit_data_models`
- [ ] `rm Gemfile.lock`
- [ ] `bundle install`
- [ ] `rake release`
```

### Downstream dependencies
Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ end
group :development, :test do
# Hash password for Metasploit::Credential::PasswordHash factories
gem 'bcrypt'
# Uploads simplecov reports to coveralls.io
gem 'coveralls', require: false
# supplies factories for producing model instance for specs
# Version 4.1.0 or newer is needed to support generate calls without the 'FactoryGirl.' in factory definitions syntax.
gem 'factory_girl', '>= 4.1.0'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Metasploit::Credential
# Metasploit::Credential [![Build Status](https://travis-ci.org/rapid7/metasploit-credential.png)](https://travis-ci.org/rapid7/metasploit-credential)[![Code Climate](https://codeclimate.com/github/rapid7/metasploit-credential.png)](https://codeclimate.com/github/rapid7/metasploit-credential)[![Dependency Status](https://gemnasium.com/rapid7/metasploit-credential.svg)](https://gemnasium.com/rapid7/metasploit-credential)[![Gem Version](https://badge.fury.io/rb/metasploit-credential.svg)](http://badge.fury.io/rb/metasploit-credential)[![Inline docs](http://inch-ci.org/github/rapid7/metasploit-credential.svg)](http://inch-ci.org/github/rapid7/metasploit-credential)[![PullReview stats](https://www.pullreview.com/github/rapid7/metasploit-credential/badges/master.svg)](https://www.pullreview.com/github/rapid7/metasploit-credential/reviews/master)

## Versioning

Expand Down
2 changes: 1 addition & 1 deletion lib/metasploit/credential/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Version
# The minor version number, scoped to the {MAJOR} version number.
MINOR = 7
# The patch number, scoped to the {MINOR} version number.
PATCH = 7
PATCH = 8

# The full version string, including the {MAJOR}, {MINOR}, {PATCH}, and optionally, the {PRERELEASE} in the
# {http://semver.org/spec/v2.0.0.html semantic versioning v2.0.0} format.
Expand Down
13 changes: 11 additions & 2 deletions metasploit-credential.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ Gem::Specification.new do |s|
s.files = Dir['{app,config,db,lib,spec}/**/*'] + ['CONTRIBUTING.md', 'LICENSE', 'Rakefile', 'README.md']
s.test_files = s.files.grep(/spec/)

s.add_development_dependency 'pg'

# patching inverse association in Mdm models.
s.add_runtime_dependency 'metasploit-concern', '~> 0.1.0'
# Various Metasploit::Credential records have associations to Mdm records
Expand All @@ -29,4 +27,15 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'rubyntlm'
# Required for supporting the en masse importation of SSH Keys
s.add_runtime_dependency 'rubyzip', '~> 1.1'

if RUBY_PLATFORM =~ /java/
s.add_runtime_dependency 'jdbc-postgres'
s.add_runtime_dependency 'activerecord-jdbcpostgresql-adapter'

s.platform = Gem::Platform::JAVA
else
s.add_runtime_dependency 'pg'

s.platform = Gem::Platform::RUBY
end
end
22 changes: 22 additions & 0 deletions spec/dummy/config/database.yml.travis
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# @note This file is only for use in travis-ci. If you need to make a `spec/dummy/config/database.yml` for running
# rake, rake spec, or rspec locally, please customize `spec/dummy/config/database.yml.example`.
#
# @example Customizing config/database.yml.example
# cp spec/dummy/config/database.yml.example spec/dummy/config/database.yml
# # update password fields for each environment's user

# Using the postgres user locally without a host and port is the supported configuration from Travis-CI
#
# @see http://about.travis-ci.org/docs/user/database-setup/#PostgreSQL
development: &pgsql
adapter: postgresql
database: metasploit_credential_development
username: postgres
pool: 5
timeout: 5

# Warning: The database defined as "test" will be erased and re-generated from your development database when you run
# `rake`. Do not set this db to the same as development or production.
test:
<<: *pgsql
database: metasploit_credential_test
8 changes: 8 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
# Require simplecov before loading ..dummy/config/environment.rb because it will cause metasploit-credential/lib to
# be loaded, which would result in Coverage not recording hits for any of the files.
require 'simplecov'
require 'coveralls'

if ENV['TRAVIS'] == 'true'
# don't generate local report as it is inaccessible on travis-ci, which is why coveralls is being used.
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
else
SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
end

require File.expand_path("../dummy/config/environment", __FILE__)
require 'rspec/rails'
Expand Down

0 comments on commit 114d17c

Please sign in to comment.