once-ler 0.1.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/onceler.rb +7 -0
- data/lib/onceler/extensions/active_record.rb +16 -4
- data/lib/onceler/transactions.rb +1 -1
- data/lib/onceler/transactions/{active_record_4.rb → active_record.rb} +0 -0
- metadata +30 -12
- data/lib/onceler/extensions/active_record_4_0.rb +0 -19
- data/lib/onceler/extensions/active_record_4_1.rb +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca5a789c430056627c2d72fee00c15255b7fa5a87674691e97c5e634cbf080fd
|
4
|
+
data.tar.gz: b0b8b75be9608e4a460d6767ef24d9e12ba66a5c08063df81d999de1b566335a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7384764c1e629c58da218f6025cb8cbecf977cbc5eec6ad037f795afc65075801da0f473940a0bd93c54d3e60504cf4dc81cb7e792267ac80ec33bf166cc5fa1
|
7
|
+
data.tar.gz: 831778e865fe5fa87aaaf00d4e4736c612a560375ed6d8fea213319eb7cbb221bc37e468b23079913456ba3d883fe2a591cbce2972bcdeb96f272b58ac38320f
|
data/lib/onceler.rb
CHANGED
@@ -1,7 +1,14 @@
|
|
1
1
|
require "rspec"
|
2
|
+
require "rubygems"
|
3
|
+
|
2
4
|
require "onceler/basic_helpers"
|
3
5
|
require "onceler/configuration"
|
4
6
|
require "onceler/extensions/active_record"
|
7
|
+
|
5
8
|
if defined?(DatabaseCleaner)
|
9
|
+
unless !DatabaseCleaner.const_defined?("VERSION") ||
|
10
|
+
Gem::Requirement.new("~> 1.7").satisfied_by?(Gem::Version.new(DatabaseCleaner::VERSION))
|
11
|
+
raise "Onceler in only compatible with DatabaseCleaner ~> 1.7."
|
12
|
+
end
|
6
13
|
require "onceler/extensions/database_cleaner"
|
7
14
|
end
|
@@ -1,7 +1,19 @@
|
|
1
1
|
require "active_record"
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
# monkey-patch this to not clear connections so that we don't lose our
|
4
|
+
# transactions
|
5
|
+
|
6
|
+
module ActiveRecord::TestFixtures
|
7
|
+
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?
|
12
|
+
end
|
13
|
+
@fixture_connections.clear
|
14
|
+
else
|
15
|
+
ActiveRecord::FixtureSet.reset_cache
|
16
|
+
end
|
17
|
+
### ONCELER'd
|
18
|
+
end
|
7
19
|
end
|
data/lib/onceler/transactions.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
require "active_record"
|
2
|
-
require "onceler/transactions/
|
2
|
+
require "onceler/transactions/active_record"
|
File without changes
|
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: 0.
|
4
|
+
version: 1.0.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:
|
11
|
+
date: 2020-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -16,28 +16,48 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '5.0'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '6.1'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
29
|
+
version: '5.0'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '6.1'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: rspec
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
37
|
- - ">="
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version: '3.
|
39
|
+
version: '3.6'
|
34
40
|
type: :runtime
|
35
41
|
prerelease: false
|
36
42
|
version_requirements: !ruby/object:Gem::Requirement
|
37
43
|
requirements:
|
38
44
|
- - ">="
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version: '3.
|
46
|
+
version: '3.6'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: appraisal
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '2.2'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '2.2'
|
41
61
|
- !ruby/object:Gem::Dependency
|
42
62
|
name: byebug
|
43
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,13 +86,11 @@ files:
|
|
66
86
|
- lib/onceler/basic_helpers.rb
|
67
87
|
- lib/onceler/configuration.rb
|
68
88
|
- lib/onceler/extensions/active_record.rb
|
69
|
-
- lib/onceler/extensions/active_record_4_0.rb
|
70
|
-
- lib/onceler/extensions/active_record_4_1.rb
|
71
89
|
- lib/onceler/extensions/database_cleaner.rb
|
72
90
|
- lib/onceler/recordable.rb
|
73
91
|
- lib/onceler/recorder.rb
|
74
92
|
- lib/onceler/transactions.rb
|
75
|
-
- lib/onceler/transactions/
|
93
|
+
- lib/onceler/transactions/active_record.rb
|
76
94
|
homepage: http://github.com/instructure/once-ler
|
77
95
|
licenses: []
|
78
96
|
metadata: {}
|
@@ -84,15 +102,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
84
102
|
requirements:
|
85
103
|
- - ">="
|
86
104
|
- !ruby/object:Gem::Version
|
87
|
-
version:
|
105
|
+
version: '2.4'
|
88
106
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
107
|
requirements:
|
90
108
|
- - ">="
|
91
109
|
- !ruby/object:Gem::Version
|
92
|
-
version:
|
110
|
+
version: 2.6.0
|
93
111
|
requirements: []
|
94
112
|
rubyforge_project:
|
95
|
-
rubygems_version: 2.7.6
|
113
|
+
rubygems_version: 2.7.6.2
|
96
114
|
signing_key:
|
97
115
|
specification_version: 4
|
98
116
|
summary: rspec supercharger
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# monkey-patch this to not clear connections so that we don't lose our
|
2
|
-
# transactions
|
3
|
-
|
4
|
-
module ActiveRecord::TestFixtures
|
5
|
-
def teardown_fixtures
|
6
|
-
return if ActiveRecord::Base.configurations.blank?
|
7
|
-
|
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?
|
12
|
-
end
|
13
|
-
@fixture_connections.clear
|
14
|
-
else
|
15
|
-
ActiveRecord::FixtureSet.reset_cache
|
16
|
-
end
|
17
|
-
### ONCELER'd
|
18
|
-
end
|
19
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# monkey-patch this to not clear connections so that we don't lose our
|
2
|
-
# transactions
|
3
|
-
|
4
|
-
module ActiveRecord::TestFixtures
|
5
|
-
def teardown_fixtures
|
6
|
-
# Rollback changes if a transaction is active.
|
7
|
-
if run_in_transaction?
|
8
|
-
@fixture_connections.each do |connection|
|
9
|
-
connection.rollback_transaction if connection.transaction_open?
|
10
|
-
end
|
11
|
-
@fixture_connections.clear
|
12
|
-
else
|
13
|
-
ActiveRecord::FixtureSet.reset_cache
|
14
|
-
end
|
15
|
-
### ONCELER'd
|
16
|
-
end
|
17
|
-
end
|