database_cleaner 0.6.7.RC → 0.6.7

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- :patch: 6
2
+ :patch: 7
3
3
  :major: 0
4
4
  :build:
5
5
  :minor: 6
@@ -0,0 +1,34 @@
1
+ require 'database_cleaner/active_record/base'
2
+ class Foo
3
+ def bar
4
+ "fdfd"
5
+ end
6
+ def zaz(x,y)
7
+ end
8
+ end
9
+ module DatabaseCleaner::ActiveRecord
10
+ class Transaction
11
+ include ::DatabaseCleaner::ActiveRecord::Base
12
+
13
+ def start
14
+ connection_klass.Foo
15
+ if connection_klass.connection.respond_to?(:increment_open_transactions)
16
+ connection_klass.connection.increment_open_transactions
17
+ else
18
+ connection_klass.__send__(:increment_open_transactions)
19
+ end
20
+ connection_klass.connection.begin_db_transaction
21
+ end
22
+
23
+
24
+ def clean
25
+ connection_klass.connection.rollback_db_transaction
26
+
27
+ if connection_klass.connection.respond_to?(:decrement_open_transactions)
28
+ connection_klass.connection.decrement_open_transactions
29
+ else
30
+ connection_klass.__send__(:decrement_open_transactions)
31
+ end
32
+ end
33
+ end
34
+ end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: database_cleaner
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5547382
5
- prerelease: true
4
+ hash: 9
5
+ prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
9
  - 7
10
- - RC
11
- version: 0.6.7.RC
10
+ version: 0.6.7
12
11
  platform: ruby
13
12
  authors:
14
13
  - Ben Mabey
@@ -16,7 +15,7 @@ autorequire:
16
15
  bindir: bin
17
16
  cert_chain: []
18
17
 
19
- date: 2011-03-24 00:00:00 -06:00
18
+ date: 2011-04-21 00:00:00 -06:00
20
19
  default_executable:
21
20
  dependencies: []
22
21
 
@@ -64,6 +63,7 @@ files:
64
63
  - features/support/env.rb
65
64
  - features/support/feature_runner.rb
66
65
  - lib/database_cleaner.rb
66
+ - lib/database_cleaner/active_record/#transaction.rb#
67
67
  - lib/database_cleaner/active_record/base.rb
68
68
  - lib/database_cleaner/active_record/deletion.rb
69
69
  - lib/database_cleaner/active_record/transaction.rb