postshift 0.2.0 → 0.2.1

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: e91aea35f8015bd2dd96fdc881a749296153c051
4
- data.tar.gz: 035a9e661aea4d78da25d6cc93febc05278fd766
3
+ metadata.gz: 7d56e8e34b5465bcc83091a128c2357491865e88
4
+ data.tar.gz: 94549f9d870f3413c55f1e81ed37f2645b18bad5
5
5
  SHA512:
6
- metadata.gz: 1f7b617a18904e274f57cbb73a75d2da9ccf48a225dd242729b8ce44caf278fd46aaf076864a139c4f14817f071c36c9b5faa73309541c9a299e026ff51ba996
7
- data.tar.gz: 293edceeacae0d92e9b6e9d26b41807ffcb750cc48f78b18909dca5aa971895d37defc4a6843f0f525ad17c1029736f1b715f80e0c2ae9da91d8f44f8e082484
6
+ metadata.gz: 9b8cc4652f550d94ea5036a311f864f49e8188fa93070e9be5dcc416b4c5566984070d1d4cc5340413d17c728681ef383621981c54d3c0344c380ee127c1ab6b
7
+ data.tar.gz: ba0f86afb60821ac0dfc69f58752ed13549b75747c23e0e44fe3e26a14a8df482ecd881ff613ae78f915237726e7b05a0f6a78bfa0a97540187e1eaa4caf8695
@@ -117,6 +117,17 @@ module ActiveRecord
117
117
  Float::INFINITY
118
118
  end
119
119
 
120
+ def reset!
121
+ @lock.synchronize do
122
+ clear_cache!
123
+ reset_transaction
124
+ unless @connection.transaction_status == ::PG::PQTRANS_IDLE
125
+ @connection.query "ROLLBACK"
126
+ end
127
+ configure_connection
128
+ end
129
+ end
130
+
120
131
  private
121
132
 
122
133
  # Copied from PostgreSQL with minor registration changes. If broken out, could override segments, etc
@@ -1,3 +1,3 @@
1
1
  module Postshift
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postshift
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Krupinski
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-07 00:00:00.000000000 Z
11
+ date: 2018-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg