http_router 0.5.4 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/http_router.rb +58 -210
- data/lib/http_router/node.rb +124 -226
- data/lib/http_router/node/arbitrary.rb +16 -0
- data/lib/http_router/node/free_regex.rb +19 -0
- data/lib/http_router/node/glob.rb +16 -0
- data/lib/http_router/node/glob_regex.rb +9 -0
- data/lib/http_router/node/regex.rb +26 -0
- data/lib/http_router/node/request.rb +44 -0
- data/lib/http_router/node/spanning_regex.rb +16 -0
- data/lib/http_router/node/variable.rb +11 -0
- data/lib/http_router/optional_compiler.rb +8 -15
- data/lib/http_router/path.rb +36 -49
- data/lib/http_router/regex_route.rb +20 -0
- data/lib/http_router/request.rb +26 -0
- data/lib/http_router/response.rb +13 -0
- data/lib/http_router/route.rb +121 -299
- data/lib/http_router/version.rb +1 -1
- data/test/helper.rb +11 -9
- data/test/rack/test_urlmap.rb +9 -9
- data/test/test_arbitrary.rb +18 -10
- data/test/test_misc.rb +28 -28
- data/test/test_mounting.rb +81 -81
- data/test/test_request.rb +6 -0
- data/test/test_trailing_slash.rb +0 -4
- data/test/test_variable.rb +1 -9
- metadata +16 -16
- data/lib/http_router/glob.rb +0 -20
- data/lib/http_router/interface/sinatra.rb +0 -149
- data/lib/http_router/parts.rb +0 -24
- data/lib/http_router/rack.rb +0 -18
- data/lib/http_router/rack/builder.rb +0 -60
- data/lib/http_router/rack/url_map.rb +0 -10
- data/lib/http_router/root.rb +0 -36
- data/lib/http_router/static.rb +0 -5
- data/lib/http_router/variable.rb +0 -30
- data/test/sinatra/recognize_spec.rb +0 -168
- data/test/sinatra/test_recognize.rb +0 -150
data/lib/http_router/version.rb
CHANGED
data/test/helper.rb
CHANGED
@@ -8,12 +8,11 @@ class HttpRouter::Route
|
|
8
8
|
end
|
9
9
|
|
10
10
|
class MiniTest::Unit::TestCase
|
11
|
-
|
12
|
-
|
11
|
+
|
12
|
+
def router(opts = nil, &blk)
|
13
|
+
@router ||= HttpRouter.new(opts, &blk)
|
13
14
|
if blk
|
14
|
-
@router.routes.each
|
15
|
-
route.default_destination if route.dest.nil?
|
16
|
-
end
|
15
|
+
@router.routes.each { |route| route.default_destination if route.dest.nil? }
|
17
16
|
@router.routes.size > 1 ? @router.routes : @router.routes.first
|
18
17
|
else
|
19
18
|
@router
|
@@ -32,11 +31,13 @@ class MiniTest::Unit::TestCase
|
|
32
31
|
end
|
33
32
|
|
34
33
|
def assert_header(header, response)
|
34
|
+
response = Rack::MockRequest.env_for(response) if response.is_a?(String)
|
35
35
|
response = router.call(response) if response.is_a?(Hash)
|
36
36
|
header.each{|k, v| assert_equal v, response[1][k]}
|
37
37
|
end
|
38
38
|
|
39
39
|
def assert_status(status, response)
|
40
|
+
response = Rack::MockRequest.env_for(response) if response.is_a?(String)
|
40
41
|
response = router.call(response) if response.is_a?(Hash)
|
41
42
|
assert_equal status, response.first
|
42
43
|
end
|
@@ -46,13 +47,14 @@ class MiniTest::Unit::TestCase
|
|
46
47
|
router.reset!
|
47
48
|
route = router.add(route)
|
48
49
|
end
|
49
|
-
|
50
|
+
dest = "Routing to #{route.to_s}"
|
51
|
+
route.to{|env| Rack::Response.new(dest).finish} if route && route.dest.nil?
|
50
52
|
request = Rack::MockRequest.env_for(request) if request.is_a?(String)
|
51
53
|
response = @router.call(request)
|
52
54
|
if route
|
53
|
-
dest = "Routing to #{route.to_s}"
|
54
55
|
assert_equal [dest], response.last.body
|
55
56
|
if params
|
57
|
+
raise "Params was nil, but you expected params" if request['router.params'].nil?
|
56
58
|
assert_equal params.size, request['router.params'].size
|
57
59
|
params.each { |k, v| assert_equal v, request['router.params'][k] }
|
58
60
|
elsif !request['router.params'].nil? and !request['router.params'].empty?
|
@@ -66,9 +68,9 @@ class MiniTest::Unit::TestCase
|
|
66
68
|
def assert_generate(path, route, *args)
|
67
69
|
if route.is_a?(String)
|
68
70
|
router.reset!
|
69
|
-
route = router.add(route)
|
71
|
+
route = router.add(route)
|
70
72
|
end
|
71
|
-
route.to{|env| Rack::Response.new("Routing to #{route.to_s}").finish} if route.respond_to?(:
|
73
|
+
route.to{|env| Rack::Response.new("Routing to #{route.to_s}").finish} if route && route.respond_to?(:to) && !route.dest
|
72
74
|
assert_equal path, router.url(route, *args)
|
73
75
|
end
|
74
76
|
end
|
data/test/rack/test_urlmap.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
class TestRackUrlmap < MiniTest::Unit::TestCase
|
2
2
|
|
3
|
-
def test_map_urls
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
end
|
3
|
+
#def test_map_urls
|
4
|
+
# HttpRouter::Rack.override_rack_urlmap!
|
5
|
+
# map = Rack::URLMap.new(
|
6
|
+
# "http://www.example.org/test" => proc {|env| [200, {}, ['test']]},
|
7
|
+
# "http://www.example.org/:test" => proc {|env| [200, {}, ['variable']]}
|
8
|
+
# )
|
9
|
+
# assert_equal 'test', map.call(Rack::MockRequest.env_for('http://www.example.org/test')).last.join
|
10
|
+
# assert_equal 'variable', map.call(Rack::MockRequest.env_for('http://www.example.org/whhhaaa')).last.join
|
11
|
+
#end
|
12
12
|
end
|
data/test/test_arbitrary.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
class TestArbitrary < MiniTest::Unit::TestCase
|
2
2
|
def test_match
|
3
3
|
hello, love80, love8080 = router {
|
4
|
-
add('test').arbitrary(Proc.new{|req, params| req.host == 'hellodooly' })
|
5
|
-
add("test").arbitrary(Proc.new{|req, params| req.host == 'lovelove' }).arbitrary{|req, params
|
6
|
-
add("test").arbitrary(Proc.new{|req, params| req.host == 'lovelove' }).arbitrary{|req, params
|
4
|
+
add('test').arbitrary(Proc.new{|req, params| req.rack.host == 'hellodooly' })
|
5
|
+
add("test").arbitrary(Proc.new{|req, params| req.rack.host == 'lovelove' }).arbitrary{|req, params| req.rack.port == 80}
|
6
|
+
add("test").arbitrary(Proc.new{|req, params| req.rack.host == 'lovelove' }).arbitrary{|req, params| req.rack.port == 8080}
|
7
7
|
}
|
8
8
|
assert_route love8080, 'http://lovelove:8080/test'
|
9
9
|
end
|
@@ -11,9 +11,9 @@ class TestArbitrary < MiniTest::Unit::TestCase
|
|
11
11
|
def test_less_specific_node
|
12
12
|
general, hello, love80, love8080 = router {
|
13
13
|
add("/test")
|
14
|
-
add("/test").arbitrary(Proc.new{|req, params| req.host == 'hellodooly' })
|
15
|
-
add("/test").arbitrary(Proc.new{|req, params| req.host == 'lovelove' }).arbitrary{|req, params
|
16
|
-
add("/test").arbitrary(Proc.new{|req, params| req.host == 'lovelove' }).arbitrary{|req, params
|
14
|
+
add("/test").arbitrary(Proc.new{|req, params| req.rack.host == 'hellodooly' })
|
15
|
+
add("/test").arbitrary(Proc.new{|req, params| req.rack.host == 'lovelove' }).arbitrary{|req, params| req.rack.port == 80}
|
16
|
+
add("/test").arbitrary(Proc.new{|req, params| req.rack.host == 'lovelove' }).arbitrary{|req, params| req.rack.port == 8080}
|
17
17
|
}
|
18
18
|
assert_route general, 'http://lovelove:8081/test'
|
19
19
|
assert_route hello, 'http://hellodooly:8081/test'
|
@@ -23,8 +23,8 @@ class TestArbitrary < MiniTest::Unit::TestCase
|
|
23
23
|
|
24
24
|
def test_match_request
|
25
25
|
love80, love8080 = router {
|
26
|
-
add("/test").get.arbitrary(Proc.new{|req, params| req.host == 'lovelove' }).arbitrary{|req, params
|
27
|
-
add("/test").get.arbitrary(Proc.new{|req, params| req.host == 'lovelove' }).arbitrary{|req, params
|
26
|
+
add("/test").get.arbitrary(Proc.new{|req, params| req.rack.host == 'lovelove' }).arbitrary{|req, params| req.rack.port == 80}
|
27
|
+
add("/test").get.arbitrary(Proc.new{|req, params| req.rack.host == 'lovelove' }).arbitrary{|req, params| req.rack.port == 8080}
|
28
28
|
}
|
29
29
|
assert_route love80, 'http://lovelove:80/test'
|
30
30
|
assert_route love8080, 'http://lovelove:8080/test'
|
@@ -32,8 +32,8 @@ class TestArbitrary < MiniTest::Unit::TestCase
|
|
32
32
|
|
33
33
|
def test_less_specific_with_request
|
34
34
|
love80, love8080, general = router {
|
35
|
-
add("test").post.arbitrary(Proc.new{|req, params| req.host == 'lovelove' }).arbitrary{|req, params
|
36
|
-
add("test").post.arbitrary(Proc.new{|req, params| req.host == 'lovelove' }).arbitrary{|req, params
|
35
|
+
add("test").post.arbitrary(Proc.new{|req, params| req.rack.host == 'lovelove' }).arbitrary{|req, params| req.rack.port == 80}
|
36
|
+
add("test").post.arbitrary(Proc.new{|req, params| req.rack.host == 'lovelove' }).arbitrary{|req, params| req.rack.port == 8080}
|
37
37
|
add("test").post
|
38
38
|
}
|
39
39
|
assert_route love8080, Rack::MockRequest.env_for('http://lovelove:8080/test', :method => :post)
|
@@ -47,4 +47,12 @@ class TestArbitrary < MiniTest::Unit::TestCase
|
|
47
47
|
}
|
48
48
|
assert_route r, '/test', {:test => 'test'}
|
49
49
|
end
|
50
|
+
|
51
|
+
def test_continue
|
52
|
+
no, yes = router {
|
53
|
+
add('test').arbitrary_with_continue{|req, p| req.continue[false]}
|
54
|
+
add('test').arbitrary_with_continue{|req, p| req.continue[true]}
|
55
|
+
}
|
56
|
+
assert_route yes, '/test'
|
57
|
+
end
|
50
58
|
end
|
data/test/test_misc.rb
CHANGED
@@ -1,30 +1,30 @@
|
|
1
1
|
class TestMisc < MiniTest::Unit::TestCase
|
2
|
-
def test_exceptions
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
end
|
7
|
-
|
8
|
-
def test_cloning
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
end
|
2
|
+
#def test_exceptions
|
3
|
+
# assert_raises(HttpRouter::AmbiguousRouteException) {HttpRouter.new.add("/:var1(/:var2)(/:var3)").compile}
|
4
|
+
# assert_raises(HttpRouter::AmbiguousVariableException) {HttpRouter.new.add("/:var1(/:var1)(/:var1)").compile}
|
5
|
+
# assert_raises(HttpRouter::UnsupportedRequestConditionError) {HttpRouter.new.add("/").condition(:flibberty => 'gibet').compile}
|
6
|
+
#end
|
7
|
+
#
|
8
|
+
#def test_cloning
|
9
|
+
# r1 = HttpRouter.new {
|
10
|
+
# add('/test').name(:test_route).to :test
|
11
|
+
# }
|
12
|
+
# r2 = r1.clone
|
13
|
+
#
|
14
|
+
# r2.add('/test2').name(:test).to(:test2)
|
15
|
+
# assert_equal 2, r2.routes.size
|
16
|
+
#
|
17
|
+
# assert r1.recognize(Rack::Request.new(Rack::MockRequest.env_for('/test2'))).nil?
|
18
|
+
# assert !r2.recognize(Rack::Request.new(Rack::MockRequest.env_for('/test2'))).nil?
|
19
|
+
# assert_equal r1.routes.first, r1.named_routes[:test_route]
|
20
|
+
# assert_equal r2.routes.first, r2.named_routes[:test_route]
|
21
|
+
#
|
22
|
+
# r1.add('/another').name(:test).to(:test2)
|
23
|
+
#
|
24
|
+
# assert_equal r1.routes.size, r2.routes.size
|
25
|
+
# assert_equal '/another', r1.url(:test)
|
26
|
+
# assert_equal '/test2', r2.url(:test)
|
27
|
+
# assert_equal :test, r1.routes.first.dest
|
28
|
+
# assert_equal :test, r2.routes.first.dest
|
29
|
+
#end
|
30
30
|
end
|
data/test/test_mounting.rb
CHANGED
@@ -1,85 +1,85 @@
|
|
1
1
|
class TestMounting < MiniTest::Unit::TestCase
|
2
|
-
def setup
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
end
|
7
|
-
|
8
|
-
def test_url_mount_for_child_route
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
end
|
13
|
-
|
14
|
-
def test_default_values
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
end
|
19
|
-
|
20
|
-
def test_multiple_values
|
21
|
-
|
22
|
-
|
23
|
-
end
|
24
|
-
|
25
|
-
def test_bubble_params
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
end
|
30
|
-
|
31
|
-
def test_path_with_optional
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
end
|
38
|
-
|
39
|
-
def test_nest3
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
end
|
50
|
-
|
51
|
-
def test_with_default_host
|
52
|
-
|
53
|
-
|
54
|
-
end
|
55
|
-
|
56
|
-
def test_with_host
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
end
|
61
|
-
|
62
|
-
def test_with_scheme
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
end
|
67
|
-
|
68
|
-
def test_clone
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
end
|
2
|
+
#def setup
|
3
|
+
# @r1 = HttpRouter.new
|
4
|
+
# @r2 = HttpRouter.new
|
5
|
+
# @r2.add("/bar").name(:test).compile
|
6
|
+
#end
|
7
|
+
#
|
8
|
+
#def test_url_mount_for_child_route
|
9
|
+
# route = @r1.add("/foo").to(@r2)
|
10
|
+
# assert_equal "/foo", @r2.url_mount.url
|
11
|
+
# assert_equal "/foo/bar", @r2.url(:test)
|
12
|
+
#end
|
13
|
+
#
|
14
|
+
#def test_default_values
|
15
|
+
# route = @r1.add("/foo/:bar").default(:bar => "baz").to(@r2)
|
16
|
+
# assert_equal "/foo/baz/bar", @r2.url(:test)
|
17
|
+
# assert_equal "/foo/haha/bar", @r2.url(:test, :bar => "haha")
|
18
|
+
#end
|
19
|
+
#
|
20
|
+
#def test_multiple_values
|
21
|
+
# @r1.add("/foo/:bar/:baz").default(:bar => "bar").to(@r2)
|
22
|
+
# assert_equal "/foo/bar/baz/bar", @r2.url(:test, :baz => "baz")
|
23
|
+
#end
|
24
|
+
#
|
25
|
+
#def test_bubble_params
|
26
|
+
# route = @r1.add("/foo/:bar").default(:bar => "baz").to(@r2)
|
27
|
+
# assert_equal "/foo/baz/bar?bang=ers", @r2.url(:test, :bang => "ers")
|
28
|
+
# assert_equal "/foo/haha/bar?bang=ers", @r2.url(:test, :bar => "haha", :bang => "ers")
|
29
|
+
#end
|
30
|
+
#
|
31
|
+
#def test_path_with_optional
|
32
|
+
# @r1.add("/foo(/:bar)").to(@r2)
|
33
|
+
# @r2.add("/hey(/:there)").name(:test).compile
|
34
|
+
# assert_equal "/foo/hey", @r2.url(:test)
|
35
|
+
# assert_equal "/foo/bar/hey", @r2.url(:test, :bar => "bar")
|
36
|
+
# assert_equal "/foo/bar/hey/there", @r2.url(:test, :bar => "bar", :there => "there")
|
37
|
+
#end
|
38
|
+
#
|
39
|
+
#def test_nest3
|
40
|
+
# @r3 = HttpRouter.new
|
41
|
+
# @r1.add("/foo(/:bar)").default(:bar => "barry").to(@r2)
|
42
|
+
# @r2.add("/hi").name(:hi).compile
|
43
|
+
# @r2.add("/mounted").to(@r3)
|
44
|
+
# @r3.add("/endpoint").name(:endpoint).compile
|
45
|
+
#
|
46
|
+
# assert_equal "/foo/barry/hi", @r2.url(:hi)
|
47
|
+
# assert_equal "/foo/barry/mounted/endpoint", @r3.url(:endpoint)
|
48
|
+
# assert_equal "/foo/flower/mounted/endpoint", @r3.url(:endpoint, :bar => "flower")
|
49
|
+
#end
|
50
|
+
#
|
51
|
+
#def test_with_default_host
|
52
|
+
# @r1.add("/mounted").default(:host => "example.com").to(@r2)
|
53
|
+
# assert_equal "http://example.com/mounted/bar", @r2.url(:test)
|
54
|
+
#end
|
55
|
+
#
|
56
|
+
#def test_with_host
|
57
|
+
# @r1.add("/mounted").to(@r2)
|
58
|
+
# assert_equal "/mounted/bar", @r2.url(:test)
|
59
|
+
# assert_equal "http://example.com/mounted/bar", @r2.url(:test, :host => "example.com")
|
60
|
+
#end
|
61
|
+
#
|
62
|
+
#def test_with_scheme
|
63
|
+
# @r1.add("/mounted").to(@r2)
|
64
|
+
# assert_equal "/mounted/bar", @r2.url(:test)
|
65
|
+
# assert_equal "https://example.com/mounted/bar", @r2.url(:test, :scheme => "https", :host => "example.com")
|
66
|
+
#end
|
67
|
+
#
|
68
|
+
#def test_clone
|
69
|
+
# @r3 = HttpRouter.new
|
70
|
+
# @r1.add("/first").to(@r2)
|
71
|
+
# @r2.add("/second").to(@r3)
|
72
|
+
# r1 = @r1.clone
|
73
|
+
# assert @r1.routes.first
|
74
|
+
# r2 = r1.routes.first.dest
|
75
|
+
# assert r2
|
76
|
+
# assert_equal @r1.routes.first.dest.object_id, @r2.object_id
|
77
|
+
# assert r2.object_id != @r2.object_id
|
78
|
+
# assert_equal 2, r2.routes.size
|
79
|
+
# r3 = r2.routes.last.dest
|
80
|
+
# assert_instance_of HttpRouter, r3
|
81
|
+
# assert r3.object_id != @r3.object_id
|
82
|
+
#end
|
83
83
|
end
|
84
84
|
|
85
85
|
# it "should clone my nested structure" do
|
data/test/test_request.rb
CHANGED
@@ -6,6 +6,12 @@ class TestRequest < MiniTest::Unit::TestCase
|
|
6
6
|
assert_status(405, Rack::MockRequest.env_for('/test', :method => 'GET'))
|
7
7
|
end
|
8
8
|
|
9
|
+
def test_single_app_with_404
|
10
|
+
r = router { add('test').post.to{|env| [404, {}, []]} }
|
11
|
+
assert_route nil, Rack::MockRequest.env_for('/test', :method => 'POST')
|
12
|
+
assert_status(404, Rack::MockRequest.env_for('/test', :method => 'POST'))
|
13
|
+
end
|
14
|
+
|
9
15
|
def test_with_optional_parts_and_405
|
10
16
|
get, post, delete = router {
|
11
17
|
get('test(.:format)')
|
data/test/test_trailing_slash.rb
CHANGED
@@ -3,10 +3,6 @@ class TestVariable < MiniTest::Unit::TestCase
|
|
3
3
|
assert_route router.add('/test'), '/test/'
|
4
4
|
end
|
5
5
|
|
6
|
-
def test_ignore_trailing_slash_disabled
|
7
|
-
assert_route router(:ignore_trailing_slash => false).add('/test/?'), '/test/'
|
8
|
-
end
|
9
|
-
|
10
6
|
def test_ignore_trailing_slash_enabled
|
11
7
|
router(:ignore_trailing_slash => false).add('/test/?')
|
12
8
|
assert_route nil, '/test/'
|
data/test/test_variable.rb
CHANGED
@@ -29,13 +29,6 @@ class TestVariable < MiniTest::Unit::TestCase
|
|
29
29
|
assert_route static, '/foo'
|
30
30
|
end
|
31
31
|
|
32
|
-
def test_anonymous_variable
|
33
|
-
assert_route '/foo/:', '/foo/id', {:'$1' => 'id'}
|
34
|
-
assert_route 'foo/:/:', '/foo/id/what', {:'$1' => 'id', :'$2' => 'what'}
|
35
|
-
assert_route 'foo/*/test', '/foo/id1/id2/test', {:'$1' => ['id1', 'id2']}
|
36
|
-
assert_route '/foo/*/what/:', '/foo/id1/id2/what/more', {:'$1' => ['id1', 'id2'], :'$2' => 'more'}
|
37
|
-
end
|
38
|
-
|
39
32
|
def test_variable_mixed_with_static
|
40
33
|
static, dynamic = router {
|
41
34
|
add("/foo/foo")
|
@@ -50,8 +43,7 @@ class TestVariable < MiniTest::Unit::TestCase
|
|
50
43
|
end
|
51
44
|
|
52
45
|
def test_match_path
|
53
|
-
r = router { add(%r{
|
54
|
-
assert_equal true, r.regex?
|
46
|
+
r = router { add(%r{^/(test123|\d+)$}) }
|
55
47
|
assert_route r, '/test123'
|
56
48
|
assert_route r, '/123'
|
57
49
|
assert_route nil, '/test123andmore'
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http_router
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 6
|
9
|
+
- 0
|
10
|
+
version: 0.6.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Joshua Hull
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-03-17 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -187,26 +187,26 @@ files:
|
|
187
187
|
- examples/variable_with_regex.ru
|
188
188
|
- http_router.gemspec
|
189
189
|
- lib/http_router.rb
|
190
|
-
- lib/http_router/glob.rb
|
191
|
-
- lib/http_router/interface/sinatra.rb
|
192
190
|
- lib/http_router/node.rb
|
191
|
+
- lib/http_router/node/arbitrary.rb
|
192
|
+
- lib/http_router/node/free_regex.rb
|
193
|
+
- lib/http_router/node/glob.rb
|
194
|
+
- lib/http_router/node/glob_regex.rb
|
195
|
+
- lib/http_router/node/regex.rb
|
196
|
+
- lib/http_router/node/request.rb
|
197
|
+
- lib/http_router/node/spanning_regex.rb
|
198
|
+
- lib/http_router/node/variable.rb
|
193
199
|
- lib/http_router/optional_compiler.rb
|
194
|
-
- lib/http_router/parts.rb
|
195
200
|
- lib/http_router/path.rb
|
196
|
-
- lib/http_router/
|
197
|
-
- lib/http_router/
|
198
|
-
- lib/http_router/
|
199
|
-
- lib/http_router/root.rb
|
201
|
+
- lib/http_router/regex_route.rb
|
202
|
+
- lib/http_router/request.rb
|
203
|
+
- lib/http_router/response.rb
|
200
204
|
- lib/http_router/route.rb
|
201
|
-
- lib/http_router/static.rb
|
202
|
-
- lib/http_router/variable.rb
|
203
205
|
- lib/http_router/version.rb
|
204
206
|
- test/helper.rb
|
205
207
|
- test/rack/test_dispatch.rb
|
206
208
|
- test/rack/test_route.rb
|
207
209
|
- test/rack/test_urlmap.rb
|
208
|
-
- test/sinatra/recognize_spec.rb
|
209
|
-
- test/sinatra/test_recognize.rb
|
210
210
|
- test/test_arbitrary.rb
|
211
211
|
- test/test_generate.rb
|
212
212
|
- test/test_greedy.rb
|