database_rewinder 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +12 -7
- data/README.md +1 -1
- data/database_rewinder.gemspec +1 -1
- data/gemfiles/rails_40.gemfile +1 -0
- data/gemfiles/rails_41.gemfile +1 -0
- data/gemfiles/rails_42.gemfile +1 -0
- data/gemfiles/rails_50.gemfile +1 -0
- data/gemfiles/rails_51.gemfile +1 -0
- data/lib/database_rewinder/active_record_monkey.rb +6 -15
- data/test/database_rewinder_test.rb +1 -1
- data/test/fake_app.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 68f7e55817b3442c32f74c7575d83dec47b44ee73c8e0dd10686869ffca8f720
|
4
|
+
data.tar.gz: 3f5e43c24343437bd8d69f3ee00015c96f3578092785d9bf166d1f3ddf72e21f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1de60041450d9fb332c53a96c36fa20414e39dfb8952834188e0885f2e99d0230b34d3e10fe3c7bd5a8147784aa38136e5f4c3e7af2636e3e6f3a156918f16d4
|
7
|
+
data.tar.gz: d0b8b8c867fb7149fd0a374a49bcae26330ebc5329b208987dc5f416224e996769b897dc7752205a7ea40f5e05a156fa1e98d1098516d8bfd5b3d3b71608299a
|
data/.travis.yml
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
language: ruby
|
2
2
|
|
3
|
+
before_install:
|
4
|
+
- gem update --system
|
5
|
+
- gem install bundler
|
6
|
+
|
3
7
|
cache: bundler
|
4
8
|
|
5
9
|
env:
|
@@ -8,24 +12,25 @@ env:
|
|
8
12
|
- DB=postgresql
|
9
13
|
|
10
14
|
rvm:
|
11
|
-
- 2.
|
12
|
-
- 2.3
|
13
|
-
- 2.
|
15
|
+
- 2.5.0
|
16
|
+
- 2.4.3
|
17
|
+
- 2.3.6
|
18
|
+
- 2.2.9
|
14
19
|
|
15
20
|
gemfile:
|
16
|
-
- gemfiles/rails_42.gemfile
|
17
|
-
- gemfiles/rails_50.gemfile
|
18
21
|
- gemfiles/rails_51.gemfile
|
22
|
+
- gemfiles/rails_50.gemfile
|
23
|
+
- gemfiles/rails_42.gemfile
|
19
24
|
- gemfiles/rails_edge.gemfile
|
20
25
|
|
21
26
|
sudo: false
|
22
27
|
|
23
28
|
matrix:
|
24
29
|
include:
|
25
|
-
- rvm: 2.3.
|
30
|
+
- rvm: 2.3.6
|
26
31
|
gemfile: gemfiles/rails_41.gemfile
|
27
32
|
env: DB=sqlite3
|
28
|
-
- rvm: 2.3.
|
33
|
+
- rvm: 2.3.6
|
29
34
|
gemfile: gemfiles/rails_40.gemfile
|
30
35
|
env: DB=sqlite3
|
31
36
|
- rvm: 2.1.10
|
data/README.md
CHANGED
data/database_rewinder.gemspec
CHANGED
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "database_rewinder"
|
8
|
-
spec.version = '0.8.
|
8
|
+
spec.version = '0.8.3'
|
9
9
|
spec.authors = ["Akira Matsuda"]
|
10
10
|
spec.email = ["ronnie@dio.jp"]
|
11
11
|
spec.description = "A minimalist's tiny and ultra-fast database cleaner"
|
data/gemfiles/rails_40.gemfile
CHANGED
data/gemfiles/rails_41.gemfile
CHANGED
data/gemfiles/rails_42.gemfile
CHANGED
data/gemfiles/rails_50.gemfile
CHANGED
data/gemfiles/rails_51.gemfile
CHANGED
@@ -13,19 +13,10 @@ module DatabaseRewinder
|
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
begin
|
23
|
-
require 'active_record/connection_adapters/postgresql_adapter'
|
24
|
-
::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.send :prepend, DatabaseRewinder::InsertRecorder
|
25
|
-
rescue LoadError
|
26
|
-
end
|
27
|
-
begin
|
28
|
-
require 'active_record/connection_adapters/abstract_mysql_adapter'
|
29
|
-
::ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter.send :prepend, DatabaseRewinder::InsertRecorder
|
30
|
-
rescue LoadError
|
16
|
+
::ActiveRecord::ConnectionAdapters::SQLite3Adapter.send :prepend, DatabaseRewinder::InsertRecorder if defined? ::ActiveRecord::ConnectionAdapters::SQLite3Adapter
|
17
|
+
::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.send :prepend, DatabaseRewinder::InsertRecorder if defined? ::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
|
18
|
+
::ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter.send :prepend, DatabaseRewinder::InsertRecorder if defined? ::ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter
|
19
|
+
|
20
|
+
def (::ActiveRecord::ConnectionAdapters::AbstractAdapter).inherited(adapter)
|
21
|
+
adapter.prepend DatabaseRewinder::InsertRecorder
|
31
22
|
end
|
@@ -131,7 +131,7 @@ class DatabaseRewinder::DatabaseRewinderTest < ActiveSupport::TestCase
|
|
131
131
|
sub_test_case 'migrations' do
|
132
132
|
test '.clean_all should not touch AR::SchemaMigration' do
|
133
133
|
begin
|
134
|
-
ActiveRecord::
|
134
|
+
ActiveRecord::SchemaMigration.create_table
|
135
135
|
ActiveRecord::SchemaMigration.create! version: '001'
|
136
136
|
DatabaseRewinder.clean_all
|
137
137
|
|
data/test/fake_app.rb
CHANGED
@@ -15,6 +15,7 @@ module DatabaseRewinderTestApp
|
|
15
15
|
end
|
16
16
|
|
17
17
|
require 'active_record/base'
|
18
|
+
ActiveRecord::Tasks::DatabaseTasks.root ||= Rails.root
|
18
19
|
ActiveRecord::Tasks::DatabaseTasks.drop_current ENV['DB']
|
19
20
|
ActiveRecord::Tasks::DatabaseTasks.drop_current "#{ENV['DB']}_2"
|
20
21
|
ActiveRecord::Tasks::DatabaseTasks.create_current ENV['DB']
|
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.8.
|
4
|
+
version: 0.8.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:
|
11
|
+
date: 2018-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -162,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
162
|
version: '0'
|
163
163
|
requirements: []
|
164
164
|
rubyforge_project:
|
165
|
-
rubygems_version: 2.
|
165
|
+
rubygems_version: 2.7.4
|
166
166
|
signing_key:
|
167
167
|
specification_version: 4
|
168
168
|
summary: A minimalist's tiny and ultra-fast database cleaner
|