sinatra-activerecord 2.0.8 → 2.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sinatra/activerecord.rb +6 -2
- 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: d77049a24680053ccad9e42f401efa5a689b5e45
|
4
|
+
data.tar.gz: ab9a5c361cf36e9782339df3cc4975b540842aef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e129ec7fed328fbb62b279c9711ac63a4d41400b16cd741beb0653d31799cd0dec0ffc285e76c378760b504a2cedfa78e2fa0755f17299e4b043774acb661aa
|
7
|
+
data.tar.gz: c8572d6e5ee580682a97d1e85c17c4dfa6d8482a9ea53aa321324db78187004f5e1266f2d3687feaedffe816943e811e8821b864c21a9e6b4e5edbcc6b3ffc6a
|
data/lib/sinatra/activerecord.rb
CHANGED
@@ -16,8 +16,12 @@ module Sinatra
|
|
16
16
|
|
17
17
|
module ActiveRecordExtension
|
18
18
|
def self.registered(app)
|
19
|
-
|
20
|
-
|
19
|
+
if ENV['DATABASE_URL']
|
20
|
+
app.set :database, ENV['DATABASE_URL']
|
21
|
+
elsif File.exist?("#{Dir.pwd}/config/database.yml")
|
22
|
+
app.set :database_file, "#{Dir.pwd}/config/database.yml"
|
23
|
+
end
|
24
|
+
|
21
25
|
unless defined?(Rake) || [:test, :production].include?(app.settings.environment)
|
22
26
|
ActiveRecord::Base.logger = Logger.new(STDOUT)
|
23
27
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-activerecord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blake Mizerany
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-09-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|