activerecord_views 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f6181c027be63e47f0f891651ef16dc6732baf4000d196709d2cbb80f0c8aa2
4
- data.tar.gz: f9a5c359c72123e6555cf023ba8aca2b6509f6341d60d239297ebf84a28bde3d
3
+ metadata.gz: 67e33c3b91d943b9fec0cf41b263302025ae787d41fe9404724cfd93c0105c73
4
+ data.tar.gz: 29b11133c94e86c16563083c1176616da9988fe9493fd69e8f2201436edded43
5
5
  SHA512:
6
- metadata.gz: 53c430bb26f03dad6cab94335ae927fefe3a4111dee9b2e322985e6eca85dc68f9c15091199c63f5e4983e36c3e4b906967166e2431f470c46574f55cc8ee990
7
- data.tar.gz: 3548136a4b337bc8331a51b150c23bd72548ffb0b114a0dae7c148f000f5faea5cd24e1998e027ff9eca2b8073f234100af3afc3bacb6ae140c80d01ca2f513e
6
+ metadata.gz: 194ac35e51118b4d57956d083d5bff2fc859c6b1bcc09ccfde564fa3425dade51caa53835676f676b3c26999b138ee81710a5d5d0c605f90fbdaebf718b0e89f
7
+ data.tar.gz: a611fff391e863d46580cd6dea1c02e95d14660a3e900212e624a162f9a99a7879ddfe6c5be709a902f44930c9c3c02ebf58cde1b67cd46d23bf141816b392d2
@@ -1,3 +1,3 @@
1
1
  module ActiveRecordViews
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
@@ -54,7 +54,7 @@ module ActiveRecordViews
54
54
  states[temp_connection] = states[connection] = temp_connection
55
55
  yield temp_connection
56
56
  ensure
57
- connection.pool.checkin temp_connection
57
+ connection.pool.checkin temp_connection if temp_connection
58
58
  states[temp_connection] = states[connection] = nil
59
59
  end
60
60
  else
@@ -333,5 +333,16 @@ describe ActiveRecordViews do
333
333
  original_connection.pool.checkin original_connection_2
334
334
  end
335
335
  end
336
+
337
+ it 'does not attempt to checkin when checkout fails' do
338
+ expect(original_connection.pool).to receive(:checkout).and_raise PG::ConnectionBad
339
+ expect(original_connection.pool).to_not receive(:checkin)
340
+
341
+ expect {
342
+ original_connection.transaction do
343
+ ActiveRecordViews.without_transaction(original_connection) { }
344
+ end
345
+ }.to raise_error PG::ConnectionBad
346
+ end
336
347
  end
337
348
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord_views
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Weathered
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-26 00:00:00.000000000 Z
11
+ date: 2021-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
185
  - !ruby/object:Gem::Version
186
186
  version: '0'
187
187
  requirements: []
188
- rubygems_version: 3.0.3
188
+ rubygems_version: 3.1.6
189
189
  signing_key:
190
190
  specification_version: 4
191
191
  summary: Automatic database view creation for ActiveRecord