Skip to content

Commit db0aeb2

Browse files
committed
Make the version constraint a range
1 parent c493ccf commit db0aeb2

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ PATH
22
remote: .
33
specs:
44
metasploit-framework (4.11.0.pre.dev)
5-
actionpack (< 4.0.0)
6-
activesupport (>= 3.0.0, < 4.0.0)
5+
actionpack (>= 3.2.21, < 4.0.0)
6+
activesupport (>= 3.2.21, < 4.0.0)
77
bcrypt
88
jsobfu (~> 0.2.0)
99
json
@@ -21,7 +21,7 @@ PATH
2121
sqlite3
2222
tzinfo
2323
metasploit-framework-db (4.11.0.pre.dev)
24-
activerecord (< 4.0.0)
24+
activerecord (>= 3.2.21, < 4.0.0)
2525
metasploit-credential (~> 0.13.8)
2626
metasploit-framework (= 4.11.0.pre.dev)
2727
metasploit_data_models (~> 0.21.1)

lib/metasploit/framework/rails_version_constraint.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
module Metasploit
44
module Framework
55
module RailsVersionConstraint
6+
67
# The Metasploit ecosystem is not ready for Rails 4 as it uses features of
78
# Rails 3.X that are removed in Rails 4.
8-
RAILS_VERSION = '< 4.0.0'
9+
RAILS_VERSION = [ '>= 3.2.21', '< 4.0.0' ]
910
end
1011
end
1112
end

metasploit-framework-db.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
2727
# no files, just dependencies
2828
spec.files = []
2929

30-
spec.add_runtime_dependency 'activerecord', Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION
30+
spec.add_runtime_dependency 'activerecord', *Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION
3131
# Metasploit::Credential database models
3232
spec.add_runtime_dependency 'metasploit-credential', '~> 0.13.8'
3333
# Database models shared between framework and Pro.

metasploit-framework-full.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
2929

3030
metasploit_framework_version_constraint = "= #{spec.version}"
3131

32-
spec.add_runtime_dependency 'rails', Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION
32+
spec.add_runtime_dependency 'rails', *Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION
3333
spec.add_runtime_dependency 'metasploit-framework', metasploit_framework_version_constraint
3434
spec.add_runtime_dependency 'metasploit-framework-db', metasploit_framework_version_constraint
3535
spec.add_runtime_dependency 'metasploit-framework-pcap', metasploit_framework_version_constraint

metasploit-framework.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ Gem::Specification.new do |spec|
4949

5050

5151
# Need 3+ for ActiveSupport::Concern
52-
spec.add_runtime_dependency 'activesupport', '>= 3.0.0', Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION
52+
spec.add_runtime_dependency 'activesupport', *Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION
5353
# Needed for config.action_view for view plugin compatibility for Pro
54-
spec.add_runtime_dependency 'actionpack', Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION
54+
spec.add_runtime_dependency 'actionpack', *Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION
5555
# Needed for some admin modules (cfme_manageiq_evm_pass_reset.rb)
5656
spec.add_runtime_dependency 'bcrypt'
5757
# Needed for Javascript obfuscation

0 commit comments

Comments
 (0)