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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9f35412ead63cc7812e937078db617305178393
4
- data.tar.gz: 008b321248242e5de22deabd356ba43049e6a5b3
3
+ metadata.gz: 1a98cc0e154b28eb92ef5d4aaa1f8df8787ca55e
4
+ data.tar.gz: 2a2b9152af2c3ad2f7830e0a7b59822d28275fa7
5
5
  SHA512:
6
- metadata.gz: 7c2092ccaade8606b0408b98aa47d4eb87bf2f90d8478739244ee58c8ee3c825c4a0066a863603cecec1cd1193e8d8047d5b2f8bd547f221f448233e9616ab92
7
- data.tar.gz: ff27ba48f1f6cda7b71bcc8de6b254769ffcf4f541bc6d1b9c92dfe0478a3baeeca92761a571fb02e04196e3326ab3b0a2738900b227102f5084c312bd2d4627
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
@@ -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
- ActiveRecord::Base.logger = Logger.new(STDOUT) unless defined?(Rake) || app.settings.production?
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
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-01-20 00:00:00.000000000 Z
12
+ date: 2015-02-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra