database_rewinder 0.9.9 → 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: 395cf45a9155494fbaa28f887a793d3780c6c4dea757e53d9c9057ddec96baca
4
- data.tar.gz: 68088ac4f44554359f87e946db585812301557287c5f3b63b88c1c45b29f865d
3
+ metadata.gz: fba90991ea75253ed37624e82b4f6c26ae379f4c3b1d24a522192befb8529757
4
+ data.tar.gz: 70c3c776b0e291b49a873e503f4111cb537e9685479176527cd94de9a663cff2
5
5
  SHA512:
6
- metadata.gz: 80e0acaed09f0606b8ae715e072c9d9198c97fcd07cedbda94c1442ef256970e89da10a983935724440fb98362210bf986f800051b79223c828061828e563b68
7
- data.tar.gz: d0c1275d8ee0a691271a5569c499f1c23c98167089935161b798090d84b1136039ca4c7d9b34186688d48671c821b18a754614c3fc2683b93907ffdf92bbdd4d
6
+ metadata.gz: 457ed185619931c3aba3c9dd0b1a03b2156e712bfae655300d737bb1ac54ccc86a2d0256878ca7e765a2bd55e8798f6a855a9420eb5c2b8123cbd68b1298646b
7
+ data.tar.gz: ad40ddaa9b69d852a3001d60c6673dcd335a4171c7c77d05245b94f0c022a71a33bef1c323d7ddc6c1297498ea18ad52037ea78f8c17335a15d7a280fcf378a8
@@ -27,39 +27,71 @@ jobs:
27
27
 
28
28
  matrix:
29
29
  db: [sqlite3, postgresql, mysql]
30
- ruby_version: [ruby-head, '3.2', '3.1', '3.0', '2.7', '2.6']
30
+ ruby_version: [ruby-head, '3.3', '3.2', '3.1']
31
31
  rails_version: [edge, '7.1', '7.0', '6.1']
32
32
 
33
33
  exclude:
34
- - ruby_version: '2.6'
35
- rails_version: edge
36
-
37
- - ruby_version: '2.6'
38
- rails_version: '7.1'
39
-
40
- - ruby_version: '2.6'
41
- rails_version: '7.0'
42
-
43
34
  - ruby_version: ruby-head
44
35
  rails_version: '6.1'
45
36
 
46
37
  include:
38
+ - ruby_version: '3.0'
39
+ rails_version: '7.1'
40
+ db: sqlite3
41
+ - ruby_version: '3.0'
42
+ rails_version: '7.1'
43
+ db: postgresql
44
+ - ruby_version: '3.0'
45
+ rails_version: '7.1'
46
+ db: mysql
47
+
47
48
  - ruby_version: '2.7'
48
- rails_version: '6.0'
49
+ rails_version: '7.1'
49
50
  db: sqlite3
50
51
  - ruby_version: '2.7'
51
- rails_version: '6.0'
52
+ rails_version: '7.1'
52
53
  db: postgresql
53
54
  - ruby_version: '2.7'
54
- rails_version: '6.0'
55
+ rails_version: '7.1'
55
56
  db: mysql
57
+
58
+ - ruby_version: '2.7'
59
+ rails_version: '7.0'
60
+ db: sqlite3
61
+ - ruby_version: '2.7'
62
+ rails_version: '7.0'
63
+ db: postgresql
64
+ - ruby_version: '2.7'
65
+ rails_version: '7.0'
66
+ db: mysql
67
+
68
+ - ruby_version: '3.0'
69
+ rails_version: '6.1'
70
+ db: sqlite3
71
+ - ruby_version: '3.0'
72
+ rails_version: '6.1'
73
+ db: postgresql
74
+ - ruby_version: '3.0'
75
+ rails_version: '6.1'
76
+ db: mysql
77
+
56
78
  - ruby_version: '2.6'
57
- rails_version: '6.0'
79
+ rails_version: '6.1'
58
80
  db: sqlite3
59
81
  - ruby_version: '2.6'
60
- rails_version: '6.0'
82
+ rails_version: '6.1'
61
83
  db: postgresql
62
84
  - ruby_version: '2.6'
85
+ rails_version: '6.1'
86
+ db: mysql
87
+
88
+ - ruby_version: '2.7'
89
+ rails_version: '6.0'
90
+ db: sqlite3
91
+ - ruby_version: '2.7'
92
+ rails_version: '6.0'
93
+ db: postgresql
94
+ - ruby_version: '2.7'
63
95
  rails_version: '6.0'
64
96
  db: mysql
65
97
 
@@ -6,7 +6,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
6
 
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = "database_rewinder"
9
- spec.version = '0.9.9'
9
+ spec.version = '1.0.0'
10
10
  spec.authors = ["Akira Matsuda"]
11
11
  spec.email = ["ronnie@dio.jp"]
12
12
  spec.description = "A minimalist's tiny and ultra-fast database cleaner for Active Record"
@@ -22,6 +22,8 @@ module DatabaseRewinder
22
22
  end
23
23
 
24
24
  def [](connection)
25
+ init unless defined? @cleaners
26
+
25
27
  @cleaners.detect {|c| c.connection_name == connection} || create_cleaner(connection)
26
28
  end
27
29
 
@@ -75,7 +77,12 @@ module DatabaseRewinder
75
77
  def all_table_names(connection)
76
78
  cache_key = get_cache_key(connection.pool)
77
79
  #NOTE connection.tables warns on AR 5 with some adapters
78
- tables = ActiveSupport::Deprecation.silence { connection.tables }
80
+ tables =
81
+ if Rails.application.respond_to?(:deprecators) # AR >= 7.1
82
+ Rails.application.deprecators.silence { connection.tables }
83
+ else
84
+ ActiveSupport::Deprecation.silence { connection.tables }
85
+ end
79
86
  schema_migraion_table_name =
80
87
  if ActiveRecord::SchemaMigration.respond_to?(:table_name)
81
88
  ActiveRecord::SchemaMigration.table_name
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: database_rewinder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.9
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akira Matsuda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-15 00:00:00.000000000 Z
11
+ date: 2024-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  - !ruby/object:Gem::Version
114
114
  version: '0'
115
115
  requirements: []
116
- rubygems_version: 3.5.0.dev
116
+ rubygems_version: 3.6.0.dev
117
117
  signing_key:
118
118
  specification_version: 4
119
119
  summary: A minimalist's tiny and ultra-fast database cleaner