kreds 1.1.4 → 1.1.6
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 +8 -0
- data/README.md +18 -22
- data/kreds.gemspec +6 -2
- data/lib/kreds/fetch.rb +1 -1
- data/lib/kreds/version.rb +1 -1
- metadata +15 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 854050f1d4157bcfb7cd033c15d751ddfa22ee702f77bd768752e96048f6ae26
|
|
4
|
+
data.tar.gz: 7e549366af77fc5d2621bbbcccc87c66e927d458892ffc71fdd8950f25b9b92b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0d1ced3f9f5f4d2817a4ebb654e90ef0aa5c48dea648156d0e72843134a2ab2fb032e4fd85ba90a7f8a2987584c3eb9ce1710b0f97c7b16c2989c297300f0bb5
|
|
7
|
+
data.tar.gz: 84f636b9899db018c4f5af342a40ef18cbf3c77e705f0d7d7ad8635f8ac8c96c2c2bdb7073435581d5e253457c5aea8ec327054db37113e21694052e148faa86
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -1,37 +1,33 @@
|
|
|
1
1
|
# Kreds: Streamlined Rails Credentials Access
|
|
2
2
|
|
|
3
3
|
[](http://badge.fury.io/rb/kreds)
|
|
4
|
-
[](https://rubygems.org/gems/kreds)
|
|
5
|
+
[](https://github.com/enjaku4/kreds/actions/workflows/ci.yml)
|
|
6
|
+
[](LICENSE)
|
|
5
7
|
|
|
6
|
-
Kreds is a simpler, shorter, and safer way to access Rails credentials, with a few extra features built in.
|
|
8
|
+
Rails credentials are a convenient way to store secrets, but retrieving them could be more intuitive - that's where Kreds comes in. Kreds is a simpler, shorter, and safer way to access Rails credentials, with a few extra features built in. It provides environment variable fallback support and blank value detection with clear human-readable error messages.
|
|
7
9
|
|
|
8
|
-
**
|
|
10
|
+
**Example of Usage:**
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
- Environment variable fallback support
|
|
12
|
-
- Environment-scoped credentials access
|
|
13
|
-
- Blank value detection and prevention
|
|
14
|
-
|
|
15
|
-
**Before and After:**
|
|
12
|
+
Say you want to fetch `[:recaptcha][:site_key]` from your Rails credentials but forgot to set a value or made a typo in the key name:
|
|
16
13
|
|
|
17
14
|
```ruby
|
|
18
|
-
#
|
|
15
|
+
# Rails credentials (silent failure, unclear errors):
|
|
19
16
|
Rails.application.credentials[:recaptcha][:site_key]
|
|
20
17
|
# => nil
|
|
21
18
|
|
|
22
|
-
# Or this (long, unclear errors):
|
|
23
19
|
Rails.application.credentials[:captcha][:site_key]
|
|
24
20
|
# => undefined method `[]' for nil:NilClass (NoMethodError)
|
|
25
21
|
|
|
26
|
-
# Or even this (longer, still unclear errors):
|
|
27
22
|
Rails.application.credentials.fetch(:recaptcha).fetch(:key)
|
|
28
23
|
# => key not found: :key (KeyError)
|
|
29
24
|
|
|
30
|
-
#
|
|
25
|
+
# Kreds (clear, human-readable errors):
|
|
31
26
|
Kreds.fetch!(:recaptcha, :site_key)
|
|
32
27
|
# => Blank value in credentials: [:recaptcha][:site_key] (Kreds::BlankCredentialsError)
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
|
|
29
|
+
Kreds.fetch!(:recaptcha, :key)
|
|
30
|
+
# => Credentials key not found: [:recaptcha][:key] (Kreds::UnknownCredentialsError)
|
|
35
31
|
```
|
|
36
32
|
|
|
37
33
|
## Table of Contents
|
|
@@ -56,7 +52,7 @@ Add Kreds to your Gemfile:
|
|
|
56
52
|
gem "kreds"
|
|
57
53
|
```
|
|
58
54
|
|
|
59
|
-
|
|
55
|
+
Install the gem:
|
|
60
56
|
|
|
61
57
|
```bash
|
|
62
58
|
bundle install
|
|
@@ -149,13 +145,13 @@ Kreds.show
|
|
|
149
145
|
## Getting Help and Contributing
|
|
150
146
|
|
|
151
147
|
### Getting Help
|
|
152
|
-
Have a question or need assistance? Open a discussion in our [discussions section](https://github.com/
|
|
148
|
+
Have a question or need assistance? Open a discussion in our [discussions section](https://github.com/enjaku4/kreds/discussions) for:
|
|
153
149
|
- Usage questions
|
|
154
150
|
- Implementation guidance
|
|
155
151
|
- Feature suggestions
|
|
156
152
|
|
|
157
153
|
### Reporting Issues
|
|
158
|
-
Found a bug? Please [create an issue](https://github.com/
|
|
154
|
+
Found a bug? Please [create an issue](https://github.com/enjaku4/kreds/issues) with:
|
|
159
155
|
- A clear description of the problem
|
|
160
156
|
- Steps to reproduce the issue
|
|
161
157
|
- Your environment details (Rails version, Ruby version, etc.)
|
|
@@ -164,14 +160,14 @@ Found a bug? Please [create an issue](https://github.com/brownboxdev/kreds/issue
|
|
|
164
160
|
Ready to contribute? You can:
|
|
165
161
|
- Fix bugs by submitting pull requests
|
|
166
162
|
- Improve documentation
|
|
167
|
-
- Add new features (please discuss first in our [discussions section](https://github.com/
|
|
163
|
+
- Add new features (please discuss first in our [discussions section](https://github.com/enjaku4/kreds/discussions))
|
|
168
164
|
|
|
169
|
-
Before contributing, please read the [contributing guidelines](https://github.com/
|
|
165
|
+
Before contributing, please read the [contributing guidelines](https://github.com/enjaku4/kreds/blob/master/CONTRIBUTING.md)
|
|
170
166
|
|
|
171
167
|
## License
|
|
172
168
|
|
|
173
|
-
The gem is available as open source under the terms of the [MIT License](https://github.com/
|
|
169
|
+
The gem is available as open source under the terms of the [MIT License](https://github.com/enjaku4/kreds/blob/master/LICENSE.txt).
|
|
174
170
|
|
|
175
171
|
## Code of Conduct
|
|
176
172
|
|
|
177
|
-
Everyone interacting in the Kreds project is expected to follow the [code of conduct](https://github.com/
|
|
173
|
+
Everyone interacting in the Kreds project is expected to follow the [code of conduct](https://github.com/enjaku4/kreds/blob/master/CODE_OF_CONDUCT.md).
|
data/kreds.gemspec
CHANGED
|
@@ -4,12 +4,16 @@ Gem::Specification.new do |spec|
|
|
|
4
4
|
spec.name = "kreds"
|
|
5
5
|
spec.version = Kreds::VERSION
|
|
6
6
|
spec.authors = ["enjaku4"]
|
|
7
|
-
spec.
|
|
7
|
+
spec.email = ["enjaku4@icloud.com"]
|
|
8
|
+
spec.homepage = "https://github.com/enjaku4/kreds"
|
|
8
9
|
spec.metadata["homepage_uri"] = spec.homepage
|
|
9
10
|
spec.metadata["source_code_uri"] = spec.homepage
|
|
10
11
|
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/CHANGELOG.md"
|
|
12
|
+
spec.metadata["bug_tracker_uri"] = "#{spec.homepage}/issues"
|
|
13
|
+
spec.metadata["documentation_uri"] = "#{spec.homepage}/blob/master/README.md"
|
|
11
14
|
spec.metadata["rubygems_mfa_required"] = "true"
|
|
12
15
|
spec.summary = "The missing shorthand for Rails credentials"
|
|
16
|
+
spec.description = "Kreds provides a simpler, shorter, and safer way to access Rails credentials with clear error messages, environment variable fallback support, and blank value detection"
|
|
13
17
|
spec.license = "MIT"
|
|
14
18
|
spec.required_ruby_version = ">= 3.2", "< 3.5"
|
|
15
19
|
|
|
@@ -20,5 +24,5 @@ Gem::Specification.new do |spec|
|
|
|
20
24
|
spec.require_paths = ["lib"]
|
|
21
25
|
|
|
22
26
|
spec.add_dependency "dry-types", "~> 1.7"
|
|
23
|
-
spec.add_dependency "rails", ">= 7.1", "< 8.
|
|
27
|
+
spec.add_dependency "rails", ">= 7.1", "< 8.2"
|
|
24
28
|
end
|
data/lib/kreds/fetch.rb
CHANGED
data/lib/kreds/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kreds
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- enjaku4
|
|
@@ -32,7 +32,7 @@ dependencies:
|
|
|
32
32
|
version: '7.1'
|
|
33
33
|
- - "<"
|
|
34
34
|
- !ruby/object:Gem::Version
|
|
35
|
-
version: '8.
|
|
35
|
+
version: '8.2'
|
|
36
36
|
type: :runtime
|
|
37
37
|
prerelease: false
|
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -42,7 +42,12 @@ dependencies:
|
|
|
42
42
|
version: '7.1'
|
|
43
43
|
- - "<"
|
|
44
44
|
- !ruby/object:Gem::Version
|
|
45
|
-
version: '8.
|
|
45
|
+
version: '8.2'
|
|
46
|
+
description: Kreds provides a simpler, shorter, and safer way to access Rails credentials
|
|
47
|
+
with clear error messages, environment variable fallback support, and blank value
|
|
48
|
+
detection
|
|
49
|
+
email:
|
|
50
|
+
- enjaku4@icloud.com
|
|
46
51
|
executables: []
|
|
47
52
|
extensions: []
|
|
48
53
|
extra_rdoc_files: []
|
|
@@ -56,13 +61,15 @@ files:
|
|
|
56
61
|
- lib/kreds/inputs.rb
|
|
57
62
|
- lib/kreds/show.rb
|
|
58
63
|
- lib/kreds/version.rb
|
|
59
|
-
homepage: https://github.com/
|
|
64
|
+
homepage: https://github.com/enjaku4/kreds
|
|
60
65
|
licenses:
|
|
61
66
|
- MIT
|
|
62
67
|
metadata:
|
|
63
|
-
homepage_uri: https://github.com/
|
|
64
|
-
source_code_uri: https://github.com/
|
|
65
|
-
changelog_uri: https://github.com/
|
|
68
|
+
homepage_uri: https://github.com/enjaku4/kreds
|
|
69
|
+
source_code_uri: https://github.com/enjaku4/kreds
|
|
70
|
+
changelog_uri: https://github.com/enjaku4/kreds/blob/master/CHANGELOG.md
|
|
71
|
+
bug_tracker_uri: https://github.com/enjaku4/kreds/issues
|
|
72
|
+
documentation_uri: https://github.com/enjaku4/kreds/blob/master/README.md
|
|
66
73
|
rubygems_mfa_required: 'true'
|
|
67
74
|
rdoc_options: []
|
|
68
75
|
require_paths:
|
|
@@ -81,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
81
88
|
- !ruby/object:Gem::Version
|
|
82
89
|
version: '0'
|
|
83
90
|
requirements: []
|
|
84
|
-
rubygems_version: 3.
|
|
91
|
+
rubygems_version: 3.7.2
|
|
85
92
|
specification_version: 4
|
|
86
93
|
summary: The missing shorthand for Rails credentials
|
|
87
94
|
test_files: []
|