2014-05-12 22:03:51 +02:00
|
|
|
#!/usr/bin/env rake
|
|
|
|
require File.expand_path('../config/application', __FILE__)
|
2014-07-30 17:10:20 +02:00
|
|
|
require 'metasploit/framework/require'
|
2014-10-23 17:24:33 +02:00
|
|
|
require 'metasploit/framework/spec/untested_payloads'
|
2014-07-30 17:10:20 +02:00
|
|
|
|
|
|
|
# @note must be before `Metasploit::Framework::Application.load_tasks`
|
|
|
|
#
|
|
|
|
# define db rake tasks from activerecord if activerecord is in the bundle. activerecord could be not in the bundle if
|
|
|
|
# the user installs with `bundle install --without db`
|
|
|
|
Metasploit::Framework::Require.optionally_active_record_railtie
|
2012-10-01 20:09:30 +02:00
|
|
|
|
2016-12-12 18:41:16 +01:00
|
|
|
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."
|
|
|
|
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`"
|
|
|
|
else
|
|
|
|
require 'rspec/core/rake_task'
|
|
|
|
RSpec::Core::RakeTask.new(spec: 'db:test:prepare')
|
|
|
|
end
|
|
|
|
|
2014-05-12 22:03:51 +02:00
|
|
|
Metasploit::Framework::Application.load_tasks
|
2014-10-30 15:37:17 +01:00
|
|
|
Metasploit::Framework::Spec::Constants.define_task
|
2014-11-05 22:34:35 +01:00
|
|
|
Metasploit::Framework::Spec::Threads::Suite.define_task
|
2014-10-23 17:24:33 +02:00
|
|
|
Metasploit::Framework::Spec::UntestedPayloads.define_task
|