sequel-rails 0.9.16 → 0.9.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 238d5d10e4e69338fa33a2b57d788dab80da794e
4
- data.tar.gz: 86b74a729100056ce1ab178c6fede62f7cab5678
3
+ metadata.gz: aee00b4205b44018918a082ef1d74442612c378d
4
+ data.tar.gz: 7ebcf44da2b0fc2ccb240be34c4284ec396ad225
5
5
  SHA512:
6
- metadata.gz: 9fa7c3bda75b73d66eaceb8a09386f743e5e2defb574a581fb8e6f6d5eab16bb22c90b98c6585a5bce8cde4dcdefd3e5f9027eb04e4cf3c98369b224e4f51af7
7
- data.tar.gz: 516360da6da064d2103dd66e3af54991ced235bcd7e6c31c574f2488943adbe6bbd75d68584f4d412b7657e72f876cd366a49ddbd878306725ed50925acdde8d
6
+ metadata.gz: 80a11646590671849a29510b6ac14a38780d928bfadc9ab1df9fa682af6afd18b0e6f42577fc1c6d0e8d4981d531fbcd1237def54f9b9604cb32cbf8276e965a
7
+ data.tar.gz: 0a03d30815d946e6af5f0298f1abf074d83b42e230377cf5d7267e6569ffff396031d1095ec432761d6fd0250bc93413829cb68beff8e01e88a620a85cdd152e
data/History.md CHANGED
@@ -1,3 +1,8 @@
1
+ 0.9.17 (2017-06-26)
2
+ ===================
3
+
4
+ * Same as 0.9.16 but with the actual changes applied...
5
+
1
6
  0.9.16 (2017-06-22)
2
7
  ===================
3
8
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module SequelRails
2
- VERSION = '0.9.16'
2
+ VERSION = '0.9.17'
3
3
  end
@@ -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.16
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-22 00:00:00.000000000 Z
12
+ date: 2017-06-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel