database_rewinder 0.6.2 → 0.6.3

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
  SHA1:
3
- metadata.gz: 70cd0f51b849539feec719bbf68bb60d77e09ba7
4
- data.tar.gz: 455acac10ab372369f4690bf82b746e9ffad412b
3
+ metadata.gz: 3c7028623a6fd17b7d6badc9203dd48468278a15
4
+ data.tar.gz: 69dd0c5d66908f6e780580ee3675d32fb64db0e3
5
5
  SHA512:
6
- metadata.gz: bdc53773b318806bb92885a582025a03d0208e229e496167c71d96a7f1631f7d65244373cc86156891a744ad20670516b0c9273f753aa5d79097572033025091
7
- data.tar.gz: a5ef0db1590adc1ea635c90bcfeea4566eed18e8434277a41ac723b2dbb6ca7b1eaad58e6c125e0910801166724f8876fa80ad36198b16ca1202a8506d513c0e
6
+ metadata.gz: a77f0ee23ab3b06b1d7d3998474732ec23f4e8d372c2b353bb68a2d5905facfe8925f5fe43932df763f2866170b48af87dd323b693903874c989696f2e6c8c13
7
+ data.tar.gz: 6151852cdd95247b417a17b370d25a9287a227a6d35556441a86f6f6493d859f5fe3914ca878b4ea7773773e5cf3a145b3b072a8365ea431624de5aad374863a
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "database_rewinder"
7
- spec.version = '0.6.2'
7
+ spec.version = '0.6.3'
8
8
  spec.authors = ["Akira Matsuda"]
9
9
  spec.email = ["ronnie@dio.jp"]
10
10
  spec.description = "A minimalist's tiny and ultra-fast database cleaner"
@@ -72,8 +72,9 @@ module DatabaseRewinder
72
72
  # cache AR connection.tables
73
73
  def all_table_names(connection)
74
74
  db = connection.pool.spec.config[:database]
75
- data_sources = connection.respond_to?(:data_sources) ? connection.data_sources : connection.tables
76
- @table_names_cache[db] ||= data_sources.reject do |t|
75
+ #NOTE connection.tables warns on AR 5 with some adapters
76
+ tables = ActiveRecord::Base.logger.silence { connection.tables }
77
+ @table_names_cache[db] ||= tables.reject do |t|
77
78
  (t == ActiveRecord::Migrator.schema_migrations_table_name) ||
78
79
  (ActiveRecord::Base.respond_to?(:internal_metadata_table_name) && (t == ActiveRecord::Base.internal_metadata_table_name))
79
80
  end
@@ -38,7 +38,7 @@ module DatabaseRewinder
38
38
  if connection.nil?
39
39
  if orm.is_a? String
40
40
  connection = orm
41
- elsif orm.is_a?(Hash) && orm.has_key?(:connection)
41
+ elsif orm.is_a?(Hash) && orm.key?(:connection)
42
42
  connection = orm[:connection]
43
43
  end
44
44
  end
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.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akira Matsuda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-04 00:00:00.000000000 Z
11
+ date: 2016-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  version: '0'
133
133
  requirements: []
134
134
  rubyforge_project:
135
- rubygems_version: 2.6.4
135
+ rubygems_version: 2.5.1
136
136
  signing_key:
137
137
  specification_version: 4
138
138
  summary: A minimalist's tiny and ultra-fast database cleaner