yasarg 0.0.3 → 0.0.4

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.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/yasarg/connection.rb +1 -25
  3. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -4,33 +4,9 @@ module Yasarg
4
4
  def establish
5
5
  require File.expand_path('../../yasarg/rails_fake_app', __FILE__)
6
6
  if !ActiveRecord::Base.connected?
7
- ActiveRecord::Base.establish_connection(configuration)
8
- end
9
- end
10
-
11
- def configuration
12
- configuration = {}
13
- if ENV["DATABASE_URL"]# heroku
14
- configuration = heroku_configuration
15
- else
16
7
  configuration = Yasarg::RailsFakeApp.config.database_configuration[Rails.env]
8
+ ActiveRecord::Base.establish_connection(configuration)
17
9
  end
18
-
19
- configuration
20
- end
21
-
22
- def heroku_configuration
23
- require "uri"
24
- db = URI.parse(ENV['DATABASE_URL'])
25
- {
26
- :adapter => 'postgresql',
27
- :host => db.host,
28
- :port => db.port,
29
- :username => db.user,
30
- :password => db.password,
31
- :database => db.path[1..-1],
32
- :encoding => 'utf8'
33
- }
34
10
  end
35
11
  end
36
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yasarg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: