sequel-rails 0.9.16 → 0.9.17
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/History.md +5 -0
- data/lib/sequel_rails/storage/postgres.rb +7 -3
- data/lib/sequel_rails/version.rb +1 -1
- data/spec/lib/sequel_rails/storage/postgres_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aee00b4205b44018918a082ef1d74442612c378d
|
4
|
+
data.tar.gz: 7ebcf44da2b0fc2ccb240be34c4284ec396ad225
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80a11646590671849a29510b6ac14a38780d928bfadc9ab1df9fa682af6afd18b0e6f42577fc1c6d0e8d4981d531fbcd1237def54f9b9604cb32cbf8276e965a
|
7
|
+
data.tar.gz: 0a03d30815d946e6af5f0298f1abf074d83b42e230377cf5d7267e6569ffff396031d1095ec432761d6fd0250bc93413829cb68beff8e01e88a620a85cdd152e
|
data/History.md
CHANGED
@@ -22,6 +22,7 @@ module SequelRails
|
|
22
22
|
with_pgpassword do
|
23
23
|
commands = ['dropdb']
|
24
24
|
add_connection_settings commands
|
25
|
+
add_flag commands, '--if-exists'
|
25
26
|
commands << database
|
26
27
|
safe_exec commands
|
27
28
|
end
|
@@ -64,6 +65,9 @@ module SequelRails
|
|
64
65
|
# command. Seems to be only way to ensure *all* test connections
|
65
66
|
# are closed
|
66
67
|
nil
|
68
|
+
rescue Sequel::DatabaseConnectionError
|
69
|
+
# Will raise an error if the database doesn't exist.
|
70
|
+
nil
|
67
71
|
end
|
68
72
|
|
69
73
|
def encoding
|
@@ -104,9 +108,9 @@ module SequelRails
|
|
104
108
|
end
|
105
109
|
|
106
110
|
def add_connection_settings(commands)
|
107
|
-
add_option commands, '--username', username
|
108
|
-
add_option commands, '--host', host
|
109
|
-
add_option commands, '--port', port.to_s
|
111
|
+
add_option commands, '--username', username unless username.blank?
|
112
|
+
add_option commands, '--host', host unless host.blank?
|
113
|
+
add_option commands, '--port', port.to_s unless port.to_s.blank? || port.to_s == "0"
|
110
114
|
end
|
111
115
|
end
|
112
116
|
end
|
data/lib/sequel_rails/version.rb
CHANGED
@@ -69,7 +69,7 @@ describe SequelRails::Storage::Postgres, :postgres do
|
|
69
69
|
describe '#_drop' do
|
70
70
|
it 'uses the dropdb command' do
|
71
71
|
expect(subject).to receive(:`).with(
|
72
|
-
"dropdb --username\\=#{username} --host\\=#{host} --port\\=#{port} #{database}"
|
72
|
+
"dropdb --username\\=#{username} --host\\=#{host} --port\\=#{port} --if-exists #{database}"
|
73
73
|
)
|
74
74
|
subject._drop
|
75
75
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brasten Sager (brasten)
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-06-
|
12
|
+
date: 2017-06-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|