Update Gemfile to metasploit_data_models 0.6.1

[#45771305]

MetasploitDataModels 0.6.1 adds a re-usable yard.rake so that all
Metasploit project don't have to define their own.  It also adds guards
so that the YARD tasks aren't defined (and don't cause errors) if YARD
is not available.

This also adds support for making the Rakefile work with `bundle install
--without development test` so it still functions in the bundle building
environment for Pro.
bug/bundler_fix
Luke Imhoff 2013-03-07 14:22:35 -06:00
parent fac941aae4
commit 7ca33c12bd
5 changed files with 49 additions and 55 deletions

4
.yardopts Normal file
View File

@ -0,0 +1,4 @@
--protected
--files CONTRIBUTING.md,COPYING,HACKING,LICENSE
lib/msf/**/*.rb
lib/rex/**/*.rb

View File

@ -7,7 +7,7 @@ gem 'activerecord'
# Needed for some admin modules (scrutinizer_add_user.rb) # Needed for some admin modules (scrutinizer_add_user.rb)
gem 'json' gem 'json'
# Database models shared between framework and Pro. # Database models shared between framework and Pro.
gem 'metasploit_data_models', :git => 'git://github.com/rapid7/metasploit_data_models.git', :tag => '0.6.0' gem 'metasploit_data_models', :git => 'git://github.com/rapid7/metasploit_data_models.git', :tag => '0.6.1'
# Needed by msfgui and other rpc components # Needed by msfgui and other rpc components
gem 'msgpack' gem 'msgpack'
# Needed by anemone crawler # Needed by anemone crawler

View File

@ -1,9 +1,9 @@
GIT GIT
remote: git://github.com/rapid7/metasploit_data_models.git remote: git://github.com/rapid7/metasploit_data_models.git
revision: 0285d6e199f125b33214100dcb0f4eeb12ee765f revision: 01f6a1eb2ac1acc069feac58e4d09a4555389096
tag: 0.6.0 tag: 0.6.1
specs: specs:
metasploit_data_models (0.6.0) metasploit_data_models (0.6.1)
activerecord (>= 3.2.10) activerecord (>= 3.2.10)
activesupport activesupport
pg pg

View File

@ -1,47 +1,49 @@
require 'bundler/setup' require 'bundler/setup'
require 'rspec/core/rake_task' require 'metasploit_data_models'
require 'yard'
RSpec::Core::RakeTask.new(:spec) print_without = false
task :default => :spec begin
require 'rspec/core/rake_task'
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."
namespace :yard do print_without = true
yard_files = [ else
# Ruby source files first RSpec::Core::RakeTask.new(:spec)
'lib/msf/**/*.rb',
'lib/rex/**/*.rb',
# Anything after '-' is a normal documentation, not source
'-',
'COPYING',
'HACKING',
'THIRD-PARTY.md'
]
yard_options = [
# include documentation for protected methods for developers extending the code.
'--protected'
]
YARD::Rake::YardocTask.new(:doc) do |t| task :default => :spec
t.files = yard_files
# --no-stats here as 'stats' task called after will print fuller stats
t.options = yard_options + ['--no-stats']
t.after = Proc.new {
Rake::Task['yard:stats'].execute
}
end
desc "Shows stats for YARD Documentation including listing undocumented modules, classes, constants, and methods"
task :stats => :environment do
stats = YARD::CLI::Stats.new
yard_arguments = yard_options + ['--compact', '--list-undoc'] + yard_files
stats.run(*yard_arguments)
end
end end
# @todo Figure out how to just clone description from yard:doc begin
desc "Generate YARD documentation" require 'yard'
# allow calling namespace to as a task that goes to default task for namespace rescue LoadError
task :yard => ['yard:doc'] puts "yard not in bundle, so can't set up yard tasks. " \
"To generate documentation ensure to install the development group."
print_without = true
end
metasploit_data_models_task_glob = MetasploitDataModels.root.join(
'lib',
'tasks',
'**',
'*.rake'
).to_s
# include tasks from metasplioit_data_models, such as `rake yard`.
# metasploit-framework specific yard options are in .yardopts
Dir.glob(metasploit_data_models_task_glob) do |path|
load path
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

View File

@ -1,12 +0,0 @@
source 'http://rubygems.org'
gem 'rails', '3.2.2'
gem 'authlogic'
gem 'prototype_legacy_helper', '0.0.0', :git => 'git://github.com/jvennix-r7/prototype_legacy_helper.git'
gem 'state_machine', '1.1.2'
gem 'liquid', '2.3.0'
gem 'ice_cube'
gem 'acts_as_list'
gem 'mime-types', '1.18', :git => "git://github.com/rapid7/mime-types.git"
gem 'metasploit_data_models', '0.0.2', :git => "git://github.com/rapid7/metasploit_data_models.git"
gem 'robots', '0.10.1'