sequel-activerecord_connection 2.0.0 → 2.0.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: a2912969fb906ae413ccdded0137055b743786a4fdcf8de812c643d8c0facc6a
4
- data.tar.gz: 75662cc9ae2f373a106b8c7163bc96fc4ae067a7001f39df166a780648dd9998
3
+ metadata.gz: 042736dc5ad00fd808dd145caa564065a11926b9bdc93698fed9a8f5b0e4aff9
4
+ data.tar.gz: 909816335c6b1001c605fff430bab10853c0746b2c21bd0741c4e8db58164abb
5
5
  SHA512:
6
- metadata.gz: 2a2d9c7f5c1b88bb0c8285968f61ae2c8e3dd27df266df9675b14c5ff6fd9eb06a4e37a9a2c4c7638a7fe11405df2a8bfb6b79ae58dda38e8bbafcd29309b07d
7
- data.tar.gz: 2e73044828506553458070cd5763ce2196706e6a58713dde428182b14f30266aa52a278dcd2a4c0e9d1b71984bb73bd8099351199140ee211c82dadbe9334985
6
+ metadata.gz: eb1cc2a21b801ec092e6e7b9fa7980f5a340371d72b8d4ab7afaec58f5a7eb9b2362292c9397eab2a4e6f80aa7e930b90d89cc07c617b884ac28e982bdeb7978
7
+ data.tar.gz: ad0b5848a8348e2566d1f1c7f51289de04aa4eba2549172c3f375f97dc06435f5bbe669426aef82ffad02cc0b0a1db63e0f76b11fdbba3bd4b021776a43ecf2a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 2.0.1 (2025-10-25)
2
+
3
+ * Allow Active Record 8.1+ (@janko)
4
+
1
5
  ## 2.0.0 (2024-11-10)
2
6
 
3
7
  * The `after_commit_everywhere` gem now needs to be added to the Gemfile manually on Active Record < 7.2 (@janko)
data/README.md CHANGED
@@ -27,16 +27,10 @@ an Active Record transaction, that query won't actually be executed inside a
27
27
  database transaction. This is because transactions are tied to the database
28
28
  connection; if one connection opens a transaction, this doesn't affect queries
29
29
  executed on a different connection, even if both connections are used in the
30
- same ruby process. With this library, transactions and queries can be
31
- seamlessly combined between Active Record and Sequel.
32
-
33
- In Rails context, there are additional considerations for a Sequel connection
34
- to play nicely. Connecting and disconnecting would have to go in lockstep with
35
- Active Record, to make commands such as `rails db:create` and `rails db:drop`
36
- work. You'd also need to find a way for system tests and the app running in the
37
- background to share the same database connection, which is something Sequel
38
- wasn't designed for. Reusing Active Record's connection means (dis)connecting
39
- and sharing between threads is all handled automatically.
30
+ same ruby process.
31
+
32
+ With this library, transactions and queries can be seamlessly combined between
33
+ Active Record and Sequel.
40
34
 
41
35
  ## Installation
42
36
 
@@ -194,18 +194,12 @@ module Sequel
194
194
  # Active Record doesn't guarantee that a single connection can only be used
195
195
  # by one thread at a time, so we need to use locking, which is what Active
196
196
  # Record does internally as well.
197
- if ActiveRecord.version >= Gem::Version.new("5.1")
198
- def activerecord_lock
199
- activerecord_connection.lock.synchronize do
200
- ActiveSupport::Dependencies.interlock.permit_concurrent_loads do
201
- yield
202
- end
197
+ def activerecord_lock
198
+ activerecord_connection.lock.synchronize do
199
+ ActiveSupport::Dependencies.interlock.permit_concurrent_loads do
200
+ yield
203
201
  end
204
202
  end
205
- else
206
- def activerecord_lock
207
- yield
208
- end
209
203
  end
210
204
 
211
205
  def activerecord_connection
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "sequel-activerecord_connection"
3
- spec.version = "2.0.0"
3
+ spec.version = "2.0.1"
4
4
  spec.authors = ["Janko Marohnić"]
5
5
  spec.email = ["janko@hey.com"]
6
6
 
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.required_ruby_version = ">= 2.5"
13
13
 
14
14
  spec.add_dependency "sequel", "~> 5.38"
15
- spec.add_dependency "activerecord", ">= 5.0", "< 8.1"
15
+ spec.add_dependency "activerecord", ">= 5.1"
16
16
 
17
17
  spec.add_development_dependency "sequel_pg" unless RUBY_ENGINE == "jruby"
18
18
  spec.add_development_dependency "minitest"
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel-activerecord_connection
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Janko Marohnić
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-11-10 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: sequel
@@ -30,20 +29,14 @@ dependencies:
30
29
  requirements:
31
30
  - - ">="
32
31
  - !ruby/object:Gem::Version
33
- version: '5.0'
34
- - - "<"
35
- - !ruby/object:Gem::Version
36
- version: '8.1'
32
+ version: '5.1'
37
33
  type: :runtime
38
34
  prerelease: false
39
35
  version_requirements: !ruby/object:Gem::Requirement
40
36
  requirements:
41
37
  - - ">="
42
38
  - !ruby/object:Gem::Version
43
- version: '5.0'
44
- - - "<"
45
- - !ruby/object:Gem::Version
46
- version: '8.1'
39
+ version: '5.1'
47
40
  - !ruby/object:Gem::Dependency
48
41
  name: sequel_pg
49
42
  requirement: !ruby/object:Gem::Requirement
@@ -109,7 +102,6 @@ homepage: https://github.com/janko/sequel-activerecord_connection
109
102
  licenses:
110
103
  - MIT
111
104
  metadata: {}
112
- post_install_message:
113
105
  rdoc_options: []
114
106
  require_paths:
115
107
  - lib
@@ -124,8 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
116
  - !ruby/object:Gem::Version
125
117
  version: '0'
126
118
  requirements: []
127
- rubygems_version: 3.5.11
128
- signing_key:
119
+ rubygems_version: 3.6.9
129
120
  specification_version: 4
130
121
  summary: Allows Sequel to use ActiveRecord connection for database interaction.
131
122
  test_files: []