bridgetown_credentials 1.2.0 → 1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa69828861ac1149851e406f310b0caaefcf9747b2dced644339ffde8c3d5f77
4
- data.tar.gz: 6d3f5feb61337bc0c42a662bb3c5447d61fd15d8dd2ec34aea9bd64fb151dbd8
3
+ metadata.gz: 5ef6c81da4907d104012ec963defa74bccb1f993eb742844ad8aef5d81c35d10
4
+ data.tar.gz: f431412c1875b6b53992293c5819d704a7c3a3747ee05e56a480704b250f6f3e
5
5
  SHA512:
6
- metadata.gz: 135e0e7b78674f948162a3636e2337dd1ec4acef1093318b9674d99b8e236fd87573616c0755ace133a5120dd411e75e6eecb6da3ebd84a8a5f0dfb4499be0e3
7
- data.tar.gz: 17c34f2c532ad43358f10b2144ed6d5059a4c1c4708d298aaf99a87f9d9d82d2d42dfa4c6eb9b60a091606c2befb1dc0f9a82eda4596e34c27668a89bf3e7073
6
+ metadata.gz: afa52663b90d9592e682f4294496dde9edff17a0afc84e3c123064d0409a05daf802e1298b2accfc7d993ed452985589c9ae9931eb301370aa473700a489a2d8
7
+ data.tar.gz: 88192ce7c788817f028b43a1633eb774e54bff09612ce1b5c130e0330883880dbadcf8194e2cab69d34b5e4af67fe30a84b2a5d7f26850e3637fa8595c46e3ac
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  Nothing so far
4
4
 
5
+ ## 1.3.0
6
+
7
+ ### Additions
8
+ * Allow keys to be read from file e.g. `CREDENTIALS_KEY_FILE`
9
+
5
10
  ## 1.2.0
6
11
 
7
12
  ### Changes
data/README.md CHANGED
@@ -104,6 +104,19 @@ export DEVELOPMENT_CREDENTIALS_KEY="4c87...af93"
104
104
  export PRODUCTION_CREDENTIALS_KEY="92bb...820f"
105
105
  ```
106
106
 
107
+ 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:
108
+
109
+ ```sh
110
+ export CREDENTIALS_KEY="4c87...af93"
111
+ ```
112
+
113
+ You can also read keys from files which is the recommended way when using [secrets in Docker Compose](https://docs.docker.com/compose/how-tos/use-secrets/). Just append `_FILE` to the corresponding environment variable name and set it to the path from which the secret can be read, for example:
114
+
115
+ ```db
116
+ export DEVELOPMENT_CREDENTIALS_KEY_FILE=/run/secrets/sandbox_credentials_key
117
+ export CREDENTIALS_KEY_FILE=/run/secrets/credentials_key
118
+ ```
119
+
107
120
  ### Edit
108
121
 
109
122
  The command is the same as the first time:
@@ -131,3 +144,5 @@ Bridgetown.credentials.google.maps.api_key # => "goomXkey"
131
144
  ## Development
132
145
 
133
146
  You're welcome to [submit issues](https://github.com/svoop/bridgetown_credentials/issues) and contribute code by [forking the project and submitting pull requests](https://docs.github.com/en/get-started/quickstart/fork-a-repo).
147
+
148
+ By the way: The underscore in the gem name "bridgetown_credentials" is no accident. While the common gem naming convention rather suggests a dash, [Bridgetown chose to prefer underscores for its plugins](https://www.bridgetownrb.com/docs/plugins#creating-a-gem).
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BridgetownCredentials
4
- VERSION = "1.2.0"
4
+ VERSION = "1.3.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridgetown_credentials
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Schwyn
@@ -29,14 +29,14 @@ dependencies:
29
29
  requirements:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 0.2.1
32
+ version: 0.6.0
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 0.2.1
39
+ version: 0.6.0
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: debug
42
42
  requirement: !ruby/object:Gem::Requirement