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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba1ff85bcdf91c4b5830cca4f393330a8ea6e40ef5919f9041458467457239ff
4
- data.tar.gz: 49c3cd50ba006d21a30b4c471baf33faad005b6c1f3596881b7097e4d8e62bd6
3
+ metadata.gz: f23e108b35ad8237715fe102164b559714732d02a5155c91ec8fdb8fd9148dac
4
+ data.tar.gz: f9137b84edad52e3960228cf412d4c3223de3a1542f81c2992b54a4ab6f13f8e
5
5
  SHA512:
6
- metadata.gz: 0f043d21ff59eec9b4994152f09fad0218d938565c4c50ae1542b56ff3997dca059ce236c20bfb491d28cbddf9e0b2b13387c9d462b1ef10e726065c25b74662
7
- data.tar.gz: 00d581b4323de2d988a74c9a7afaed31fa2fcba2642666568dc4f04088f8c09e49992a17877848ad095d63da58657b0a2fdbd4f8dfc8701d22969850238d333b
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.0
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
- if RUBY_ENGINE == "jruby"
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
- @conn = ActiveRecord::Base.establish_connection(SYSTEM_CONNECTION_PARAMS.merge(jdbc_connect_properties: { "oracle.net.encryption_client" => "REJECTED" }))
70
- expect(@conn.select("SELECT COUNT(*) Records FROM v$Session_Connect_Info WHERE SID=SYS_CONTEXT('USERENV', 'SID') AND Network_Service_Banner LIKE '%Encryption service adapter%'")).to eq([{ "records" => 0 }])
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
- @conn = ActiveRecord::Base.establish_connection(SYSTEM_CONNECTION_PARAMS.merge(jdbc_connect_properties: { "oracle.net.encryption_client" => "REQUESTED" }))
77
- expect(@conn.select("SELECT COUNT(*) Records FROM v$Session_Connect_Info WHERE SID=SYS_CONTEXT('USERENV', 'SID') AND Network_Service_Banner LIKE '%Encryption service adapter%'")).to eq([{ "records" => 1 }])
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.0
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: 3.6.7
156
+ rubygems_version: 4.0.17
157
157
  specification_version: 4
158
158
  summary: Oracle enhanced adapter for ActiveRecord
159
159
  test_files: