kettle-dev 2.2.2 → 2.2.3

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: 95ca53a704f80768d0bc13fd9eb4603bb4823638fd66f0a427139ee28a1b6835
4
- data.tar.gz: aea475e448ac97b3992474cf3d13b8912bcdf38d5dd5a4472256ce5dc7b4ecce
3
+ metadata.gz: fa3fa8282c2b534ba8d14a5ff998db809e15c577e3e7b65bd7592c7bd8e568d7
4
+ data.tar.gz: ffa804162693d265c3a250d39f37324806d00a44676c50ca35c0a12cbecce771
5
5
  SHA512:
6
- metadata.gz: 9862a2300bfcf03533a4f8bc48e58081f8676de927de77fe5623c2192e9b9a9c5a5909b02a264317cacfc313e25f1b60e9e34ddcf87450837f56cf1ee3afe244
7
- data.tar.gz: 23f33da7772e128ba221b35fecf4f2e0e110343c4087dc9572c3841496c617d04c040f761c29f1ae4816acf17e3837aa9478beb6c245d5a3419c0a0ce1cabe11
6
+ metadata.gz: cfffdbc293252d77553ba59d5e9179121c7b537ae676a1380c38a8a7af30b85266e1f07487f0368fd61671cee3a0324b2889537fbe89780225a54c8c6287c10e
7
+ data.tar.gz: 9e59b4fc95c59873b928adaa4a4ff75bab63247e60e5fbb8c39b8f6ef9cb7aad0f433efaa957dab32ec8c18a64cab5be63a7cd697566ef93590859821cb81b63
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,18 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [2.2.3] - 2026-06-09
34
+
35
+ - TAG: [v2.2.3][2.2.3t]
36
+ - COVERAGE: 91.76% -- 3762/4100 lines in 28 files
37
+ - BRANCH COVERAGE: 72.91% -- 1483/2034 branches in 28 files
38
+ - 67.00% documented
39
+
40
+ ### Fixed
41
+
42
+ - `kettle-pre-release` Markdown image checks now inspect project Markdown files
43
+ instead of recursive scratch output such as `tmp/template_test`.
44
+
33
45
  ## [2.2.2] - 2026-06-09
34
46
 
35
47
  - TAG: [v2.2.2][2.2.2t]
@@ -2010,7 +2022,9 @@ Please file a bug if you notice a violation of semantic versioning.
2010
2022
  - Selecting will run the selected workflow via `act`
2011
2023
  - This may move to its own gem in the future.
2012
2024
 
2013
- [Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.2...HEAD
2025
+ [Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.3...HEAD
2026
+ [2.2.3]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.2...v2.2.3
2027
+ [2.2.3t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.2.3
2014
2028
  [2.2.2]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.1...v2.2.2
2015
2029
  [2.2.2t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.2.2
2016
2030
  [2.2.1]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.0...v2.2.1
data/README.md CHANGED
@@ -854,7 +854,7 @@ Thanks for RTFM. ☺️
854
854
  [📌gitmoji]: https://gitmoji.dev
855
855
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
856
856
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
857
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-4.083-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
857
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-4.100-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
858
858
  [🔐security]: https://github.com/kettle-dev/kettle-dev/blob/main/SECURITY.md
859
859
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
860
860
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "optparse"
4
+ require "English"
4
5
  require "uri"
5
6
  require "net/http"
6
7
  require "openssl"
@@ -96,6 +97,11 @@ module Kettle
96
97
  module Markdown
97
98
  module_function
98
99
 
100
+ SCRATCH_PATH_PREFIXES = %w[
101
+ tmp/
102
+ .git/
103
+ ].freeze
104
+
99
105
  # Extract unique remote HTTP(S) image URLs from markdown or HTML images.
100
106
  # @param text [String]
101
107
  # @return [Array<String>]
@@ -125,11 +131,43 @@ module Kettle
125
131
  urls.uniq
126
132
  end
127
133
 
134
+ # Find Markdown files that are part of the releasable project.
135
+ # @return [Array<String>]
136
+ def project_markdown_files
137
+ files = tracked_markdown_files
138
+ return files unless files.empty?
139
+
140
+ Dir.glob(["**/*.md", "**/*.md.example"], File::FNM_DOTMATCH).reject { |path| scratch_path?(path) }.sort
141
+ end
142
+
143
+ # @return [Array<String>]
144
+ def tracked_markdown_files
145
+ output = IO.popen(["git", "ls-files", "-z", "--", "*.md", "*.md.example"], err: File::NULL, &:read)
146
+ return [] unless $CHILD_STATUS.success?
147
+
148
+ output.split("\0").reject { |path| scratch_path?(path) }.sort
149
+ rescue Errno::ENOENT
150
+ []
151
+ end
152
+
153
+ # @param path [String]
154
+ # @return [Boolean]
155
+ def scratch_path?(path)
156
+ SCRATCH_PATH_PREFIXES.any? { |prefix| path.start_with?(prefix) }
157
+ end
158
+
128
159
  # Extract from files matching glob.
129
- # @param glob_pattern [String]
160
+ # @param glob_pattern [String, Array<String>]
130
161
  # @return [Array<String>]
131
- def extract_image_urls_from_files(glob_pattern = "*.md")
132
- files = Dir.glob(glob_pattern)
162
+ def extract_image_urls_from_files(glob_pattern = nil)
163
+ files =
164
+ if glob_pattern.nil?
165
+ project_markdown_files
166
+ elsif glob_pattern.is_a?(String)
167
+ Dir.glob(glob_pattern)
168
+ else
169
+ Array(glob_pattern)
170
+ end
133
171
  urls = files.flat_map do |f|
134
172
  begin
135
173
  extract_image_urls_from_text(File.read(f))
@@ -183,7 +221,7 @@ module Kettle
183
221
  # @return [void]
184
222
  def check_markdown_uri_normalization!
185
223
  puts "[kettle-pre-release] Check 2: Normalize Markdown image URLs"
186
- files = Dir.glob(["**/*.md", "**/*.md.example"])
224
+ files = Markdown.project_markdown_files
187
225
  changed = []
188
226
  total_candidates = 0
189
227
 
@@ -232,10 +270,7 @@ module Kettle
232
270
  # @return [void]
233
271
  def check_markdown_images_http!
234
272
  puts "[kettle-pre-release] Check 3: Validate Markdown image links (HTTP HEAD)"
235
- urls = [
236
- Markdown.extract_image_urls_from_files("**/*.md"),
237
- Markdown.extract_image_urls_from_files("**/*.md.example")
238
- ].flatten.uniq
273
+ urls = Markdown.extract_image_urls_from_files
239
274
  puts "[kettle-pre-release] Found #{urls.size} unique image URL(s)."
240
275
  failures = []
241
276
  urls.each do |url|
@@ -3,7 +3,7 @@
3
3
  module Kettle
4
4
  module Dev
5
5
  module Version
6
- VERSION = "2.2.2"
6
+ VERSION = "2.2.3"
7
7
  end
8
8
  VERSION = Version::VERSION # Traditional Constant Location
9
9
  end
data.tar.gz.sig CHANGED
@@ -1 +1,2 @@
1
- /�F�
1
+ d�@s@���T.!��������>wd�$���^�{AQ~�[��,�O��KܯY�`�(����nVa�k���Ԙ9�
2
+ ̙�}y�H�;ɋ�,;�����
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kettle-dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.2
4
+ version: 2.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -338,10 +338,10 @@ licenses:
338
338
  - AGPL-3.0-only
339
339
  metadata:
340
340
  homepage_uri: https://kettle-dev.galtzo.com
341
- source_code_uri: https://github.com/kettle-dev/kettle-dev/tree/v2.2.2
342
- changelog_uri: https://github.com/kettle-dev/kettle-dev/blob/v2.2.2/CHANGELOG.md
341
+ source_code_uri: https://github.com/kettle-dev/kettle-dev/tree/v2.2.3
342
+ changelog_uri: https://github.com/kettle-dev/kettle-dev/blob/v2.2.3/CHANGELOG.md
343
343
  bug_tracker_uri: https://github.com/kettle-dev/kettle-dev/issues
344
- documentation_uri: https://www.rubydoc.info/gems/kettle-dev/2.2.2
344
+ documentation_uri: https://www.rubydoc.info/gems/kettle-dev/2.2.3
345
345
  funding_uri: https://github.com/sponsors/pboling
346
346
  wiki_uri: https://github.com/kettle-dev/kettle-dev/wiki
347
347
  news_uri: https://www.railsbling.com/tags/kettle-dev
metadata.gz.sig CHANGED
Binary file