sinatra-routing-helpers 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/sinatra/routing-helpers/version.rb +1 -1
- data/lib/sinatra/routing-helpers.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NmViOWI0YzgwYzZmYjZiNjUyYmFmMzc0YjBmYmU4ZTllMmI1ZjJmZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTVkNmVjMzY4YmI4OGJhY2IyMDcwOTRhOGJmOWMxZjUwYzFmMTFkNQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODQyNTljM2UyZjgwMWQ3MTlkOGZhYzkxMTRkZDBiYjgzYWNlNjg4Mjg4MDRi
|
10
|
+
OWMxMjA3MjA5MDY1ZDFkODFhMmI2MDhiNWFmYzRmMTYxZTE1YTM2ZmMyNTEz
|
11
|
+
N2UzODQwZjRkYmQ0M2MyNGU1MWE2OGUwNTYwYmY1NjE5MDdiYTA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NGE1YWI2YzhkODczOWRmZGE1MTM3MGQyYjdhZWY0NzNlMWYxMDZlYmFlY2E1
|
14
|
+
MjJjNWZkYjg1ZDk3YTlmYjJiYzcyYzkxZDI2N2YwM2E2NjQ1Njk5Y2QzZWE4
|
15
|
+
ZjhjYmViZjg0OGFiY2NhMTY5YjZkN2Q2NzI2N2NlYzQxOWI4N2U=
|
@@ -9,6 +9,10 @@ module Sinatra
|
|
9
9
|
# better handling of referrer path
|
10
10
|
def parsed_referrer_path
|
11
11
|
if (!request.referrer.nil? && !request.referrer.empty?) && parsed_referrer = URI.parse(request.referrer)
|
12
|
+
if parsed_referrer.path.end_with?('/')
|
13
|
+
parsed_referrer.path.chop!
|
14
|
+
end
|
15
|
+
|
12
16
|
parsed_referrer.path
|
13
17
|
else
|
14
18
|
nil
|