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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 243d63e08d1e0efc90840322ebe46d547a6733829e4cde6f009dcaee457fb141
4
- data.tar.gz: 0c927adb97f3fdfa9e4680d59825b50b2741b11cb8131c1e61b0eca42dec75fb
3
+ metadata.gz: 441940b63b8d897f1ad3b84bf43168d20dcbf62017a604e201538cee0315a7ca
4
+ data.tar.gz: fdd75a75105b0c34efb26096499ec6ffeac7340a170d4f8fcb7188c3f0d4e3db
5
5
  SHA512:
6
- metadata.gz: 0abb15b103100f8205b1ec4c7890d51b9ad8d8c0f55d8d96e1f55b0e85b6d0ade146c382c32e187bfb2c952d02a3fc940ee33b9c6f9beabe598b7773e9cf9fa9
7
- data.tar.gz: 12edf2aad07063edb1d4385bedcc8899d388eefef26499671cdddf2bc37c67bfeec39fc08729e09e19c63c04021f28642276f81354b1729a7e08940b5a47fcc9
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 7.1 Integration below)
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 7.1 Integration
87
+ ## Older Rails Integration
88
88
 
89
- Test Secvault in Rails 7.1 before upgrading to 7.2+:
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.setup_rails_71_integration!
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:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Secvault
4
- VERSION = "2.2.0"
4
+ VERSION = "2.3.0"
5
5
  end
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 7.1 applications
69
- # This provides an easy way to integrate Secvault into Rails 7.1 apps
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.setup_rails_71_integration!
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 setup_rails_71_integration!
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: secvault
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Unnikrishnan KP