sinatra-activerecord 2.0.12 → 2.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sinatra/activerecord.rb +3 -5
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dc09ab6801720e356b4efef4ec637a9abcb2fc0c
4
- data.tar.gz: f161f7ed905b1d0652607e1cb854d03eebc10000
3
+ metadata.gz: ae55471906bc043ca2e1264c3e739beffddfcbe3
4
+ data.tar.gz: 78286a61f1c3e720be4c6f7e2237ab0015286f0e
5
5
  SHA512:
6
- metadata.gz: 061b27daa61a46299ff8316d75e9075a48294e91cb1f4c6d68cf7364206ea655e9001ba0ca0ca0c34946d28bbdae4abcd2af7f9bbcd21e275a5d00401aa923ea
7
- data.tar.gz: cc1b3542feb7ee3e44b15a0434e2d3cede633a635335a82db033aea6cd511d7a5bc9f51777696f83b0135c0cf8bf0ce2c643ee8c28f31c39bad3a54719f1b505
6
+ metadata.gz: 6cf58da73fcf3b32ccbea62d8428ee283def27d382eebc8827570788c37c326264988366280cdacee26ab0312c2b8ee40826c289c1efc28d5d2a4be674fae1e8
7
+ data.tar.gz: 8d6bb313b221964c27301e23c4555b7141a30a444baad640f92b2bf758d08fa22baea6d3f71aaecd3825cb95483449ac0b912c7df134fef5094bfec6d4ce50d8
@@ -19,9 +19,9 @@ module Sinatra
19
19
  if ENV['DATABASE_URL']
20
20
  app.set :database, ENV['DATABASE_URL']
21
21
  elsif File.exist?("#{Dir.pwd}/config/database.yml")
22
- app.set :database_file, "#{Dir.pwd}/config/database.yml"
22
+ app.set :database_file, "#{Dir.pwd}/config/database.yml"
23
23
  end
24
-
24
+
25
25
  unless defined?(Rake) || [:test, :production].include?(app.settings.environment)
26
26
  ActiveRecord::Base.logger = Logger.new(STDOUT)
27
27
  end
@@ -30,9 +30,7 @@ module Sinatra
30
30
 
31
31
  # re-connect if database connection dropped (Rails 3 only)
32
32
  app.before { ActiveRecord::Base.verify_active_connections! if ActiveRecord::Base.respond_to?(:verify_active_connections!) }
33
- if ActiveRecord::ConnectionAdapters.const_defined?(:ConnectionManagement)
34
- app.use ActiveRecord::ConnectionAdapters::ConnectionManagement
35
- end
33
+ app.after { ActiveRecord::Base.clear_active_connections! }
36
34
  end
37
35
 
38
36
  def database_file=(path)
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.12
4
+ version: 2.0.13
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: 2017-02-13 00:00:00.000000000 Z
12
+ date: 2017-03-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra