still_active 1.2.0 → 1.2.1

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: 8c861ae8a727347f9b276576f3da48d806fbc25ab05020d849e5e92c8de49732
4
- data.tar.gz: bc3e5d7429e17adc0b6b0e955f50a6ddb9e7f157f1c656bf8c9044113cd5a97e
3
+ metadata.gz: 5c443b34e114712ecfb265633fcd0293c122f6e1cb9601e03fa7605384e69fd6
4
+ data.tar.gz: 8113b917cdcaa3e90704b06814863606b574bd90f2254dbb44945aa816c18a49
5
5
  SHA512:
6
- metadata.gz: e922835a769aeb9817dd27e99bf194c39e21e43794ee66d6d7d1db4c2c9ccaf11cf40d75ac251302f014f3df539998ab4e285f446fb68b6aaa080259421cc1fb
7
- data.tar.gz: 932b7e3dbd72cd02492070eced16a77e1a8a1649bb86132f2a7f827339d3f42138633139cbfd5134e31b1c4a92d18b28758afafc74674402f72a9ed2d7512399
6
+ metadata.gz: 7b05d36cd5b8313ac39e6b18cb00a6c8193347e0388a3844bd6501d3760e6fb78bc709fc36a6ef9370ddca73fc6f46b97747d1df33d37324771c09b62f09426a
7
+ data.tar.gz: 0d6964db03f4ac800016f6c6a4adb9ed0c3651351f83af3b21e7caf66354a1e991e4e5ccc999332c3bb23c93248fcdbfaedb452745766b1a306dc209874ff317
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.2.1] - 2026-02-20
4
+
5
+ ### Fixed
6
+
7
+ - Ruby version freshness reported the running Ruby (e.g. 4.0.1) instead of the target project's Ruby from `Gemfile.lock`; now reads `RUBY VERSION` section from lockfile, falls back to running version only when absent
8
+ - Platform-specific gems (e.g. `nokogiri` on multiple architectures) were processed once per platform, wasting API calls and inflating the progress counter total
9
+
3
10
  ## [1.2.0] - 2026-02-20
4
11
 
5
12
  ### Added
@@ -12,6 +12,7 @@ module StillActive
12
12
  .locked_gems
13
13
  .specs
14
14
  .select { |spec| gemfile_gems.include?(spec.name) }
15
+ .uniq(&:name)
15
16
  .map do |spec|
16
17
  {
17
18
  name: spec.name,
@@ -11,12 +11,12 @@ module StillActive
11
11
  ENDOFLIFE_URI = URI("https://endoflife.date/")
12
12
 
13
13
  def ruby_freshness
14
- return unless standard_ruby?
14
+ current = current_ruby_version
15
+ return if current.nil?
15
16
 
16
17
  cycles = fetch_cycles
17
18
  return if cycles.nil?
18
19
 
19
- current = current_ruby_version
20
20
  current_cycle = find_cycle(cycles, current)
21
21
  latest_cycle = cycles.first
22
22
 
@@ -43,12 +43,20 @@ module StillActive
43
43
 
44
44
  private
45
45
 
46
- def standard_ruby?
47
- RUBY_ENGINE == "ruby"
46
+ def current_ruby_version
47
+ lockfile_ruby_version || (RUBY_ENGINE == "ruby" ? RUBY_VERSION : nil)
48
48
  end
49
49
 
50
- def current_ruby_version
51
- RUBY_VERSION
50
+ def lockfile_ruby_version
51
+ gemfile = ENV["BUNDLE_GEMFILE"]
52
+ return unless gemfile
53
+
54
+ lockfile_path = "#{gemfile}.lock"
55
+ return unless File.exist?(lockfile_path)
56
+
57
+ content = File.read(lockfile_path)
58
+ match = content.match(/^RUBY VERSION\n\s+ruby (\d+\.\d+\.\d+)/)
59
+ match&.[](1)
52
60
  end
53
61
 
54
62
  def fetch_cycles
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StillActive
4
- VERSION = "1.2.0"
4
+ VERSION = "1.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: still_active
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Floyd