meta-tags 2.22.3 → 2.24.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d14babad77499d7760b9227ee1c94901ab6926cf1c068c942bac1ab1d810567
4
- data.tar.gz: 4a2009413ba29de63675dd5429f9341bda138c977c63ca449edc244c54bf731b
3
+ metadata.gz: 566365edffbf0315633065a07584898e708104ed5657ae1b673302dcd10ed3b0
4
+ data.tar.gz: ffde1c27ef6745ad5ce3635118a63e4af9b3845dc4ee6ef4eb1c2747bd93f7e5
5
5
  SHA512:
6
- metadata.gz: 04d053a661471fd3dec669571d11da00062b47a295a04c1a0d7f476e0c283fd258f1d751a2db00e684be7b0ab2b1b50a0496c2e1a796db1958303d408d6f20b8
7
- data.tar.gz: b04ad7ecbc6f8b45316eb98ab7fe99a0ad515b2c2c4acb9df01eb71cb86b09a6fd33722a5076e0a94260faeb95bbccd4cebe7e81756e05f99ad749a61029e462
6
+ metadata.gz: ec303b92dcd6e228fb13d23ce7222f9086e53f715efdccc587c298ed1ad0de838917d29e818a2549f3c91600264b523075772272ce5aa0ea8dd8e1c1ebd6d3c9
7
+ data.tar.gz: 9caa336eb5b685e16fe8474ff3aa70e79ceb931c8bba1ddab58db5947a67a4a45d92ccb1ce1d2a6c34a033a54ff8a704ae76ecc386057607bb6f8fd5388bd6d6
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,5 +1,88 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ ## 2.24.0 (September 1, 2026) [☰](https://github.com/kpumuk/meta-tags/compare/v2.23.0...v2.24.0)
6
+
7
+ Features:
8
+
9
+ - Added the `truncate_array_items_at_boundaries` option for `title` and `keywords` arrays. When enabled, multi-item arrays stop before an overflowing item instead of cutting that item in the middle. The first or only item can still be truncated, so a non-empty value does not become empty ([354](https://github.com/kpumuk/meta-tags/pull/354)).
10
+
11
+ ```ruby
12
+ MetaTags.configure do |config|
13
+ config.title_limit = 12
14
+ config.truncate_array_items_at_boundaries = true
15
+ end
16
+
17
+ display_meta_tags(title: ["Shoes", "Running", "Men"])
18
+ # => <title>Shoes</title>
19
+ # With the option disabled: <title>Shoes | Runn</title>
20
+ ```
21
+
22
+ - Added hash-based custom directives for `robots`, `googlebot`, and `bingbot`. `nil` and `true` produce valueless directives, `false` omits a directive, and other values use `name:value`; existing robots helpers and legacy scalar and array values remain supported ([224](https://github.com/kpumuk/meta-tags/pull/224), rebased in [361](https://github.com/kpumuk/meta-tags/pull/361), corrected in [406](https://github.com/kpumuk/meta-tags/pull/406)).
23
+
24
+ ```ruby
25
+ display_meta_tags(
26
+ robots: {
27
+ "max-snippet" => -1,
28
+ "max-video-preview" => -1
29
+ }
30
+ )
31
+ # => <meta name="robots" content="max-snippet:-1, max-video-preview:-1">
32
+ ```
33
+
34
+ Bugfixes:
35
+
36
+ - Made `skip_canonical_links_on_noindex` follow the directives that are actually rendered. Empty crawler lists and blank crawler names no longer suppress canonical links, while effective `noindex` directives in custom `robots`, `googlebot`, and `bingbot` values do ([405](https://github.com/kpumuk/meta-tags/pull/405), [413](https://github.com/kpumuk/meta-tags/pull/413), [416](https://github.com/kpumuk/meta-tags/pull/416)).
37
+ - Preserved legacy scalar and array custom robots values instead of treating every value as a directive hash. This also fixes valueless directives being serialized with a trailing colon and disabled directives being rendered as `name:false` ([406](https://github.com/kpumuk/meta-tags/pull/406)).
38
+ - Preserved an inherited `itemprop` on anonymous values inside recursively structured metadata, including arrays of Open Graph images. Named subproperties still do not inherit the attribute, and an explicit nested value still wins ([410](https://github.com/kpumuk/meta-tags/pull/410)).
39
+ - Suppressed icon and array-form alternate links when their URL is `nil` or blank, instead of rendering unusable `href=""` elements ([411](https://github.com/kpumuk/meta-tags/pull/411)).
40
+ - Fixed `MetaTagsCollection#page_title` when `site` is supplied through method defaults. It now excludes the site while `full_title` continues to include it ([412](https://github.com/kpumuk/meta-tags/pull/412)).
41
+
42
+ ```ruby
43
+ collection.page_title(site: "Site", title: "Page") # => "Page"
44
+ collection.full_title(site: "Site", title: "Page") # => "Site | Page"
45
+ ```
46
+
47
+ - Deep-merged the `og` and `open_graph` aliases when both appear in one input hash, instead of silently discarding the canonical `og` value. `og` wins conflicting leaves in the same input; separate updates retain their existing last-update precedence ([414](https://github.com/kpumuk/meta-tags/pull/414)).
48
+ - Aligned the packaged RBS contracts with existing runtime behavior: `description_limit` accepts `nil`, `title_tag_attributes` accepts Rails-style nested arrays and numeric or boolean values, and recursive metadata accepts finite `Float` values ([415](https://github.com/kpumuk/meta-tags/pull/415), [418](https://github.com/kpumuk/meta-tags/pull/418), [419](https://github.com/kpumuk/meta-tags/pull/419)).
49
+ - Fixed the `lowercase` title option so it is consumed even when the page title is absent, rather than leaking into `<meta name="lowercase">`. String-like title values implementing `#to_str` are now coerced before lowercasing instead of raising `NoMethodError` ([420](https://github.com/kpumuk/meta-tags/pull/420)).
50
+
51
+ Changes:
52
+
53
+ - **MetaTags 3.0 migration:** direct Symbols in nested custom-tag arrays now emit a deprecation warning. MetaTags 2.x still renders them literally by default; set `resolve_symbolic_references_in_arrays = true` to opt in to 3.0 reference semantics now, and use Strings for values that should remain literal. Direct hash references, explicit `{_: ...}` references, top-level arrays, and specialized arrays keep their existing behavior ([409](https://github.com/kpumuk/meta-tags/pull/409)).
54
+
55
+ ```ruby
56
+ MetaTags.configure do |config|
57
+ config.resolve_symbolic_references_in_arrays = true
58
+ end
59
+
60
+ display_meta_tags(
61
+ image_src: "https://example.com/image.png",
62
+ og: {image: [:image_src]}
63
+ )
64
+ # => <link rel="image_src" href="https://example.com/image.png">
65
+ # <meta property="og:image" content="https://example.com/image.png">
66
+ ```
67
+
68
+ - Made README rendering examples executable regression tests and repaired confirmed dead reference links, reducing the chance that documented output drifts from the renderer ([404](https://github.com/kpumuk/meta-tags/pull/404), [417](https://github.com/kpumuk/meta-tags/pull/417)).
69
+ - Made the `steep` Rake task propagate type-checking failures and reconciled the RBS signatures with the current Ruby implementation, so CI can no longer report success after Steep errors ([407](https://github.com/kpumuk/meta-tags/pull/407)).
70
+ - Refreshed the supported development lockfiles, split Ruby 3.1 compatibility locks where patched dependencies require newer Ruby, and added an advisory audit covering every committed supported lockfile ([408](https://github.com/kpumuk/meta-tags/pull/408)).
71
+ - Hardened GitHub Actions by removing untrusted checkouts from the privileged Dependabot workflow, declaring token permissions, adding stable required checks and a security policy, and enforcing OpenSSF Scorecards and pedantic zizmor checks ([357](https://github.com/kpumuk/meta-tags/pull/357), [358](https://github.com/kpumuk/meta-tags/pull/358), [359](https://github.com/kpumuk/meta-tags/pull/359), [360](https://github.com/kpumuk/meta-tags/pull/360), [362](https://github.com/kpumuk/meta-tags/pull/362), [374](https://github.com/kpumuk/meta-tags/pull/374)).
72
+ - Updated the GitHub Actions toolchain throughout the release cycle, including `actions/checkout`, artifact upload, GitHub App authentication, `ruby/setup-ruby`, RubyGems release automation, Scorecards, and zizmor ([367](https://github.com/kpumuk/meta-tags/pull/367), [376](https://github.com/kpumuk/meta-tags/pull/376), [397](https://github.com/kpumuk/meta-tags/pull/397), [399](https://github.com/kpumuk/meta-tags/pull/399), [401](https://github.com/kpumuk/meta-tags/pull/401), [402](https://github.com/kpumuk/meta-tags/pull/402), [403](https://github.com/kpumuk/meta-tags/pull/403)).
73
+
74
+ ## 2.23.0 (March 16, 2026) [☰](https://github.com/kpumuk/meta-tags/compare/v2.22.3...v2.23.0)
75
+
76
+ Bugfixes:
77
+
78
+ - Fixed `title` helper to always return a string, joining array titles with the configured separator ([344](https://github.com/kpumuk/meta-tags/pull/344)).
79
+ - Fixed packaged RBS interfaces for Rails helpers so `_ActionViewBase` and `_ActionControllerBase` resolve for gem consumers ([345](https://github.com/kpumuk/meta-tags/pull/345)).
80
+
81
+ Changes:
82
+
83
+ - Refreshed README and generated docs to describe modern SEO guidance more accurately, while keeping legacy metadata features documented as compatibility options ([349](https://github.com/kpumuk/meta-tags/pull/349)).
84
+ - Optimized property tag matching to improve metadata rendering performance and reduce allocations and memory use on the hot render path ([350](https://github.com/kpumuk/meta-tags/pull/350)).
85
+
3
86
  ## 2.22.3 (January 7, 2026) [☰](https://github.com/kpumuk/meta-tags/compare/v2.22.2...v2.22.3)
4
87
 
5
88
  Changes: