kettle-dev 2.5.10 → 2.5.11
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
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +20 -1
- data/README.md +1 -1
- data/lib/kettle/dev/ruby_gems_versions.rb +77 -4
- data/lib/kettle/dev/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +4 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f2c0c759c751e79d77e5cf8495f9c461d514d0b120c97cd95b4ae7222afe7f0c
|
|
4
|
+
data.tar.gz: 95f799d83838660c1fa6200fe4783368a59456f1e8c6221bfdccff0eb967cecf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6e95a43755c42b2cf9e45e6d5df069aa0fd5cea4291aeae0ef9f9020a43eed84959a7c734bf8dbd0f719f9d78f6b3f135399cddb9374b616e74abbdb200c6017
|
|
7
|
+
data.tar.gz: 9bee1f5843526fc154502c909c0144c4440da1610611d6eaf9ef23a4d7f72386071e420cbe267b0ce08d0a82c59abe094b990c85e0d2a813077ab08fe8a147ec
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,23 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [2.5.11] - 2026-07-30
|
|
34
|
+
|
|
35
|
+
- TAG: [v2.5.11][2.5.11t]
|
|
36
|
+
- COVERAGE: 91.66% -- 4756/5189 lines in 44 files
|
|
37
|
+
- BRANCH COVERAGE: 76.03% -- 1802/2370 branches in 44 files
|
|
38
|
+
- 53.78% documented
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- RubyGems version lookups now share the 30-day local version-response cache
|
|
43
|
+
used by dependency floor checks, so release-state and changelog generation can
|
|
44
|
+
survive transient RubyGems API failures for untouched gems while still
|
|
45
|
+
refreshing recently released gems.
|
|
46
|
+
- RubyGems release-state cache-bust markers now stay fresh for 30 days after
|
|
47
|
+
`kettle-release` publishes a gem, so downstream tooling can selectively
|
|
48
|
+
refresh recently released gems without refreshing untouched gems.
|
|
49
|
+
|
|
33
50
|
## [2.5.10] - 2026-07-30
|
|
34
51
|
|
|
35
52
|
- TAG: [v2.5.10][2.5.10t]
|
|
@@ -3060,7 +3077,9 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
3060
3077
|
- Selecting will run the selected workflow via `act`
|
|
3061
3078
|
- This may move to its own gem in the future.
|
|
3062
3079
|
|
|
3063
|
-
[Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v2.5.
|
|
3080
|
+
[Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v2.5.11...HEAD
|
|
3081
|
+
[2.5.11]: https://github.com/kettle-dev/kettle-dev/compare/v2.5.10...v2.5.11
|
|
3082
|
+
[2.5.11t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.5.11
|
|
3064
3083
|
[2.5.10]: https://github.com/kettle-dev/kettle-dev/compare/v2.5.9...v2.5.10
|
|
3065
3084
|
[2.5.10t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.5.10
|
|
3066
3085
|
[2.5.9]: https://github.com/kettle-dev/kettle-dev/compare/v2.5.8...v2.5.9
|
data/README.md
CHANGED
|
@@ -1005,7 +1005,7 @@ Thanks for RTFM. ☺️
|
|
|
1005
1005
|
[📌gitmoji]: https://gitmoji.dev
|
|
1006
1006
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
1007
1007
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
1008
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-5.
|
|
1008
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-5.189-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
1009
1009
|
[🔐security]: https://github.com/kettle-dev/kettle-dev/blob/main/SECURITY.md
|
|
1010
1010
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
1011
1011
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
|
@@ -8,14 +8,24 @@ require "uri"
|
|
|
8
8
|
|
|
9
9
|
module Kettle
|
|
10
10
|
module Dev
|
|
11
|
+
class Error < StandardError; end unless const_defined?(:Error, false)
|
|
12
|
+
ENV_TRUE_RE = /\A(1|true|y|yes)\z/i unless const_defined?(:ENV_TRUE_RE, false)
|
|
13
|
+
|
|
11
14
|
module RubyGemsVersions
|
|
12
|
-
CACHE_BUST_TTL_SECONDS =
|
|
15
|
+
CACHE_BUST_TTL_SECONDS = 30 * 24 * 60 * 60
|
|
16
|
+
VERSION_CACHE_TTL_SECONDS = 30 * 24 * 60 * 60
|
|
13
17
|
ENV_REFRESH = "KETTLE_RUBYGEMS_REFRESH"
|
|
14
18
|
ENV_MARKER_PATH = "KETTLE_RUBYGEMS_CACHE_BUST_PATH"
|
|
19
|
+
ENV_VERSION_CACHE_PATH = "KETTLE_RUBYGEMS_VERSION_CACHE_PATH"
|
|
20
|
+
ENV_LEGACY_VERSION_CACHE_PATH = "KETTLE_JEM_DEPS_FLOOR_CACHE"
|
|
15
21
|
|
|
16
22
|
class << self
|
|
17
23
|
def fetch(gem_name, version_hint: nil, refresh: false)
|
|
18
|
-
|
|
24
|
+
name = gem_name.to_s
|
|
25
|
+
cached = cached_versions(name)
|
|
26
|
+
cache_bust = refresh || env_refresh? || fresh_release_marker?(name, version_hint)
|
|
27
|
+
return cached if cached && !cache_bust
|
|
28
|
+
|
|
19
29
|
uri = versions_uri(gem_name, cache_bust: cache_bust)
|
|
20
30
|
request = Net::HTTP::Get.new(uri)
|
|
21
31
|
if cache_bust
|
|
@@ -25,9 +35,15 @@ module Kettle
|
|
|
25
35
|
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") do |http|
|
|
26
36
|
http.request(request)
|
|
27
37
|
end
|
|
28
|
-
return
|
|
38
|
+
return cached unless response.is_a?(Net::HTTPSuccess)
|
|
39
|
+
|
|
40
|
+
data = JSON.parse(response.body)
|
|
41
|
+
write_versions(name, data) if data.is_a?(Array)
|
|
42
|
+
data
|
|
43
|
+
rescue => error
|
|
44
|
+
return cached if cached
|
|
29
45
|
|
|
30
|
-
|
|
46
|
+
raise error
|
|
31
47
|
end
|
|
32
48
|
|
|
33
49
|
def mark_released(gem_name, version)
|
|
@@ -55,6 +71,20 @@ module Kettle
|
|
|
55
71
|
File.join(state_home, "kettle-dev", "rubygems-cache-bust.json")
|
|
56
72
|
end
|
|
57
73
|
|
|
74
|
+
def version_cache_path
|
|
75
|
+
configured = ENV.fetch(ENV_VERSION_CACHE_PATH, "").to_s
|
|
76
|
+
return "" if configured.match?(/\A(?:false|0|no|off|disabled)\z/i)
|
|
77
|
+
return configured unless configured.empty?
|
|
78
|
+
|
|
79
|
+
legacy_configured = ENV.fetch(ENV_LEGACY_VERSION_CACHE_PATH, "").to_s
|
|
80
|
+
return "" if legacy_configured.match?(/\A(?:false|0|no|off|disabled)\z/i)
|
|
81
|
+
return legacy_configured unless legacy_configured.empty?
|
|
82
|
+
|
|
83
|
+
cache_home = ENV["XDG_CACHE_HOME"]
|
|
84
|
+
cache_home = File.join(Dir.home, ".cache") if cache_home.to_s.empty?
|
|
85
|
+
File.join(cache_home, "kettle-jem", "deps-floor-rubygems-versions.json")
|
|
86
|
+
end
|
|
87
|
+
|
|
58
88
|
private
|
|
59
89
|
|
|
60
90
|
def versions_uri(gem_name, cache_bust:)
|
|
@@ -86,6 +116,49 @@ module Kettle
|
|
|
86
116
|
def env_refresh?
|
|
87
117
|
ENV.fetch(ENV_REFRESH, "").match?(Kettle::Dev::ENV_TRUE_RE)
|
|
88
118
|
end
|
|
119
|
+
|
|
120
|
+
def cached_versions(gem_name)
|
|
121
|
+
path = version_cache_path
|
|
122
|
+
return nil if path.empty?
|
|
123
|
+
|
|
124
|
+
entry = read_version_cache(path).fetch("versions", {})[gem_name]
|
|
125
|
+
return nil unless entry.is_a?(Hash)
|
|
126
|
+
return nil unless fresh_version_cache_entry?(entry)
|
|
127
|
+
|
|
128
|
+
Array(entry["entries"])
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
def write_versions(gem_name, entries)
|
|
132
|
+
path = version_cache_path
|
|
133
|
+
return if path.empty?
|
|
134
|
+
|
|
135
|
+
data = read_version_cache(path)
|
|
136
|
+
data["versions"] ||= {}
|
|
137
|
+
data["versions"][gem_name] = {
|
|
138
|
+
"cached_at" => Time.now.utc.iso8601,
|
|
139
|
+
"entries" => entries
|
|
140
|
+
}
|
|
141
|
+
FileUtils.mkdir_p(File.dirname(path))
|
|
142
|
+
File.write(path, JSON.pretty_generate(data) << "\n")
|
|
143
|
+
rescue => error
|
|
144
|
+
warn("[kettle-dev] could not update RubyGems.org version cache: #{error.class}: #{error.message}") if Kettle::Dev::DEBUGGING
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
def read_version_cache(path)
|
|
148
|
+
return {} unless File.file?(path)
|
|
149
|
+
|
|
150
|
+
parsed = JSON.parse(File.read(path))
|
|
151
|
+
parsed.is_a?(Hash) ? parsed : {}
|
|
152
|
+
rescue JSON::ParserError
|
|
153
|
+
{}
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
def fresh_version_cache_entry?(entry)
|
|
157
|
+
cached_at = Time.iso8601(entry["cached_at"].to_s)
|
|
158
|
+
cached_at >= Time.now.utc - VERSION_CACHE_TTL_SECONDS
|
|
159
|
+
rescue ArgumentError
|
|
160
|
+
false
|
|
161
|
+
end
|
|
89
162
|
end
|
|
90
163
|
end
|
|
91
164
|
end
|
data/lib/kettle/dev/version.rb
CHANGED
|
@@ -5,7 +5,7 @@ module Kettle
|
|
|
5
5
|
# Version namespace for this gem.
|
|
6
6
|
module Version
|
|
7
7
|
# Current gem version.
|
|
8
|
-
VERSION = "2.5.
|
|
8
|
+
VERSION = "2.5.11"
|
|
9
9
|
end
|
|
10
10
|
# Current gem version exposed at the traditional constant location.
|
|
11
11
|
VERSION = Version::VERSION # Traditional Constant Location
|
data.tar.gz.sig
CHANGED
|
Binary file
|
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.5.
|
|
4
|
+
version: 2.5.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter H. Boling
|
|
@@ -397,10 +397,10 @@ licenses:
|
|
|
397
397
|
- AGPL-3.0-only
|
|
398
398
|
metadata:
|
|
399
399
|
homepage_uri: https://kettle-dev.galtzo.com
|
|
400
|
-
source_code_uri: https://github.com/kettle-dev/kettle-dev/tree/v2.5.
|
|
401
|
-
changelog_uri: https://github.com/kettle-dev/kettle-dev/blob/v2.5.
|
|
400
|
+
source_code_uri: https://github.com/kettle-dev/kettle-dev/tree/v2.5.11
|
|
401
|
+
changelog_uri: https://github.com/kettle-dev/kettle-dev/blob/v2.5.11/CHANGELOG.md
|
|
402
402
|
bug_tracker_uri: https://github.com/kettle-dev/kettle-dev/issues
|
|
403
|
-
documentation_uri: https://www.rubydoc.info/gems/kettle-dev/2.5.
|
|
403
|
+
documentation_uri: https://www.rubydoc.info/gems/kettle-dev/2.5.11
|
|
404
404
|
funding_uri: https://github.com/sponsors/pboling
|
|
405
405
|
wiki_uri: https://github.com/kettle-dev/kettle-dev/wiki
|
|
406
406
|
news_uri: https://www.railsbling.com/tags/kettle-dev
|
metadata.gz.sig
CHANGED
|
Binary file
|