routing-filter 0.1.6 → 0.1.7

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.
@@ -16,10 +16,10 @@ ActionDispatch::Routing::RouteSet.class_eval do
16
16
  names.each { |name| @set.filters << RoutingFilter.build(name, options) }
17
17
  end
18
18
 
19
- def recognize_path_with_filtering(path, env = {})
20
- @set.filters.run(:around_recognize, path, env, &lambda{ recognize_path_without_filtering(path, env) })
21
- end
22
- alias_method_chain :recognize_path, :filtering
19
+ # def recognize_path_with_filtering(path, env = {})
20
+ # @set.filters.run(:around_recognize, path.dup, env, &lambda{ recognize_path_without_filtering(path.dup, env) })
21
+ # end
22
+ # alias_method_chain :recognize_path, :filtering
23
23
 
24
24
  def generate_with_filtering(options, recall = {}, extras = false)
25
25
  @set.filters.run(:around_generate, options, &lambda{ generate_without_filtering(options, recall, extras) })
@@ -57,10 +57,14 @@ Rack::Mount::CodeGeneration.class_eval do
57
57
  # hard for your users to hook in anywhere
58
58
  def recognize_with_filtering(request, &block)
59
59
  path, route, matches, params = request.env['PATH_INFO'], nil, nil, nil
60
+ original_path = path.dup
61
+
60
62
  filters.run(:around_recognize, path, request.env) do
61
63
  route, matches, params = recognize_without_filtering(request)
62
64
  params || {}
63
65
  end
66
+
67
+ request.env['PATH_INFO'] = original_path # hmm ...
64
68
  block.call(route, matches, params) if route
65
69
  end
66
70
  end
@@ -1,3 +1,3 @@
1
1
  module RoutingFilter
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: routing-filter
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 6
10
- version: 0.1.6
9
+ - 7
10
+ version: 0.1.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sven Fuchs
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-01 00:00:00 +02:00
18
+ date: 2010-09-30 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency