database_rewinder 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -0
- data/database_rewinder.gemspec +1 -1
- data/gemfiles/rails_50.gemfile +1 -1
- data/lib/database_rewinder.rb +2 -1
- data/test/test_helper.rb +2 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d281c6087756dd83155fc23873c02d06194f000
|
4
|
+
data.tar.gz: d7a07bde4982b12e753c9cf7c9f017c558ddd122
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7c3c5b02e0ce2e26bff1ec8663090acf9b36e54b68de18e6038347e6d5776ad3bb50208680602dca93f03af4c5e47591d4fc41221b457b7a61243537989ed1a
|
7
|
+
data.tar.gz: d774ab040272c850e8e5603ca42c288a08271aab4f96e46751ce51e6eba2fb18ecf526f640126027514bb4d122fecb75445fb1fbee6242f20bc39716c72fd918
|
data/.travis.yml
CHANGED
@@ -11,6 +11,7 @@ gemfile:
|
|
11
11
|
- gemfiles/rails_40.gemfile
|
12
12
|
- gemfiles/rails_41.gemfile
|
13
13
|
- gemfiles/rails_42.gemfile
|
14
|
+
- gemfiles/rails_50.gemfile
|
14
15
|
- gemfiles/rails_edge.gemfile
|
15
16
|
|
16
17
|
sudo: false
|
@@ -21,3 +22,7 @@ matrix:
|
|
21
22
|
gemfile: gemfiles/rails_edge.gemfile
|
22
23
|
- rvm: 2.1.10
|
23
24
|
gemfile: gemfiles/rails_edge.gemfile
|
25
|
+
- rvm: 2.0.0
|
26
|
+
gemfile: gemfiles/rails_50.gemfile
|
27
|
+
- rvm: 2.1.10
|
28
|
+
gemfile: gemfiles/rails_50.gemfile
|
data/database_rewinder.gemspec
CHANGED
@@ -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.
|
7
|
+
spec.version = '0.6.1'
|
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"
|
data/gemfiles/rails_50.gemfile
CHANGED
data/lib/database_rewinder.rb
CHANGED
@@ -72,7 +72,8 @@ module DatabaseRewinder
|
|
72
72
|
# cache AR connection.tables
|
73
73
|
def all_table_names(connection)
|
74
74
|
db = connection.pool.spec.config[:database]
|
75
|
-
|
75
|
+
data_sources = connection.respond_to?(:data_sources) ? connection.data_sources : connection.tables
|
76
|
+
@table_names_cache[db] ||= data_sources.reject {|t| t == ActiveRecord::Migrator.schema_migrations_table_name }
|
76
77
|
end
|
77
78
|
end
|
78
79
|
end
|
data/test/test_helper.rb
CHANGED
@@ -9,7 +9,8 @@ require 'database_rewinder'
|
|
9
9
|
require 'fake_app'
|
10
10
|
require 'test/unit/rails/test_help'
|
11
11
|
|
12
|
-
|
12
|
+
migrated = ActiveRecord::Base.connection.respond_to?(:data_source_exists?) ? ActiveRecord::Base.connection.data_source_exists?('foos') : ActiveRecord::Base.connection.table_exists?('foos')
|
13
|
+
CreateAllTables.up unless migrated
|
13
14
|
|
14
15
|
module DeleteAllTables
|
15
16
|
def teardown
|
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.
|
4
|
+
version: 0.6.1
|
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-
|
11
|
+
date: 2016-07-04 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.
|
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
|