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 +4 -4
- data/lib/active_record_views/version.rb +1 -1
- data/lib/active_record_views.rb +1 -1
- data/spec/active_record_views_spec.rb +11 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67e33c3b91d943b9fec0cf41b263302025ae787d41fe9404724cfd93c0105c73
|
4
|
+
data.tar.gz: 29b11133c94e86c16563083c1176616da9988fe9493fd69e8f2201436edded43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 194ac35e51118b4d57956d083d5bff2fc859c6b1bcc09ccfde564fa3425dade51caa53835676f676b3c26999b138ee81710a5d5d0c605f90fbdaebf718b0e89f
|
7
|
+
data.tar.gz: a611fff391e863d46580cd6dea1c02e95d14660a3e900212e624a162f9a99a7879ddfe6c5be709a902f44930c9c3c02ebf58cde1b67cd46d23bf141816b392d2
|
data/lib/active_record_views.rb
CHANGED
@@ -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.
|
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-
|
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.
|
188
|
+
rubygems_version: 3.1.6
|
189
189
|
signing_key:
|
190
190
|
specification_version: 4
|
191
191
|
summary: Automatic database view creation for ActiveRecord
|