secvault 2.2.0 → 2.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
- data/CHANGELOG.md +22 -0
- data/README.md +4 -4
- data/lib/secvault/version.rb +1 -1
- data/lib/secvault.rb +8 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 441940b63b8d897f1ad3b84bf43168d20dcbf62017a604e201538cee0315a7ca
|
4
|
+
data.tar.gz: fdd75a75105b0c34efb26096499ec6ffeac7340a170d4f8fcb7188c3f0d4e3db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14fc56f53ff8729262cb5fa07bf2de96e908d7c4f6b00a1134ea2c86b3a433b220a24b3399ad43e97846cadd0bc79546780a4e0fce5318448497b62d5fba0714
|
7
|
+
data.tar.gz: 3e4c8387fa38263e3bf99436211b3eaadf6b3d7d2aa5ec483cc6b19fc9dcbcb9bd402b9099e800fcc8c6fb9fc09b8281875415fdd90570fbee6625d324706032
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,27 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [2.3.0] - 2025-09-22
|
4
|
+
|
5
|
+
### Changed
|
6
|
+
|
7
|
+
- **Better method naming**: Renamed `setup_rails_71_integration!` to `setup_backward_compatibility_with_older_rails!`
|
8
|
+
- **More generic approach**: New method name works for any older Rails version, not just 7.1
|
9
|
+
- **Updated documentation**: README now uses "Older Rails Integration" instead of "Rails 7.1 Integration"
|
10
|
+
- **Clearer version support**: Documentation now shows "Rails 7.1 and older" for better clarity
|
11
|
+
|
12
|
+
### Backward Compatibility
|
13
|
+
|
14
|
+
- ✅ **Old method name still works**: `setup_rails_71_integration!` is aliased to the new method
|
15
|
+
- ✅ **No breaking changes**: All existing code continues to work
|
16
|
+
- ✅ **Updated test apps**: Rails 7.1 test app uses the new, cleaner method name
|
17
|
+
|
18
|
+
### Benefits
|
19
|
+
|
20
|
+
- **Future-proof naming**: Works for Rails 7.1, 7.0, 6.x, or any version with native secrets
|
21
|
+
- **Clearer intent**: Method name clearly indicates it's for backward compatibility
|
22
|
+
- **Better documentation**: More generic approach in README and code comments
|
23
|
+
- **Maintained compatibility**: Existing users don't need to change anything
|
24
|
+
|
3
25
|
## [2.2.0] - 2025-09-22
|
4
26
|
|
5
27
|
### Added
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Restores the classic Rails `secrets.yml` functionality that was removed in Rails 7.2. Uses simple, plain YAML files for environment-specific secrets management.
|
4
4
|
|
5
5
|
**Rails Version Support:**
|
6
|
-
- **Rails 7.1**: Manual setup (see Rails
|
6
|
+
- **Rails 7.1 and older**: Manual setup (see Older Rails Integration below)
|
7
7
|
- **Rails 7.2+**: Automatic setup
|
8
8
|
- **Rails 8.0+**: Full compatibility
|
9
9
|
|
@@ -84,13 +84,13 @@ all_secrets = Rails::Secrets.parse([
|
|
84
84
|
], env: Rails.env)
|
85
85
|
```
|
86
86
|
|
87
|
-
## Rails
|
87
|
+
## Older Rails Integration
|
88
88
|
|
89
|
-
|
89
|
+
For Rails versions with existing secrets functionality (like Rails 7.1), use Secvault to test before upgrading:
|
90
90
|
|
91
91
|
```ruby
|
92
92
|
# config/initializers/secvault.rb
|
93
|
-
Secvault.
|
93
|
+
Secvault.setup_backward_compatibility_with_older_rails!
|
94
94
|
```
|
95
95
|
|
96
96
|
This replaces Rails.application.secrets with Secvault functionality. Your existing Rails 7.1 code works unchanged:
|
data/lib/secvault/version.rb
CHANGED
data/lib/secvault.rb
CHANGED
@@ -65,18 +65,18 @@ module Secvault
|
|
65
65
|
require "secvault/rails_secrets"
|
66
66
|
end
|
67
67
|
|
68
|
-
# Helper method to set up Secvault for Rails
|
69
|
-
# This provides an easy way to integrate Secvault into Rails
|
70
|
-
# that still have native Rails::Secrets functionality.
|
68
|
+
# Helper method to set up Secvault for older Rails versions
|
69
|
+
# This provides an easy way to integrate Secvault into older Rails apps
|
70
|
+
# that still have native Rails::Secrets functionality (like Rails 7.1).
|
71
71
|
#
|
72
72
|
# Usage in an initializer:
|
73
|
-
# Secvault.
|
73
|
+
# Secvault.setup_backward_compatibility_with_older_rails!
|
74
74
|
#
|
75
75
|
# This will:
|
76
76
|
# 1. Override native Rails::Secrets with Secvault implementation
|
77
77
|
# 2. Replace Rails.application.secrets with Secvault-powered functionality
|
78
78
|
# 3. Load secrets from config/secrets.yml automatically
|
79
|
-
def
|
79
|
+
def setup_backward_compatibility_with_older_rails!
|
80
80
|
# Override native Rails::Secrets
|
81
81
|
if defined?(Rails::Secrets)
|
82
82
|
Rails.send(:remove_const, :Secrets)
|
@@ -109,6 +109,9 @@ module Secvault
|
|
109
109
|
end
|
110
110
|
end
|
111
111
|
end
|
112
|
+
|
113
|
+
# Backward compatibility alias
|
114
|
+
alias_method :setup_rails_71_integration!, :setup_backward_compatibility_with_older_rails!
|
112
115
|
end
|
113
116
|
|
114
117
|
Secvault.install! if defined?(Rails)
|