canonical-rails 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/canonical_rails/tag_helper.rb +4 -2
- data/lib/canonical-rails/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0dec5645d51ed0ad35587260417f914f20d4ec3b4a10a082e29aa6a824b5f4a6
|
4
|
+
data.tar.gz: 1d6bf6bd72105ab1790b1afb4383b27048f49aae8efaab50f5ef2fa4c07ef90e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33a696b21575481f8c2a1d8303200f9ab576605f02c7fa65ef43a02febce9937b0843a2c6b5fcb20ddc9a19f17e63784462aabd9805c12d883d489dd7eb52b38
|
7
|
+
data.tar.gz: 96884877d1a604b141d492477ab3bca7feb78c934961c6d03f10a4f31742aa271c9b9832893cb742edfd0ec5552d6fae8a5e3eecb243822646f89edde8b91740
|
@@ -5,10 +5,12 @@ module CanonicalRails
|
|
5
5
|
end
|
6
6
|
|
7
7
|
def trailing_slash_if_needed
|
8
|
-
"/" if trailing_slash_needed?
|
8
|
+
"/" if trailing_slash_needed?
|
9
9
|
end
|
10
10
|
|
11
11
|
def path_without_html_extension
|
12
|
+
return '' if request.path == '/'
|
13
|
+
|
12
14
|
request.path.sub(/\.html$/, '')
|
13
15
|
end
|
14
16
|
|
@@ -29,7 +31,7 @@ module CanonicalRails
|
|
29
31
|
port = port.present? && port.to_i != default_ports[canonical_protocol] ? ":#{port}" : ''
|
30
32
|
raw "#{canonical_protocol}#{host}#{port}#{path_without_html_extension}#{trailing_slash_if_needed}#{whitelisted_query_string}".downcase
|
31
33
|
end
|
32
|
-
|
34
|
+
|
33
35
|
def canonical_path
|
34
36
|
raw "#{path_without_html_extension}#{trailing_slash_if_needed}#{whitelisted_query_string}"
|
35
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: canonical-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Ivanov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '4.1'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '6.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '4.1'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '6.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: appraisal
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|