dry-credentials 0.2.1 → 0.3.0
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 +10 -2
 - data/README.md +13 -3
 - data/lib/dry/credentials/helpers.rb +1 -1
 - data/lib/dry/credentials/version.rb +1 -1
 - data.tar.gz.sig +0 -0
 - metadata +29 -13
 - 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: a87f2e29c53fafba34356002ee07e2eb2d31fba25135d51b9098b34171a771cb
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: d675791b951d5220f8dafc35330deb022eea62cd2bc82f7e84963d9504441763
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 0a13c705e06e11791408562219391cf524d7e1d17069cfcfd1d9469cb41187bf7649be21df8b230435c487621b90a2d86f05b19d54bb52dab7a09f215a042b25
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 0c07cae029dc55ba469e469a4f250f36ae73064ec8d5529b6a9f6f9239757eb1ce95ceae7471bb6d959c60e2419fd559de3a6169204bf99c2d15bae726431c43
         
     | 
    
        checksums.yaml.gz.sig
    CHANGED
    
    | 
         Binary file 
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -2,16 +2,24 @@ 
     | 
|
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            Nothing so far
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
      
 5 
     | 
    
         
            +
            ## 0.3.0
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            #### Additions
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            * Support generic fallback environment variable +CREDENTIALS_KEY+
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
       5 
11 
     | 
    
         
             
            ## 0.2.1
         
     | 
| 
       6 
12 
     | 
    
         | 
| 
       7 
13 
     | 
    
         
             
            ## 0.2.1
         
     | 
| 
       8 
14 
     | 
    
         | 
| 
      
 15 
     | 
    
         
            +
            #### Additions
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
       9 
17 
     | 
    
         
             
            * Add square brackets setter for settings
         
     | 
| 
       10 
18 
     | 
    
         
             
            * Explain integrations for Bridgetown, Hanami 2 and Rodbot
         
     | 
| 
       11 
19 
     | 
    
         | 
| 
       12 
20 
     | 
    
         
             
            ## 0.2.0
         
     | 
| 
       13 
21 
     | 
    
         | 
| 
       14 
     | 
    
         
            -
            #### Breaking  
     | 
| 
      
 22 
     | 
    
         
            +
            #### Breaking changes
         
     | 
| 
       15 
23 
     | 
    
         | 
| 
       16 
24 
     | 
    
         
             
            * Fall back to `APP_ENV` instead of `RACK_ENV`
         
     | 
| 
       17 
25 
     | 
    
         | 
| 
         @@ -21,7 +29,7 @@ Nothing so far 
     | 
|
| 
       21 
29 
     | 
    
         | 
| 
       22 
30 
     | 
    
         
             
            ## 0.1.0
         
     | 
| 
       23 
31 
     | 
    
         | 
| 
       24 
     | 
    
         
            -
            #### Initial  
     | 
| 
      
 32 
     | 
    
         
            +
            #### Initial implementation
         
     | 
| 
       25 
33 
     | 
    
         | 
| 
       26 
34 
     | 
    
         
             
            * Require Ruby 3.0 or newer
         
     | 
| 
       27 
35 
     | 
    
         
             
            * Class mixin featuring the `credentials` macro:
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            [](https://rubygems.org/gems/dry-credentials)
         
     | 
| 
       2 
2 
     | 
    
         
             
            [](https://github.com/svoop/dry-credentials/actions?workflow=Test)
         
     | 
| 
       3 
3 
     | 
    
         
             
            [](https://codeclimate.com/github/svoop/dry-credentials/)
         
     | 
| 
       4 
     | 
    
         
            -
            [](https://github.com/sponsors/svoop)
         
     | 
| 
       5 
5 
     | 
    
         | 
| 
       6 
6 
     | 
    
         
             
            # Dry::Credentials
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
         @@ -13,6 +13,8 @@ While similar in purpose to ActiveSupport::EncryptedConfiguration, this lightwei 
     | 
|
| 
       13 
13 
     | 
    
         
             
            * [API](https://www.rubydoc.info/gems/dry-credentials)
         
     | 
| 
       14 
14 
     | 
    
         
             
            * Author: [Sven Schwyn - Bitcetera](https://bitcetera.com)
         
     | 
| 
       15 
15 
     | 
    
         | 
| 
      
 16 
     | 
    
         
            +
            Thank you for supporting free and open-source software by sponsoring on [GitHub](https://github.com/sponsors/svoop) or on [Donorbox](https://donorbox.com/bitcetera). Any gesture is appreciated, from a single Euro for a ☕️ cup of coffee to 🍹 early retirement.
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
       16 
18 
     | 
    
         
             
            ## Install
         
     | 
| 
       17 
19 
     | 
    
         | 
| 
       18 
20 
     | 
    
         
             
            ### Security
         
     | 
| 
         @@ -96,6 +98,12 @@ To decrypt the credentials and use them in your app, you have to set just this o 
     | 
|
| 
       96 
98 
     | 
    
         
             
            export SANDBOX_CREDENTIALS_KEY=68656973716a4e706e336733377245732b6e77584c6c772b5432446532456f674767664271374a623876383d
         
     | 
| 
       97 
99 
     | 
    
         
             
            ```
         
     | 
| 
       98 
100 
     | 
    
         | 
| 
      
 101 
     | 
    
         
            +
            Alternatively, you can omit the first part of the variable name. Such a key will be used for any app environment, but a more specific key will always take precedence. This is particularly useful when working with containerized setups:
         
     | 
| 
      
 102 
     | 
    
         
            +
             
     | 
| 
      
 103 
     | 
    
         
            +
            ```sh
         
     | 
| 
      
 104 
     | 
    
         
            +
            export CREDENTIALS_KEY=68656973716a4e706e336733377245732b6e77584c6c772b5432446532456f674767664271374a623876383d
         
     | 
| 
      
 105 
     | 
    
         
            +
            ```
         
     | 
| 
      
 106 
     | 
    
         
            +
             
     | 
| 
       99 
107 
     | 
    
         
             
            With this in place, you can use the decrypted credentials anywhere in your app:
         
     | 
| 
       100 
108 
     | 
    
         | 
| 
       101 
109 
     | 
    
         
             
            ```ruby
         
     | 
| 
         @@ -164,7 +172,7 @@ The [bridgetown_credentials gem](https://github.com/svoop/bridgetown_credentials 
     | 
|
| 
       164 
172 
     | 
    
         | 
| 
       165 
173 
     | 
    
         
             
            ### Hanami 2
         
     | 
| 
       166 
174 
     | 
    
         | 
| 
       167 
     | 
    
         
            -
            To use credentials in a [Hanami 2](https//hanami.org) app, first add this gem to the  
     | 
| 
      
 175 
     | 
    
         
            +
            To use credentials in a [Hanami 2](https//hanami.org) app, first add this gem to the Gemfile of the app and then create a provider `config/providers/credentials.rb`:
         
     | 
| 
       168 
176 
     | 
    
         | 
| 
       169 
177 
     | 
    
         
             
            ```ruby
         
     | 
| 
       170 
178 
     | 
    
         
             
            # frozen_string_literal: true
         
     | 
| 
         @@ -175,6 +183,8 @@ Hanami.app.register_provider :credentials do 
     | 
|
| 
       175 
183 
     | 
    
         | 
| 
       176 
184 
     | 
    
         
             
                Dry::Credentials::Extension.new.then do |credentials|
         
     | 
| 
       177 
185 
     | 
    
         
             
                  credentials[:env] = Hanami.env
         
     | 
| 
      
 186 
     | 
    
         
            +
                  credentials[:dir] = Hanami.app.root.join(credentials[:dir])
         
     | 
| 
      
 187 
     | 
    
         
            +
                  credentials[:dir].mkpath
         
     | 
| 
       178 
188 
     | 
    
         
             
                  credentials.load!
         
     | 
| 
       179 
189 
     | 
    
         
             
                  register "credentials", credentials
         
     | 
| 
       180 
190 
     | 
    
         
             
                end
         
     | 
| 
         @@ -182,7 +192,7 @@ Hanami.app.register_provider :credentials do 
     | 
|
| 
       182 
192 
     | 
    
         
             
            end
         
     | 
| 
       183 
193 
     | 
    
         
             
            ```
         
     | 
| 
       184 
194 
     | 
    
         | 
| 
       185 
     | 
    
         
            -
             
     | 
| 
      
 195 
     | 
    
         
            +
            Next up are Rake tasks `lib/tasks/credentials.rake`:
         
     | 
| 
       186 
196 
     | 
    
         | 
| 
       187 
197 
     | 
    
         
             
            ```ruby
         
     | 
| 
       188 
198 
     | 
    
         
             
            namespace :credentials do
         
     | 
    
        data.tar.gz.sig
    CHANGED
    
    | 
         Binary file 
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: dry-credentials
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.3.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Sven Schwyn
         
     | 
| 
         @@ -10,24 +10,26 @@ bindir: bin 
     | 
|
| 
       10 
10 
     | 
    
         
             
            cert_chain:
         
     | 
| 
       11 
11 
     | 
    
         
             
            - |
         
     | 
| 
       12 
12 
     | 
    
         
             
              -----BEGIN CERTIFICATE-----
         
     | 
| 
       13 
     | 
    
         
            -
               
     | 
| 
       14 
     | 
    
         
            -
               
     | 
| 
       15 
     | 
    
         
            -
               
     | 
| 
      
 13 
     | 
    
         
            +
              MIIDODCCAiCgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhydWJ5
         
     | 
| 
      
 14 
     | 
    
         
            +
              L0RDPWJpdGNldGVyYS9EQz1jb20wHhcNMjQxMTIwMjExMDIwWhcNMjUxMTIwMjEx
         
     | 
| 
      
 15 
     | 
    
         
            +
              MDIwWjAjMSEwHwYDVQQDDBhydWJ5L0RDPWJpdGNldGVyYS9EQz1jb20wggEiMA0G
         
     | 
| 
       16 
16 
     | 
    
         
             
              CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDcLg+IHjXYaUlTSU7R235lQKD8ZhEe
         
     | 
| 
       17 
17 
     | 
    
         
             
              KMhoGlSUonZ/zo1OT3KXcqTCP1iMX743xYs6upEGALCWWwq+nxvlDdnWRjF3AAv7
         
     | 
| 
       18 
18 
     | 
    
         
             
              ikC+Z2BEowjyeCCT/0gvn4ohKcR0JOzzRaIlFUVInlGSAHx2QHZ2N8ntf54lu7nd
         
     | 
| 
       19 
19 
     | 
    
         
             
              L8CiDK8rClsY4JBNGOgH9UC81f+m61UUQuTLxyM2CXfAYkj/sGNTvFRJcNX+nfdC
         
     | 
| 
       20 
20 
     | 
    
         
             
              hM9r2kH1+7wsa8yG7wJ2IkrzNACD8v84oE6qVusN8OLEMUI/NaEPVPbw2LUM149H
         
     | 
| 
       21 
21 
     | 
    
         
             
              PVa0i729A4IhroNnFNmw4wOC93ARNbM1+LW36PLMmKjKudf5Exg8VmDVAgMBAAGj
         
     | 
| 
       22 
     | 
    
         
            -
               
     | 
| 
       23 
     | 
    
         
            -
              yoX/ 
     | 
| 
       24 
     | 
    
         
            -
               
     | 
| 
       25 
     | 
    
         
            -
               
     | 
| 
       26 
     | 
    
         
            -
               
     | 
| 
       27 
     | 
    
         
            -
               
     | 
| 
       28 
     | 
    
         
            -
               
     | 
| 
      
 22 
     | 
    
         
            +
              dzB1MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBSfK8MtR62mQ6oN
         
     | 
| 
      
 23 
     | 
    
         
            +
              yoX/VKJzFjLSVDAdBgNVHREEFjAUgRJydWJ5QGJpdGNldGVyYS5jb20wHQYDVR0S
         
     | 
| 
      
 24 
     | 
    
         
            +
              BBYwFIEScnVieUBiaXRjZXRlcmEuY29tMA0GCSqGSIb3DQEBCwUAA4IBAQDSeB1x
         
     | 
| 
      
 25 
     | 
    
         
            +
              8QK8F/ML37isgvwGiQxovDUqu6Sq14cQ1qE9y5prUBmL2AsDuCBpXXctcvamFqNC
         
     | 
| 
      
 26 
     | 
    
         
            +
              PgfJtj7ZZcXmY0SfKCog7T1btkr6zYxPXpxwUqB45n0I6v5qc0UCNvMEfBzxlak5
         
     | 
| 
      
 27 
     | 
    
         
            +
              VW7UMNlKD9qukeN55hxuLF2F/sLldMcHUo/ATgdV4zk1t3sK6A9+02wz5K5qfWdM
         
     | 
| 
      
 28 
     | 
    
         
            +
              Mi+XWXmGd57uojk3RcIXNwBRRP4DTKcKgVXhuyHb7q1vjTXrS6bw1Ortu0KmWOIk
         
     | 
| 
      
 29 
     | 
    
         
            +
              jTyRsT1gymASS2KHe+BaCTwD74GqO8q4woYLZgXnJ/PvgcFgY2FEi2Kn/sXLp4JE
         
     | 
| 
      
 30 
     | 
    
         
            +
              boIgxQCMT+nxBHCD
         
     | 
| 
       29 
31 
     | 
    
         
             
              -----END CERTIFICATE-----
         
     | 
| 
       30 
     | 
    
         
            -
            date: 2024- 
     | 
| 
      
 32 
     | 
    
         
            +
            date: 2024-12-08 00:00:00.000000000 Z
         
     | 
| 
       31 
33 
     | 
    
         
             
            dependencies:
         
     | 
| 
       32 
34 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       33 
35 
     | 
    
         
             
              name: base64
         
     | 
| 
         @@ -85,6 +87,20 @@ dependencies: 
     | 
|
| 
       85 
87 
     | 
    
         
             
                - - ">="
         
     | 
| 
       86 
88 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       87 
89 
     | 
    
         
             
                    version: '0'
         
     | 
| 
      
 90 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 91 
     | 
    
         
            +
              name: minitest-substitute
         
     | 
| 
      
 92 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 93 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 94 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 95 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 96 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 97 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 98 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 99 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 100 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 101 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 102 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 103 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       88 
104 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       89 
105 
     | 
    
         
             
              name: minitest-flash
         
     | 
| 
       90 
106 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -215,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       215 
231 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       216 
232 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       217 
233 
     | 
    
         
             
            requirements: []
         
     | 
| 
       218 
     | 
    
         
            -
            rubygems_version: 3.5. 
     | 
| 
      
 234 
     | 
    
         
            +
            rubygems_version: 3.5.23
         
     | 
| 
       219 
235 
     | 
    
         
             
            signing_key:
         
     | 
| 
       220 
236 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       221 
237 
     | 
    
         
             
            summary: A mixin to use encrypted credentials in your classes
         
     | 
    
        metadata.gz.sig
    CHANGED
    
    | 
         Binary file 
     |