platform_sh 0.2.0 → 0.2.1

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: e85e959466efdc7947188a49c24bbf8d508aabbb
4
- data.tar.gz: 29a2407e0292ab7c60ea385ec0dd641b0a5823ff
3
+ metadata.gz: 0e71be526233086dc4dec85f9e982c83ba9b53fc
4
+ data.tar.gz: bde54716176c65d76027a9444bbd4aa8df40cee4
5
5
  SHA512:
6
- metadata.gz: 11e4d689feaa4a4bd9c97aa0389ea02af2bf1f4d2d81ddc1d295f686672f5de125fc9be12a6497510273133184734ae0b1e165ba80141f0f893d1ee51ea4947e
7
- data.tar.gz: f31c2b20861179550aba4d9a38d1eecd5b3170f5a62e7c876ac8dfe676031041d48622abe3d51154e690bf21d04612962eddfd12d4060f4c716423520bc53d4a
6
+ metadata.gz: 6ee507001a05ab47ddf7ca083f441cc72d70c297583c3b1b7ebf4a6f522d7b2a1f9d191784fa7b92b8f6237910acf9f46e4471be045ec4b11edb40bca02c30d3
7
+ data.tar.gz: e2d9c4ee007c710af96f9e42f06d642ef74d9f8a1d9c3d0ebcb1078100c58cd3f212a9442ceba19b282f0906da83ba77c8e9cfb0b823b0afcead6065efe65d22
data/lib/platform_sh.rb CHANGED
@@ -64,7 +64,13 @@ class PlatformSH
64
64
  return nil
65
65
  when 1
66
66
  database = databases.first[1][0]
67
- database_url = "#{database['scheme']}://#{database['username']}:#{database['password']}@#{database['host']}:#{database['port']}/#{database['path']}"
67
+ #This is needed to choose between mysql and mysql2 gems, magically.
68
+ if database['scheme'] == "mysql"
69
+ scheme = "mysql2"
70
+ else
71
+ scheme = database['scheme']
72
+ end
73
+ database_url = "#{scheme}://#{}:#{database['password']}@#{database['host']}:#{database['port']}/#{database['path']}"
68
74
  return database_url
69
75
  else
70
76
  $stderr.puts "More than one database, giving up, set configuration by hand"
@@ -1,3 +1,3 @@
1
1
  class PlatformSH
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: platform_sh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ori Pekelman