still_active 1.4.0 → 1.4.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: be6f4e86c6afb3564385acfaf5733cecc38845c300a8a2ef624d0b267cc93a94
4
- data.tar.gz: ec381b31257189f8f171bb5bdc4f318dfd0edd03cba957dd58b3400935ab5898
3
+ metadata.gz: cb7cc442ab86e0411ca2de3926014c92e952cd5d7fdd4fb1bd555b6432346b8b
4
+ data.tar.gz: 91c4e617d7fd8d53127a49d896c107c9b716dfa5608dd9b0d7b3c7d607f67eba
5
5
  SHA512:
6
- metadata.gz: dcb580e83cedb482f05fe6a2cfebc91190050339dfb4a0986075d4cc28c6f9788d96efa86a66a7a28c22d248e6b15305d78f2e7f7bcd09c82ad0e9fbbed5fd0f
7
- data.tar.gz: df4d1a5980ddb05e8cdb5c781ee72941ba4477fa71c101db6b03e089d0ffd2c8571803590467d8796841214d2fda6f9c40865ea7c16c58fcb89d632efd825cdc
6
+ metadata.gz: a30d5038b09709f8f85b2c341f5f21d12a7637315a85bcd138a1a2f7944927c7f6adcb9388f68bf0dc7b2bd4aec250dc14eb54dc394218d00560434f88627144
7
+ data.tar.gz: 0ce06926d425612d825b17cbd3f84c4e3f0ff6a4ab700f0114df712b00bb6f61acbe90de30c6c1a971348ff8a063621a38a7d5e851586de1972bced2f8a4803f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.4.1] - 2026-05-22
4
+
5
+ ### Fixed
6
+
7
+ - `still_active --gems=X` (or any invocation that doesn't need a Gemfile) crashed with `Bundler::GemfileNotFound` when run from a directory without a Gemfile in the tree. `Config#initialize` eagerly called `Bundler.default_gemfile`. Now `gemfile_path` resolves lazily on first read and falls back to `./Gemfile` when none is reachable.
8
+
3
9
  ## [1.4.0] - 2026-05-22
4
10
 
5
11
  ### Added
@@ -6,13 +6,12 @@ require "open3"
6
6
 
7
7
  module StillActive
8
8
  class Config
9
- attr_writer :github_oauth_token, :gitlab_token
9
+ attr_writer :github_oauth_token, :gitlab_token, :gemfile_path
10
10
  attr_accessor :baseline_path,
11
11
  :critical_warning_emoji,
12
12
  :fail_if_critical,
13
13
  :fail_if_warning,
14
14
  :futurist_emoji,
15
- :gemfile_path,
16
15
  :gems,
17
16
  :fail_if_outdated,
18
17
  :fail_if_vulnerable,
@@ -31,7 +30,7 @@ module StillActive
31
30
  @fail_if_outdated = nil
32
31
  @fail_if_vulnerable = nil
33
32
  @fail_if_warning = false
34
- @gemfile_path = Bundler.default_gemfile.to_s
33
+ @gemfile_path = nil
35
34
  @gems = []
36
35
  @ignored_gems = []
37
36
  @github_oauth_token = nil
@@ -66,6 +65,16 @@ module StillActive
66
65
  @gitlab_token ||= presence(ENV["GITLAB_TOKEN"]) || glab_cli_token
67
66
  end
68
67
 
68
+ # Lazy so that running with --gems=... (no Gemfile needed) doesn't crash
69
+ # when invoked from a directory without a Gemfile in the tree.
70
+ def gemfile_path
71
+ @gemfile_path ||= begin
72
+ Bundler.default_gemfile.to_s
73
+ rescue Bundler::GemfileNotFound
74
+ File.join(Dir.pwd, "Gemfile")
75
+ end
76
+ end
77
+
69
78
  private
70
79
 
71
80
  def gh_cli_token
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StillActive
4
- VERSION = "1.4.0"
4
+ VERSION = "1.4.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.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Floyd