File tree Expand file tree Collapse file tree 2 files changed +0
-30
lines changed Expand file tree Collapse file tree 2 files changed +0
-30
lines changed Original file line number Diff line number Diff line change @@ -60,11 +60,6 @@ def self.require_environment!
60
60
# the configuration from the parsed options.
61
61
parsed_options . configure ( Rails . application )
62
62
63
- # support disabling the database
64
- unless parsed_options . options . database . disable
65
- Metasploit ::Framework ::Require . optionally_active_record_railtie
66
- end
67
-
68
63
Rails . application . require_environment!
69
64
70
65
parsed_options
Original file line number Diff line number Diff line change @@ -34,31 +34,6 @@ def self.optionally(name, without_warning)
34
34
end
35
35
end
36
36
37
- # Tries to `require 'active_record/railtie'` to define the activerecord Rails initializers and rake tasks.
38
- #
39
- # @example Optionally requiring 'active_record/railtie'
40
- # require 'metasploit/framework/require'
41
- #
42
- # class MyClass
43
- # def setup
44
- # if database_enabled
45
- # Metasploit::Framework::Require.optionally_active_record_railtie
46
- # end
47
- # end
48
- # end
49
- #
50
- # @return [void]
51
- def self . optionally_active_record_railtie
52
- if ::File . exist? ( Rails . application . config . paths [ 'config/database' ] . first )
53
- optionally (
54
- 'active_record/railtie' ,
55
- 'activerecord not in the bundle, so database support will be disabled.'
56
- )
57
- else
58
- warn 'Could not find database.yml, so database support will be disabled.'
59
- end
60
- end
61
-
62
37
# Tries to `require 'metasploit/credential/creation'` and include it in the `including_module`.
63
38
#
64
39
# @param including_module [Module] `Class` or `Module` that wants to `include Metasploit::Credential::Creation`.
You can’t perform that action at this time.
0 commit comments