From db0aeb2a05c3242b26762f5c4a492bb2b4da38bd Mon Sep 17 00:00:00 2001 From: Matt Buck Date: Fri, 19 Dec 2014 13:54:13 -0600 Subject: [PATCH] Make the version constraint a range --- Gemfile.lock | 6 +++--- lib/metasploit/framework/rails_version_constraint.rb | 3 ++- metasploit-framework-db.gemspec | 2 +- metasploit-framework-full.gemspec | 2 +- metasploit-framework.gemspec | 4 ++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6042d7bb63..5dea44b409 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,8 +2,8 @@ PATH remote: . specs: metasploit-framework (4.11.0.pre.dev) - actionpack (< 4.0.0) - activesupport (>= 3.0.0, < 4.0.0) + actionpack (>= 3.2.21, < 4.0.0) + activesupport (>= 3.2.21, < 4.0.0) bcrypt jsobfu (~> 0.2.0) json @@ -21,7 +21,7 @@ PATH sqlite3 tzinfo metasploit-framework-db (4.11.0.pre.dev) - activerecord (< 4.0.0) + activerecord (>= 3.2.21, < 4.0.0) metasploit-credential (~> 0.13.8) metasploit-framework (= 4.11.0.pre.dev) metasploit_data_models (~> 0.21.1) diff --git a/lib/metasploit/framework/rails_version_constraint.rb b/lib/metasploit/framework/rails_version_constraint.rb index cdcb7e3113..9f436dbb20 100644 --- a/lib/metasploit/framework/rails_version_constraint.rb +++ b/lib/metasploit/framework/rails_version_constraint.rb @@ -3,9 +3,10 @@ module Metasploit module Framework module RailsVersionConstraint + # The Metasploit ecosystem is not ready for Rails 4 as it uses features of # Rails 3.X that are removed in Rails 4. - RAILS_VERSION = '< 4.0.0' + RAILS_VERSION = [ '>= 3.2.21', '< 4.0.0' ] end end end \ No newline at end of file diff --git a/metasploit-framework-db.gemspec b/metasploit-framework-db.gemspec index 86acf809bb..f6901e1b56 100644 --- a/metasploit-framework-db.gemspec +++ b/metasploit-framework-db.gemspec @@ -27,7 +27,7 @@ Gem::Specification.new do |spec| # no files, just dependencies spec.files = [] - spec.add_runtime_dependency 'activerecord', Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION + spec.add_runtime_dependency 'activerecord', *Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION # Metasploit::Credential database models spec.add_runtime_dependency 'metasploit-credential', '~> 0.13.8' # Database models shared between framework and Pro. diff --git a/metasploit-framework-full.gemspec b/metasploit-framework-full.gemspec index 5d8809bb18..f3596ec32f 100644 --- a/metasploit-framework-full.gemspec +++ b/metasploit-framework-full.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| metasploit_framework_version_constraint = "= #{spec.version}" - spec.add_runtime_dependency 'rails', Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION + spec.add_runtime_dependency 'rails', *Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION spec.add_runtime_dependency 'metasploit-framework', metasploit_framework_version_constraint spec.add_runtime_dependency 'metasploit-framework-db', metasploit_framework_version_constraint spec.add_runtime_dependency 'metasploit-framework-pcap', metasploit_framework_version_constraint diff --git a/metasploit-framework.gemspec b/metasploit-framework.gemspec index 854f715c9d..67e51e9b68 100644 --- a/metasploit-framework.gemspec +++ b/metasploit-framework.gemspec @@ -49,9 +49,9 @@ Gem::Specification.new do |spec| # Need 3+ for ActiveSupport::Concern - spec.add_runtime_dependency 'activesupport', '>= 3.0.0', Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION + spec.add_runtime_dependency 'activesupport', *Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION # Needed for config.action_view for view plugin compatibility for Pro - spec.add_runtime_dependency 'actionpack', Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION + spec.add_runtime_dependency 'actionpack', *Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION # Needed for some admin modules (cfme_manageiq_evm_pass_reset.rb) spec.add_runtime_dependency 'bcrypt' # Needed for Javascript obfuscation