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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d74986e248d965c5c327a305d00f6fa4e78c3cfa79c0ff3e24d1a51513b2b5ae
4
- data.tar.gz: b92ca91903f6ed4f001b96af806ab31f241e76585784a5a4c931f1d40a592d7b
3
+ metadata.gz: 854050f1d4157bcfb7cd033c15d751ddfa22ee702f77bd768752e96048f6ae26
4
+ data.tar.gz: 7e549366af77fc5d2621bbbcccc87c66e927d458892ffc71fdd8950f25b9b92b
5
5
  SHA512:
6
- metadata.gz: ef1aa0826e0024caec247ae91af53504684a3e21301db445fc0827358793ff67dd9b1457a9c7b65aaf101daf6e082f5136d054507cb2aa367034d732ff5c2cfd
7
- data.tar.gz: acf4be931199bf84760259480cc49b85770e48595fe59cb347fa8041d2a6a9a5bc3eaa8aca1c2aabf7c2a88e67fb948ae56b371958ad2551ec0b886325422ca5
6
+ metadata.gz: 0d1ced3f9f5f4d2817a4ebb654e90ef0aa5c48dea648156d0e72843134a2ab2fb032e4fd85ba90a7f8a2987584c3eb9ce1710b0f97c7b16c2989c297300f0bb5
7
+ data.tar.gz: 84f636b9899db018c4f5af342a40ef18cbf3c77e705f0d7d7ad8635f8ac8c96c2c2bdb7073435581d5e253457c5aea8ec327054db37113e21694052e148faa86
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## v1.1.6
2
+
3
+ - Added support for Rails 8.1
4
+
5
+ ## v1.1.5
6
+
7
+ - Performance improvement
8
+
1
9
  ## v1.1.4
2
10
 
3
11
  - Relaxed dependency versions
data/README.md CHANGED
@@ -1,37 +1,33 @@
1
1
  # Kreds: Streamlined Rails Credentials Access
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/kreds.svg)](http://badge.fury.io/rb/kreds)
4
- [![Github Actions badge](https://github.com/brownboxdev/kreds/actions/workflows/ci.yml/badge.svg)](https://github.com/brownboxdev/kreds/actions/workflows/ci.yml)
4
+ [![Downloads](https://img.shields.io/gem/dt/kreds.svg)](https://rubygems.org/gems/kreds)
5
+ [![Github Actions badge](https://github.com/enjaku4/kreds/actions/workflows/ci.yml/badge.svg)](https://github.com/enjaku4/kreds/actions/workflows/ci.yml)
6
+ [![License](https://img.shields.io/github/license/enjaku4/kreds.svg)](LICENSE)
5
7
 
6
- Kreds is a simpler, shorter, and safer way to access Rails credentials, with a few extra features built in. Rails credentials are a convenient way to store secrets, but retrieving them could be more intuitive — that's where Kreds comes 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
- **Key Features:**
10
+ **Example of Usage:**
9
11
 
10
- - Simplified credential access with clear error messages
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
- # Instead of this (long, silent failures if value is missing):
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
- # You can write this (shorter, human-readable errors):
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
- Kreds.fetch!(:captcha, :site_key)
34
- # => Credentials key not found: [:captcha] (Kreds::UnknownCredentialsError)
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
- And then execute:
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/brownboxdev/kreds/discussions) for:
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/brownboxdev/kreds/issues) with:
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/brownboxdev/kreds/discussions))
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/brownboxdev/kreds/blob/master/CONTRIBUTING.md)
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/brownboxdev/kreds/blob/master/LICENSE.txt).
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/brownboxdev/kreds/blob/master/CODE_OF_CONDUCT.md).
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.homepage = "https://github.com/brownboxdev/kreds"
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.1"
27
+ spec.add_dependency "rails", ">= 7.1", "< 8.2"
24
28
  end
data/lib/kreds/fetch.rb CHANGED
@@ -7,7 +7,7 @@ module Kreds
7
7
 
8
8
  path = []
9
9
 
10
- symbolized_keys.reduce(Kreds.show) do |hash, key|
10
+ symbolized_keys.reduce(Rails.application.credentials) do |hash, key|
11
11
  path << key
12
12
  fetch_key(hash, key, path, symbolized_keys)
13
13
  end
data/lib/kreds/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kreds
2
- VERSION = "1.1.4".freeze
2
+ VERSION = "1.1.6".freeze
3
3
  end
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
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.1'
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.1'
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/brownboxdev/kreds
64
+ homepage: https://github.com/enjaku4/kreds
60
65
  licenses:
61
66
  - MIT
62
67
  metadata:
63
- homepage_uri: https://github.com/brownboxdev/kreds
64
- source_code_uri: https://github.com/brownboxdev/kreds
65
- changelog_uri: https://github.com/brownboxdev/kreds/blob/master/CHANGELOG.md
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.6.7
91
+ rubygems_version: 3.7.2
85
92
  specification_version: 4
86
93
  summary: The missing shorthand for Rails credentials
87
94
  test_files: []