bezel-app 0.1.2 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2369d476f92ff5ff9966a5046a9cc820fdf84cf6
4
- data.tar.gz: 2d6ec587fdbdf6a93e905d647f8709b9cd508c4f
3
+ metadata.gz: 78ea98df3b0c1c5faba2a0cb91e2af51a736f7ca
4
+ data.tar.gz: 90384a72836d8ea528608e0326c5c3bd0051b93d
5
5
  SHA512:
6
- metadata.gz: f864bcf6266ecda9e91a113a9287ffe1597cc2753bd883707bb1d772ff4dc135527bfeb0b31d25e3c12649a100ca130a7f6174755277b79e660e539c1b700d0c
7
- data.tar.gz: a334a9fb09b4b06805d6a7843c90ca3141cd05606144ed94c4c36d0a2406bafb7d8fb1853379bf6467c01e1ff398acbc17d2f125716e3379869b40718ec9ea1a
6
+ metadata.gz: d359910e0acb5b2afa48b9790d8ae13fcc408154bff58066ae82f6e943c6f6373596d93fc330d2c81edcdec1ea89c13433de0bc102b65cf5db8526608d91a2b9
7
+ data.tar.gz: ecff06b79ad559654e0523f8c117de424c01da00ae9e023d6446f8c5648dbc90e1bfbfaa5dedd6b117dc6f4b9380e73bf25ba7748c896a7f4b139fff5a95978e
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'bezel-app'
8
- spec.version = '0.1.2'
8
+ spec.version = '0.1.3'
9
9
  spec.authors = ['Keith Thompson']
10
10
  spec.email = ['KeithM_Thompson@outlook.com']
11
11
 
@@ -92,10 +92,22 @@ MIGRATIONS = Dir.glob('./db/migrate/*.sql').to_a
92
92
  end
93
93
 
94
94
  def self.open
95
- @db = PG::Connection.new(
96
- dbname: app_name,
97
- port: 5432
98
- )
95
+ if (ENV['DATABASE_URL'])
96
+ uri = URI.parse(ENV['DATABASE_URL'])
97
+
98
+ @db = PG::Connection.new(
99
+ user: uri.user,
100
+ password: uri.password,
101
+ host: uri.host,
102
+ port: uri.port,
103
+ dbname: uri.path[1..-1],
104
+ )
105
+ else
106
+ @db = PG::Connection.new(
107
+ dbname: app_name,
108
+ port: 5432
109
+ )
110
+ end
99
111
  end
100
112
 
101
113
  def self.reset
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bezel-app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Thompson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-26 00:00:00.000000000 Z
11
+ date: 2016-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor