pg_rls 0.1.4 → 0.1.5
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/Gemfile.lock +4 -1
- data/lib/pg_rls/database/tasks/admin_database.rake +4 -5
- data/lib/pg_rls/middleware/sidekiq/client.rb +3 -6
- data/lib/pg_rls/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 96c51a563fc96608b2c952922f3f38475fe3dcd2a1822ee367a80b50997df72c
|
|
4
|
+
data.tar.gz: 1540d7bdc72fa8a2ea31eeeeadcb22ad06c5efc80b54440edc3a4ecdd6af155c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '082c4cad7586ccf9f1c5aef6047489c52b86d4bd1b1dc3de0c4b2d7afec357d9b2463cdf753987c52657067372f5ac4fe271b874fabd383156519b34bebfca2f'
|
|
7
|
+
data.tar.gz: 9b46030589110529d4a2c6cd92590700cfd16fa139aa0e257431d43de19faf38f7d5e1bb8541c06253ec878dbbe4e9b92969cfcfa89df78bb47d0ba1cb206884
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
pg_rls (0.1.
|
|
4
|
+
pg_rls (0.1.5)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
@@ -131,6 +131,8 @@ GEM
|
|
|
131
131
|
net-smtp (0.4.0)
|
|
132
132
|
net-protocol
|
|
133
133
|
nio4r (2.5.9)
|
|
134
|
+
nokogiri (1.15.4-arm64-darwin)
|
|
135
|
+
racc (~> 1.4)
|
|
134
136
|
nokogiri (1.15.4-x86_64-linux)
|
|
135
137
|
racc (~> 1.4)
|
|
136
138
|
parallel (1.23.0)
|
|
@@ -265,6 +267,7 @@ GEM
|
|
|
265
267
|
zeitwerk (2.6.12)
|
|
266
268
|
|
|
267
269
|
PLATFORMS
|
|
270
|
+
arm64-darwin-22
|
|
268
271
|
x86_64-linux
|
|
269
272
|
|
|
270
273
|
DEPENDENCIES
|
|
@@ -22,14 +22,13 @@ end
|
|
|
22
22
|
namespace :db do
|
|
23
23
|
include PgRls::Schema::UpStatements
|
|
24
24
|
|
|
25
|
-
override_task
|
|
25
|
+
override_task :load_config do
|
|
26
26
|
PgRls.instance_variable_set(:@as_db_admin, true)
|
|
27
|
-
|
|
27
|
+
Rake::Task['db:load_config:original'].invoke
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
override_task
|
|
31
|
-
|
|
32
|
-
Rake::Task['db:abort_if_pending_migrations:original'].invoke
|
|
30
|
+
override_task grant_usage: :load_config do
|
|
31
|
+
create_rls_user
|
|
33
32
|
end
|
|
34
33
|
|
|
35
34
|
namespace :test do
|
|
@@ -12,12 +12,9 @@ module PgRls
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
def load_tenant_attribute!(msg)
|
|
15
|
-
if PgRls.admin_connection?
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
tenant = PgRls::Tenant.fetch!
|
|
19
|
-
msg['pg_rls'] = tenant.id
|
|
20
|
-
end
|
|
15
|
+
return msg['admin'] = true if PgRls.admin_connection?
|
|
16
|
+
|
|
17
|
+
msg['pg_rls'] ||= PgRls::Tenant.fetch&.id
|
|
21
18
|
end
|
|
22
19
|
end
|
|
23
20
|
end
|
data/lib/pg_rls/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pg_rls
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Laloush
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-11-
|
|
11
|
+
date: 2023-11-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: |2
|
|
14
14
|
This gem will help you to integrate PostgreSQL RLS to help you develop a great multitenancy application
|
|
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
86
86
|
- !ruby/object:Gem::Version
|
|
87
87
|
version: '0'
|
|
88
88
|
requirements: []
|
|
89
|
-
rubygems_version: 3.4.
|
|
89
|
+
rubygems_version: 3.4.21
|
|
90
90
|
signing_key:
|
|
91
91
|
specification_version: 4
|
|
92
92
|
summary: Write a short summary, because RubyGems requires one.
|