canonical-rails 0.2.14 → 0.2.16

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d3d683836ca3eab3192c8b640adf905be85117bc9e24bbf321951a2e1123028b
4
- data.tar.gz: decac4a87c0d23be1ff2a5d5bb32b0270dc7340c5f32f000b17bc24d80b0f20c
3
+ metadata.gz: bcd112f6336911d48b0ce389c4001e3cde3e317156d0750843082853ed34e859
4
+ data.tar.gz: 5d54de09e39553dd9fd4558f436e389ade5aac2d5d3abb2a831618b50c6eda94
5
5
  SHA512:
6
- metadata.gz: d0b42b3666218e59b25b711eec0baa2eb6e918e11401ed95cf878806437059b89570cd8b937872ce92e17f0182064ff11e80a948f1eb5416455901b480bbe2d5
7
- data.tar.gz: 884400f724a659c7733306a600fd87a0e75274d615296c074abd54ddc7014ba2e8751c841032beabcbb264464454ddd3102609038c0b8c037bc188d8e84a7669
6
+ metadata.gz: 581b017e522540124fc31837bec3fd7fad9cc12a747c05d9f6e65eca623c7fa0e911f82543f91d01f8bbe602f1d8a5b8248eda95719624cf17af30c1828c5730
7
+ data.tar.gz: 870d087582f9c1be65d8634aeb18c95ad5d1f0d0fbb275c9e6dae7d3559f98be9a6ec3a0df1242baae2537aa8909f3413af1f6a56694ef0e842d2220e622606e
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2012 YOURNAME
1
+ Copyright 2012 Denis Ivanov
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  CanonicalRails
2
2
  ==============
3
- [![Build Status](https://travis-ci.org/jumph4x/canonical-rails.svg?branch=master)](https://travis-ci.org/jumph4x/canonical-rails)
3
+ [![latest builds](https://github.com/jumph4x/canonical-rails/actions/workflows/ruby.yml/badge.svg)](https://github.com/jumph4x/canonical-rails/actions/workflows/ruby.yml)
4
+
5
+
4
6
 
5
7
  A number of articles exist explaining the issue concisely and at length:
6
8
 
@@ -36,5 +38,4 @@ your HTML views:
36
38
 
37
39
  ## Cred
38
40
 
39
- A project by [Downshift Labs](http://downshiftlabs.com), Ruby on Rails,
40
- Performance tuning and Spree Commerce projects.
41
+ Originally developed for [FCP Euro - High Quality European Car Parts](https://www.fcpeuro.com).
data/Rakefile CHANGED
@@ -20,9 +20,6 @@ RDoc::Task.new(:rdoc) do |rdoc|
20
20
  rdoc.rdoc_files.include('lib/**/*.rb')
21
21
  end
22
22
 
23
- APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
24
- load 'rails/tasks/engine.rake'
25
-
26
23
  Bundler::GemHelper.install_tasks
27
24
 
28
25
  require 'rspec/core/rake_task'
@@ -17,10 +17,10 @@ module CanonicalRails
17
17
  "/" if trailing_slash_needed?
18
18
  end
19
19
 
20
- def path_without_html_extension
20
+ def path_without_extension
21
21
  return '' if request.path == '/'
22
22
 
23
- request.path.sub(/\.html?$/, '')
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}#{path_without_html_extension}#{trailing_slash_config(force_trailing_slash)}#{allowed_query_string}"
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 "#{path_without_html_extension}#{trailing_slash_config(force_trailing_slash)}#{allowed_query_string}"
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)
@@ -1,3 +1,3 @@
1
1
  module CanonicalRails
2
- VERSION = "0.2.14"
2
+ VERSION = "0.2.16"
3
3
  end
metadata CHANGED
@@ -1,25 +1,25 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canonical-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.14
4
+ version: 0.2.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Ivanov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-10 00:00:00.000000000 Z
11
+ date: 2024-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rails
14
+ name: actionview
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.1'
20
- - - "<="
20
+ - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '7.1'
22
+ version: '7.3'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -27,37 +27,43 @@ dependencies:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
29
  version: '4.1'
30
- - - "<="
30
+ - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '7.1'
32
+ version: '7.3'
33
33
  - !ruby/object:Gem::Dependency
34
- name: appraisal
34
+ name: actionpack
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '0'
39
+ version: '4.1'
40
+ - - "<"
41
+ - !ruby/object:Gem::Version
42
+ version: '7.3'
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: '0'
49
+ version: '4.1'
50
+ - - "<"
51
+ - !ruby/object:Gem::Version
52
+ version: '7.3'
47
53
  - !ruby/object:Gem::Dependency
48
- name: sprockets
54
+ name: appraisal
49
55
  requirement: !ruby/object:Gem::Requirement
50
56
  requirements:
51
- - - "~>"
57
+ - - ">="
52
58
  - !ruby/object:Gem::Version
53
- version: '3.0'
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: '3.0'
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.0.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