-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'staging/electro-release'
- Loading branch information
Showing
379 changed files
with
28,753 additions
and
53 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
service_name: travis-ci |
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,19 +1,27 @@ | ||
# bundler configuration | ||
.bundle | ||
# Mac OS X folder attributes | ||
.DS_Store | ||
# built gems | ||
*.gem | ||
# Rubymine project configuration | ||
.idea | ||
*.gem | ||
*.rbc | ||
.bundle | ||
.config | ||
# logs | ||
*.log | ||
# Don't check in new rvm version and gemset files | ||
.ruby-gemset | ||
.ruby-version | ||
# Don't check in rvmrc since this is a gem | ||
.rvmrc | ||
# YARD database | ||
.yardoc | ||
Gemfile.lock | ||
InstalledFiles | ||
_yardoc | ||
# coverage report directory for simplecov/Rubymine | ||
coverage | ||
doc/ | ||
lib/bundler/man | ||
pkg | ||
rdoc | ||
spec/reports | ||
test/tmp | ||
test/version_tmp | ||
tmp | ||
# generated yardocs | ||
doc | ||
# Installed gem versions. Not stored for the same reasons as .rvmrc | ||
Gemfile.lock | ||
# Packaging directory for builds | ||
pkg/* | ||
# Database configuration (with passwords) for specs | ||
spec/dummy/config/database.yml |
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 @@ | ||
--backtrace | ||
--colour | ||
--drb | ||
--format nested |
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,38 @@ | ||
# RM_INFO is set when using Rubymine. In Rubymine, starting SimpleCov is | ||
# controlled by running with coverage, so don't explicitly start coverage (and | ||
# therefore generate a report) when in Rubymine. This _will_ generate a report | ||
# whenever `rake spec` is run. | ||
unless ENV['RM_INFO'] | ||
SimpleCov.start | ||
end | ||
|
||
SimpleCov.configure do | ||
load_adapter('rails') | ||
|
||
# ignore this file | ||
add_filter '.simplecov' | ||
|
||
# | ||
# Changed Files in Git Group | ||
# @see http://fredwu.me/post/35625566267/simplecov-test-coverage-for-changed-files-only | ||
# | ||
|
||
untracked = `git ls-files --exclude-standard --others` | ||
unstaged = `git diff --name-only` | ||
staged = `git diff --name-only --cached` | ||
all = untracked + unstaged + staged | ||
changed_filenames = all.split("\n") | ||
|
||
add_group 'Changed' do |source_file| | ||
changed_filenames.detect { |changed_filename| | ||
source_file.filename.end_with?(changed_filename) | ||
} | ||
end | ||
|
||
# | ||
# Specs are reported on to ensure that all examples are being run and all | ||
# lets, befores, afters, etc are being used. | ||
# | ||
|
||
add_group 'Specs', 'spec' | ||
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,6 @@ | ||
language: ruby | ||
rvm: | ||
- '1.9.3' | ||
- '2.0' | ||
- '2.1' | ||
- 'jruby-19mode' |
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,5 @@ | ||
--markup markdown | ||
--private | ||
--protected | ||
{app,lib}/**/*.rb | ||
db/migrate/*.rb |
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,27 @@ | ||
Copyright (C) 2012-2013, Rapid7, Inc. | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, | ||
are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
* Neither the name of Rapid7 LLC nor the names of its contributors | ||
may be used to endorse or promote products derived from this software | ||
without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | ||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1,52 @@ | ||
require "bundler/gem_tasks" | ||
#!/usr/bin/env rake | ||
begin | ||
require 'bundler/setup' | ||
rescue LoadError | ||
puts 'You must `gem install bundler` and `bundle install` to run rake tasks' | ||
end | ||
|
||
print_without = false | ||
APP_RAKEFILE = File.expand_path('../spec/dummy/Rakefile', __FILE__) | ||
|
||
begin | ||
load 'rails/tasks/engine.rake' | ||
rescue LoadError | ||
puts "railties not in bundle, so can't load engine tasks." | ||
print_without = true | ||
end | ||
|
||
Bundler::GemHelper.install_tasks | ||
|
||
# | ||
# load rake files like a normal rails app | ||
# @see http://viget.com/extend/rails-engine-testing-with-rspec-capybara-and-factorygirl | ||
# | ||
|
||
pathname = Pathname.new(__FILE__) | ||
root = pathname.parent | ||
rakefile_glob = root.join('lib', 'tasks', '**', '*.rake').to_path | ||
|
||
Dir.glob(rakefile_glob) do |rakefile| | ||
load rakefile | ||
end | ||
|
||
begin | ||
require 'rspec/core' | ||
rescue LoadError | ||
puts "rspec not in bundle, so can't set up spec tasks. " \ | ||
"To run specs ensure to install the development and test groups." | ||
print_without = true | ||
else | ||
require 'rspec/core/rake_task' | ||
|
||
# @see http://viget.com/extend/rails-engine-testing-with-rspec-capybara-and-factorygirl | ||
RSpec::Core::RakeTask.new(:spec) | ||
|
||
task :default => :spec | ||
end | ||
|
||
if print_without | ||
puts "Bundle currently installed '--without #{Bundler.settings.without.join(' ')}'." | ||
puts "To clear the without option do `bundle install --without ''` (the --without flag with an empty string) or " \ | ||
"`rm -rf .bundle` to remove the .bundle/config manually and then `bundle install`" | ||
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,46 @@ | ||
# Reflection of the call to {Metasploit::Model::Association::ClassMethods#association}. | ||
class Metasploit::Model::Association::Reflection < Metasploit::Model::Base | ||
# | ||
# Attributes | ||
# | ||
|
||
# @!attribute [rw] class_name | ||
# The name {#klass}. The name of {#klass} is given instead of {#klass} directly when initializing this | ||
# reflection to prevent circular references with autoloading or ActiveSupport::Dependencies loading. | ||
# | ||
# @return [String] Fully-qualified name of class in this association | ||
attr_accessor :class_name | ||
|
||
# @!attribute [rw] model | ||
# The model on which this association was declared. The equivalent for ActiveRecord association reflections | ||
# would be #active_record. | ||
# | ||
# @return [Class] | ||
attr_accessor :model | ||
|
||
# @!attribute [rw] name | ||
# The name of this association. | ||
# | ||
# @return [String] | ||
attr_accessor :name | ||
|
||
# | ||
# Validations | ||
# | ||
|
||
validates :model, :presence => true | ||
validates :name, :presence => true | ||
validates :class_name, :presence => true | ||
|
||
# | ||
# Methods | ||
# | ||
|
||
# Class with name {#class_name}. | ||
# | ||
# @return [] | ||
# @raise [NameError] if {#class_name} cannot be constantized | ||
def klass | ||
class_name.constantize | ||
end | ||
end |
Oops, something went wrong.