2019-05-20 16:03:59 -06:00
|
|
|
# Database Cleaner Adapter for Moped
|
2018-05-25 23:54:09 -07:00
|
|
|
|
2019-05-20 16:03:59 -06:00
|
|
|
[![Build Status](https://travis-ci.org/DatabaseCleaner/database_cleaner-moped.svg?branch=master)](https://travis-ci.org/DatabaseCleaner/database_cleaner-moped)
|
|
|
|
[![Code Climate](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-moped/badges/gpa.svg)](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-moped)
|
2018-05-25 23:54:09 -07:00
|
|
|
|
2019-05-20 16:03:59 -06:00
|
|
|
Clean your Moped databases with Database Cleaner.
|
2018-05-25 23:54:09 -07:00
|
|
|
|
2019-05-20 16:03:59 -06:00
|
|
|
See https://github.com/DatabaseCleaner/database_cleaner for more information.
|
2018-05-25 23:54:09 -07:00
|
|
|
|
2019-05-20 16:03:59 -06:00
|
|
|
## Installation
|
2018-05-25 23:54:09 -07:00
|
|
|
|
|
|
|
```ruby
|
2019-05-20 16:03:59 -06:00
|
|
|
# Gemfile
|
|
|
|
group :test do
|
|
|
|
gem 'database_cleaner-moped'
|
|
|
|
end
|
2018-05-25 23:54:09 -07:00
|
|
|
```
|
|
|
|
|
2019-05-20 16:21:44 -06:00
|
|
|
## Supported Strategies
|
|
|
|
|
|
|
|
<table>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<th>Truncation</th>
|
|
|
|
<th>Transaction</th>
|
|
|
|
<th>Deletion</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td> <b>Yes</b></td>
|
|
|
|
<td> No</td>
|
|
|
|
<td> No</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
(Default strategy is denoted in bold)
|
|
|
|
|
2019-05-20 16:03:59 -06:00
|
|
|
## Configuration options
|
2019-05-20 11:50:40 -06:00
|
|
|
|
|
|
|
<table>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<th>ORM</th>
|
|
|
|
<th>How to access</th>
|
|
|
|
<th>Notes</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td> Moped</td>
|
|
|
|
<td> <code>DatabaseCleaner[:moped]</code></td>
|
|
|
|
<td> It is necessary to configure database name with <code>DatabaseCleaner[:moped].db = db_name</code> otherwise name `default` will be used.</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2018-05-25 23:54:09 -07:00
|
|
|
|
2019-05-20 16:03:59 -06:00
|
|
|
## COPYRIGHT
|
2018-05-25 23:54:09 -07:00
|
|
|
|
2019-05-20 16:03:59 -06:00
|
|
|
See [LICENSE] for details.
|