diff --git a/beef b/beef index a0aede467..ea723c015 100755 --- a/beef +++ b/beef @@ -169,7 +169,7 @@ OTR::ActiveRecord.migrations_paths = [File.join('core', 'main', 'ar-migrations') OTR::ActiveRecord.configure_from_hash!(adapter:'sqlite3', database:db_file) # otr-activerecord require you to manually establish the connection with the following line #Also a check to confirm that the correct Gem version is installed to require it, likely easier for old systems. -if Gem.loaded_specs['otr-activerecord'].version > Gem::Version.create('2.0') +if Gem.loaded_specs['otr-activerecord'].version > Gem::Version.create('1.4.2') OTR::ActiveRecord.establish_connection! end # Migrate (if required) diff --git a/spec/beef/api/auth_rate_spec.rb b/spec/beef/api/auth_rate_spec.rb index 7636292ef..cbc5958fc 100644 --- a/spec/beef/api/auth_rate_spec.rb +++ b/spec/beef/api/auth_rate_spec.rb @@ -45,7 +45,7 @@ RSpec.describe 'BeEF API Rate Limit' do OTR::ActiveRecord.configure_from_hash!(adapter:'sqlite3', database: db_file) # otr-activerecord require you to manually establish the connection with the following line #Also a check to confirm that the correct Gem version is installed to require it, likely easier for old systems. - if Gem.loaded_specs['otr-activerecord'].version > Gem::Version.create('2.0') + if Gem.loaded_specs['otr-activerecord'].version > Gem::Version.create('1.4.2') OTR::ActiveRecord.establish_connection! end context = ActiveRecord::Migration.new.migration_context diff --git a/spec/beef/core/main/autorun_engine/autorun_engine_spec.rb b/spec/beef/core/main/autorun_engine/autorun_engine_spec.rb index 164e74adc..c263d23a5 100644 --- a/spec/beef/core/main/autorun_engine/autorun_engine_spec.rb +++ b/spec/beef/core/main/autorun_engine/autorun_engine_spec.rb @@ -50,7 +50,7 @@ RSpec.describe 'AutoRunEngine Test', run_on_browserstack: true do OTR::ActiveRecord.configure_from_hash!(adapter: 'sqlite3', database: db_file) # otr-activerecord require you to manually establish the connection with the following line #Also a check to confirm that the correct Gem version is installed to require it, likely easier for old systems. - if Gem.loaded_specs['otr-activerecord'].version > Gem::Version.create('2.0') + if Gem.loaded_specs['otr-activerecord'].version > Gem::Version.create('1.4.2') OTR::ActiveRecord.establish_connection! end context = ActiveRecord::Migration.new.migration_context diff --git a/spec/beef/extensions/requester_spec.rb b/spec/beef/extensions/requester_spec.rb index 869941fba..189695ade 100644 --- a/spec/beef/extensions/requester_spec.rb +++ b/spec/beef/extensions/requester_spec.rb @@ -36,7 +36,7 @@ RSpec.describe 'BeEF Extension Requester' do OTR::ActiveRecord.configure_from_hash!(adapter:'sqlite3', database:'beef.db') # otr-activerecord require you to manually establish the connection with the following line #Also a check to confirm that the correct Gem version is installed to require it, likely easier for old systems. - if Gem.loaded_specs['otr-activerecord'].version > Gem::Version.create('2.0') + if Gem.loaded_specs['otr-activerecord'].version > Gem::Version.create('1.4.2') OTR::ActiveRecord.establish_connection! end # Migrate (if required) diff --git a/spec/beef/extensions/websocket_hooked_browser_spec.rb b/spec/beef/extensions/websocket_hooked_browser_spec.rb index 52e76e3ab..9505e7853 100644 --- a/spec/beef/extensions/websocket_hooked_browser_spec.rb +++ b/spec/beef/extensions/websocket_hooked_browser_spec.rb @@ -50,7 +50,7 @@ RSpec.describe 'Browser hooking with Websockets', run_on_browserstack: true do OTR::ActiveRecord.configure_from_hash!(adapter: 'sqlite3', database: db_file) # otr-activerecord require you to manually establish the connection with the following line #Also a check to confirm that the correct Gem version is installed to require it, likely easier for old systems. - if Gem.loaded_specs['otr-activerecord'].version > Gem::Version.create('2.0') + if Gem.loaded_specs['otr-activerecord'].version > Gem::Version.create('1.4.2') OTR::ActiveRecord.establish_connection! end context = ActiveRecord::Migration.new.migration_context diff --git a/spec/beef/modules/debug/test_beef_debugs_spec.rb b/spec/beef/modules/debug/test_beef_debugs_spec.rb index d26361d57..43477e9ab 100644 --- a/spec/beef/modules/debug/test_beef_debugs_spec.rb +++ b/spec/beef/modules/debug/test_beef_debugs_spec.rb @@ -49,7 +49,7 @@ RSpec.describe 'BeEF Debug Command Modules:', run_on_browserstack: true do OTR::ActiveRecord.configure_from_hash!(adapter: 'sqlite3', database: db_file) # otr-activerecord require you to manually establish the connection with the following line #Also a check to confirm that the correct Gem version is installed to require it, likely easier for old systems. - if Gem.loaded_specs['otr-activerecord'].version > Gem::Version.create('2.0') + if Gem.loaded_specs['otr-activerecord'].version > Gem::Version.create('1.4.2') OTR::ActiveRecord.establish_connection! end context = ActiveRecord::Migration.new.migration_context diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 365298859..bbefd4aae 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -49,7 +49,7 @@ OTR::ActiveRecord.migrations_paths = [File.join('core', 'main', 'ar-migrations') OTR::ActiveRecord.configure_from_hash!(adapter:'sqlite3', database:':memory:') # otr-activerecord require you to manually establish the connection with the following line #Also a check to confirm that the correct Gem version is installed to require it, likely easier for old systems. -if Gem.loaded_specs['otr-activerecord'].version > Gem::Version.create('2.0') +if Gem.loaded_specs['otr-activerecord'].version > Gem::Version.create('1.4.2') OTR::ActiveRecord.establish_connection! end ActiveRecord::Schema.verbose = false