aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Gemfile1
-rw-r--r--Gemfile.lock54
-rw-r--r--actionpack/actionpack.gemspec2
-rw-r--r--actionpack/lib/action_dispatch/journey/route.rb10
-rw-r--r--actionpack/lib/action_dispatch/request/session.rb4
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb4
-rw-r--r--actionpack/test/dispatch/request/session_test.rb2
-rw-r--r--guides/bug_report_templates/action_controller_master.rb1
-rw-r--r--guides/bug_report_templates/active_record_master.rb1
-rw-r--r--guides/bug_report_templates/generic_master.rb1
-rw-r--r--railties/lib/rails/generators/app_base.rb6
11 files changed, 45 insertions, 41 deletions
diff --git a/Gemfile b/Gemfile
index 8617060fda..a398387947 100644
--- a/Gemfile
+++ b/Gemfile
@@ -7,6 +7,7 @@ gem 'rake', '>= 10.3'
# Active Job depends on the URI::GID::MissingModelIDError, which isn't released yet.
gem 'globalid', github: 'rails/globalid'
+gem 'rack', github: 'rack/rack'
# This needs to be with require false as it is
# loaded after loading the test library to
diff --git a/Gemfile.lock b/Gemfile.lock
index 0882c45690..daaa208a74 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -26,6 +26,13 @@ GIT
mime-types (>= 1.16, < 3)
GIT
+ remote: git://github.com/rack/rack.git
+ revision: 2cb9430fce32da2f2dbccf9de97ab691351c1408
+ specs:
+ rack (2.0.0.alpha)
+ json
+
+GIT
remote: git://github.com/rails/arel.git
revision: d5432b4616ff43fbb14540d351eed351e21bb20e
branch: master
@@ -62,21 +69,21 @@ GIT
GIT
remote: git://github.com/rails/sprockets-rails.git
- revision: ad4a43bd1bb19c86a8bf94a2ad5e477686161490
+ revision: e65e088575be4f6b994823b80a277affb0a57a5e
branch: master
specs:
- sprockets-rails (3.0.0)
+ sprockets-rails (3.0.0.beta2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
GIT
remote: git://github.com/rails/sprockets.git
- revision: de057b4f13deb2bb5e8684cd06b9b687f5d09792
+ revision: 653de5268ba862ea23457291824180c67ad5dc99
branch: master
specs:
sprockets (4.0.0)
- rack (~> 1.0)
+ rack (~> 2.x)
PATH
remote: .
@@ -90,7 +97,7 @@ PATH
actionpack (5.0.0.alpha)
actionview (= 5.0.0.alpha)
activesupport (= 5.0.0.alpha)
- rack (~> 1.6)
+ rack (~> 2.x)
rack-test (~> 0.6.3)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
@@ -139,7 +146,7 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- amq-protocol (1.9.2)
+ amq-protocol (2.0.0)
backburner (1.0.0)
beaneater (~> 1.0)
dante (> 0.1.5)
@@ -149,11 +156,10 @@ GEM
beaneater (1.0.0)
benchmark-ips (2.3.0)
builder (3.2.2)
- bunny (1.7.0)
+ bunny (2.0.0)
amq-protocol (>= 1.9.2)
- byebug (5.0.0)
- columnize (= 0.9.0)
- celluloid (0.16.1)
+ byebug (6.0.2)
+ celluloid (0.16.0)
timers (~> 4.0.0)
coffee-rails (4.1.0)
coffee-script (>= 2.2.0)
@@ -162,7 +168,6 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.9.1.1)
- columnize (0.9.0)
concurrent-ruby (0.9.1)
connection_pool (2.2.0)
dalli (2.7.4)
@@ -173,7 +178,7 @@ GEM
activerecord (>= 3.0, < 5.0)
delayed_job (>= 3.0, < 4.1)
erubis (2.7.0)
- execjs (2.5.2)
+ execjs (2.6.0)
hitimes (1.2.2)
hitimes (1.2.2-x86-mingw32)
i18n (0.7.0)
@@ -181,7 +186,7 @@ GEM
kindlerb (0.1.1)
mustache
nokogiri
- loofah (2.0.2)
+ loofah (2.0.3)
nokogiri (>= 1.5.9)
metaclass (0.0.4)
method_source (0.8.2)
@@ -201,16 +206,13 @@ GEM
psych (2.0.13)
que (0.10.0)
racc (1.4.12)
- rack (1.6.4)
rack-cache (1.2)
rack (>= 0.4)
- rack-protection (1.5.3)
- rack
rack-test (0.6.3)
rack (>= 1.0)
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
- rails-dom-testing (1.0.6)
+ rails-dom-testing (1.0.7)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
@@ -248,23 +250,20 @@ GEM
redis (~> 3.2, >= 3.2.1)
redis-namespace (~> 1.5, >= 1.5.2)
sigdump (0.2.3)
- sinatra (1.4.6)
- rack (~> 1.4)
- rack-protection (~> 1.4)
- tilt (>= 1.3, < 3)
- sneakers (1.0.4)
- bunny (~> 1.7.0)
+ sinatra (1.0)
+ rack (>= 1.0)
+ sneakers (1.1.0)
+ bunny (>= 1.7.0, <= 2.0.0)
serverengine (~> 1.5.5)
thor
thread (~> 0.1.7)
sqlite3 (1.3.10)
stackprof (0.2.7)
- sucker_punch (1.5.0)
- celluloid (~> 0.16.0)
+ sucker_punch (1.5.1)
+ celluloid (= 0.16.0)
thor (0.19.1)
thread (0.1.7)
thread_safe (0.3.5)
- tilt (2.0.1)
timers (4.0.1)
hitimes
turbolinks (2.5.3)
@@ -315,6 +314,7 @@ DEPENDENCIES
que
queue_classic!
racc (>= 1.4.6)
+ rack!
rack-cache (~> 1.2)
rails!
rake (>= 10.3)
@@ -337,4 +337,4 @@ DEPENDENCIES
w3c_validators
BUNDLED WITH
- 1.10.5
+ 1.10.6
diff --git a/actionpack/actionpack.gemspec b/actionpack/actionpack.gemspec
index 1bba9df969..28d8bc3091 100644
--- a/actionpack/actionpack.gemspec
+++ b/actionpack/actionpack.gemspec
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
s.add_dependency 'activesupport', version
- s.add_dependency 'rack', '~> 1.6'
+ s.add_dependency 'rack', '~> 2.x'
s.add_dependency 'rack-test', '~> 0.6.3'
s.add_dependency 'rails-html-sanitizer', '~> 1.0', '>= 1.0.2'
s.add_dependency 'rails-dom-testing', '~> 1.0', '>= 1.0.5'
diff --git a/actionpack/lib/action_dispatch/journey/route.rb b/actionpack/lib/action_dispatch/journey/route.rb
index 209cd20d80..f5c9abf1cc 100644
--- a/actionpack/lib/action_dispatch/journey/route.rb
+++ b/actionpack/lib/action_dispatch/journey/route.rb
@@ -1,13 +1,11 @@
module ActionDispatch
module Journey # :nodoc:
class Route # :nodoc:
- attr_reader :app, :path, :defaults, :name
+ attr_reader :app, :path, :defaults, :name, :precedence
attr_reader :constraints
alias :conditions :constraints
- attr_accessor :precedence
-
module VerbMatchers
VERBS = %w{ DELETE GET HEAD OPTIONS LINK PATCH POST PUT TRACE UNLINK }
VERBS.each do |v|
@@ -51,13 +49,13 @@ module ActionDispatch
def self.build(name, app, path, constraints, required_defaults, defaults)
request_method_match = verb_matcher(constraints.delete(:request_method))
- new name, app, path, constraints, required_defaults, defaults, request_method_match
+ new name, app, path, constraints, required_defaults, defaults, request_method_match, 0
end
##
# +path+ is a path constraint.
# +constraints+ is a hash of constraints to be applied to this route.
- def initialize(name, app, path, constraints, required_defaults, defaults, request_method_match)
+ def initialize(name, app, path, constraints, required_defaults, defaults, request_method_match, precedence)
@name = name
@app = app
@path = path
@@ -70,7 +68,7 @@ module ActionDispatch
@required_parts = nil
@parts = nil
@decorated_ast = nil
- @precedence = 0
+ @precedence = precedence
@path_formatter = @path.build_formatter
end
diff --git a/actionpack/lib/action_dispatch/request/session.rb b/actionpack/lib/action_dispatch/request/session.rb
index a8a3cd20b9..bae3d909fa 100644
--- a/actionpack/lib/action_dispatch/request/session.rb
+++ b/actionpack/lib/action_dispatch/request/session.rb
@@ -4,8 +4,8 @@ module ActionDispatch
class Request < Rack::Request
# Session is responsible for lazily loading the session from store.
class Session # :nodoc:
- ENV_SESSION_KEY = Rack::Session::Abstract::ENV_SESSION_KEY # :nodoc:
- ENV_SESSION_OPTIONS_KEY = Rack::Session::Abstract::ENV_SESSION_OPTIONS_KEY # :nodoc:
+ ENV_SESSION_KEY = Rack::RACK_SESSION # :nodoc:
+ ENV_SESSION_OPTIONS_KEY = Rack::RACK_SESSION_OPTIONS # :nodoc:
# Singleton object used to determine if an optional param wasn't specified
Unspecified = Object.new
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index c1134d16ad..51bafb539f 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -150,9 +150,9 @@ module ActionDispatch
conditions,
required_defaults,
defaults,
- request_method)
+ request_method,
+ precedence)
- route.precedence = precedence
route
end
diff --git a/actionpack/test/dispatch/request/session_test.rb b/actionpack/test/dispatch/request/session_test.rb
index 10fb04e230..8bcc07dd04 100644
--- a/actionpack/test/dispatch/request/session_test.rb
+++ b/actionpack/test/dispatch/request/session_test.rb
@@ -7,7 +7,7 @@ module ActionDispatch
def test_create_adds_itself_to_env
env = {}
s = Session.create(store, env, {})
- assert_equal s, env[Rack::Session::Abstract::ENV_SESSION_KEY]
+ assert_equal s, env[Rack::RACK_SESSION]
end
def test_to_hash
diff --git a/guides/bug_report_templates/action_controller_master.rb b/guides/bug_report_templates/action_controller_master.rb
index 1a4b736348..31a3f6c650 100644
--- a/guides/bug_report_templates/action_controller_master.rb
+++ b/guides/bug_report_templates/action_controller_master.rb
@@ -9,6 +9,7 @@ gemfile(true) do
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'arel', github: 'rails/arel'
+ gem 'rack', github: 'rack/rack'
end
require 'action_controller/railtie'
diff --git a/guides/bug_report_templates/active_record_master.rb b/guides/bug_report_templates/active_record_master.rb
index 270dbe7df7..6ae50b2460 100644
--- a/guides/bug_report_templates/active_record_master.rb
+++ b/guides/bug_report_templates/active_record_master.rb
@@ -9,6 +9,7 @@ gemfile(true) do
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'arel', github: 'rails/arel'
+ gem 'rack', github: 'rack/rack'
gem 'sqlite3'
end
diff --git a/guides/bug_report_templates/generic_master.rb b/guides/bug_report_templates/generic_master.rb
index b6b4562751..f6dce64280 100644
--- a/guides/bug_report_templates/generic_master.rb
+++ b/guides/bug_report_templates/generic_master.rb
@@ -9,6 +9,7 @@ gemfile(true) do
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'arel', github: 'rails/arel'
+ gem 'rack', github: 'rack/rack'
end
require 'active_support'
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb
index a5fdfdcf2f..38074e80e0 100644
--- a/railties/lib/rails/generators/app_base.rb
+++ b/railties/lib/rails/generators/app_base.rb
@@ -211,7 +211,8 @@ module Rails
GemfileEntry.github('sprockets-rails', 'rails/sprockets-rails'),
GemfileEntry.github('sprockets', 'rails/sprockets'),
GemfileEntry.github('sass-rails', 'rails/sass-rails'),
- GemfileEntry.github('arel', 'rails/arel')
+ GemfileEntry.github('arel', 'rails/arel'),
+ GemfileEntry.github('rack', 'rack/rack')
]
elsif options.edge?
[
@@ -219,7 +220,8 @@ module Rails
GemfileEntry.github('sprockets-rails', 'rails/sprockets-rails'),
GemfileEntry.github('sprockets', 'rails/sprockets'),
GemfileEntry.github('sass-rails', 'rails/sass-rails'),
- GemfileEntry.github('arel', 'rails/arel')
+ GemfileEntry.github('arel', 'rails/arel'),
+ GemfileEntry.github('rack', 'rack/rack')
]
else
[GemfileEntry.version('rails',