umlaut 4.1.3 → 4.1.4

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: 4d91bea86b750d7de0b76d3172ad437624b394a2
4
- data.tar.gz: 933ff04c313fe3b86c4c9461fb05ca4c1abc26c5
3
+ metadata.gz: cce91bae398fb67fa51ea9fbea49542990156bcf
4
+ data.tar.gz: 83bd117265034101c4a6496b89f5471c9f116932
5
5
  SHA512:
6
- metadata.gz: 3a2ac871fee3a1852ab21ce52df541dddd83ff5dc4e515cff16285e841fbe4fa79556e12f8fb4f765e34253bec2c77256e428c1489550942f3d04858562dfe2a
7
- data.tar.gz: 962a967708047efe0885c92de1d19c22b56ab3eaeb184a9590ee47204f7af5a28e39d5382e08511025fdb0ab39b65a93a344fe57c44658b9ea42620219eaa708
6
+ metadata.gz: 1442fdcbdd69ca295c2a8e0695d3503b403181b92a9b8ed7b33c84360ad7e49f8cc866b68b86e5c3040918aea2bc4ab56cf2b7825ae5753581c8b60a2bba194e
7
+ data.tar.gz: 00d94e3a43f64dc38844254d6bf65c2896dc3dc61721e503ef204b9667250767f509485d303e50db25095f7591ba744f4326ba638a2ca314fc12769c5837c961
@@ -54,6 +54,28 @@ module ActiveRecord
54
54
  # We're refusing to give a connection when asked for. Same outcome
55
55
  # as if the pool timed out on checkout, so let's subclass the exception
56
56
  # used for that.
57
- class ImplicitConnectionForbiddenError < ActiveRecord::ConnectionTimeoutError ; end
57
+ class ImplicitConnectionForbiddenError < ActiveRecord::ConnectionTimeoutError ; end
58
+
59
+ # Workaround to leaked connections database outage/recovery,
60
+ # https://github.com/rails/rails/issues/20114
61
+ # Fix expected in 4.2.2, workaround only applies to 4.x, you're on your
62
+ # own for Rails 3.x, upgrade.
63
+ rails_version = Gem::Version.new(Rails.version)
64
+ if (rails_version >= Gem::Version.new("4.0")) && (rails_version < Gem::Version.new("4.2.2"))
65
+ class ConnectionAdapters::ConnectionPool
66
+
67
+ def checkout_and_verify_with_rescue(c)
68
+ checkout_and_verify_without_rescue(c)
69
+ rescue Exception
70
+ remove c
71
+ c.disconnect!
72
+
73
+ raise
74
+ end
75
+ alias_method_chain :checkout_and_verify, :rescue
76
+
77
+ end
78
+ end
79
+
58
80
  end
59
81
 
@@ -1,5 +1,5 @@
1
1
  module Umlaut
2
- VERSION = "4.1.3"
2
+ VERSION = "4.1.4"
3
3
 
4
4
  # This is used in Umlaut's .gemspec for generating the gem,
5
5
  # and is also used in the umlaut app generator to make sure
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: umlaut
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.3
4
+ version: 4.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Rochkind, et al
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-29 00:00:00.000000000 Z
11
+ date: 2015-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails