once-ler 2.0.1 → 2.1.0

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: 4a7e71ca5ff844380110ac4b4060be81811248388db45dbcb4b4a4e483f485ba
4
- data.tar.gz: 8d7c37e025598dd704b0defb6fe457096d60b9ea3a9938078cec9da8bfe23f49
3
+ metadata.gz: 7654f9ad2d940b55ad1e27a53dba5bc881ba89cd4e6e188b4f054d28e39e916f
4
+ data.tar.gz: 1fbd33b1ab4c48a2399b8eaac1f9ae98b8183f29a6e73775ab890de208d76dff
5
5
  SHA512:
6
- metadata.gz: 0776abbe7e55c9df9da1ab76d8aa3fbb619cb9ba8ef7957f031ddcb98d834a1812f2287b087c6637201898ea5b4b05fd462682899e3396d471ee50d6e0c59134
7
- data.tar.gz: 3a1e18714221814c6d07057acbde148b01d2b296232ac308afe107f173fcbf9c107d560e8f56b649d1fcf77b252a78167b55cf73f7187d4beb0b74bf50e241ea
6
+ metadata.gz: 25037256ffceca08837c1bb4efdb554aecb0ae88f0dd628f5cd11507c32ed87bed68e474365a555a2c40ba7b63c5744ff9e4b2caa5b61a5a5182b1ece4343730
7
+ data.tar.gz: 1be3ead4c4b5624da2b6895ec6ce4738d95bba55b8440db6d309acdb44f6acd479e0c98130dd6e35f2c0dc687ec98f1f964a68bf8ab0be3a40e05ec402a54cd6
@@ -1,19 +1,30 @@
1
1
  require "active_record"
2
+ require "rails/version"
2
3
 
3
4
  # monkey-patch this to not clear connections so that we don't lose our
4
5
  # transactions
5
6
 
6
7
  module ActiveRecord::TestFixtures
7
8
  def teardown_fixtures
8
- # Rollback changes if a transaction is active.
9
- if run_in_transaction?
10
- @fixture_connections.each do |connection|
11
- connection.rollback_transaction if connection.transaction_open?
9
+ if ::Rails.version < "7.2"
10
+ if run_in_transaction?
11
+ ActiveSupport::Notifications.unsubscribe(@connection_subscriber) if @connection_subscriber
12
+ @fixture_connections.each do |connection|
13
+ connection.rollback_transaction if connection.transaction_open?
14
+ connection.pool.lock_thread = false
15
+ end
16
+ @fixture_connections.clear
17
+ teardown_shared_connection_pool
18
+ else
19
+ ActiveRecord::FixtureSet.reset_cache
12
20
  end
13
- @fixture_connections.clear
14
21
  else
15
- ActiveRecord::FixtureSet.reset_cache
22
+ if run_in_transaction?
23
+ teardown_transactional_fixtures
24
+ else
25
+ ActiveRecord::FixtureSet.reset_cache
26
+ invalidate_already_loaded_fixtures
27
+ end
16
28
  end
17
- ### ONCELER'd
18
29
  end
19
30
  end
@@ -51,7 +51,7 @@ module Onceler
51
51
  def record!
52
52
  Onceler.recording = true
53
53
  @tape = @group_class.new
54
- @tape.setup_fixtures
54
+ @tape.send(:setup_fixtures)
55
55
  @tape.send :extend, Recordable
56
56
  @tape.copy_from(parent_tape) if parent_tape
57
57
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: once-ler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Jensen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-21 00:00:00.000000000 Z
11
+ date: 2025-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -16,20 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '6.0'
19
+ version: '7.0'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '7.1'
22
+ version: '8.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '6.0'
29
+ version: '7.0'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '7.1'
32
+ version: '8.0'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rspec
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -73,7 +73,63 @@ dependencies:
73
73
  - !ruby/object:Gem::Version
74
74
  version: 2.3.0
75
75
  - !ruby/object:Gem::Dependency
76
- name: byebug
76
+ name: debug
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ - !ruby/object:Gem::Dependency
90
+ name: database_cleaner
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '2.0'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '2.0'
103
+ - !ruby/object:Gem::Dependency
104
+ name: database_cleaner-active_record
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '2.0'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - "~>"
115
+ - !ruby/object:Gem::Version
116
+ version: '2.0'
117
+ - !ruby/object:Gem::Dependency
118
+ name: rake
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ type: :development
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
131
+ - !ruby/object:Gem::Dependency
132
+ name: sqlite3
77
133
  requirement: !ruby/object:Gem::Requirement
78
134
  requirements:
79
135
  - - ">="
@@ -114,14 +170,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
114
170
  requirements:
115
171
  - - ">="
116
172
  - !ruby/object:Gem::Version
117
- version: '2.6'
173
+ version: '3.1'
118
174
  required_rubygems_version: !ruby/object:Gem::Requirement
119
175
  requirements:
120
176
  - - ">="
121
177
  - !ruby/object:Gem::Version
122
178
  version: 2.6.0
123
179
  requirements: []
124
- rubygems_version: 3.1.4
180
+ rubygems_version: 3.3.26
125
181
  signing_key:
126
182
  specification_version: 4
127
183
  summary: rspec supercharger