pg_conn 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pg_conn/role_methods.rb +4 -5
- data/lib/pg_conn/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: 589bec28c740660ad6dd0f09101eda54af26aad2f03a43a27ed7ffa6e422fdf3
|
4
|
+
data.tar.gz: 17ccef8e37a0699331e7c518d1a856652750719dbd2c1a3d04af5173f0d625f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91c48594e61dc7caef44a22de75165f5815e69b4dc2e1b181b024291b5bb7cd3ec9eee97aced702a459424afcc093406af9e6d6cb631b128e8117f0084249ac4
|
7
|
+
data.tar.gz: d485db7de8dd27c0eb81db8c1d6940f02ba822a88514e6d13999747c55e902121306e1a0c04105be8881dd0f84819f73aa46101432004b22745e2e9848b0d3d6
|
data/lib/pg_conn/role_methods.rb
CHANGED
@@ -44,11 +44,10 @@ module PgConn
|
|
44
44
|
# Create a new role
|
45
45
|
def create(rolename, superuser: false, create_database: false, can_login: false, create_role: false)
|
46
46
|
user_decl = "create role \"#{rolename}\""
|
47
|
-
superuser_decl = superuser ? "
|
48
|
-
create_database_decl = create_database ? "
|
49
|
-
can_login_decl = can_login ? "
|
50
|
-
create_role_decl = create_role ? "
|
51
|
-
|
47
|
+
superuser_decl = superuser ? "superuser" : "nosuperuser"
|
48
|
+
create_database_decl = create_database ? "createdb" : "nocreatedb"
|
49
|
+
can_login_decl = can_login ? "login" : "nologin"
|
50
|
+
create_role_decl = create_role ? "createrole" : "nocreaterole"
|
52
51
|
stmt = [user_decl, superuser_decl, can_login_decl, create_role_decl].compact.join(" ")
|
53
52
|
conn.exec stmt
|
54
53
|
end
|
data/lib/pg_conn/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_conn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Claus Rasmussen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|