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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: ee33c2d9a1ffd6b4fc293c215959ab1af83813f6
4
- data.tar.gz: eb14adbd9150c594b0da819848968128bd771fb5
2
+ SHA256:
3
+ metadata.gz: 68f7e55817b3442c32f74c7575d83dec47b44ee73c8e0dd10686869ffca8f720
4
+ data.tar.gz: 3f5e43c24343437bd8d69f3ee00015c96f3578092785d9bf166d1f3ddf72e21f
5
5
  SHA512:
6
- metadata.gz: 3be4968e470fbcff3d1b4cfcfef4f48fd706038d05802136bf0c25b5c8778ed39f27ae5dac42b008919202239cd26ba349d53828d3c28f23f5385330da53446f
7
- data.tar.gz: 16c0c14ea06967a64dc15c8b2b605d52d20e1bf658356a1a9d27430d5c86e6e5994828cf511388237ad215eadc3e9ea97486866fa79badb3b48c47a80f536fea
6
+ metadata.gz: 1de60041450d9fb332c53a96c36fa20414e39dfb8952834188e0885f2e99d0230b34d3e10fe3c7bd5a8147784aa38136e5f4c3e7af2636e3e6f3a156918f16d4
7
+ data.tar.gz: d0b8b8c867fb7149fd0a374a49bcae26330ebc5329b208987dc5f416224e996769b897dc7752205a7ea40f5e05a156fa1e98d1098516d8bfd5b3d3b71608299a
@@ -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.2.7
12
- - 2.3.4
13
- - 2.4.1
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.4
30
+ - rvm: 2.3.6
26
31
  gemfile: gemfiles/rails_41.gemfile
27
32
  env: DB=sqlite3
28
- - rvm: 2.3.4
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
@@ -25,7 +25,7 @@ This strategy was originally devised and implemented by Shingo Morita (@eudoxa)
25
25
 
26
26
  * ActiveRecord 4.0, 4.1, 4.2, 5.0, 5.1, 5.2 (edge)
27
27
 
28
- * Ruby 2.0, 2.1, 2.2, 2.3, 2.4
28
+ * Ruby 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6 (trunk)
29
29
 
30
30
  ## Installation
31
31
 
@@ -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.2'
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"
@@ -1,6 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'rails', '~> 4.0.0'
4
+ gem 'pg', '~> 0.21'
4
5
  gem 'mysql2', '~> 0.3.10'
5
6
  gem 'nokogiri', RUBY_VERSION < '2.1' ? '~> 1.6.0' : '>= 1.7'
6
7
 
@@ -1,6 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'rails', '~> 4.1.0'
4
+ gem 'pg', '~> 0.21'
4
5
  gem 'mysql2', '~> 0.3.13'
5
6
  gem 'nokogiri', RUBY_VERSION < '2.1' ? '~> 1.6.0' : '>= 1.7'
6
7
 
@@ -1,6 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'rails', '~> 4.2.0'
4
+ gem 'pg', '~> 0.21'
4
5
  gem 'nokogiri', RUBY_VERSION < '2.1' ? '~> 1.6.0' : '>= 1.7'
5
6
 
6
7
  gemspec path: '../'
@@ -1,5 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'rails', '~> 5.0.0'
4
+ gem 'pg', '~> 0.21'
4
5
 
5
6
  gemspec path: '../'
@@ -1,5 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'rails', '~> 5.1.0'
4
+ gem 'pg', '~> 0.21'
4
5
 
5
6
  gemspec path: '../'
@@ -13,19 +13,10 @@ module DatabaseRewinder
13
13
  end
14
14
  end
15
15
 
16
- #FIXME can we not load 'em?
17
- begin
18
- require 'active_record/connection_adapters/sqlite3_adapter'
19
- ::ActiveRecord::ConnectionAdapters::SQLite3Adapter.send :prepend, DatabaseRewinder::InsertRecorder
20
- rescue LoadError
21
- end
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::Base.connection.initialize_schema_migrations_table
134
+ ActiveRecord::SchemaMigration.create_table
135
135
  ActiveRecord::SchemaMigration.create! version: '001'
136
136
  DatabaseRewinder.clean_all
137
137
 
@@ -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.2
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: 2017-05-19 00:00:00.000000000 Z
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.6.12
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