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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 36dc618e3a81951b55226dd18bc44c813bfc4546
4
- data.tar.gz: 2839976dcc5ba1caf71a4f470928c2a9e0c453e3
3
+ metadata.gz: f90d123d2687cb65c62cd16f911bf59650060142
4
+ data.tar.gz: a74f18a14b56229f7f777a828622fa1ea48a5940
5
5
  SHA512:
6
- metadata.gz: 5b34caf71a442add6e0124b9bdb6a2856ef7f0907788111e80faa178c151608edd70c4a63d36c0517dfc00e1fbeb50c5b310693824f7b1f627a42192c47d918b
7
- data.tar.gz: a574f9ab9b3019bd36c90c8c96ec8539ee339332e3c7feb63c354cbc57441a55c40fe85dbd94049bf447447738032f8d10d6be18c1d08f1045b6888e0be8cd60
6
+ metadata.gz: 4a654194b7c5d8ee9db1c19d159d7cbc8b1f6a7cb3ac0940290c9c93ab3b3e36574b03f258efa58ce86fe4db56b941ec7fce7a7837260066888aad12c1f4b1aa
7
+ data.tar.gz: 1d27eea5ab8191e85eaad75824311d7b180ffe5d1d66686522f2bf353acc5a479d41ae6b5617950e985c46aab3924a04dd7204bb4e591164e65d2e5ef0d8ed33
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Alvid
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
@@ -5,6 +5,7 @@ describe Alvid do
5
5
  expect(Alvid::VERSION).not_to be nil
6
6
  end
7
7
 
8
+
8
9
  describe 'init' do
9
10
  describe 'when VCAP_SERVICES provided' do
10
11
  it 'supports p-mysql' do
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
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-04 00:00:00.000000000 Z
12
+ date: 2016-03-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler