sequel-activerecord_connection 1.4.1 → 1.4.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: f6e3934544ded0f6495b75e5a04a8a9adb1d98d9d6b5d76420c45b72c94a4898
4
- data.tar.gz: 44fcd4c9c5b5c0f3c1fc9804b9ae3568aca9d7d2623fbb3e3181b52c1e2acc2a
3
+ metadata.gz: 1459c431ad6f922b5c4400d85ae916e5032cab36a959041362f45817b604919d
4
+ data.tar.gz: 667fe2896a48d5d93d16e5c5b00e0d064c43d2687ef077bc9421e3d7869a41b6
5
5
  SHA512:
6
- metadata.gz: 560c34801be1e01717c4d1939ab5745c473df770dbe0d6366ad6cf9f14fe2b7920ae0bd39c8b59b602a70b12a1bbeb3ef34522c02410ad7c6a1d8fb8139340dc
7
- data.tar.gz: fe7b20203fafa3414360e5cee9aeb6994b0205838dc82abcc83c9a03b17a8e707c69c49c5f06c4ec6c4019216d80a1e6b0c0f843a935ef11c35601a323064146
6
+ metadata.gz: c9f5cb40548c059e3319be0088b8a158dd66c18543fd31f1954db8bc848c4ef541ec1f779acc637211d730dfe4a080a805ee477f128474c9894cc6883e10f46d
7
+ data.tar.gz: 6068798de2efef62ae54cde36cb2d7abbad316aadc3eba6d5dceae1708e1aec36ec43b51cbeaf0f59609fd2be09e5d02b0f07afde5f646ebf39fb992e054b046
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 1.4.3 (2024-09-26)
2
+
3
+ * Fix compatibility with adapters that don't support savepoints (@janko)
4
+
5
+ ## 1.4.2 (2024-09-23)
6
+
7
+ * Fix compatibility with newer versions of Oracle Enhanced adapter (@janko)
8
+
9
+ * Drop support for Ruby 2.4 (@janko)
10
+
1
11
  ## 1.4.1 (2024-05-10)
2
12
 
3
13
  * Fix `#rollback_checker`, `#rollback_on_exit` and `#after_rollback` not working reliably on JRuby and Sequel 5.78+ (@janko)
@@ -5,10 +5,12 @@ module Sequel
5
5
  module Oracle
6
6
  def synchronize(*)
7
7
  super do |conn|
8
+ raw_connection = conn.respond_to?(:raw_oci_connection) ? conn.raw_oci_connection : conn
9
+
8
10
  # required for prepared statements
9
- Utils.add_prepared_statements_cache(conn.raw_oci_connection)
11
+ Utils.add_prepared_statements_cache(raw_connection)
10
12
 
11
- yield conn.raw_oci_connection
13
+ yield raw_connection
12
14
  end
13
15
  end
14
16
  end
@@ -70,7 +70,10 @@ module Sequel
70
70
  # information to know whether we're in a transaction, whether to create a
71
71
  # savepoint, when to run transaction/savepoint hooks etc.
72
72
  def _trans(conn)
73
- hash = super || { savepoints: [], activerecord: true }
73
+ hash = super || { activerecord: true }
74
+
75
+ # adapters that don't support savepoints won't have this assigned
76
+ hash[:savepoints] ||= []
74
77
 
75
78
  # add any ActiveRecord transactions/savepoints that have been opened
76
79
  # directly via ActiveRecord::Base.transaction
@@ -137,7 +140,7 @@ module Sequel
137
140
  end
138
141
  end
139
142
 
140
- if ActiveRecord.version >= Gem::Version.new("7.2.0.alpha")
143
+ if ActiveRecord.version >= Gem::Version.new("7.2.0")
141
144
  def activerecord_transaction_callback(type, &block)
142
145
  activerecord_connection.current_transaction.public_send(type, &block)
143
146
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "sequel-activerecord_connection"
3
- spec.version = "1.4.1"
3
+ spec.version = "1.4.3"
4
4
  spec.authors = ["Janko Marohnić"]
5
5
  spec.email = ["janko.marohnic@gmail.com"]
6
6
 
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.homepage = "https://github.com/janko/sequel-activerecord_connection"
10
10
  spec.license = "MIT"
11
11
 
12
- spec.required_ruby_version = ">= 2.4"
12
+ spec.required_ruby_version = ">= 2.5"
13
13
 
14
14
  spec.add_dependency "sequel", "~> 5.38"
15
15
  spec.add_dependency "activerecord", ">= 5.0", "< 8"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel-activerecord_connection
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Janko Marohnić
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-09 00:00:00.000000000 Z
11
+ date: 2024-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel
@@ -131,14 +131,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
131
131
  requirements:
132
132
  - - ">="
133
133
  - !ruby/object:Gem::Version
134
- version: '2.4'
134
+ version: '2.5'
135
135
  required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  requirements:
137
137
  - - ">="
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  requirements: []
141
- rubygems_version: 3.5.9
141
+ rubygems_version: 3.5.11
142
142
  signing_key:
143
143
  specification_version: 4
144
144
  summary: Allows Sequel to use ActiveRecord connection for database interaction.