Mirror of metasploit
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Rakefile 1.3KB

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/env rake
  2. require File.expand_path('../config/application', __FILE__)
  3. require 'metasploit/framework/require'
  4. require 'metasploit/framework/spec/untested_payloads'
  5. # @note must be before `Metasploit::Framework::Application.load_tasks`
  6. #
  7. # define db rake tasks from activerecord if activerecord is in the bundle. activerecord could be not in the bundle if
  8. # the user installs with `bundle install --without db`
  9. Metasploit::Framework::Require.optionally_active_record_railtie
  10. begin
  11. require 'rspec/core'
  12. require 'rspec-rerun/tasks'
  13. rescue LoadError
  14. puts "rspec not in bundle, so can't set up spec tasks. " \
  15. "To run specs ensure to install the development and test groups."
  16. puts "Bundle currently installed '--without #{Bundler.settings.without.join(' ')}'."
  17. puts "To clear the without option do `bundle install --without ''` (the --without flag with an empty string) or " \
  18. "`rm -rf .bundle` to remove the .bundle/config manually and then `bundle install`"
  19. else
  20. require 'rspec/core/rake_task'
  21. RSpec::Core::RakeTask.new(spec: 'db:test:prepare')
  22. end
  23. Metasploit::Framework::Application.load_tasks
  24. Metasploit::Framework::Spec::Constants.define_task
  25. Metasploit::Framework::Spec::Threads::Suite.define_task
  26. Metasploit::Framework::Spec::UntestedPayloads.define_task