activerecord-cipherstash-pg-adapter 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/active_record/connection_adapters/6.1/postgres_cipherstash_adapter.rb +1 -1
- data/lib/active_record/connection_adapters/7.0/postgres_cipherstash_adapter.rb +1 -1
- data/lib/active_record/connection_adapters/postgres_cipherstash_adapter.rb +1 -1
- data/lib/activerecord-cipherstash-pg-adapter.rb +21 -4
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f49b439e9bfe2874fc67bf0f4064ba66a3659a9e67b207e156ddb2b3cf8c5bb2
|
4
|
+
data.tar.gz: 02347f9e3efe1f15da8dd6c11e8745c424d7dd9f65b493640ea57f41370dd7b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 703fb309bb186e2350856b0f5fabae1e373685e13552afb53cfb04fb2630866f271cbbf2efebe305e9a06bc5f62dbc3808379d2037286e4af42a9052bae8185a
|
7
|
+
data.tar.gz: 5885728f591239c6f6893dbd9f2b19bb75976bd01237fedb24a9fcf42804ce78315b5da1831af0cf35961ea6210c072fc28c520bfbc703157cd163dc369a9c60
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.6.0] - 2023-04-20
|
4
|
+
|
5
|
+
### Changed
|
6
|
+
|
7
|
+
- Updated the adapter name constant to be the same as the ActiveRecord PostgreSQL adapter.
|
8
|
+
|
9
|
+
### Fixed
|
10
|
+
|
11
|
+
- Logic around Rails credentials taking precedence over local env vars.
|
12
|
+
|
3
13
|
## [0.5.0] - 2023-04-19
|
4
14
|
|
5
15
|
### Added
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
3
|
# Why the funky filename
|
4
|
-
# (lib/active_record/connection_adapters/
|
4
|
+
# (lib/active_record/connection_adapters/postgres_cipherstash_adapter.rb)
|
5
5
|
# that doesn't match the gem structure? It's to hook into Rails.
|
6
6
|
#
|
7
7
|
# See this chunk from:
|
@@ -15,10 +15,27 @@ module ActiveRecord
|
|
15
15
|
initializer "postgres_cipherstash_adapter.configure" do
|
16
16
|
if defined?(Rails.application.credentials)
|
17
17
|
cs_credentials = Rails.application.credentials.try(:cipherstash)
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
|
19
|
+
client_id = cs_credentials&.fetch(:client_id, nil)
|
20
|
+
client_key = cs_credentials&.fetch(:client_key, nil)
|
21
|
+
workspace_id = cs_credentials&.fetch(:workspace_id, nil)
|
22
|
+
client_access_key = cs_credentials&.fetch(:client_access_key, nil)
|
23
|
+
|
24
|
+
unless client_id.nil?
|
25
|
+
ENV["CS_CLIENT_ID"] = client_id
|
26
|
+
end
|
27
|
+
|
28
|
+
unless client_key.nil?
|
29
|
+
ENV["CS_CLIENT_KEY"] = client_key
|
30
|
+
end
|
31
|
+
|
32
|
+
unless workspace_id.nil?
|
33
|
+
ENV["CS_WORKSPACE_ID"] = workspace_id
|
34
|
+
end
|
35
|
+
|
36
|
+
unless client_access_key.nil?
|
37
|
+
ENV["CS_CLIENT_ACCESS_KEY"] = client_access_key
|
38
|
+
end
|
22
39
|
end
|
23
40
|
end
|
24
41
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-cipherstash-pg-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robin Howard
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|