database_cleaner-sequel 1.8.0.beta → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/.travis.yml +9 -3
- data/Gemfile +7 -3
- data/README.md +55 -42
- data/bin/setup +38 -2
- data/database_cleaner-sequel.gemspec +9 -14
- data/docker-compose.yml +29 -0
- data/lib/database_cleaner/sequel.rb +3 -2
- data/lib/database_cleaner/sequel/base.rb +3 -16
- data/lib/database_cleaner/sequel/deletion.rb +33 -33
- data/lib/database_cleaner/sequel/transaction.rb +3 -19
- data/lib/database_cleaner/sequel/truncation.rb +7 -5
- data/lib/database_cleaner/sequel/version.rb +1 -1
- metadata +22 -35
- data/Gemfile.lock +0 -52
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ba0b85c908c1b8e2a4f9e5dc3929503e668b274bf0dbdc9f8325f04beba4617
|
4
|
+
data.tar.gz: aa17280bb426baea132843cae876444c26f8a07d558e51a1914a5ac6eebc927b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19fa8eb6abc7692c7b794d95aa2ebf3e7a50ca46454d811dcab1e78a04a70b98823957a1625cd7ae872f054b487dcfab00d02e47c5db71b0fa076e088fe05d8c
|
7
|
+
data.tar.gz: 6267fcee3c62ddfa27829885ac6422a24df7a53e1c608716638090d7eced6a6ed0ddc5731a89e01743599415c697d040e4d06d7cc4d71bd295a348b1485d9ccf
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
|
3
|
-
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
|
4
|
-
|
5
3
|
# Specify your gem's dependencies in database_cleaner-sequel.gemspec
|
6
4
|
gemspec
|
7
5
|
|
8
|
-
gem "database_cleaner",
|
6
|
+
gem "database_cleaner-core", git: "https://github.com/DatabaseCleaner/database_cleaner"
|
7
|
+
gem "byebug"
|
8
|
+
|
9
|
+
group :test do
|
10
|
+
gem "simplecov", require: false
|
11
|
+
gem "codecov", require: false
|
12
|
+
end
|
data/README.md
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/DatabaseCleaner/database_cleaner-sequel.svg?branch=master)](https://travis-ci.org/DatabaseCleaner/database_cleaner-sequel)
|
4
4
|
[![Code Climate](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-sequel/badges/gpa.svg)](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-sequel)
|
5
|
+
[![codecov](https://codecov.io/gh/DatabaseCleaner/database_cleaner-sequel/branch/master/graph/badge.svg)](https://codecov.io/gh/DatabaseCleaner/database_cleaner-sequel)
|
5
6
|
|
6
7
|
Clean your Sequel databases with Database Cleaner.
|
7
8
|
|
@@ -16,50 +17,62 @@ group :test do
|
|
16
17
|
end
|
17
18
|
```
|
18
19
|
|
20
|
+
```ruby
|
21
|
+
# test_helper.rb
|
22
|
+
DatabaseCleaner[:sequel].strategy = :transaction
|
23
|
+
|
24
|
+
class Minitest::Spec
|
25
|
+
before :each do
|
26
|
+
DatabaseCleaner[:sequel].start
|
27
|
+
end
|
28
|
+
|
29
|
+
after :each do
|
30
|
+
DatabaseCleaner[:sequel].clean
|
31
|
+
end
|
32
|
+
end
|
33
|
+
```
|
34
|
+
|
19
35
|
## Supported Strategies
|
20
36
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
</tr>
|
35
|
-
</tbody>
|
36
|
-
</table>
|
37
|
-
|
38
|
-
(Default strategy is denoted in bold)
|
39
|
-
|
40
|
-
## Configuration options
|
41
|
-
|
42
|
-
<table>
|
43
|
-
<tbody>
|
44
|
-
<tr>
|
45
|
-
<th>ORM</th>
|
46
|
-
<th>How to access</th>
|
47
|
-
<th>Notes</th>
|
48
|
-
</tr>
|
49
|
-
<tr>
|
50
|
-
<td> Sequel</td>
|
51
|
-
<td> <code>DatabaseCleaner[:sequel]</code></td>
|
52
|
-
<td> Multiple databases supported; specify <code>DatabaseCleaner[:sequel, {:connection => Sequel.connect(uri)}]</code></td>
|
53
|
-
</tr>
|
54
|
-
</tbody>
|
55
|
-
</table>
|
56
|
-
|
57
|
-
## Common Errors
|
58
|
-
|
59
|
-
### Nothing happens in JRuby with Sequel using transactions
|
60
|
-
|
61
|
-
Due to an inconsistency in JRuby's implementation of Fibers, Sequel gives a different connection to `DatabaseCleaner.start` than is used for tests run between `.start` and `.clean`. This can be worked around by running your tests in a block like `DatabaseCleaner.cleaning { run_my_tests }` instead, which does not use Fibers.
|
37
|
+
Three strategies are supported:
|
38
|
+
|
39
|
+
* Transaction (default)
|
40
|
+
* Truncation
|
41
|
+
* Deletion
|
42
|
+
|
43
|
+
## Strategy configuration options
|
44
|
+
|
45
|
+
The transaction strategy accepts no options.
|
46
|
+
|
47
|
+
The truncation and deletion strategies may accept the following options:
|
48
|
+
|
49
|
+
* `:only` and `:except` may take a list of table names:
|
62
50
|
|
51
|
+
```ruby
|
52
|
+
# Only truncate the "users" table.
|
53
|
+
DatabaseCleaner[:sequel].strategy = :truncation, { only: ["users"] }
|
54
|
+
|
55
|
+
# Delete all tables except the "users" table.
|
56
|
+
DatabaseCleaner[:sequel].strategy = :deletion, { except: ["users"] }
|
57
|
+
```
|
58
|
+
|
59
|
+
* `:pre_count` - When set to `true`, this will check each table for existing rows before truncating or deleting it. This can speed up test suites when many of the tables are never populated. Defaults to `false`.
|
60
|
+
|
61
|
+
## Adapter configuration options
|
62
|
+
|
63
|
+
`#db` defaults to the default Sequel database, but can be specified manually in a few ways:
|
64
|
+
|
65
|
+
```ruby
|
66
|
+
# Sequel connection object
|
67
|
+
DatabaseCleaner[:sequel].db = Sequel.connect(uri)
|
68
|
+
|
69
|
+
# Back to default:
|
70
|
+
DatabaseCleaner[:sequel].db = :default
|
71
|
+
|
72
|
+
# Multiple Sequel databases can be specified:
|
73
|
+
DatabaseCleaner[:sequel, connection: :default]
|
74
|
+
DatabaseCleaner[:sequel, connection: Sequel.connect(uri)]
|
75
|
+
```
|
63
76
|
## COPYRIGHT
|
64
77
|
|
65
|
-
See [LICENSE] for details.
|
78
|
+
See [LICENSE](LICENSE) for details.
|
data/bin/setup
CHANGED
@@ -1,8 +1,44 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
set -euo pipefail
|
3
3
|
IFS=$'\n\t'
|
4
|
-
|
4
|
+
|
5
|
+
NAME=$0
|
6
|
+
DOCKER=NO
|
7
|
+
|
8
|
+
usage() {
|
9
|
+
cat <<EOF
|
10
|
+
Usage:
|
11
|
+
$NAME
|
12
|
+
|
13
|
+
OPTIONS
|
14
|
+
-d|--docker copy example config that works with docker-composed test
|
15
|
+
databases, copy default otherwise.
|
16
|
+
-h|--help display this message and exit.
|
17
|
+
EOF
|
18
|
+
}
|
19
|
+
|
20
|
+
while [[ $# -gt 0 ]]
|
21
|
+
do
|
22
|
+
|
23
|
+
opt="$1"
|
24
|
+
case $opt in
|
25
|
+
-d|--docker)
|
26
|
+
DOCKER=YES
|
27
|
+
shift
|
28
|
+
;;
|
29
|
+
-h|--help)
|
30
|
+
usage
|
31
|
+
exit
|
32
|
+
;;
|
33
|
+
esac
|
34
|
+
done
|
5
35
|
|
6
36
|
bundle check || bundle install
|
7
|
-
cp spec/support/sample.config.yml spec/support/config.yml
|
8
37
|
|
38
|
+
if [[ $DOCKER = "YES" ]]
|
39
|
+
then
|
40
|
+
cp spec/support/sample-docker.config.yml spec/support/config.yml
|
41
|
+
echo "Run \`docker-compose up\` to setup databases"
|
42
|
+
else
|
43
|
+
cp spec/support/sample.config.yml spec/support/config.yml
|
44
|
+
fi
|
@@ -1,12 +1,9 @@
|
|
1
|
-
|
2
|
-
lib = File.expand_path("../lib", __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require "database_cleaner/sequel/version"
|
1
|
+
require_relative "./lib/database_cleaner/sequel/version"
|
5
2
|
|
6
3
|
Gem::Specification.new do |spec|
|
7
4
|
spec.name = "database_cleaner-sequel"
|
8
5
|
spec.version = DatabaseCleaner::Sequel::VERSION
|
9
|
-
spec.authors = ["Ernesto Tagwerker"]
|
6
|
+
spec.authors = ["Ernesto Tagwerker", "Micah Geisel"]
|
10
7
|
spec.email = ["ernesto@ombulabs.com"]
|
11
8
|
|
12
9
|
spec.summary = "Strategies for cleaning databases using Sequel. Can be used to ensure a clean state for testing."
|
@@ -14,9 +11,6 @@ Gem::Specification.new do |spec|
|
|
14
11
|
spec.homepage = "https://github.com/DatabaseCleaner/database_cleaner-sequel"
|
15
12
|
spec.license = "MIT"
|
16
13
|
|
17
|
-
spec.add_dependency "database_cleaner", "~> 1.8.0.beta"
|
18
|
-
spec.add_dependency "sequel"
|
19
|
-
|
20
14
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
21
15
|
f.match(%r{^(test|spec|features)/})
|
22
16
|
end
|
@@ -24,12 +18,13 @@ Gem::Specification.new do |spec|
|
|
24
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
19
|
spec.require_paths = ["lib"]
|
26
20
|
|
27
|
-
spec.
|
28
|
-
spec.
|
29
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
21
|
+
spec.add_dependency "database_cleaner-core", "~>2.0.0"
|
22
|
+
spec.add_dependency "sequel"
|
30
23
|
|
31
|
-
spec.add_development_dependency
|
32
|
-
spec.add_development_dependency
|
33
|
-
spec.add_development_dependency
|
24
|
+
spec.add_development_dependency "bundler"
|
25
|
+
spec.add_development_dependency "rake"
|
26
|
+
spec.add_development_dependency "rspec"
|
27
|
+
spec.add_development_dependency "mysql2"
|
28
|
+
spec.add_development_dependency "pg"
|
34
29
|
spec.add_development_dependency "sqlite3"
|
35
30
|
end
|
data/docker-compose.yml
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
version: '3.1'
|
2
|
+
|
3
|
+
services:
|
4
|
+
mysql:
|
5
|
+
image: mysql:8
|
6
|
+
ports:
|
7
|
+
- 3307:3306
|
8
|
+
environment:
|
9
|
+
MYSQL_ROOT_PASSWORD: root-password
|
10
|
+
MYSQL_DATABASE: database_cleaner_test
|
11
|
+
MYSQL_USER: database_cleaner
|
12
|
+
MYSQL_PASSWORD: database_cleaner
|
13
|
+
volumes:
|
14
|
+
- mydata:/var/lib/mysql
|
15
|
+
|
16
|
+
postgres:
|
17
|
+
image: postgres:12
|
18
|
+
ports:
|
19
|
+
- 5433:5432
|
20
|
+
environment:
|
21
|
+
POSTGRES_DB: database_cleaner_test
|
22
|
+
POSTGRES_USER: database_cleaner
|
23
|
+
POSTGRES_PASSWORD: database_cleaner
|
24
|
+
volumes:
|
25
|
+
- pgdata:/var/lib/postgresql/data
|
26
|
+
|
27
|
+
volumes:
|
28
|
+
mydata:
|
29
|
+
pgdata:
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require "database_cleaner/sequel/version"
|
2
|
-
require "database_cleaner"
|
3
|
-
require "database_cleaner/sequel/truncation"
|
2
|
+
require "database_cleaner/core"
|
4
3
|
require "database_cleaner/sequel/transaction"
|
4
|
+
require "database_cleaner/sequel/truncation"
|
5
5
|
require "database_cleaner/sequel/deletion"
|
6
6
|
|
7
|
+
DatabaseCleaner[:sequel].strategy = :transaction
|
@@ -1,21 +1,8 @@
|
|
1
|
-
require
|
1
|
+
require "database_cleaner/strategy"
|
2
|
+
|
2
3
|
module DatabaseCleaner
|
3
4
|
module Sequel
|
4
|
-
|
5
|
-
%w(truncation transaction deletion)
|
6
|
-
end
|
7
|
-
|
8
|
-
def self.default_strategy
|
9
|
-
:transaction
|
10
|
-
end
|
11
|
-
|
12
|
-
module Base
|
13
|
-
include ::DatabaseCleaner::Generic::Base
|
14
|
-
|
15
|
-
def db=(desired_db)
|
16
|
-
@db = desired_db
|
17
|
-
end
|
18
|
-
|
5
|
+
class Base < Strategy
|
19
6
|
def db
|
20
7
|
return @db if @db && @db != :default
|
21
8
|
raise "As you have more than one active sequel database you have to specify the one to use manually!" if ::Sequel::DATABASES.count > 1
|
@@ -1,45 +1,45 @@
|
|
1
|
-
require 'database_cleaner/sequel/base'
|
2
|
-
require 'database_cleaner/generic/truncation'
|
3
1
|
require 'database_cleaner/sequel/truncation'
|
4
2
|
|
5
|
-
module DatabaseCleaner
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
db.
|
3
|
+
module DatabaseCleaner
|
4
|
+
module Sequel
|
5
|
+
class Deletion < Truncation
|
6
|
+
def disable_referential_integrity(tables)
|
7
|
+
case db.database_type
|
8
|
+
when :postgres
|
9
|
+
db.run('SET CONSTRAINTS ALL DEFERRED')
|
10
|
+
tables_to_truncate(db).each do |table|
|
11
|
+
db.run("ALTER TABLE \"#{table}\" DISABLE TRIGGER ALL")
|
12
|
+
end
|
13
|
+
when :mysql
|
14
|
+
old = db.fetch('SELECT @@FOREIGN_KEY_CHECKS').first[:@@FOREIGN_KEY_CHECKS]
|
15
|
+
db.run('SET FOREIGN_KEY_CHECKS = 0')
|
13
16
|
end
|
14
|
-
|
15
|
-
|
16
|
-
db.
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
db.run("ALTER TABLE \"#{table}\" ENABLE TRIGGER ALL")
|
17
|
+
yield
|
18
|
+
ensure
|
19
|
+
case db.database_type
|
20
|
+
when :postgres
|
21
|
+
tables.each do |table|
|
22
|
+
db.run("ALTER TABLE \"#{table}\" ENABLE TRIGGER ALL")
|
23
|
+
end
|
24
|
+
when :mysql
|
25
|
+
db.run("SET FOREIGN_KEY_CHECKS = #{old}")
|
24
26
|
end
|
25
|
-
when :mysql
|
26
|
-
db.run("SET FOREIGN_KEY_CHECKS = #{old}")
|
27
27
|
end
|
28
|
-
end
|
29
28
|
|
30
|
-
|
31
|
-
|
32
|
-
|
29
|
+
def delete_tables(db, tables)
|
30
|
+
tables.each do |table|
|
31
|
+
db[table.to_sym].delete
|
32
|
+
end
|
33
33
|
end
|
34
|
-
end
|
35
34
|
|
36
|
-
|
37
|
-
|
35
|
+
def clean
|
36
|
+
return unless dirty?
|
38
37
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
38
|
+
tables = tables_to_truncate(db)
|
39
|
+
db.transaction do
|
40
|
+
disable_referential_integrity(tables) do
|
41
|
+
delete_tables(db, tables)
|
42
|
+
end
|
43
43
|
end
|
44
44
|
end
|
45
45
|
end
|
@@ -1,25 +1,13 @@
|
|
1
1
|
require 'database_cleaner/sequel/base'
|
2
|
+
|
2
3
|
module DatabaseCleaner
|
3
4
|
module Sequel
|
4
|
-
class Transaction
|
5
|
-
include ::DatabaseCleaner::Sequel::Base
|
6
|
-
|
7
|
-
def self.check_fiber_brokenness
|
8
|
-
if !@checked_fiber_brokenness && Fiber.new { Thread.current }.resume != Thread.current
|
9
|
-
raise RuntimeError, "This ruby engine's Fibers are not compatible with Sequel's connection pool. " +
|
10
|
-
"To work around this, please use DatabaseCleaner.cleaning with a block instead of " +
|
11
|
-
"DatabaseCleaner.start and DatabaseCleaner.clean"
|
12
|
-
end
|
13
|
-
@checked_fiber_brokenness = true
|
14
|
-
end
|
15
|
-
|
5
|
+
class Transaction < Base
|
16
6
|
def start
|
17
|
-
self.class.check_fiber_brokenness
|
18
|
-
|
19
7
|
@fibers ||= []
|
20
8
|
db = self.db
|
21
9
|
f = Fiber.new do
|
22
|
-
db.transaction(:rollback => :always, :savepoint => true) do
|
10
|
+
db.transaction(:rollback => :always, :savepoint => true, :auto_savepoint => true) do
|
23
11
|
Fiber.yield
|
24
12
|
end
|
25
13
|
end
|
@@ -31,10 +19,6 @@ module DatabaseCleaner
|
|
31
19
|
f = @fibers.pop
|
32
20
|
f.resume
|
33
21
|
end
|
34
|
-
|
35
|
-
def cleaning
|
36
|
-
self.db.transaction(:rollback => :always, :savepoint => true) { yield }
|
37
|
-
end
|
38
22
|
end
|
39
23
|
end
|
40
24
|
end
|
@@ -1,11 +1,13 @@
|
|
1
|
-
require 'database_cleaner/generic/truncation'
|
2
1
|
require 'database_cleaner/sequel/base'
|
3
2
|
|
4
3
|
module DatabaseCleaner
|
5
4
|
module Sequel
|
6
|
-
class Truncation
|
7
|
-
|
8
|
-
|
5
|
+
class Truncation < Base
|
6
|
+
def initialize only: [], except: [], pre_count: false
|
7
|
+
@only = only
|
8
|
+
@except = except
|
9
|
+
@pre_count = pre_count
|
10
|
+
end
|
9
11
|
|
10
12
|
def start
|
11
13
|
@last_txid = txid
|
@@ -63,7 +65,7 @@ module DatabaseCleaner
|
|
63
65
|
end
|
64
66
|
|
65
67
|
def tables_to_truncate(db)
|
66
|
-
(@only
|
68
|
+
(@only.any? ? @only : db.tables.map(&:to_s)) - @except - migration_storage_names
|
67
69
|
end
|
68
70
|
|
69
71
|
# overwritten
|
metadata
CHANGED
@@ -1,29 +1,30 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: database_cleaner-sequel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ernesto Tagwerker
|
8
|
+
- Micah Geisel
|
8
9
|
autorequire:
|
9
10
|
bindir: exe
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2021-01-31 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: database_cleaner
|
15
|
+
name: database_cleaner-core
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
16
17
|
requirements:
|
17
18
|
- - "~>"
|
18
19
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
+
version: 2.0.0
|
20
21
|
type: :runtime
|
21
22
|
prerelease: false
|
22
23
|
version_requirements: !ruby/object:Gem::Requirement
|
23
24
|
requirements:
|
24
25
|
- - "~>"
|
25
26
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
27
|
+
version: 2.0.0
|
27
28
|
- !ruby/object:Gem::Dependency
|
28
29
|
name: sequel
|
29
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -42,58 +43,44 @@ dependencies:
|
|
42
43
|
name: bundler
|
43
44
|
requirement: !ruby/object:Gem::Requirement
|
44
45
|
requirements:
|
45
|
-
- - "
|
46
|
+
- - ">="
|
46
47
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
48
|
+
version: '0'
|
48
49
|
type: :development
|
49
50
|
prerelease: false
|
50
51
|
version_requirements: !ruby/object:Gem::Requirement
|
51
52
|
requirements:
|
52
|
-
- - "
|
53
|
+
- - ">="
|
53
54
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
55
|
+
version: '0'
|
55
56
|
- !ruby/object:Gem::Dependency
|
56
57
|
name: rake
|
57
58
|
requirement: !ruby/object:Gem::Requirement
|
58
59
|
requirements:
|
59
|
-
- - "
|
60
|
+
- - ">="
|
60
61
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
62
|
+
version: '0'
|
62
63
|
type: :development
|
63
64
|
prerelease: false
|
64
65
|
version_requirements: !ruby/object:Gem::Requirement
|
65
66
|
requirements:
|
66
|
-
- - "
|
67
|
+
- - ">="
|
67
68
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
69
|
+
version: '0'
|
69
70
|
- !ruby/object:Gem::Dependency
|
70
71
|
name: rspec
|
71
72
|
requirement: !ruby/object:Gem::Requirement
|
72
73
|
requirements:
|
73
|
-
- - "
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '3.0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '3.0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: mysql
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
74
|
+
- - ">="
|
88
75
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
76
|
+
version: '0'
|
90
77
|
type: :development
|
91
78
|
prerelease: false
|
92
79
|
version_requirements: !ruby/object:Gem::Requirement
|
93
80
|
requirements:
|
94
|
-
- - "
|
81
|
+
- - ">="
|
95
82
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
83
|
+
version: '0'
|
97
84
|
- !ruby/object:Gem::Dependency
|
98
85
|
name: mysql2
|
99
86
|
requirement: !ruby/object:Gem::Requirement
|
@@ -148,13 +135,13 @@ files:
|
|
148
135
|
- ".rspec"
|
149
136
|
- ".travis.yml"
|
150
137
|
- Gemfile
|
151
|
-
- Gemfile.lock
|
152
138
|
- LICENSE.txt
|
153
139
|
- README.md
|
154
140
|
- Rakefile
|
155
141
|
- bin/console
|
156
142
|
- bin/setup
|
157
143
|
- database_cleaner-sequel.gemspec
|
144
|
+
- docker-compose.yml
|
158
145
|
- lib/database_cleaner-sequel.rb
|
159
146
|
- lib/database_cleaner/sequel.rb
|
160
147
|
- lib/database_cleaner/sequel/base.rb
|
@@ -178,11 +165,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
178
165
|
version: '0'
|
179
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
180
167
|
requirements:
|
181
|
-
- - "
|
168
|
+
- - ">="
|
182
169
|
- !ruby/object:Gem::Version
|
183
|
-
version:
|
170
|
+
version: '0'
|
184
171
|
requirements: []
|
185
|
-
rubygems_version: 3.0.
|
172
|
+
rubygems_version: 3.0.3
|
186
173
|
signing_key:
|
187
174
|
specification_version: 4
|
188
175
|
summary: Strategies for cleaning databases using Sequel. Can be used to ensure a clean
|
data/Gemfile.lock
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ../..
|
3
|
-
specs:
|
4
|
-
database_cleaner (1.8.0.beta)
|
5
|
-
|
6
|
-
PATH
|
7
|
-
remote: .
|
8
|
-
specs:
|
9
|
-
database_cleaner-sequel (1.8.0.beta)
|
10
|
-
database_cleaner (~> 1.8.0.beta)
|
11
|
-
sequel
|
12
|
-
|
13
|
-
GEM
|
14
|
-
remote: https://rubygems.org/
|
15
|
-
specs:
|
16
|
-
diff-lcs (1.3)
|
17
|
-
mysql (2.9.1)
|
18
|
-
mysql2 (0.3.18)
|
19
|
-
pg (0.18.2)
|
20
|
-
rake (10.4.2)
|
21
|
-
rspec (3.7.0)
|
22
|
-
rspec-core (~> 3.7.0)
|
23
|
-
rspec-expectations (~> 3.7.0)
|
24
|
-
rspec-mocks (~> 3.7.0)
|
25
|
-
rspec-core (3.7.1)
|
26
|
-
rspec-support (~> 3.7.0)
|
27
|
-
rspec-expectations (3.7.0)
|
28
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
29
|
-
rspec-support (~> 3.7.0)
|
30
|
-
rspec-mocks (3.7.0)
|
31
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
32
|
-
rspec-support (~> 3.7.0)
|
33
|
-
rspec-support (3.7.1)
|
34
|
-
sequel (5.28.0)
|
35
|
-
sqlite3 (1.3.10)
|
36
|
-
|
37
|
-
PLATFORMS
|
38
|
-
ruby
|
39
|
-
|
40
|
-
DEPENDENCIES
|
41
|
-
bundler (~> 1.16)
|
42
|
-
database_cleaner!
|
43
|
-
database_cleaner-sequel!
|
44
|
-
mysql (~> 2.9.1)
|
45
|
-
mysql2
|
46
|
-
pg
|
47
|
-
rake (~> 10.0)
|
48
|
-
rspec (~> 3.0)
|
49
|
-
sqlite3
|
50
|
-
|
51
|
-
BUNDLED WITH
|
52
|
-
1.17.3
|