canonical-rails 0.2.14 → 0.2.15
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/README.md +1 -2
- data/app/helpers/canonical_rails/tag_helper.rb +4 -4
- data/lib/canonical-rails/version.rb +1 -1
- metadata +20 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cf9e6c0398f9b204f9cdcdf73d2ea3607fddc75fad061f8a6057b5c83c5b3fb8
|
|
4
|
+
data.tar.gz: 07d0d5b92eb285da22f61e13cec4203af2abac3453e5e8370bcd2eba0de03aa1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '018c55179322a1807e0b7bde285b38d0927345bcf74774a79efb829d05bac226c6743757f2c73b9ded0a9ee5230073850e74126a0e3a1ad55e3f9b7a9a6513bd'
|
|
7
|
+
data.tar.gz: 0620d371b5fc2cb139afed5550f3635f5ffecb735e0979681f3239676c54b57bd7f3197fdaa2ba12f51fcd484893a1ceb7f3fba620061c03f9afb04f34a86837
|
data/README.md
CHANGED
|
@@ -17,10 +17,10 @@ module CanonicalRails
|
|
|
17
17
|
"/" if trailing_slash_needed?
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
def
|
|
20
|
+
def path_without_extension
|
|
21
21
|
return '' if request.path == '/'
|
|
22
22
|
|
|
23
|
-
request.path.sub(
|
|
23
|
+
request.path.sub(/\.\w{3,4}$/, '')
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def canonical_protocol
|
|
@@ -38,11 +38,11 @@ module CanonicalRails
|
|
|
38
38
|
def canonical_href(host = canonical_host, port = canonical_port, force_trailing_slash = nil)
|
|
39
39
|
default_ports = { 'https://' => 443, 'http://' => 80 }
|
|
40
40
|
port = port.present? && port.to_i != default_ports[canonical_protocol] ? ":#{port}" : ''
|
|
41
|
-
raw "#{canonical_protocol}#{host}#{port}#{
|
|
41
|
+
raw "#{canonical_protocol}#{host}#{port}#{path_without_extension}#{trailing_slash_config(force_trailing_slash)}#{allowed_query_string}"
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
def canonical_path(force_trailing_slash = nil)
|
|
45
|
-
raw "#{
|
|
45
|
+
raw "#{path_without_extension}#{trailing_slash_config(force_trailing_slash)}#{allowed_query_string}"
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
def canonical_tag(host = canonical_host, port = canonical_port, force_trailing_slash = nil)
|
metadata
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
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.15
|
|
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: 2023-10-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
14
|
+
name: actionview
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
@@ -19,7 +19,7 @@ dependencies:
|
|
|
19
19
|
version: '4.1'
|
|
20
20
|
- - "<="
|
|
21
21
|
- !ruby/object:Gem::Version
|
|
22
|
-
version: '7.
|
|
22
|
+
version: '7.2'
|
|
23
23
|
type: :runtime
|
|
24
24
|
prerelease: false
|
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -29,35 +29,41 @@ dependencies:
|
|
|
29
29
|
version: '4.1'
|
|
30
30
|
- - "<="
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: '7.
|
|
32
|
+
version: '7.2'
|
|
33
33
|
- !ruby/object:Gem::Dependency
|
|
34
|
-
name:
|
|
34
|
+
name: actionpack
|
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
37
|
- - ">="
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: '
|
|
39
|
+
version: '4.1'
|
|
40
|
+
- - "<="
|
|
41
|
+
- !ruby/object:Gem::Version
|
|
42
|
+
version: '7.1'
|
|
40
43
|
type: :development
|
|
41
44
|
prerelease: false
|
|
42
45
|
version_requirements: !ruby/object:Gem::Requirement
|
|
43
46
|
requirements:
|
|
44
47
|
- - ">="
|
|
45
48
|
- !ruby/object:Gem::Version
|
|
46
|
-
version: '
|
|
49
|
+
version: '4.1'
|
|
50
|
+
- - "<="
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: '7.1'
|
|
47
53
|
- !ruby/object:Gem::Dependency
|
|
48
|
-
name:
|
|
54
|
+
name: appraisal
|
|
49
55
|
requirement: !ruby/object:Gem::Requirement
|
|
50
56
|
requirements:
|
|
51
|
-
- - "
|
|
57
|
+
- - ">="
|
|
52
58
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: '
|
|
59
|
+
version: '0'
|
|
54
60
|
type: :development
|
|
55
61
|
prerelease: false
|
|
56
62
|
version_requirements: !ruby/object:Gem::Requirement
|
|
57
63
|
requirements:
|
|
58
|
-
- - "
|
|
64
|
+
- - ">="
|
|
59
65
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: '
|
|
66
|
+
version: '0'
|
|
61
67
|
- !ruby/object:Gem::Dependency
|
|
62
68
|
name: rspec-rails
|
|
63
69
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -126,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
126
132
|
- !ruby/object:Gem::Version
|
|
127
133
|
version: '0'
|
|
128
134
|
requirements: []
|
|
129
|
-
rubygems_version: 3.
|
|
135
|
+
rubygems_version: 3.4.19
|
|
130
136
|
signing_key:
|
|
131
137
|
specification_version: 4
|
|
132
138
|
summary: Simple and configurable Rails canonical ref tag helper
|