http_router 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/http_router/route.rb +3 -2
- data/lib/http_router/version.rb +1 -1
- metadata +4 -4
data/lib/http_router/route.rb
CHANGED
@@ -187,7 +187,6 @@ class HttpRouter
|
|
187
187
|
"#<HttpRouter:Route #{object_id} @original_path=#{@original_path.inspect} @conditions=#{@conditions.inspect} @arbitrary=#{@arbitrary.inspect}>"
|
188
188
|
end
|
189
189
|
|
190
|
-
private
|
191
190
|
def compile
|
192
191
|
return if @compiled
|
193
192
|
@paths.map! do |path|
|
@@ -247,8 +246,10 @@ class HttpRouter
|
|
247
246
|
add_non_path_to_tree(node, path, param_names)
|
248
247
|
end
|
249
248
|
@compiled = true
|
249
|
+
self
|
250
250
|
end
|
251
251
|
|
252
|
+
private
|
252
253
|
def add_non_path_to_tree(node, path, names)
|
253
254
|
path_obj = Path.new(self, path, names)
|
254
255
|
destination = Proc.new { |req, use_partial_matching|
|
@@ -265,7 +266,7 @@ class HttpRouter
|
|
265
266
|
env["PATH_INFO"] = ''
|
266
267
|
env["SCRIPT_NAME"] += req.rack_request.path_info
|
267
268
|
end
|
268
|
-
response =
|
269
|
+
response = path_obj.route.dest.call(env)
|
269
270
|
router.pass_on_response(response) ? throw(:pass) : throw(:success, response)
|
270
271
|
else
|
271
272
|
throw :success, Response.new(req, path_obj)
|
data/lib/http_router/version.rb
CHANGED
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:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
9
|
+
- 2
|
10
|
+
version: 0.7.2
|
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-04-
|
18
|
+
date: 2011-04-25 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|