activerecord-oracle_enhanced-adapter 7.2.0 → 7.2.1
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/History.md +17 -0
- data/VERSION +1 -1
- data/lib/active_record/connection_adapters/oracle_enhanced/jdbc_connection.rb +9 -4
- data/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb +3 -1
- data/spec/active_record/connection_adapters/oracle_enhanced/connection_spec.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f23e108b35ad8237715fe102164b559714732d02a5155c91ec8fdb8fd9148dac
|
|
4
|
+
data.tar.gz: f9137b84edad52e3960228cf412d4c3223de3a1542f81c2992b54a4ab6f13f8e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e77a1755ceebb244ea23dcde2429b07e3c416e58a17bb929efe1baafdaac232036ff64dc05751cedd943d28b18815e8dfea5aa6b4c0af57f1b2dd03813b27ea6
|
|
7
|
+
data.tar.gz: 6b44ac4c89eaa96301fc8c69ad2f79eed8e45f7251b898f67af9ee3722052375c8f296e61de8736f09c378613ca711de9e3d52944fd29732dc3dba720fedf9fb
|
data/History.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## 7.2.1 / 2026-07-26
|
|
2
|
+
|
|
3
|
+
* Changes and bug fixes
|
|
4
|
+
* Accept `allow_retry` keyword argument in JDBC connection `exec`
|
|
5
|
+
* Add `reset` method to JDBC connection
|
|
6
|
+
* Skip `ObjectSpace::WeakMap` workaround on JRuby that implements `#values`
|
|
7
|
+
* Run tests on JRuby 9.4.15.0
|
|
8
|
+
|
|
9
|
+
## 7.2.0 / 2025-06-23
|
|
10
|
+
|
|
11
|
+
* Changes and bug fixes
|
|
12
|
+
* No changes since 7.2.0.rc1
|
|
13
|
+
* Support Rails 7.2 [#2424]
|
|
14
|
+
* Bump the minimum Ruby version to 3.1 [#2442]
|
|
15
|
+
* Use RuboCop Plugin [#2427]
|
|
16
|
+
* Use Oracle Instant Client Version 23.8
|
|
17
|
+
|
|
1
18
|
## 7.2.0.rc1 / 2025-06-18
|
|
2
19
|
|
|
3
20
|
* Changes and bug fixes
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
7.2.
|
|
1
|
+
7.2.1
|
|
@@ -236,6 +236,11 @@ module ActiveRecord
|
|
|
236
236
|
raise OracleEnhanced::ConnectionException, e.message
|
|
237
237
|
end
|
|
238
238
|
|
|
239
|
+
def reset
|
|
240
|
+
# tentative
|
|
241
|
+
reset!
|
|
242
|
+
end
|
|
243
|
+
|
|
239
244
|
# Resets connection, by logging off and creating a new connection.
|
|
240
245
|
def reset!
|
|
241
246
|
logoff rescue nil
|
|
@@ -249,8 +254,8 @@ module ActiveRecord
|
|
|
249
254
|
end
|
|
250
255
|
|
|
251
256
|
# mark connection as dead if connection lost
|
|
252
|
-
def with_retry(&block)
|
|
253
|
-
should_retry = auto_retry? && autocommit?
|
|
257
|
+
def with_retry(allow_retry: false, &block)
|
|
258
|
+
should_retry = (allow_retry || auto_retry?) && autocommit?
|
|
254
259
|
begin
|
|
255
260
|
yield if block_given?
|
|
256
261
|
rescue Java::JavaSql::SQLException => e
|
|
@@ -263,8 +268,8 @@ module ActiveRecord
|
|
|
263
268
|
end
|
|
264
269
|
end
|
|
265
270
|
|
|
266
|
-
def exec(sql)
|
|
267
|
-
with_retry do
|
|
271
|
+
def exec(sql, allow_retry: false)
|
|
272
|
+
with_retry(allow_retry: allow_retry) do
|
|
268
273
|
exec_no_retry(sql)
|
|
269
274
|
end
|
|
270
275
|
end
|
|
@@ -848,7 +848,9 @@ module ActiveRecord
|
|
|
848
848
|
end
|
|
849
849
|
|
|
850
850
|
# Workaround for https://github.com/jruby/jruby/issues/6267
|
|
851
|
-
|
|
851
|
+
# JRuby implements ObjectSpace::WeakMap#values natively since 9.4, where the
|
|
852
|
+
# internal `map` field this workaround reads does not exist anymore.
|
|
853
|
+
if RUBY_ENGINE == "jruby" && !ObjectSpace::WeakMap.method_defined?(:values)
|
|
852
854
|
require "jruby"
|
|
853
855
|
|
|
854
856
|
class org.jruby::RubyObjectSpace::WeakMap
|
|
@@ -66,15 +66,15 @@ describe "OracleEnhancedAdapter establish connection" do
|
|
|
66
66
|
|
|
67
67
|
it "should not encrypt JDBC network connection" do
|
|
68
68
|
if ORACLE_ENHANCED_CONNECTION == :jdbc
|
|
69
|
-
|
|
70
|
-
expect(
|
|
69
|
+
ActiveRecord::Base.establish_connection(SYSTEM_CONNECTION_PARAMS.merge(jdbc_connect_properties: { "oracle.net.encryption_client" => "REJECTED" }))
|
|
70
|
+
expect(ActiveRecord::Base.connection.select_value("SELECT COUNT(*) FROM v$Session_Connect_Info WHERE SID=SYS_CONTEXT('USERENV', 'SID') AND Network_Service_Banner LIKE '%Encryption service adapter%'")).to eq(0)
|
|
71
71
|
end
|
|
72
72
|
end
|
|
73
73
|
|
|
74
74
|
it "should encrypt JDBC network connection" do
|
|
75
75
|
if ORACLE_ENHANCED_CONNECTION == :jdbc
|
|
76
|
-
|
|
77
|
-
expect(
|
|
76
|
+
ActiveRecord::Base.establish_connection(SYSTEM_CONNECTION_PARAMS.merge(jdbc_connect_properties: { "oracle.net.encryption_client" => "REQUESTED" }))
|
|
77
|
+
expect(ActiveRecord::Base.connection.select_value("SELECT COUNT(*) FROM v$Session_Connect_Info WHERE SID=SYS_CONTEXT('USERENV', 'SID') AND Network_Service_Banner LIKE '%Encryption service adapter%'")).to eq(1)
|
|
78
78
|
end
|
|
79
79
|
end
|
|
80
80
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activerecord-oracle_enhanced-adapter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.2.
|
|
4
|
+
version: 7.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Raimonds Simanovskis
|
|
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
153
153
|
- !ruby/object:Gem::Version
|
|
154
154
|
version: 1.8.11
|
|
155
155
|
requirements: []
|
|
156
|
-
rubygems_version:
|
|
156
|
+
rubygems_version: 4.0.17
|
|
157
157
|
specification_version: 4
|
|
158
158
|
summary: Oracle enhanced adapter for ActiveRecord
|
|
159
159
|
test_files:
|