Land #4416, define rails version dep in one place

* Bump rails to 3.2.21
bug/bundler_fix
Fernando Arias 2014-12-19 15:17:54 -06:00
commit 337b2d784f
No known key found for this signature in database
GPG Key ID: 89EC07CE01DF79A1
5 changed files with 46 additions and 35 deletions

View File

@ -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)
@ -34,12 +34,12 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.19)
actionpack (= 3.2.19)
actionmailer (3.2.21)
actionpack (= 3.2.21)
mail (~> 2.5.4)
actionpack (3.2.19)
activemodel (= 3.2.19)
activesupport (= 3.2.19)
actionpack (3.2.21)
activemodel (= 3.2.21)
activesupport (= 3.2.21)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
@ -47,18 +47,18 @@ GEM
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.19)
activesupport (= 3.2.19)
activemodel (3.2.21)
activesupport (= 3.2.21)
builder (~> 3.0.0)
activerecord (3.2.19)
activemodel (= 3.2.19)
activesupport (= 3.2.19)
activerecord (3.2.21)
activemodel (= 3.2.21)
activesupport (= 3.2.21)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.19)
activemodel (= 3.2.19)
activesupport (= 3.2.19)
activesupport (3.2.19)
activeresource (3.2.21)
activemodel (= 3.2.21)
activesupport (= 3.2.21)
activesupport (3.2.21)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
arel (3.0.3)
@ -156,17 +156,17 @@ GEM
rack
rack-test (0.6.2)
rack (>= 1.0)
rails (3.2.19)
actionmailer (= 3.2.19)
actionpack (= 3.2.19)
activerecord (= 3.2.19)
activeresource (= 3.2.19)
activesupport (= 3.2.19)
rails (3.2.21)
actionmailer (= 3.2.21)
actionpack (= 3.2.21)
activerecord (= 3.2.21)
activeresource (= 3.2.21)
activesupport (= 3.2.21)
bundler (~> 1.0)
railties (= 3.2.19)
railties (3.2.19)
actionpack (= 3.2.19)
activesupport (= 3.2.19)
railties (= 3.2.21)
railties (3.2.21)
actionpack (= 3.2.21)
activesupport (= 3.2.21)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)

View File

@ -0,0 +1,12 @@
# Records the Bundler-style dependency constraint for the version of Rails to be
# used with the Metasploit Framework and Metasploit Pro.
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 = [ '>= 3.2.21', '< 4.0.0' ]
end
end
end

View File

@ -12,6 +12,7 @@ end
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'metasploit/framework/version'
require 'metasploit/framework/rails_version_constraint'
Gem::Specification.new do |spec|
spec.name = 'metasploit-framework-db'
@ -26,10 +27,7 @@ Gem::Specification.new do |spec|
# no files, just dependencies
spec.files = []
# 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_constraint = '< 4.0.0'
spec.add_runtime_dependency 'activerecord', rails_version_constraint
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.

View File

@ -12,6 +12,7 @@ end
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'metasploit/framework/version'
require 'metasploit/framework/rails_version_constraint'
Gem::Specification.new do |spec|
spec.name = 'metasploit-framework-full'
@ -28,6 +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 '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

View File

@ -12,6 +12,7 @@ end
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'metasploit/framework/version'
require 'metasploit/framework/rails_version_constraint'
Gem::Specification.new do |spec|
spec.name = 'metasploit-framework'
@ -46,13 +47,11 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^spec/})
spec.require_paths = ["lib"]
# 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_constraint = '< 4.0.0'
# Need 3+ for ActiveSupport::Concern
spec.add_runtime_dependency 'activesupport', '>= 3.0.0', rails_version_constraint
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', rails_version_constraint
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