verikloak-audience 0.2.3 → 0.2.4

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: 713d20df5953ade3498d0e2fbd5ea3adbd86475911e3bf28b9d3ba670a5fdac7
4
- data.tar.gz: a2f6975e273151879cd3a9bde96b0619b6db1214f5a1f9d007992dbb0bea6467
3
+ metadata.gz: 14464de9a3539e2ee4090afb4a1bc62b24f637bc7b8d272795592fe06f00f353
4
+ data.tar.gz: 1a2fb4b570a8396fba4733e0dd19f0bf984a5a5754c445d58e4f052abd1b3428
5
5
  SHA512:
6
- metadata.gz: b8288ce11783eb853baa74d1c1fa3622b547b2332e140c6e395cd28301a1995a39d329c54df46121bfec54f222784e923ae0d6de7ff4a226e55c88f195980804
7
- data.tar.gz: 9856d8684a3fbdcbde033e48926878a0cb54578c24f95f57ff34d4e62385249cbd8707721a59b3495b7f980413189fe32a9cc11d4af4319015aea34c0467852d
6
+ metadata.gz: 26dba91989a702c379240bdc4190cae808b3a028994d3321c17d026bd116146e6b0157cebbbacf99f4f412a3311df8b4258df7070cf49b1ec8c9ebe9f2560413
7
+ data.tar.gz: 0bceb0d0575ec78727ac5aa179baeeeca0895646159f45e54e399d6a7a0dffc5cc6158f61f0c59585716b1a998a502c3ef09882c4a87d083e10a333371bed662
data/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ---
9
9
 
10
+ ## [0.2.4] - 2025-09-22
11
+
12
+ ### Fixed
13
+ - Skip middleware validation even before `Rails::Generators` is loaded so `rails g verikloak:install` succeeds without a placeholder configuration.
14
+ - Treat all `verikloak:*:install` generators as safe so additional installer tasks (e.g. `verikloak:pundit:install`) can run before configuration exists.
15
+
10
16
  ## [0.2.3] - 2025-09-22
11
17
 
12
18
  ### Fixed
@@ -54,10 +54,9 @@ module Verikloak
54
54
  end
55
55
 
56
56
  # Rails short commands (`g`, `d`) are stripped from ARGV fairly early in
57
- # the boot process. When that happens the first argument becomes the
58
- # generator namespace (e.g. `verikloak:install`). Include it here so the
59
- # install generator can run before `required_aud` is configured.
60
- COMMANDS_SKIPPING_VALIDATION = %w[generate g destroy d verikloak:install].freeze
57
+ # the boot process. Treat `verikloak:*:install` generators as safe so they
58
+ # can run before configuration files exist.
59
+ COMMANDS_SKIPPING_VALIDATION = %w[generate g destroy d].freeze
61
60
 
62
61
  # Detect whether Rails is currently executing a generator-style command.
63
62
  # Generators boot the application before configuration exists, so we
@@ -65,10 +64,10 @@ module Verikloak
65
64
  #
66
65
  # @return [Boolean]
67
66
  def self.skip_configuration_validation?
68
- return false unless defined?(Rails::Generators)
69
-
70
67
  command = first_rails_command
71
- COMMANDS_SKIPPING_VALIDATION.include?(command)
68
+ return false unless command
69
+
70
+ COMMANDS_SKIPPING_VALIDATION.include?(command) || verikloak_install_generator?(command)
72
71
  end
73
72
 
74
73
  # Capture the first non-option argument passed to the Rails CLI,
@@ -85,6 +84,17 @@ module Verikloak
85
84
 
86
85
  nil
87
86
  end
87
+
88
+ # Detect whether the provided CLI token refers to a Verikloak install
89
+ # generator (e.g. `verikloak:install`, `verikloak:pundit:install`).
90
+ #
91
+ # @param command [String, nil] first non-option argument from ARGV
92
+ # @return [Boolean]
93
+ def self.verikloak_install_generator?(command)
94
+ return false unless command.is_a?(String)
95
+
96
+ command.start_with?('verikloak:') && command.end_with?(':install')
97
+ end
88
98
  end
89
99
  end
90
100
  end
@@ -4,6 +4,6 @@ module Verikloak
4
4
  module Audience
5
5
  # Current gem version.
6
6
  # @return [String]
7
- VERSION = '0.2.3'
7
+ VERSION = '0.2.4'
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: verikloak-audience
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - taiyaky
@@ -74,7 +74,7 @@ metadata:
74
74
  source_code_uri: https://github.com/taiyaky/verikloak-audience
75
75
  changelog_uri: https://github.com/taiyaky/verikloak-audience/blob/main/CHANGELOG.md
76
76
  bug_tracker_uri: https://github.com/taiyaky/verikloak-audience/issues
77
- documentation_uri: https://rubydoc.info/gems/verikloak-audience/0.2.3
77
+ documentation_uri: https://rubydoc.info/gems/verikloak-audience/0.2.4
78
78
  rubygems_mfa_required: 'true'
79
79
  rdoc_options: []
80
80
  require_paths: