http_router 0.7.4 → 0.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,8 @@
1
1
  class HttpRouter
2
2
  class Node
3
3
  class Arbitrary < Node
4
+ alias_method :node_lookup, :[]
5
+
4
6
  def initialize(router, allow_partial, blk, param_names)
5
7
  @allow_partial, @blk, @param_names = allow_partial, blk, param_names
6
8
  super(router)
@@ -10,7 +12,7 @@ class HttpRouter
10
12
  if request.path.empty? or (request.path.size == 1 and request.path[0] == '') or @allow_partial
11
13
  catch(:pass) do
12
14
  request = request.clone
13
- request.continue = proc { |state| super(request) if state }
15
+ request.continue = proc { |state| node_lookup(request) if state }
14
16
  params = @param_names.nil? ? {} : Hash[@param_names.zip(request.params)]
15
17
  @blk.call(request, params)
16
18
  end
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  class HttpRouter #:nodoc
3
- VERSION = '0.7.4'
3
+ VERSION = '0.7.5'
4
4
  end
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: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 4
10
- version: 0.7.4
9
+ - 5
10
+ version: 0.7.5
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-26 00:00:00 -07:00
18
+ date: 2011-04-28 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency