Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bump rack-mount to 0.6.13 and add test case for named character class…

…es [#5509 state:resolved]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
  • Loading branch information...
commit 6c3f5eb76c2277e8a8e94d8c7d8942dc2d11a3df 1 parent 8b2e4fd
@pixeltrix pixeltrix authored spastorino committed
View
2  actionpack/actionpack.gemspec
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
s.add_dependency('i18n', '~> 0.4.1')
s.add_dependency('rack', '~> 1.2.1')
s.add_dependency('rack-test', '~> 0.5.4')
- s.add_dependency('rack-mount', '~> 0.6.12')
+ s.add_dependency('rack-mount', '~> 0.6.13')
s.add_dependency('tzinfo', '~> 0.3.23')
s.add_dependency('erubis', '~> 2.6.6')
end
View
12 actionpack/test/dispatch/routing_test.rb
@@ -442,6 +442,12 @@ def self.matches?(request)
get :preview, :on => :member
end
+ match '/purchases/:token/:filename',
+ :to => 'purchases#fetch',
+ :token => /[[:alnum:]]{10}/,
+ :filename => /(.+)/,
+ :as => :purchase
+
scope '/countries/:country', :constraints => lambda { |params, req| %[all France].include?(params[:country]) } do
match '/', :to => 'countries#index'
match '/cities', :to => 'countries#cities'
@@ -2098,6 +2104,12 @@ def test_route_defined_in_resources_scope_level
assert_equal '/customers/1/export', customer_export_path(:customer_id => '1')
end
+ def test_named_character_classes_in_regexp_constraints
+ get '/purchases/315004be7e/Ruby_on_Rails_3.pdf'
+ assert_equal 'purchases#fetch', @response.body
+ assert_equal '/purchases/315004be7e/Ruby_on_Rails_3.pdf', purchase_path(:token => '315004be7e', :filename => 'Ruby_on_Rails_3.pdf')
+ end
+
private
def with_test_routes
yield
Please sign in to comment.
Something went wrong with that request. Please try again.