alvid 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/alvid.rb +4 -3
- data/lib/alvid/version.rb +1 -1
- data/spec/alvid_spec.rb +1 -0
- 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: f90d123d2687cb65c62cd16f911bf59650060142
|
4
|
+
data.tar.gz: a74f18a14b56229f7f777a828622fa1ea48a5940
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a654194b7c5d8ee9db1c19d159d7cbc8b1f6a7cb3ac0940290c9c93ab3b3e36574b03f258efa58ce86fe4db56b941ec7fce7a7837260066888aad12c1f4b1aa
|
7
|
+
data.tar.gz: 1d27eea5ab8191e85eaad75824311d7b180ffe5d1d66686522f2bf353acc5a479d41ae6b5617950e985c46aab3924a04dd7204bb4e591164e65d2e5ef0d8ed33
|
data/lib/alvid.rb
CHANGED
@@ -3,16 +3,17 @@ require 'json'
|
|
3
3
|
|
4
4
|
module Alvid
|
5
5
|
def self.init
|
6
|
+
puts ENV.inspect
|
6
7
|
db_uri = if ENV['VCAP_SERVICES'].nil? || JSON.parse(ENV['VCAP_SERVICES']).empty?
|
7
8
|
require 'dm-sqlite-adapter'
|
8
9
|
'sqlite::memory:'
|
9
10
|
else
|
10
11
|
require 'dm-mysql-adapter'
|
11
12
|
product_name, service = JSON.parse(ENV['VCAP_SERVICES']).first
|
13
|
+
puts "Product name: #{product_name}"
|
14
|
+
puts "Service: #{product_name}"
|
12
15
|
case product_name
|
13
|
-
when /mysql/
|
14
|
-
service.first.first[1]['uri']
|
15
|
-
when /cleardb/
|
16
|
+
when /mysql|cleardb/
|
16
17
|
service.first['credentials']['uri']
|
17
18
|
end
|
18
19
|
end
|
data/lib/alvid/version.rb
CHANGED
data/spec/alvid_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alvid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alan Moran
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-03-
|
12
|
+
date: 2016-03-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|