Commit Graph

22 Commits

Author SHA1 Message Date
Dean Welch acf23e9c61 Sets config.eager_load to false for production envs 2023-03-21 12:31:33 +00:00
Jeffrey Martin 90dc90cbab future proof legacy connection 2023-01-23 10:03:32 -06:00
Jeffrey Martin 177f1ec4d8 update that may need guards depending on execution 2023-01-23 09:57:15 -06:00
Jeffrey Martin 16d7a9315b Update reline and suppress Fiddle issue
This reverts commit 6494603510, reversing
changes made to 5d3b8f8030.

By defining the missing constant early in startup we can force
reline to detect Fiddle as version '0.0.0' when the class is provide
by a Ruby 2.x implementation that has an documented version.
2022-09-01 11:05:54 -05:00
Jeffrey Martin 047a1eba07 Rails 6.1 upgrade 2021-08-09 12:16:08 -05:00
dwelch-r7 1617b3ec9b Use zeitwerk for lib/msf/core folder 2020-12-07 10:31:45 +00:00
Jeffrey Martin 89d010a533 remove rails_bigdecimal_fix with rails 5 bump 2020-07-31 11:56:50 -05:00
Brent Cook e4992c6817 move bigdecimal fix to separate file, include for specs
This fixes some noisy warnings about bignum when running specs, making it easier to see the real problems.
2019-09-10 18:40:14 -05:00
Trevor Rosen be127e0c61 Per-env eager load settings for Rails 4
#5234
 MSP-12612
2015-04-23 14:18:51 -05:00
Matt Buck 2cd5be021b Merge branch 'master' into staging/rails-4.0
Conflicts:
	Gemfile
	Gemfile.lock
	db/schema.rb
	metasploit-framework-db.gemspec
	metasploit-framework.gemspec
2015-01-08 13:12:27 -06:00
Trevor Rosen 3ba3465afb Ensure logging in ~/.msf4/log
Fix #4511
2015-01-07 09:37:07 -06:00
Luke Imhoff 633b4b9e51 Disable simplecov on travis-ci
MSP-11671

`bundler install --without coverage` will not install `simplecov`.
Running without simplecov changes the average runtime of `rake
cucumber:boot` from (n=13) 112.50 seconds to (n=10) 32.17 seconds
(-71.41%). (-73.68% from 2c1203ba49d49603aec169eed053ab929ccdedc6.)  Raw
data:
https://docs.google.com/spreadsheets/d/1vCRi_38Go3Wfq670eDCXMTSSXL1blSbk6NQsgpOqfYw/edit?usp=sharing.
2014-12-05 11:58:09 -06:00
darkbushido 5e693a043b we need action_controller/railties 2014-09-04 13:06:14 -05:00
Luke Imhoff 951ce15b44 Move database.yml selection to Metasploit::Framework::Database
MSP-11153

Test the following paths in order and only return them if the path
exists:

1. MSF_DATABASE_CONFIG environment variable
2. ~/.msf4/database.yml
3. <project>/config/database.yml
2014-08-27 12:01:43 -05:00
Luke Imhoff 7013a2755b Favor MSF_DATABASE_CONFIG for paths['config/database']
MSP-10848

Use these locations, in order for
Metasploit::Framework::Application.config.paths['config/database']:

1. MSF_DATABASE_CONFIG environment variable
2. ~/.msf4/database.yml (if it exists)
3. config/database.yml
2014-08-05 10:16:33 -05:00
Luke Imhoff d56dd318b9 require 'action_view/railtie' for pro compatibility
MSP-10848

Other railties, like jquery-rails, need 'action_view/railtie', but don't
require it themselves, so require it explictly in
`config/application.rb` to prevent msfconsole boot errors.
2014-08-04 20:12:28 -05:00
Luke Imhoff ba4891bca0 Restore Rails.groups arguments
MSP-10905

They don't cause a problem.
2014-07-29 15:50:52 -05:00
Luke Imhoff 04541ac724 Parse msfconsole options before initializing Rails
MSP-10905
2014-07-29 14:07:14 -05:00
James Lee 2eea95e120 Silence warnings about I18n defaults 2014-07-18 11:49:49 -05:00
Luke Imhoff 9d326fcb24 Extra common engine and fix default encoding
MSP-9653

Extra config and initializers that can we shared between
Metasploit::Framework::Application and the future
Metasploit::Framework::Engine.  Move the default encoding setup from
lib/msf/sanity.rb to a before_initialize callback for the shared config
so that gems, like gherkin that depend on the utf-8 default internal
encoding can be loaded.
2014-06-02 12:57:48 -05:00
Luke Imhoff b1598e83c3 Re-enable bundle install --without db support
MSP-9606

Catch LoadError in config/application.rb when trying to require
'active_record/railtie` so that end-users can run without any of the
database gems installed.  NOTE: you can't run in the development or
test environment without the database because factory_girl needs
ActiveRecord.
2014-05-12 15:39:34 -05:00
Luke Imhoff 3370465d84 Use railties to load Metasploit::Credential correctly
MSP-9606

In order to support Metasploit::Credential correctly,
metasploit-framework needs to support Metasploit::Concern, which does
all its magic using a Rails::Engine initializer, so the easiest path is
to make metasploit-framework be able to use Rails::Engines.  To make
Rails::Engine use Rails::Engine, make a dummy Rails::Application
subclass so that all the initializers will be run when anything requires
msfenv.
2014-05-12 15:03:51 -05:00