isolator 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +5 -0
- data/isolator.gemspec +1 -0
- data/lib/isolator.rb +1 -0
- data/lib/isolator/database_cleaner_support.rb +17 -0
- data/lib/isolator/version.rb +1 -1
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3330be0a90b276b54420aa7a44a79417cacb5c55edb2fc59bc1f6fa85774d5d3
|
4
|
+
data.tar.gz: d97281da4ea2e8f8cfb92703035b76e1e47969477fb1f462c9f382183439ce7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e74da7cd7c11f149b3e2d80f1b23ea6ee605de8219d9ae54576019bb42ef010f53f185e648dae4fe1fc007e7f38d3dd2ad19b1fdf6542266ff2f03f50cc6cdd
|
7
|
+
data.tar.gz: 91ab7e065521a8a0ebb001528fbf31e6df2008089b0e9f544a4c2c128278f321f652bde932d0e3c46eb79f8121289de763946f012946f57eba72ba6a027b1616
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
## master
|
4
|
+
|
5
|
+
## 0.3.0 (2018-04-02)
|
6
|
+
|
7
|
+
- Add support for the [database_cleaner](https://github.com/DatabaseCleaner/database_cleaner) gem. ([@Envek][])
|
8
|
+
|
3
9
|
## 0.2.2 (2018-03-28)
|
4
10
|
|
5
11
|
- [Fix [#14](https://github.com/palkan/isolator/issues/14)] Always use default value for threshold. ([@palkan][])
|
@@ -35,3 +41,4 @@
|
|
35
41
|
[@alexshgov]: https://github.com/alexshgov
|
36
42
|
[@TheSmartnik]: https://github.com/TheSmartnik
|
37
43
|
[@dsalahutdinov]: https://github.com/dsalahutdinov
|
44
|
+
[@Envek]: https://github.com/Envek
|
data/README.md
CHANGED
@@ -98,6 +98,11 @@ Isolator relys on [uniform_notifier][] to send custom notifications.
|
|
98
98
|
|
99
99
|
**NOTE:** `uniform_notifier` should be installed separately (i.e., added to Gemfile).
|
100
100
|
|
101
|
+
### Transactional tests support
|
102
|
+
|
103
|
+
- Rails' baked-in [use_transactional_tests](api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html#class-ActiveRecord::FixtureSet-label-Transactional+Tests)
|
104
|
+
- [database_cleaner](https://github.com/DatabaseCleaner/database_cleaner) gem. Make sure that you require isolator _after_ database_cleaner.
|
105
|
+
|
101
106
|
### Supported ORMs
|
102
107
|
|
103
108
|
- `ActiveRecord` >= 4.1
|
data/isolator.gemspec
CHANGED
data/lib/isolator.rb
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "database_cleaner/active_record/transaction"
|
4
|
+
|
5
|
+
::DatabaseCleaner::ActiveRecord::Transaction.prepend(
|
6
|
+
Module.new do
|
7
|
+
def start
|
8
|
+
super
|
9
|
+
Isolator.transactions_threshold += 1
|
10
|
+
end
|
11
|
+
|
12
|
+
def clean
|
13
|
+
Isolator.transactions_threshold -= 1
|
14
|
+
super
|
15
|
+
end
|
16
|
+
end
|
17
|
+
)
|
data/lib/isolator/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isolator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladimir Dementyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sniffer
|
@@ -234,6 +234,20 @@ dependencies:
|
|
234
234
|
- - ">="
|
235
235
|
- !ruby/object:Gem::Version
|
236
236
|
version: '0'
|
237
|
+
- !ruby/object:Gem::Dependency
|
238
|
+
name: database_cleaner
|
239
|
+
requirement: !ruby/object:Gem::Requirement
|
240
|
+
requirements:
|
241
|
+
- - ">="
|
242
|
+
- !ruby/object:Gem::Version
|
243
|
+
version: '0'
|
244
|
+
type: :development
|
245
|
+
prerelease: false
|
246
|
+
version_requirements: !ruby/object:Gem::Requirement
|
247
|
+
requirements:
|
248
|
+
- - ">="
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
version: '0'
|
237
251
|
description: Detect non-atomic interactions within DB transactions
|
238
252
|
email:
|
239
253
|
- dementiev.vm@gmail.com
|
@@ -273,6 +287,7 @@ files:
|
|
273
287
|
- lib/isolator/adapters/mailers/mail.rb
|
274
288
|
- lib/isolator/callbacks.rb
|
275
289
|
- lib/isolator/configuration.rb
|
290
|
+
- lib/isolator/database_cleaner_support.rb
|
276
291
|
- lib/isolator/errors.rb
|
277
292
|
- lib/isolator/ext/thread_fetch.rb
|
278
293
|
- lib/isolator/isolate.rb
|