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 +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +8 -7
- data/interface.yml +1 -1
- data/lib/jekyll/icon_flow/adapter.rb +14 -2
- data/lib/jekyll/icon_flow/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a8faa53a2568b9acf577d01b1be85dadc28d8aceb55152cb1eb9b86287313964
|
|
4
|
+
data.tar.gz: 434eec04e9dfe6e8fadcc168c6fe61c597c8fc405d71790f9c7518b93149c0ea
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.txt)
|
|
10
10
|
[](https://deepwiki.com/gundestrup/jekyll-icon-flow)
|
|
11
11
|
[](https://www.codefactor.io/repository/github/gundestrup/jekyll-icon-flow)
|
|
12
|
-
[](https://github.com/gundestrup/jekyll-icon-flow)
|
|
13
13
|
[](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
|
-
|
|
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
|
|
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
|
-
|
|
168
|
-
vendored icons are excluded in
|
|
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
|
@@ -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 =
|
|
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
|
-
|
|
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";
|