rapid7/metasploit_data_models — pull request #11 by limhoff-r7 (2013-03-07 19:34:05+00:00)
Title: Allows rake to run when bundle install --without development test

[#45771305]

MetasploitDataModels being a Rails::Engine means its lib/tasks folder is
included in the rake tasks loaded by Pro. The problem with this was
that lib/tasks/yard.rake always assumed YARD was available, but it's not
when building the bundles since Pro is bundled --without cucumber
development test. Guard the yard namespace with defined? YARD and make
sure YARD is loaded when needed by having the dummy app in spec/dummy
pass Rails.groups to Bundler.require so that more than just the default
group is loaded.

Since that pulls in factory_girl_rails, the spec/factories in
metasploit_data_models weren't being found since it was looking for
spec/factory under spec/dummy, so copy the initializer from Pro to
inject the MetasploitDataModels factories as an initializer
'metasploit_data_models.prepend_factory_path' in
MetasploitDataModels::Engine that both spec/dummy and Pro can use.