sqldef 0.2.1 → 0.3.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 +5 -0
- data/lib/sqldef/version.rb +1 -1
- data/lib/sqldef.rb +3 -12
- 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: cfe9780ec8742c8a847fb663d777402691f498ae9e9350e1320d07988baaee4b
|
4
|
+
data.tar.gz: '0058fc62cf4890e10c654e0aba80917ed3b3c690751954da7b3a9164ee2930e5'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08366e2312fdb2bbf11f76b3531f7cfc6277c14cfe47aa684627593dcdba568a4bfcb622966f4a5531b1c7350d181c964f4f549d1ddcf5e9bec5fb8afb0bbe89'
|
7
|
+
data.tar.gz: acf6dc9b174b389913ed8ec2ed2af7b8b5ed8ba2f184a08c6ce432967147f53f81bcd2d3e2cfdbdd270e07360f4ff7b85946bfbf5235b26502790f2a349e88f3
|
data/CHANGELOG.md
CHANGED
data/lib/sqldef/version.rb
CHANGED
data/lib/sqldef.rb
CHANGED
@@ -24,11 +24,6 @@ module Sqldef
|
|
24
24
|
]
|
25
25
|
private_constant :COMMANDS
|
26
26
|
|
27
|
-
ENVS = {
|
28
|
-
'psqldef' => { 'PGSSLMODE' => 'disable' }, # TODO: support updating this
|
29
|
-
}
|
30
|
-
private_constant :ENVS
|
31
|
-
|
32
27
|
@bin = Dir.pwd
|
33
28
|
|
34
29
|
class << self
|
@@ -40,7 +35,7 @@ module Sqldef
|
|
40
35
|
sqldef = download(command)
|
41
36
|
schema = IO.popen(
|
42
37
|
[
|
43
|
-
|
38
|
+
sqldef,
|
44
39
|
"--user=#{user}", *(["--password=#{password}"] if password),
|
45
40
|
"--host=#{host}", *(["--port=#{port}"] if port),
|
46
41
|
'--export', database,
|
@@ -56,7 +51,7 @@ module Sqldef
|
|
56
51
|
def dry_run(command:, path:, host:, port: nil, user:, password: nil, database:)
|
57
52
|
sqldef = download(command)
|
58
53
|
execute(
|
59
|
-
|
54
|
+
sqldef,
|
60
55
|
"--user=#{user}", *(["--password=#{password}"] if password),
|
61
56
|
"--host=#{host}", *(["--port=#{port}"] if port),
|
62
57
|
'--dry-run', database,
|
@@ -69,7 +64,7 @@ module Sqldef
|
|
69
64
|
def apply(command:, path:, host:, port: nil, user:, password: nil, database:)
|
70
65
|
sqldef = download(command)
|
71
66
|
execute(
|
72
|
-
|
67
|
+
sqldef,
|
73
68
|
"--user=#{user}", *(["--password=#{password}"] if password),
|
74
69
|
"--host=#{host}", *(["--port=#{port}"] if port),
|
75
70
|
database,
|
@@ -109,10 +104,6 @@ module Sqldef
|
|
109
104
|
end
|
110
105
|
end
|
111
106
|
|
112
|
-
def env(command)
|
113
|
-
ENVS.fetch(command.to_s, {})
|
114
|
-
end
|
115
|
-
|
116
107
|
def build_url(command)
|
117
108
|
unless COMMANDS.include?(command)
|
118
109
|
raise "Unexpected sqldef command: #{command}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sqldef
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Kokubun
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Idempotent MySQL/PostgreSQL schema management by SQL
|
14
14
|
email:
|
@@ -50,7 +50,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
50
50
|
- !ruby/object:Gem::Version
|
51
51
|
version: '0'
|
52
52
|
requirements: []
|
53
|
-
rubygems_version: 3.
|
53
|
+
rubygems_version: 3.3.7
|
54
54
|
signing_key:
|
55
55
|
specification_version: 4
|
56
56
|
summary: Idempotent MySQL/PostgreSQL schema management by SQL
|