Skip to content

Commit 337b2d7

Browse files
committed
Land rapid7#4416, define rails version dep in one place
* Bump rails to 3.2.21
2 parents fffa8cf + db0aeb2 commit 337b2d7

File tree

5 files changed

+46
-35
lines changed

5 files changed

+46
-35
lines changed

Gemfile.lock

Lines changed: 27 additions & 27 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)
@@ -34,31 +34,31 @@ PATH
3434
GEM
3535
remote: https://rubygems.org/
3636
specs:
37-
actionmailer (3.2.19)
38-
actionpack (= 3.2.19)
37+
actionmailer (3.2.21)
38+
actionpack (= 3.2.21)
3939
mail (~> 2.5.4)
40-
actionpack (3.2.19)
41-
activemodel (= 3.2.19)
42-
activesupport (= 3.2.19)
40+
actionpack (3.2.21)
41+
activemodel (= 3.2.21)
42+
activesupport (= 3.2.21)
4343
builder (~> 3.0.0)
4444
erubis (~> 2.7.0)
4545
journey (~> 1.0.4)
4646
rack (~> 1.4.5)
4747
rack-cache (~> 1.2)
4848
rack-test (~> 0.6.1)
4949
sprockets (~> 2.2.1)
50-
activemodel (3.2.19)
51-
activesupport (= 3.2.19)
50+
activemodel (3.2.21)
51+
activesupport (= 3.2.21)
5252
builder (~> 3.0.0)
53-
activerecord (3.2.19)
54-
activemodel (= 3.2.19)
55-
activesupport (= 3.2.19)
53+
activerecord (3.2.21)
54+
activemodel (= 3.2.21)
55+
activesupport (= 3.2.21)
5656
arel (~> 3.0.2)
5757
tzinfo (~> 0.3.29)
58-
activeresource (3.2.19)
59-
activemodel (= 3.2.19)
60-
activesupport (= 3.2.19)
61-
activesupport (3.2.19)
58+
activeresource (3.2.21)
59+
activemodel (= 3.2.21)
60+
activesupport (= 3.2.21)
61+
activesupport (3.2.21)
6262
i18n (~> 0.6, >= 0.6.4)
6363
multi_json (~> 1.0)
6464
arel (3.0.3)
@@ -156,17 +156,17 @@ GEM
156156
rack
157157
rack-test (0.6.2)
158158
rack (>= 1.0)
159-
rails (3.2.19)
160-
actionmailer (= 3.2.19)
161-
actionpack (= 3.2.19)
162-
activerecord (= 3.2.19)
163-
activeresource (= 3.2.19)
164-
activesupport (= 3.2.19)
159+
rails (3.2.21)
160+
actionmailer (= 3.2.21)
161+
actionpack (= 3.2.21)
162+
activerecord (= 3.2.21)
163+
activeresource (= 3.2.21)
164+
activesupport (= 3.2.21)
165165
bundler (~> 1.0)
166-
railties (= 3.2.19)
167-
railties (3.2.19)
168-
actionpack (= 3.2.19)
169-
activesupport (= 3.2.19)
166+
railties (= 3.2.21)
167+
railties (3.2.21)
168+
actionpack (= 3.2.21)
169+
activesupport (= 3.2.21)
170170
rack-ssl (~> 1.3.2)
171171
rake (>= 0.8.7)
172172
rdoc (~> 3.4)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Records the Bundler-style dependency constraint for the version of Rails to be
2+
# used with the Metasploit Framework and Metasploit Pro.
3+
module Metasploit
4+
module Framework
5+
module RailsVersionConstraint
6+
7+
# The Metasploit ecosystem is not ready for Rails 4 as it uses features of
8+
# Rails 3.X that are removed in Rails 4.
9+
RAILS_VERSION = [ '>= 3.2.21', '< 4.0.0' ]
10+
end
11+
end
12+
end

metasploit-framework-db.gemspec

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ end
1212

1313
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
1414
require 'metasploit/framework/version'
15+
require 'metasploit/framework/rails_version_constraint'
1516

1617
Gem::Specification.new do |spec|
1718
spec.name = 'metasploit-framework-db'
@@ -26,10 +27,7 @@ Gem::Specification.new do |spec|
2627
# no files, just dependencies
2728
spec.files = []
2829

29-
# The Metasploit ecosystem is not ready for Rails 4 as it uses features of Rails 3.X that are removed in Rails 4.
30-
rails_version_constraint = '< 4.0.0'
31-
32-
spec.add_runtime_dependency 'activerecord', rails_version_constraint
30+
spec.add_runtime_dependency 'activerecord', *Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION
3331
# Metasploit::Credential database models
3432
spec.add_runtime_dependency 'metasploit-credential', '~> 0.13.8'
3533
# Database models shared between framework and Pro.

metasploit-framework-full.gemspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ end
1212

1313
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
1414
require 'metasploit/framework/version'
15+
require 'metasploit/framework/rails_version_constraint'
1516

1617
Gem::Specification.new do |spec|
1718
spec.name = 'metasploit-framework-full'
@@ -28,6 +29,7 @@ Gem::Specification.new do |spec|
2829

2930
metasploit_framework_version_constraint = "= #{spec.version}"
3031

32+
spec.add_runtime_dependency 'rails', *Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION
3133
spec.add_runtime_dependency 'metasploit-framework', metasploit_framework_version_constraint
3234
spec.add_runtime_dependency 'metasploit-framework-db', metasploit_framework_version_constraint
3335
spec.add_runtime_dependency 'metasploit-framework-pcap', metasploit_framework_version_constraint

metasploit-framework.gemspec

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ end
1212

1313
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
1414
require 'metasploit/framework/version'
15+
require 'metasploit/framework/rails_version_constraint'
1516

1617
Gem::Specification.new do |spec|
1718
spec.name = 'metasploit-framework'
@@ -46,13 +47,11 @@ Gem::Specification.new do |spec|
4647
spec.test_files = spec.files.grep(%r{^spec/})
4748
spec.require_paths = ["lib"]
4849

49-
# The Metasploit ecosystem is not ready for Rails 4 as it uses features of Rails 3.X that are removed in Rails 4.
50-
rails_version_constraint = '< 4.0.0'
5150

5251
# Need 3+ for ActiveSupport::Concern
53-
spec.add_runtime_dependency 'activesupport', '>= 3.0.0', rails_version_constraint
52+
spec.add_runtime_dependency 'activesupport', *Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION
5453
# Needed for config.action_view for view plugin compatibility for Pro
55-
spec.add_runtime_dependency 'actionpack', rails_version_constraint
54+
spec.add_runtime_dependency 'actionpack', *Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION
5655
# Needed for some admin modules (cfme_manageiq_evm_pass_reset.rb)
5756
spec.add_runtime_dependency 'bcrypt'
5857
# Needed for Javascript obfuscation

0 commit comments

Comments
 (0)