incline 0.2.18 → 0.2.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/incline/version.rb +1 -1
- data/lib/incline.rb +6 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56411284e4d17a3c8427fcd363ab5a9a06ee7238
|
4
|
+
data.tar.gz: cadb63efd1172b4de4315f27ffb91313cc6c50f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04d13291b6afcfb36c51547322fa707c11776719d4224edc88a36c14f2b637eb77df7be9f55a0d31e60a99c31e3886994a32aa66a32b7c4431bd9baeb0a2627f
|
7
|
+
data.tar.gz: 606cb3af25ea7278e0fc578edc2aa959c11fd86d9affca6c40d16ad5ee2fe796482b6a285eb1353d40a6c87c8423d34f387210cdf45df3bd96cdd17a7ae3f5f3
|
data/Gemfile.lock
CHANGED
data/lib/incline/version.rb
CHANGED
data/lib/incline.rb
CHANGED
@@ -126,11 +126,7 @@ module Incline
|
|
126
126
|
get_routes(Rails.application.routes.routes).sort do |a,b|
|
127
127
|
if a[:engine] == b[:engine]
|
128
128
|
if a[:controller] == b[:controller]
|
129
|
-
|
130
|
-
a[:path] <=> b[:path]
|
131
|
-
else
|
132
|
-
a[:action] <=> b[:action]
|
133
|
-
end
|
129
|
+
a[:action] <=> b[:action]
|
134
130
|
else
|
135
131
|
a[:controller] <=> b[:controller]
|
136
132
|
end
|
@@ -242,11 +238,13 @@ module Incline
|
|
242
238
|
end
|
243
239
|
|
244
240
|
result.inject([]) do |ret,item|
|
245
|
-
existing = ret.find{|r| r[:engine] == item[:engine] && r[:controller] == item[:controller] && r[:action] == item[:action]}
|
241
|
+
existing = ret.find{|r| r[:engine] == item[:engine] && r[:controller] == item[:controller] && r[:action] == item[:action] && r[:path] == item[:path]}
|
246
242
|
if existing
|
247
|
-
existing[:verb]
|
243
|
+
verbs = existing[:verb].split('|')
|
244
|
+
verbs << item[:verb] unless verbs.include?(item[:verb])
|
245
|
+
existing[:verb] += verbs.sort.join('|')
|
248
246
|
else
|
249
|
-
ret << item
|
247
|
+
ret << item.dup
|
250
248
|
end
|
251
249
|
ret
|
252
250
|
end
|