mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
Use Mustermann from master until a release is made
Since master has a patch which fixes the missing `:+` implementation for Regular and Sinatra-based patterns. We can also re-enable the namespace specs for accepting regular expressions for path concatination. /cc #200 and #207
This commit is contained in:
parent
e9f72ca878
commit
b1fd9f1dd3
3 changed files with 3 additions and 7 deletions
|
@ -1,6 +1,8 @@
|
|||
source "https://rubygems.org" unless ENV['QUICK']
|
||||
gemspec
|
||||
|
||||
gem 'mustermann', github: 'sinatra/mustermann'
|
||||
|
||||
group :development, :test do
|
||||
|
||||
platform :ruby_18 do
|
||||
|
|
|
@ -268,9 +268,7 @@ module Sinatra
|
|||
def prefixed_path(a, b)
|
||||
return a || b || /.*/ unless a and b
|
||||
|
||||
Mustermann.new(a.to_s + b.to_s)
|
||||
rescue
|
||||
Mustermann.new(/#{a}#{b}/)
|
||||
Mustermann.new(a) + Mustermann.new(b)
|
||||
end
|
||||
|
||||
def prefixed(method, pattern = nil, conditions = {}, &block)
|
||||
|
|
|
@ -80,8 +80,6 @@ describe Sinatra::Namespace do
|
|||
end
|
||||
|
||||
it 'accepts the path as regular expression' do
|
||||
skip "Sinatra::Namespace accepts regular expressions for pattern"
|
||||
|
||||
namespace('/:foo') { send(verb, %r{/bar}) { params[:foo] }}
|
||||
send(verb, '/foo/bar').should be_ok
|
||||
body.should == 'foo' unless verb == :head
|
||||
|
@ -99,8 +97,6 @@ describe Sinatra::Namespace do
|
|||
end
|
||||
|
||||
it 'accepts the path as a named parameter' do
|
||||
skip "Sinatra::Namespace accepts regular expressions for pattern"
|
||||
|
||||
namespace(%r{/foo}) { send(verb, '/:bar') { params[:bar] }}
|
||||
send(verb, '/foo/bar').should be_ok
|
||||
body.should == 'bar' unless verb == :head
|
||||
|
|
Loading…
Add table
Reference in a new issue