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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d070c6fcc9f43b0c3f46b28046a64bee1476a3f2e6369e386bf918ae8d5717b1
4
- data.tar.gz: 7022f92a6f2d92a1e35cdf08362606b7b7dc4e446c070fe77dbf8bb503971aae
3
+ metadata.gz: ca5a789c430056627c2d72fee00c15255b7fa5a87674691e97c5e634cbf080fd
4
+ data.tar.gz: b0b8b75be9608e4a460d6767ef24d9e12ba66a5c08063df81d999de1b566335a
5
5
  SHA512:
6
- metadata.gz: 01c8cc6c6a2964809cc65a8dfde2c35ca8a8fbfc3e777552e689e544bfe31aa3d5011fcb779de1f358186ad5c73d3ffbef53ad4a2f8128d3ac36a6ed3323cc60
7
- data.tar.gz: 7f6568a41e20f9c41d24fb2abca6297db5d5b7a0ddc2255bcfd75091535d2c6640742c8e78d7d8a73e5fd3f14418e82bb87a25ca382b6a86574b822decc43a45
6
+ metadata.gz: 7384764c1e629c58da218f6025cb8cbecf977cbc5eec6ad037f795afc65075801da0f473940a0bd93c54d3e60504cf4dc81cb7e792267ac80ec33bf166cc5fa1
7
+ data.tar.gz: 831778e865fe5fa87aaaf00d4e4736c612a560375ed6d8fea213319eb7cbb221bc37e468b23079913456ba3d883fe2a591cbce2972bcdeb96f272b58ac38320f
@@ -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
- if ActiveRecord::VERSION::STRING >= "4.1."
4
- require "onceler/extensions/active_record_4_1"
5
- else
6
- require "onceler/extensions/active_record_4_0"
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
@@ -1,2 +1,2 @@
1
1
  require "active_record"
2
- require "onceler/transactions/active_record_4"
2
+ require "onceler/transactions/active_record"
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.1.4
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: 2018-05-10 00:00:00.000000000 Z
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: '4.0'
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: '4.0'
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.0'
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.0'
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/active_record_4.rb
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: 1.9.3
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: 1.3.5
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