routing-filter-codeur 0.7.1.2 → 0.8.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/routing_filter/adapters/routers/journey.rb +8 -15
- data/lib/routing_filter/version.rb +1 -1
- metadata +32 -17
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e80c17b0539eaa04aaf8d5aa238540e54c4d3f410d3eb04c8fc87b4d7df5cb9f
|
|
4
|
+
data.tar.gz: 6315c6225a6915677bbead291522d3f2ce6f49af1332ea3b189ec48de9312779
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e875a2dae54f8f220c259afc387912c4657c256cf46b58fdb6548683ec06f2bbc5bd64748a8cbff2322cd791fb14beee1f8bad8c560bcc5854e5ba40036068a0
|
|
7
|
+
data.tar.gz: 3548b94679b16d936b47da8e5fdb4f56f69224360bb2a83e1fea6cd0d728b9ce73a94e2dca014bc264e55314e8801788aac735e86ffaed60cc67d51fa2160302
|
data/CHANGELOG.md
CHANGED
|
@@ -6,36 +6,29 @@
|
|
|
6
6
|
# recognized by the rails router and transformed to a route set and dispatched
|
|
7
7
|
# to a controller.
|
|
8
8
|
module ActionDispatchJourneyRouterWithFiltering
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
else
|
|
13
|
-
env.path_info
|
|
14
|
-
end
|
|
9
|
+
# NOTE: `find_routes`` was inlined as `recognize` in Rails 8.1+
|
|
10
|
+
def recognize(req, &block)
|
|
11
|
+
path = req.path_info
|
|
15
12
|
|
|
16
13
|
filter_parameters = {}
|
|
17
14
|
original_path = path.dup
|
|
18
15
|
|
|
19
16
|
# Apply the custom user around_recognize filter callbacks
|
|
20
|
-
@routes.filters.run(:around_recognize, path, env) do
|
|
21
|
-
# Yield the filter
|
|
17
|
+
@routes.filters.run(:around_recognize, path, req.env) do
|
|
18
|
+
# Yield the filter parameters for adjustment by the user
|
|
22
19
|
filter_parameters
|
|
23
20
|
end
|
|
24
21
|
|
|
25
22
|
# Recognize the routes
|
|
26
|
-
super(
|
|
23
|
+
super(req) do |route, parameters|
|
|
27
24
|
# Merge in custom parameters that will be visible to the controller
|
|
28
25
|
params = (parameters || {}).merge(filter_parameters)
|
|
29
26
|
|
|
30
27
|
# Reset the path before yielding to the controller (prevents breakages in CSRF validation)
|
|
31
|
-
|
|
32
|
-
env['PATH_INFO'] = original_path
|
|
33
|
-
else
|
|
34
|
-
env.path_info = original_path
|
|
35
|
-
end
|
|
28
|
+
req.path_info = original_path
|
|
36
29
|
|
|
37
30
|
# Yield results are dispatched to the controller
|
|
38
|
-
yield [
|
|
31
|
+
yield [route, params]
|
|
39
32
|
end
|
|
40
33
|
end
|
|
41
34
|
end
|
metadata
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: routing-filter-codeur
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sven Fuchs
|
|
8
8
|
- Codeur
|
|
9
|
-
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: actionpack
|
|
@@ -17,28 +16,40 @@ dependencies:
|
|
|
17
16
|
requirements:
|
|
18
17
|
- - ">="
|
|
19
18
|
- !ruby/object:Gem::Version
|
|
20
|
-
version: '
|
|
19
|
+
version: '8.1'
|
|
20
|
+
- - "<"
|
|
21
|
+
- !ruby/object:Gem::Version
|
|
22
|
+
version: '9.0'
|
|
21
23
|
type: :runtime
|
|
22
24
|
prerelease: false
|
|
23
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
26
|
requirements:
|
|
25
27
|
- - ">="
|
|
26
28
|
- !ruby/object:Gem::Version
|
|
27
|
-
version: '
|
|
29
|
+
version: '8.1'
|
|
30
|
+
- - "<"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '9.0'
|
|
28
33
|
- !ruby/object:Gem::Dependency
|
|
29
34
|
name: activesupport
|
|
30
35
|
requirement: !ruby/object:Gem::Requirement
|
|
31
36
|
requirements:
|
|
32
37
|
- - ">="
|
|
33
38
|
- !ruby/object:Gem::Version
|
|
34
|
-
version: '
|
|
39
|
+
version: '8.1'
|
|
40
|
+
- - "<"
|
|
41
|
+
- !ruby/object:Gem::Version
|
|
42
|
+
version: '9.0'
|
|
35
43
|
type: :runtime
|
|
36
44
|
prerelease: false
|
|
37
45
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
46
|
requirements:
|
|
39
47
|
- - ">="
|
|
40
48
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: '
|
|
49
|
+
version: '8.1'
|
|
50
|
+
- - "<"
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: '9.0'
|
|
42
53
|
- !ruby/object:Gem::Dependency
|
|
43
54
|
name: i18n
|
|
44
55
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -87,28 +98,34 @@ dependencies:
|
|
|
87
98
|
requirements:
|
|
88
99
|
- - ">="
|
|
89
100
|
- !ruby/object:Gem::Version
|
|
90
|
-
version: '
|
|
101
|
+
version: '8.1'
|
|
102
|
+
- - "<"
|
|
103
|
+
- !ruby/object:Gem::Version
|
|
104
|
+
version: '9.0'
|
|
91
105
|
type: :development
|
|
92
106
|
prerelease: false
|
|
93
107
|
version_requirements: !ruby/object:Gem::Requirement
|
|
94
108
|
requirements:
|
|
95
109
|
- - ">="
|
|
96
110
|
- !ruby/object:Gem::Version
|
|
97
|
-
version: '
|
|
111
|
+
version: '8.1'
|
|
112
|
+
- - "<"
|
|
113
|
+
- !ruby/object:Gem::Version
|
|
114
|
+
version: '9.0'
|
|
98
115
|
- !ruby/object:Gem::Dependency
|
|
99
116
|
name: minitest
|
|
100
117
|
requirement: !ruby/object:Gem::Requirement
|
|
101
118
|
requirements:
|
|
102
|
-
- - "
|
|
119
|
+
- - ">="
|
|
103
120
|
- !ruby/object:Gem::Version
|
|
104
|
-
version:
|
|
121
|
+
version: '0'
|
|
105
122
|
type: :development
|
|
106
123
|
prerelease: false
|
|
107
124
|
version_requirements: !ruby/object:Gem::Requirement
|
|
108
125
|
requirements:
|
|
109
|
-
- - "
|
|
126
|
+
- - ">="
|
|
110
127
|
- !ruby/object:Gem::Version
|
|
111
|
-
version:
|
|
128
|
+
version: '0'
|
|
112
129
|
description: Routing filters wraps around the complex beast that the Rails routing
|
|
113
130
|
system is, allowing for unseen flexibility and power in Rails URL recognition and
|
|
114
131
|
generation.
|
|
@@ -136,11 +153,10 @@ files:
|
|
|
136
153
|
- lib/routing_filter/filters/uuid.rb
|
|
137
154
|
- lib/routing_filter/result_wrapper.rb
|
|
138
155
|
- lib/routing_filter/version.rb
|
|
139
|
-
homepage: http://github.com/
|
|
156
|
+
homepage: http://github.com/codeur/routing-filter
|
|
140
157
|
licenses:
|
|
141
158
|
- MIT
|
|
142
159
|
metadata: {}
|
|
143
|
-
post_install_message:
|
|
144
160
|
rdoc_options: []
|
|
145
161
|
require_paths:
|
|
146
162
|
- lib
|
|
@@ -155,8 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
155
171
|
- !ruby/object:Gem::Version
|
|
156
172
|
version: '0'
|
|
157
173
|
requirements: []
|
|
158
|
-
rubygems_version: 3.
|
|
159
|
-
signing_key:
|
|
174
|
+
rubygems_version: 3.6.9
|
|
160
175
|
specification_version: 4
|
|
161
176
|
summary: Routing filters wraps around the complex beast that the Rails routing system
|
|
162
177
|
is, allowing for unseen flexibility and power in Rails URL recognition and generation
|