simple-sql 0.4.31 → 0.4.32

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
  SHA256:
3
- metadata.gz: f10fbb016a81d94094c3429a8b553b0da428f40d509b96e523eb1ac79982fdbb
4
- data.tar.gz: 1b691b4e59e0c7d34d5912dacf80c58240bb0ce3733e78741f5e932f8f1409c0
3
+ metadata.gz: 98414c53004214c032d2432a3e17f19ea0c32fa81d1e8ab15cbfb843ec48ec6c
4
+ data.tar.gz: 0bc1b9bbbdba63fe6a91d750e23f47fd334779c5e6b501ef1f4d60e0131d5073
5
5
  SHA512:
6
- metadata.gz: 2d33441657dc0cf4565bb313045949ead6d5b1dd22c14058fe10558b48b83a12c6e0dcdac5991c4859c43ab553f9e6e3d4b9dfc9ef1ac5358dbabbd04cc90513
7
- data.tar.gz: 14965623e2f4541e3862b950ce4b6439c2a219ac7be9ffe3b720cc3f73d09a9c5629908e29b85a8860835d7c21ca641b618d4f1aece8f1704391b62a47262933
6
+ metadata.gz: c248241ffaa25a7967b2e65f8f4292d0fc64428d24f3526b8dfa5515936b241f4fdc3e48861583697a9a259002590fdfd9eace692d364d8ec2ca1d5f2475f4fa
7
+ data.tar.gz: b0244677fe2fa04e995a3b7593e341b02018c9d9e197a6783f9c17332fda7821ed770f202ec854f7218ffd6439c6d3200ac0b2a101ed5f03699d3d0f3ee38597
@@ -38,14 +38,13 @@ module Simple::SQL::Config
38
38
  abc = read_database_yml
39
39
  username, password, host, port, database = abc.values_at "username", "password", "host", "port", "database"
40
40
 
41
- # raise username.inspect
42
- username_and_password = [username, password].compact.join(":")
43
- host_and_port = [host, port].compact.join(":")
44
- if username_and_password != ""
45
- "postgres://#{username_and_password}@#{host_and_port}/#{database}"
46
- else
47
- "postgres://#{host_and_port}/#{database}"
48
- end
41
+ URI::Generic.build(
42
+ scheme: "postgres",
43
+ userinfo: [ username, (":" if password), password ].join,
44
+ host: host || "localhost",
45
+ port: port,
46
+ path: "/#{database}"
47
+ ).to_s
49
48
  end
50
49
 
51
50
  def read_database_yml
@@ -1,5 +1,5 @@
1
1
  module Simple
2
2
  module SQL
3
- VERSION = "0.4.31"
3
+ VERSION = "0.4.32"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-sql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.31
4
+ version: 0.4.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - radiospiel
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-01-14 00:00:00.000000000 Z
12
+ date: 2019-02-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pg_array_parser
@@ -266,8 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
266
266
  - !ruby/object:Gem::Version
267
267
  version: '0'
268
268
  requirements: []
269
- rubyforge_project:
270
- rubygems_version: 2.7.7
269
+ rubygems_version: 3.0.2
271
270
  signing_key:
272
271
  specification_version: 4
273
272
  summary: SQL with a simple interface