sinatra-activerecord 2.0.4 → 2.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -14
- data/lib/sinatra/activerecord.rb +3 -1
- 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: 1a98cc0e154b28eb92ef5d4aaa1f8df8787ca55e
|
4
|
+
data.tar.gz: 2a2b9152af2c3ad2f7830e0a7b59822d28275fa7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cd76193d5f39e52e44d543dddbd02847f0e608858d571685e78aae400d479e99e37564fa3a6afa6e9258923ae20fb7e8c90706e578a6996ac18a593421493ce
|
7
|
+
data.tar.gz: a54777d8b944b07e78511b1d74562690be17b7446e50a032bb757f348ae7c69337a31899dc52eb21fe9d7039fd8e20e87704ed3d2215131bd699acd48cc4214e
|
data/README.md
CHANGED
@@ -52,20 +52,6 @@ namespace :db do
|
|
52
52
|
end
|
53
53
|
```
|
54
54
|
|
55
|
-
In case you're using tools like SimpleCov, where the application needs to be
|
56
|
-
required only inside SimpleCov's Rake tasks, you can do
|
57
|
-
|
58
|
-
```ruby
|
59
|
-
# Rakefile
|
60
|
-
require "sinatra/activerecord/rake"
|
61
|
-
|
62
|
-
namespace :db do
|
63
|
-
task :load_config do
|
64
|
-
require "./app"
|
65
|
-
end
|
66
|
-
end
|
67
|
-
```
|
68
|
-
|
69
55
|
In the Terminal test that it works:
|
70
56
|
|
71
57
|
```sh
|
data/lib/sinatra/activerecord.rb
CHANGED
@@ -18,7 +18,9 @@ module Sinatra
|
|
18
18
|
def self.registered(app)
|
19
19
|
app.set :database, ENV['DATABASE_URL'] if ENV['DATABASE_URL']
|
20
20
|
app.set :database_file, "#{Dir.pwd}/config/database.yml" if File.exist?("#{Dir.pwd}/config/database.yml")
|
21
|
-
|
21
|
+
unless defined?(Rake) || [:test, :production].include?(app.settings.environment)
|
22
|
+
ActiveRecord::Base.logger = Logger.new(STDOUT)
|
23
|
+
end
|
22
24
|
|
23
25
|
app.helpers ActiveRecordHelper
|
24
26
|
|
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.5
|
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-02-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|