meta-tags 2.16.0 → 2.17.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 49694826540a1943557eb3ae5fa74f5405ad2649c300806ec1064e48842e99f4
4
- data.tar.gz: 7687408b49c8791b2386152a50d8760f7f9b533ed4e222fa1c8588cb49f7c7d4
3
+ metadata.gz: b5d6a918c74ab34bf285b01fd38c0c490745e0ee51f958d8bf2bf405dd26b287
4
+ data.tar.gz: eee0a81f5b209b140ff27ec0cad12852c672ab1f035d930a1ab1ae5b82b8bfa8
5
5
  SHA512:
6
- metadata.gz: 1bef5f94ed23181efe26b22f498e6162059c6454676f20244cf8f0f62664fe87e10d5aa00a0e16e69ee8e3326f4f368ac008ad6c3d3a4d81b4f19f7fa9925c44
7
- data.tar.gz: 3474171a2614d3064d90a10e4760e20b837f3c57acf253e907de990165e141a9cd0eb3f2b0baa0f1ffb04454e86abc3f713cca0f564e004b030825277f6cf161
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
- # Ruby typings
14
- gem 'steep', platform: :mri unless ENV["NO_STEEP"] == '1'
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', '~> 1.18.0'
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 6.1.
15
+ major Rails releases up to 7.0.
16
16
 
17
- Ruby versions older than 2.5 are no longer officially supported.
17
+ Ruby versions older than 2.6 are no longer officially supported.
18
18
 
19
- _Please note_ that we are no longer support Ruby versions older than 2.4.0 and
20
- Ruby on Rails older than 5.1, because they [reached their End of Life](https://github.com/kpumuk/meta-tags/pull/143).
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
@@ -10,4 +10,6 @@ target :lib do
10
10
  # (because we don't have RBS files for it)
11
11
  ignore "lib/meta_tags/railtie.rb"
12
12
  ignore "lib/generators"
13
+
14
+ library "set"
13
15
  end
data/certs/kpumuk.pem CHANGED
@@ -1,7 +1,7 @@
1
1
  -----BEGIN CERTIFICATE-----
2
2
  MIIDODCCAi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Lxs6Q/PaGGEc8bonOirCZrwVDzHFA1cPjcSoApdsyGdRiyj
17
- 1f+XHXjCE5A1A6b8o4ffpAI6gkuaQOIrgGCyLS9oos6DSuofkvXI9g62G+2ZOmKJ
18
- U97JEQmXCpruLEeSVT2UqR+iJAWEAxPzqzDbTzZBTSPKn+nXeuF6h81e4hsJtkeJ
19
- HkYAoatF9iZrxT4E
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.kind_of?(HashWithIndifferentAccess) ? meta_tags.dup : meta_tags.with_indifferent_access
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)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module MetaTags
4
4
  # Gem version.
5
- VERSION = '2.16.0'
5
+ VERSION = '2.17.0'
6
6
  public_constant :VERSION
7
7
  end
@@ -27,7 +27,7 @@ module MetaTags
27
27
  #
28
28
  # @see #display_meta_tags
29
29
  #
30
- def set_meta_tags(meta_tags = {}) # rubocop:disable Naming/AccessorMethodName
30
+ def set_meta_tags(meta_tags = {})
31
31
  self.meta_tags.update(meta_tags)
32
32
  end
33
33
 
data/lib/meta_tags.rb CHANGED
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'set'
4
+ require 'active_support/core_ext/hash/indifferent_access'
5
+
3
6
  # MetaTags gem namespace.
4
7
  module MetaTags
5
8
  # Returns MetaTags gem configuration.
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.5.0'
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" => "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/",
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) -> Hash[String | Symbol, untyped]
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
- ��w:�l���D�y����TIJŹ�i,%K9����WS���Y�R�'S��M����� ���$E~ ɯ(r��֙�`�HNb@yS-��e�m���6Y؄��?A� \1;jk�?*\2�ک���[SQ'�9�$ݯVw�,�i�[�}�0e�:1]��}M���q�R8ϡ+SY�2�ꋫ������3�}�܀� [�-z
2
- ��u��e��Z�R|���+��CZ����aU�����-E�W�m���P����(��_����K�
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.16.0
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
- dWsvREM9a3B1bXVrL0RDPWluZm8wHhcNMjAxMjEwMjA1MTE5WhcNMjExMjEwMjA1
15
- MTE5WjAjMSEwHwYDVQQDDBhrcHVtdWsvREM9a3B1bXVrL0RDPWluZm8wggEiMA0G
14
+ dWsvREM9a3B1bXVrL0RDPWluZm8wHhcNMjIwNzA1MjIyODU4WhcNMjMwNzA1MjIy
15
+ ODU4WjAjMSEwHwYDVQQDDBhrcHVtdWsvREM9a3B1bXVrL0RDPWluZm8wggEiMA0G
16
16
  CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC8NmK6GXPiE/q7PDbj7nNdw3pa8a6Q
17
17
  IDxLtc7kW95e1mh0TVgOE8kvGegGtRtjvhXVGTTFtZ+yMD/0DCfTM2oUQYk5oYpO
18
18
  ZGrCfbNIdZauf4WYsnJtKOTrRoqFMwpL5PlBDKczB2y5lUmQs2HIsjQ0Q21wdKyy
@@ -21,15 +21,15 @@ cert_chain:
21
21
  RryRTj5NVZbq9p1/WRc5zxD9QhAEPjRa5ikbd+eWebIDpAKI0hpyC/9bAgMBAAGj
22
22
  dzB1MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBT2uFRXNWDpVdbv
23
23
  +xBk8DAgJPGBPTAdBgNVHREEFjAUgRJrcHVtdWtAa3B1bXVrLmluZm8wHQYDVR0S
24
- BBYwFIESa3B1bXVrQGtwdW11ay5pbmZvMA0GCSqGSIb3DQEBCwUAA4IBAQBdcrpl
25
- 32OlNaf68v38yzqYkviLELtbzRvEpRuQWZZyxOwU1OWSFAWkkALuseLWHDLYRDE8
26
- lOzQHewKodqaSPEo63vMZ28UQ3kDP1YE+cXR12fOg4YbCH8VETrTJa3X0AOOAbgA
27
- ZLMcZD6wu9Zu2rPhxLxs6Q/PaGGEc8bonOirCZrwVDzHFA1cPjcSoApdsyGdRiyj
28
- 1f+XHXjCE5A1A6b8o4ffpAI6gkuaQOIrgGCyLS9oos6DSuofkvXI9g62G+2ZOmKJ
29
- U97JEQmXCpruLEeSVT2UqR+iJAWEAxPzqzDbTzZBTSPKn+nXeuF6h81e4hsJtkeJ
30
- HkYAoatF9iZrxT4E
24
+ BBYwFIESa3B1bXVrQGtwdW11ay5pbmZvMA0GCSqGSIb3DQEBCwUAA4IBAQBa5fMh
25
+ JcbhWBoP3kA32g3yM238fyJlre/ZeE6WIFxcuETff8AgPmk550qpAF/WBtP23X8Q
26
+ khIFv+bFiuBURvNbuFevs23to7NeNA7XMmEJqjB6fRzO/i/a3bkLG07u+o74MyXe
27
+ 3/VAxl4Ce+C3aLwXccsbD+Fe3kQ6ku4ceIh2WebBSkpG3WRANReEAf7lcOt4aGEt
28
+ nkYjyHgDz6/gYamK15XtOivglkTJDwAVGBzF9o6j5IQ9nXho8Vd2P+hiawx76CoT
29
+ ANVO3I4ZwTKD12DMFqjalLwbSVVO4wpuMO3tcAgO4q7Fqh2tXTXom/YYl0SFvmx4
30
+ evTPD0iY8lmGP3ZM
31
31
  -----END CERTIFICATE-----
32
- date: 2021-09-23 00:00:00.000000000 Z
32
+ 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/_rails.rbs
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
- post_install_message:
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.5.0
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.2.22
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