jekyll-icon-flow 0.1.1 → 0.1.2

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: 5e28f799b138783bf710e067b11b80482739a17b957f34ee22d16f844051a7da
4
- data.tar.gz: 4a3c2c4e5d4518c4f81555004c43040d8e210b64f1439bb44ef0de5f0b03e18e
3
+ metadata.gz: a8faa53a2568b9acf577d01b1be85dadc28d8aceb55152cb1eb9b86287313964
4
+ data.tar.gz: 434eec04e9dfe6e8fadcc168c6fe61c597c8fc405d71790f9c7518b93149c0ea
5
5
  SHA512:
6
- metadata.gz: c44e3d784131dfcda18c79bbe8b32dec08cb0da0e4d920406cb2ce8570718dc628f2fe1c863da094c1491fd2174beac9ae700753cd1e3878a8b58cf29d2cd727
7
- data.tar.gz: 681d5fdc919e1bed96c20586034c9dc5e37c13cda9063a39a4217604da34b3c5cf65f822c52a7e02844adf44d0c3570e2645be56b194af11bd4521d90ccb18ef
6
+ metadata.gz: 1f404c7cffe41abe9c92a2e8ef85a68f0fb0ab1e7ef2ae2919061eb30b001abe964841a295c5e2f50fcf8683c62fbc68dbaab3e80b417bd99fcd883e30368fff
7
+ data.tar.gz: b308ebb28e99e3e07abe53830ce697951e03144052fa7878441c6b28febd586a4bbf98dc9403fddb09a1bec740cb9d6ae3628a32026c47e62c0aca3a8b4ffbf8
data/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.1.2] - 2026-10-30
6
+
7
+ ### Changed
8
+
9
+ - CI: Semgrep bumped 1.176.0 → 1.182.0 — the standalone job runs the digest-pinned `semgrep/semgrep:1.182.0` container image; matrix/release jobs install it via `pipx install semgrep==1.182.0`. Added `.github/dependabot.yml` covering github-actions and bundler updates.
10
+ - Tests migrated from RSpec to Minitest (`spec/` → `test/`; `minitest` + `minitest-mock` for `Object#stub`, `jekyll-test-harness` via `install!(framework: :minitest)`). The vendored-icon smoke test is now generated per icon so a corrupt SVG names the icon in the failure; SimpleCov tracks branch coverage.
11
+ - CI matrixes Jekyll minors (`~> 4.0.0`, `~> 4.2.0`, latest) × Ruby 3.3/3.4 via a `JEKYLL_VERSION`-gated Gemfile pin; pinned legs run `rake test` only because RuboCop's `unicode-display_width` can't resolve with pre-4.3 `terminal-table`. `csv`/`base64`/`bigdecimal` are declared for old Jekyll on Ruby 3.4.
12
+ - Added `test/system/gem_artifact_test.rb` — builds the packaged `.gem` and runs a real `jekyll build` against it (`rake test:system`, part of `rake ci`).
13
+
5
14
  ## [0.1.1] - 2026-10-06
6
15
 
7
16
  ### Fixed
data/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  [![License: AGPL v3](https://img.shields.io/badge/license-AGPL--3.0--or--later-blue.svg)](LICENSE.txt)
10
10
  [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/gundestrup/jekyll-icon-flow)
11
11
  [![CodeFactor](https://www.codefactor.io/repository/github/gundestrup/jekyll-icon-flow/badge)](https://www.codefactor.io/repository/github/gundestrup/jekyll-icon-flow)
12
- [![Semgrep CE](https://img.shields.io/badge/Semgrep_CE-security-success)](https://github.com/gundestrup/jekyll-icon-flow)
12
+ [![Semgrep](https://img.shields.io/badge/Semgrep-security-success)](https://github.com/gundestrup/jekyll-icon-flow)
13
13
  [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=gundestrup_jekyll-icon-flow&metric=alert_status)](https://sonarcloud.io/dashboard?id=gundestrup_jekyll-icon-flow)
14
14
 
15
15
  Pack-agnostic inline SVG icons for Jekyll via Liquid tags. Each icon pack
@@ -52,7 +52,7 @@ coexist. Swap `icon_lucide` for `icon_simple` and the icon changes while
52
52
  ### Parameters
53
53
 
54
54
  | Param | Default | Effect |
55
- |---|---|---|
55
+ | --- | --- | --- | --- |
56
56
  | `size:` | `m` (`1em`) | Named size `xxs`/`xs`/`s`/`m`/`l`/`xl`/`xxl` (0.5/0.75/0.875/1/1.25/1.5/2 em — relative, so icons scale with surrounding text; default `m` = 1em fits the line height) or a nonnegative CSS length (`px`, `em`, `rem`, `%`, `vw`, `vh`, `vmin`, `vmax`, `ch`, `ex`) or `0`, applied to `width`/`height` |
57
57
  | `class:` | — | merged onto the `<svg>` alongside `icon icon-<name>` |
58
58
  | `title:` | — | accessible label, rendered as `<title>` in the SVG |
@@ -79,7 +79,7 @@ icon_flow:
79
79
  ## Packs
80
80
 
81
81
  | Tag | Pack | License | Notes |
82
- |---|---|---|---|
82
+ | --- | --- | --- | --- |
83
83
  | `icon_lucide` / `lucide_icon` | [Lucide](https://lucide.dev) | ISC | UI icons, stroke style |
84
84
  | `icon_simple` / `simple_icon` | [simple-icons](https://simpleicons.org) | CC0 | brand logos, fill style |
85
85
  | `icon_custom` / `custom_icon` | your files | — | `icon_flow.custom_dir`, e.g. [svgrepo](https://www.svgrepo.com/) downloads (keep `-svgrepo-com.svg` attribution in filenames, per the fleet convention) |
@@ -157,15 +157,16 @@ Every icon renders normalized SVG:
157
157
  ## Development and release checks
158
158
 
159
159
  Run `bundle exec rake ci` for RuboCop, dependency audit, local Semgrep rules,
160
- RSpec with SimpleCov and packaged-gem contents. Coverage is written to
160
+ Minitest with SimpleCov and packaged-gem contents. Coverage is written to
161
161
  `coverage/index.html` locally and `coverage/coverage.xml` in CI for Codecov.
162
- `COVERAGE=false bundle exec rspec` skips instrumentation during focused work.
162
+ `COVERAGE=false bundle exec rake test` skips instrumentation during focused work.
163
163
  Run `bundle exec rake "version:bump[patch]"` to update the gem version and
164
164
  lockfile, then add a dated changelog entry before
165
165
  `bundle exec rake version:pre_release`. Publishing requires configuring the
166
166
  GitHub `release` environment and RubyGems trusted publishing first.
167
- SonarCloud analyses the repository automatically; its
168
- vendored icons are excluded in `.sonarcloud.properties`.
167
+ SonarQube Cloud analyses the repository in CI (scan step in
168
+ `.github/workflows/ci.yml`); its vendored icons are excluded in
169
+ `sonar-project.properties`.
169
170
 
170
171
  ## License
171
172
 
data/interface.yml CHANGED
@@ -2,7 +2,7 @@
2
2
  # Public tag/config surface for tooling (editor extensions, doc linters).
3
3
  ---
4
4
  gem: jekyll-icon-flow
5
- version: 0.1.1
5
+ version: 0.1.2
6
6
  tags:
7
7
  custom_icon:
8
8
  params:
@@ -72,7 +72,7 @@ module Jekyll
72
72
  def normalize(svg, icon_name, options)
73
73
  svg = svg.strip.sub(/\A<\?xml[^?]*\?>\s*/, "")
74
74
  svg = normalize_custom_colors(svg) if self.class::COLOR_MODEL == :auto
75
- svg = svg.sub(/<svg[^>]*>/) { |tag| normalize_root(tag, icon_name, options) }
75
+ svg = replace_root_tag(svg) { |tag| normalize_root(tag, icon_name, options) }
76
76
  options["title"] ? inject_title(svg, options["title"].to_s) : svg
77
77
  end
78
78
 
@@ -98,7 +98,19 @@ module Jekyll
98
98
  end
99
99
 
100
100
  def inject_title(svg, title)
101
- svg.sub(/<svg[^>]*>/) { |tag| "#{tag}<title>#{CGI.escapeHTML(title)}</title>" }
101
+ replace_root_tag(svg) { |tag| "#{tag}<title>#{CGI.escapeHTML(title)}</title>" }
102
+ end
103
+
104
+ # Substitutes the block result for the first "<svg ...>" root
105
+ # tag: the first "<svg" through the next ">", the same span as
106
+ # /<svg[^>]*>/. index lookups stay linear even on input with many
107
+ # "<svg" occurrences, where the regex rescans the tail for each.
108
+ def replace_root_tag(svg)
109
+ tag_start = svg.index("<svg")
110
+ tag_end = tag_start && svg.index(">", tag_start)
111
+ return svg unless tag_end
112
+
113
+ "#{svg[0...tag_start]}#{yield svg[tag_start..tag_end]}#{svg[(tag_end + 1)..]}"
102
114
  end
103
115
 
104
116
  # :stroke packs (lucide) already carry stroke="currentColor";
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module IconFlow
5
- VERSION = "0.1.1"
5
+ VERSION = "0.1.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-icon-flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Svend Gundestrup