meta-tags 2.16.0 → 2.17.0
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
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile +5 -3
- data/README.md +4 -4
- data/Steepfile +2 -0
- data/certs/kpumuk.pem +9 -9
- data/lib/meta_tags/meta_tags_collection.rb +3 -3
- data/lib/meta_tags/text_normalizer.rb +1 -1
- data/lib/meta_tags/version.rb +1 -1
- data/lib/meta_tags/view_helper.rb +1 -1
- data/lib/meta_tags.rb +3 -0
- data/meta-tags.gemspec +7 -6
- data/sig/lib/_internal/rails.rbs +56 -0
- data/sig/lib/meta_tags/meta_tags_collection.rbs +1 -1
- data/sig/lib/meta_tags/text_normalizer.rbs +1 -1
- data.tar.gz.sig +2 -2
- metadata +18 -17
- metadata.gz.sig +0 -0
- data/sig/lib/_rails.rbs +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5d6a918c74ab34bf285b01fd38c0c490745e0ee51f958d8bf2bf405dd26b287
|
4
|
+
data.tar.gz: eee0a81f5b209b140ff27ec0cad12852c672ab1f035d930a1ab1ae5b82b8bfa8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc19a58a8e0c30867e1019a1e78bc502b6e6efff3edfa1494699ad8701a51bd0f80a345a51b86dbf7ab1924f7f7e211cf9965234f51ae005ae4376af4ab6e1d5
|
7
|
+
data.tar.gz: edd7b528239c11d3f8fe1275270bd46b9584696b73415bd86fe4cda5549f9a05cd0c02c44c69ecd955e4964cfaa413fc14956c7c67ca478d491b7a4078128b53
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 2.17.0 (July 5, 2022) [☰](https://github.com/kpumuk/meta-tags/compare/v2.16.0...v2.17.0)
|
4
|
+
|
5
|
+
Changes:
|
6
|
+
|
7
|
+
- Separate RBS files to _internal directory to avoid exposing RBS ([237](https://github.com/kpumuk/meta-tags/pull/237))
|
8
|
+
- Added Ruby 3.1 to supported versions, Ruby 2.6 is minimum supported version ([235](https://github.com/kpumuk/meta-tags/pull/235/))
|
9
|
+
|
3
10
|
## 2.16.0 (September 24, 2021) [☰](https://github.com/kpumuk/meta-tags/compare/v2.15.0...v2.16.0)
|
4
11
|
|
5
12
|
Changes:
|
data/Gemfile
CHANGED
@@ -10,13 +10,15 @@ if ENV['RAILS_VERSION']
|
|
10
10
|
gem 'railties', "~> #{ENV['RAILS_VERSION']}"
|
11
11
|
end
|
12
12
|
|
13
|
-
|
14
|
-
|
13
|
+
unless ENV["NO_STEEP"] == '1'
|
14
|
+
# Ruby typings
|
15
|
+
gem 'steep', '~> 1.0.1', platform: :mri
|
16
|
+
end
|
15
17
|
|
16
18
|
group :test do
|
17
19
|
# Lock rubocop to a specific version we use on CI. If you update this,
|
18
20
|
# don't forget to switch rubocop channel in the .codeclimate.yml
|
19
|
-
gem 'rubocop', '
|
21
|
+
gem 'rubocop', '= 1.31.0'
|
20
22
|
# Cops for rails apps
|
21
23
|
gem 'rubocop-rails'
|
22
24
|
# Apply RSpec rubocop cops
|
data/README.md
CHANGED
@@ -12,12 +12,12 @@ Search Engine Optimization (SEO) plugin for Ruby on Rails applications.
|
|
12
12
|
## Ruby on Rails
|
13
13
|
|
14
14
|
MetaTags main branch fully supports Ruby on Rails 5.1+, and is tested against all
|
15
|
-
major Rails releases up to
|
15
|
+
major Rails releases up to 7.0.
|
16
16
|
|
17
|
-
Ruby versions older than 2.
|
17
|
+
Ruby versions older than 2.6 are no longer officially supported.
|
18
18
|
|
19
|
-
_Please note_ that we
|
20
|
-
Ruby on Rails older than 5.1, because they
|
19
|
+
_Please note_ that we no longer support Ruby versions older than 2.6.0 and
|
20
|
+
Ruby on Rails older than 5.1, because they reached their [End of Life](https://endoflife.date/ruby).
|
21
21
|
|
22
22
|
## Installation
|
23
23
|
|
data/Steepfile
CHANGED
data/certs/kpumuk.pem
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
-----BEGIN CERTIFICATE-----
|
2
2
|
MIIDODCCAiCgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhrcHVt
|
3
|
-
|
4
|
-
|
3
|
+
dWsvREM9a3B1bXVrL0RDPWluZm8wHhcNMjIwNzA1MjIyODU4WhcNMjMwNzA1MjIy
|
4
|
+
ODU4WjAjMSEwHwYDVQQDDBhrcHVtdWsvREM9a3B1bXVrL0RDPWluZm8wggEiMA0G
|
5
5
|
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC8NmK6GXPiE/q7PDbj7nNdw3pa8a6Q
|
6
6
|
IDxLtc7kW95e1mh0TVgOE8kvGegGtRtjvhXVGTTFtZ+yMD/0DCfTM2oUQYk5oYpO
|
7
7
|
ZGrCfbNIdZauf4WYsnJtKOTrRoqFMwpL5PlBDKczB2y5lUmQs2HIsjQ0Q21wdKyy
|
@@ -10,11 +10,11 @@ ZGrCfbNIdZauf4WYsnJtKOTrRoqFMwpL5PlBDKczB2y5lUmQs2HIsjQ0Q21wdKyy
|
|
10
10
|
RryRTj5NVZbq9p1/WRc5zxD9QhAEPjRa5ikbd+eWebIDpAKI0hpyC/9bAgMBAAGj
|
11
11
|
dzB1MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBT2uFRXNWDpVdbv
|
12
12
|
+xBk8DAgJPGBPTAdBgNVHREEFjAUgRJrcHVtdWtAa3B1bXVrLmluZm8wHQYDVR0S
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
13
|
+
BBYwFIESa3B1bXVrQGtwdW11ay5pbmZvMA0GCSqGSIb3DQEBCwUAA4IBAQBa5fMh
|
14
|
+
JcbhWBoP3kA32g3yM238fyJlre/ZeE6WIFxcuETff8AgPmk550qpAF/WBtP23X8Q
|
15
|
+
khIFv+bFiuBURvNbuFevs23to7NeNA7XMmEJqjB6fRzO/i/a3bkLG07u+o74MyXe
|
16
|
+
3/VAxl4Ce+C3aLwXccsbD+Fe3kQ6ku4ceIh2WebBSkpG3WRANReEAf7lcOt4aGEt
|
17
|
+
nkYjyHgDz6/gYamK15XtOivglkTJDwAVGBzF9o6j5IQ9nXho8Vd2P+hiawx76CoT
|
18
|
+
ANVO3I4ZwTKD12DMFqjalLwbSVVO4wpuMO3tcAgO4q7Fqh2tXTXom/YYl0SFvmx4
|
19
|
+
evTPD0iY8lmGP3ZM
|
20
20
|
-----END CERTIFICATE-----
|
@@ -9,7 +9,7 @@ module MetaTags
|
|
9
9
|
# Initializes a new instance of MetaTagsCollection.
|
10
10
|
#
|
11
11
|
def initialize
|
12
|
-
@meta_tags = HashWithIndifferentAccess.new
|
12
|
+
@meta_tags = ActiveSupport::HashWithIndifferentAccess.new
|
13
13
|
end
|
14
14
|
|
15
15
|
# Returns meta tag value by name.
|
@@ -170,10 +170,10 @@ module MetaTags
|
|
170
170
|
# Converts input hash to HashWithIndifferentAccess and renames :open_graph to :og.
|
171
171
|
#
|
172
172
|
# @param [Hash] meta_tags list of meta tags.
|
173
|
-
# @return [HashWithIndifferentAccess] normalized meta tags list.
|
173
|
+
# @return [ActiveSupport::HashWithIndifferentAccess] normalized meta tags list.
|
174
174
|
#
|
175
175
|
def normalize_open_graph(meta_tags)
|
176
|
-
meta_tags = meta_tags.
|
176
|
+
meta_tags = meta_tags.with_indifferent_access
|
177
177
|
meta_tags[:og] = meta_tags.delete(:open_graph) if meta_tags.key?(:open_graph)
|
178
178
|
meta_tags
|
179
179
|
end
|
@@ -205,7 +205,7 @@ module MetaTags
|
|
205
205
|
# What should we truncate first: site title or page title?
|
206
206
|
main_title = MetaTags.config.truncate_site_title_first ? title : [site_title]
|
207
207
|
|
208
|
-
main_length = main_title.map(&:length).sum + (main_title.size - 1) * separator.length
|
208
|
+
main_length = main_title.map(&:length).sum + ((main_title.size - 1) * separator.length)
|
209
209
|
main_limited_length = global_limit
|
210
210
|
|
211
211
|
secondary_limited_length = global_limit - (main_length > 0 ? main_length + separator.length : 0)
|
data/lib/meta_tags/version.rb
CHANGED
data/lib/meta_tags.rb
CHANGED
data/meta-tags.gemspec
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.homepage = "https://github.com/kpumuk/meta-tags"
|
16
16
|
spec.license = "MIT"
|
17
17
|
spec.platform = Gem::Platform::RUBY
|
18
|
-
spec.required_ruby_version = '>= 2.
|
18
|
+
spec.required_ruby_version = '>= 2.6.0'
|
19
19
|
|
20
20
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(\.|(bin|test|spec|features)/)}) }
|
21
21
|
spec.bindir = "exe"
|
@@ -33,10 +33,11 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.signing_key = File.expand_path("~/.ssh/gem-kpumuk.pem") if $PROGRAM_NAME.end_with?('gem')
|
34
34
|
|
35
35
|
spec.metadata = {
|
36
|
-
"bug_tracker_uri"
|
37
|
-
"changelog_uri"
|
38
|
-
"documentation_uri"
|
39
|
-
"homepage_uri"
|
40
|
-
"source_code_uri"
|
36
|
+
"bug_tracker_uri" => "https://github.com/kpumuk/meta-tags/issues/",
|
37
|
+
"changelog_uri" => "https://github.com/kpumuk/meta-tags/blob/main/CHANGELOG.md",
|
38
|
+
"documentation_uri" => "https://rubydoc.info/github/kpumuk/meta-tags/",
|
39
|
+
"homepage_uri" => "https://github.com/kpumuk/meta-tags/",
|
40
|
+
"source_code_uri" => "https://github.com/kpumuk/meta-tags/",
|
41
|
+
"rubygems_mfa_required" => "true",
|
41
42
|
}
|
42
43
|
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
class ::Hash[unchecked out K, unchecked out V]
|
2
|
+
def with_indifferent_access: () -> ActiveSupport::HashWithIndifferentAccess[K, V]
|
3
|
+
def deep_merge!: (instance | ActiveSupport::HashWithIndifferentAccess[K, V] other) -> self
|
4
|
+
end
|
5
|
+
|
6
|
+
class ::Object
|
7
|
+
def presence: () -> String?
|
8
|
+
def blank?: () -> bool
|
9
|
+
def present?: () -> bool
|
10
|
+
end
|
11
|
+
|
12
|
+
class ::Loofah
|
13
|
+
module TextBehavior
|
14
|
+
def text: (?Hash[Symbol, untyped]? options) -> String
|
15
|
+
end
|
16
|
+
|
17
|
+
class DocumentFragment
|
18
|
+
include TextBehavior
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.fragment: (String tags, ?String? encoding) -> DocumentFragment
|
22
|
+
end
|
23
|
+
|
24
|
+
class ::Rails
|
25
|
+
end
|
26
|
+
|
27
|
+
module ActionController
|
28
|
+
class Base
|
29
|
+
include _ActionControllerBase
|
30
|
+
|
31
|
+
def self.helpers: () -> _ActionViewBase
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
module ActiveSupport
|
36
|
+
class HashWithIndifferentAccess[unchecked out K, unchecked out V] < Hash[K, V]
|
37
|
+
def with_indifferent_access: () -> self
|
38
|
+
def deep_merge!: (instance | Hash[K, V] other) -> self
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
interface _ActionControllerBase
|
43
|
+
def render: (*untyped args) { () -> untyped } -> untyped
|
44
|
+
end
|
45
|
+
|
46
|
+
interface _ActionViewBase
|
47
|
+
def tag: (String name, ?Hash[String | Symbol, untyped] options, ?bool open) -> void
|
48
|
+
|
49
|
+
def content_tag: (String name, String content, ?Hash[String | Symbol, untyped] options, ?bool open) -> void
|
50
|
+
|
51
|
+
def safe_join: (Array[String], String) -> String
|
52
|
+
|
53
|
+
def truncate: (String text, ?Hash[Symbol, untyped] options) -> String
|
54
|
+
|
55
|
+
def strip_tags: (String html) -> String
|
56
|
+
end
|
@@ -28,7 +28,7 @@ module MetaTags
|
|
28
28
|
|
29
29
|
def extract_robots: () -> Hash[String, String]
|
30
30
|
|
31
|
-
def normalize_open_graph: (Hash[String | Symbol, untyped] meta_tags) ->
|
31
|
+
def normalize_open_graph: (Hash[String | Symbol, untyped] meta_tags) -> ActiveSupport::HashWithIndifferentAccess[String | Symbol, untyped]
|
32
32
|
|
33
33
|
def extract_separator_section: (String | Symbol name, String default) -> String
|
34
34
|
|
@@ -21,7 +21,7 @@ module MetaTags
|
|
21
21
|
|
22
22
|
def cleanup_strings: (keywords? strings, ?strip: bool strip) -> Array[String]
|
23
23
|
|
24
|
-
def truncate: (String string, ?Integer limit, ?String natural_separator) -> String
|
24
|
+
def truncate: (String string, ?Integer? limit, ?String natural_separator) -> String
|
25
25
|
|
26
26
|
def truncate_array: (Array[String] string_array, ?Integer? limit, ?String separator, ?String natural_separator) -> Array[String]
|
27
27
|
|
data.tar.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
��Ӈ%]2p��
|
2
|
+
^��Z�!�V���q��lhq
|
metadata
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meta-tags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmytro Shteflyuk
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
13
|
MIIDODCCAiCgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhrcHVt
|
14
|
-
|
15
|
-
|
14
|
+
dWsvREM9a3B1bXVrL0RDPWluZm8wHhcNMjIwNzA1MjIyODU4WhcNMjMwNzA1MjIy
|
15
|
+
ODU4WjAjMSEwHwYDVQQDDBhrcHVtdWsvREM9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date: 2022-07-05 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: actionpack
|
@@ -144,7 +144,7 @@ files:
|
|
144
144
|
- lib/meta_tags/version.rb
|
145
145
|
- lib/meta_tags/view_helper.rb
|
146
146
|
- meta-tags.gemspec
|
147
|
-
- sig/lib/
|
147
|
+
- sig/lib/_internal/rails.rbs
|
148
148
|
- sig/lib/meta_tags.rbs
|
149
149
|
- sig/lib/meta_tags/configuration.rbs
|
150
150
|
- sig/lib/meta_tags/content_tag.rbs
|
@@ -164,7 +164,8 @@ metadata:
|
|
164
164
|
documentation_uri: https://rubydoc.info/github/kpumuk/meta-tags/
|
165
165
|
homepage_uri: https://github.com/kpumuk/meta-tags/
|
166
166
|
source_code_uri: https://github.com/kpumuk/meta-tags/
|
167
|
-
|
167
|
+
rubygems_mfa_required: 'true'
|
168
|
+
post_install_message:
|
168
169
|
rdoc_options: []
|
169
170
|
require_paths:
|
170
171
|
- lib
|
@@ -172,15 +173,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
172
173
|
requirements:
|
173
174
|
- - ">="
|
174
175
|
- !ruby/object:Gem::Version
|
175
|
-
version: 2.
|
176
|
+
version: 2.6.0
|
176
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
177
178
|
requirements:
|
178
179
|
- - ">="
|
179
180
|
- !ruby/object:Gem::Version
|
180
181
|
version: '0'
|
181
182
|
requirements: []
|
182
|
-
rubygems_version: 3.
|
183
|
-
signing_key:
|
183
|
+
rubygems_version: 3.1.6
|
184
|
+
signing_key:
|
184
185
|
specification_version: 4
|
185
186
|
summary: Collection of SEO helpers for Ruby on Rails.
|
186
187
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|
data/sig/lib/_rails.rbs
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
class ::Hash[unchecked out K, unchecked out V]
|
2
|
-
def with_indifferent_access: () -> instance
|
3
|
-
def deep_merge!: (instance other) -> self
|
4
|
-
end
|
5
|
-
|
6
|
-
class ::Object
|
7
|
-
def presence: () -> String?
|
8
|
-
def blank?: () -> bool
|
9
|
-
def present?: () -> bool
|
10
|
-
end
|
11
|
-
|
12
|
-
interface _ActionControllerBase
|
13
|
-
def render: (*untyped args) { () -> untyped } -> untyped
|
14
|
-
end
|
15
|
-
|
16
|
-
interface _ActionViewBase
|
17
|
-
def tag: (String name, ?Hash[String | Symbol, untyped] options, ?bool open) -> void
|
18
|
-
|
19
|
-
def content_tag: (String name, String content, ?Hash[String | Symbol, untyped] options, ?bool open) -> void
|
20
|
-
|
21
|
-
def safe_join: (Array[String], String) -> String
|
22
|
-
|
23
|
-
def truncate: (String text, ?Hash[Symbol, untyped] options) -> String
|
24
|
-
|
25
|
-
def strip_tags: (String html) -> String
|
26
|
-
end
|