kreds 1.1.5 → 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: 575188b32a50ad95468044373828227f651932c8b74b46419f6a3ba327304fd2
4
- data.tar.gz: e359ac0dd63c5407686e58ea0f20cf8497f154de95d5c4879520bae62afc3ee7
3
+ metadata.gz: 854050f1d4157bcfb7cd033c15d751ddfa22ee702f77bd768752e96048f6ae26
4
+ data.tar.gz: 7e549366af77fc5d2621bbbcccc87c66e927d458892ffc71fdd8950f25b9b92b
5
5
  SHA512:
6
- metadata.gz: 5e46fe736f2b611617cd0b51e94012f82aa84012d1f6d0c008bbd60f58a6b7858852531dcae12ead92a779317595ad63e3962d83b8e079f25546509b73e6cceb
7
- data.tar.gz: 65522943c2ca399be7fe852065aabb9bfb1d50b764fd704bfbd87a99d83a92ec3d83884b6de087cf71f09f58d4e62134f0772d7c306dc69badae1fef248cc889
6
+ metadata.gz: 0d1ced3f9f5f4d2817a4ebb654e90ef0aa5c48dea648156d0e72843134a2ab2fb032e4fd85ba90a7f8a2987584c3eb9ce1710b0f97c7b16c2989c297300f0bb5
7
+ data.tar.gz: 84f636b9899db018c4f5af342a40ef18cbf3c77e705f0d7d7ad8635f8ac8c96c2c2bdb7073435581d5e253457c5aea8ec327054db37113e21694052e148faa86
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v1.1.6
2
+
3
+ - Added support for Rails 8.1
4
+
1
5
  ## v1.1.5
2
6
 
3
7
  - Performance improvement
data/README.md CHANGED
@@ -5,35 +5,29 @@
5
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
6
  [![License](https://img.shields.io/github/license/enjaku4/kreds.svg)](LICENSE)
7
7
 
8
- 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.
9
9
 
10
- **Key Features:**
10
+ **Example of Usage:**
11
11
 
12
- - Simplified credential access with clear error messages
13
- - Environment variable fallback support
14
- - Environment-scoped credentials access
15
- - Blank value detection and prevention
16
-
17
- **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:
18
13
 
19
14
  ```ruby
20
- # Instead of this (long, silent failures if value is missing):
15
+ # Rails credentials (silent failure, unclear errors):
21
16
  Rails.application.credentials[:recaptcha][:site_key]
22
17
  # => nil
23
18
 
24
- # Or this (long, unclear errors):
25
19
  Rails.application.credentials[:captcha][:site_key]
26
20
  # => undefined method `[]' for nil:NilClass (NoMethodError)
27
21
 
28
- # Or even this (longer, still unclear errors):
29
22
  Rails.application.credentials.fetch(:recaptcha).fetch(:key)
30
23
  # => key not found: :key (KeyError)
31
24
 
32
- # You can write this (shorter, human-readable errors):
25
+ # Kreds (clear, human-readable errors):
33
26
  Kreds.fetch!(:recaptcha, :site_key)
34
27
  # => Blank value in credentials: [:recaptcha][:site_key] (Kreds::BlankCredentialsError)
35
- Kreds.fetch!(:captcha, :site_key)
36
- # => Credentials key not found: [:captcha] (Kreds::UnknownCredentialsError)
28
+
29
+ Kreds.fetch!(:recaptcha, :key)
30
+ # => Credentials key not found: [:recaptcha][:key] (Kreds::UnknownCredentialsError)
37
31
  ```
38
32
 
39
33
  ## Table of Contents
@@ -58,7 +52,7 @@ Add Kreds to your Gemfile:
58
52
  gem "kreds"
59
53
  ```
60
54
 
61
- And then execute:
55
+ Install the gem:
62
56
 
63
57
  ```bash
64
58
  bundle install
data/kreds.gemspec CHANGED
@@ -24,5 +24,5 @@ Gem::Specification.new do |spec|
24
24
  spec.require_paths = ["lib"]
25
25
 
26
26
  spec.add_dependency "dry-types", "~> 1.7"
27
- spec.add_dependency "rails", ">= 7.1", "< 8.1"
27
+ spec.add_dependency "rails", ">= 7.1", "< 8.2"
28
28
  end
data/lib/kreds/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kreds
2
- VERSION = "1.1.5".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.5
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,7 @@ dependencies:
42
42
  version: '7.1'
43
43
  - - "<"
44
44
  - !ruby/object:Gem::Version
45
- version: '8.1'
45
+ version: '8.2'
46
46
  description: Kreds provides a simpler, shorter, and safer way to access Rails credentials
47
47
  with clear error messages, environment variable fallback support, and blank value
48
48
  detection