verikloak-audience 0.2.2 → 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 +4 -4
- data/CHANGELOG.md +11 -0
- data/lib/verikloak/audience/railtie.rb +17 -3
- data/lib/verikloak/audience/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 14464de9a3539e2ee4090afb4a1bc62b24f637bc7b8d272795592fe06f00f353
         | 
| 4 | 
            +
              data.tar.gz: 1a2fb4b570a8396fba4733e0dd19f0bf984a5a5754c445d58e4f052abd1b3428
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 26dba91989a702c379240bdc4190cae808b3a028994d3321c17d026bd116146e6b0157cebbbacf99f4f412a3311df8b4258df7070cf49b1ec8c9ebe9f2560413
         | 
| 7 | 
            +
              data.tar.gz: 0bceb0d0575ec78727ac5aa179baeeeca0895646159f45e54e399d6a7a0dffc5cc6158f61f0c59585716b1a998a502c3ef09882c4a87d083e10a333371bed662
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -7,6 +7,17 @@ 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 | 
            +
             | 
| 16 | 
            +
            ## [0.2.3] - 2025-09-22
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            ### Fixed
         | 
| 19 | 
            +
            - Detect the `verikloak:install` namespace after Rails strips the `g` alias so generator invocations inside wrappers (e.g. `docker compose run`) no longer fail validation.
         | 
| 20 | 
            +
             | 
| 10 21 | 
             
            ## [0.2.2] - 2025-09-22
         | 
| 11 22 |  | 
| 12 23 | 
             
            ### Fixed
         | 
| @@ -53,6 +53,9 @@ module Verikloak | |
| 53 53 | 
             
                    app.middleware.insert_after ::Verikloak::Middleware, ::Verikloak::Audience::Middleware
         | 
| 54 54 | 
             
                  end
         | 
| 55 55 |  | 
| 56 | 
            +
                  # Rails short commands (`g`, `d`) are stripped from ARGV fairly early in
         | 
| 57 | 
            +
                  # the boot process. Treat `verikloak:*:install` generators as safe so they
         | 
| 58 | 
            +
                  # can run before configuration files exist.
         | 
| 56 59 | 
             
                  COMMANDS_SKIPPING_VALIDATION = %w[generate g destroy d].freeze
         | 
| 57 60 |  | 
| 58 61 | 
             
                  # Detect whether Rails is currently executing a generator-style command.
         | 
| @@ -61,10 +64,10 @@ module Verikloak | |
| 61 64 | 
             
                  #
         | 
| 62 65 | 
             
                  # @return [Boolean]
         | 
| 63 66 | 
             
                  def self.skip_configuration_validation?
         | 
| 64 | 
            -
                    return false unless defined?(Rails::Generators)
         | 
| 65 | 
            -
             | 
| 66 67 | 
             
                    command = first_rails_command
         | 
| 67 | 
            -
                     | 
| 68 | 
            +
                    return false unless command
         | 
| 69 | 
            +
             | 
| 70 | 
            +
                    COMMANDS_SKIPPING_VALIDATION.include?(command) || verikloak_install_generator?(command)
         | 
| 68 71 | 
             
                  end
         | 
| 69 72 |  | 
| 70 73 | 
             
                  # Capture the first non-option argument passed to the Rails CLI,
         | 
| @@ -81,6 +84,17 @@ module Verikloak | |
| 81 84 |  | 
| 82 85 | 
             
                    nil
         | 
| 83 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
         | 
| 84 98 | 
             
                end
         | 
| 85 99 | 
             
              end
         | 
| 86 100 | 
             
            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. | 
| 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. | 
| 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:
         |