database_cleaner 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,10 @@
1
1
  0.4.x (In Git)
2
2
 
3
+ == 0.4.2 2010-01-12
4
+
5
+ === Bufixes
6
+ * Datamapper truncation now uses 'select' instead of deprecated the 'query' method. (Steve Tooke)
7
+
3
8
  == 0.4.1 2010-01-07
4
9
 
5
10
  === Bufixes
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :minor: 4
3
- :patch: 1
3
+ :patch: 2
4
4
  :build:
5
5
  :major: 0
@@ -15,7 +15,7 @@ module DataMapper
15
15
 
16
16
  # taken from http://github.com/godfat/dm-mapping/tree/master
17
17
  def storage_names(repository = :default)
18
- query 'SHOW TABLES'
18
+ select 'SHOW TABLES'
19
19
  end
20
20
 
21
21
  def truncate_table(table_name)
@@ -24,7 +24,7 @@ module DataMapper
24
24
 
25
25
  # copied from activerecord
26
26
  def disable_referential_integrity
27
- old = query("SELECT @@FOREIGN_KEY_CHECKS;")
27
+ old = select("SELECT @@FOREIGN_KEY_CHECKS;")
28
28
  begin
29
29
  execute("SET FOREIGN_KEY_CHECKS = 0;")
30
30
  yield
@@ -46,7 +46,7 @@ module DataMapper
46
46
  WHERE type = 'table' AND NOT name = 'sqlite_sequence'
47
47
  SQL
48
48
  # activerecord-2.1.0/lib/active_record/connection_adapters/sqlite_adapter.rb: 181
49
- query sql
49
+ select sql
50
50
  end
51
51
 
52
52
  def truncate_table(table_name)
@@ -76,7 +76,7 @@ module DataMapper
76
76
  SELECT table_name FROM "information_schema"."tables"
77
77
  WHERE table_schema = current_schema()
78
78
  SQL
79
- query(sql)
79
+ select(sql)
80
80
  end
81
81
 
82
82
  def truncate_table(table_name)
@@ -86,7 +86,7 @@ module DataMapper
86
86
  # FIXME
87
87
  # copied from activerecord
88
88
  def supports_disable_referential_integrity?
89
- version = query("SHOW server_version")[0][0].split('.')
89
+ version = select("SHOW server_version")[0][0].split('.')
90
90
  (version[0].to_i >= 8 && version[1].to_i >= 1) ? true : false
91
91
  rescue
92
92
  return false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: database_cleaner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Mabey
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-07 00:00:00 -07:00
12
+ date: 2010-01-12 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15