clean up adapter READMEs.

This commit is contained in:
Micah Geisel 2019-05-20 16:03:59 -06:00
parent 29e61aba36
commit b4850f6616
11 changed files with 139 additions and 301 deletions

View file

@ -1,14 +1,13 @@
# Database Cleaner for ActiveRecord
# Database Cleaner Adapter for ActiveRecord
[![Build Status](https://travis-ci.org/DatabaseCleaner/database_cleaner-active_record.svg?branch=master)](https://travis-ci.org/DatabaseCleaner/database_cleaner-active_record)
[![Code Climate](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-active_record/badges/gpa.svg)](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-active_record)
Database Cleaner is a set of strategies for cleaning your database in Ruby.
Clean your ActiveRecord databases with Database Cleaner.
The original use case was to ensure a clean state during tests.
Each strategy is a small amount of code but is code that is usually needed in any ruby app that is testing with a database.
See https://github.com/DatabaseCleaner/database_cleaner for more information.
## Gem Setup
## Installation
```ruby
# Gemfile
@ -56,7 +55,7 @@ Some people report much faster speeds with `:deletion` while others say `:trunca
If you are using ActiveRecord then take a look at the [additional options](#additional-activerecord-options-for-truncation) available for `:truncation`.
### Configuration options
## Configuration options
<table>
<tbody>

View file

@ -1,28 +1,22 @@
# DatabaseCleaner::CouchPotato
# Database Cleaner Adapter for CouchPotato
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/database_cleaner/couch_potato`. To experiment with that code, run `bin/console` for an interactive prompt.
[![Build Status](https://travis-ci.org/DatabaseCleaner/database_cleaner-couch_potato.svg?branch=master)](https://travis-ci.org/DatabaseCleaner/database_cleaner-couch_potato)
[![Code Climate](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-couch_potato/badges/gpa.svg)](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-couch_potato)
TODO: Delete this and the text above, and describe your gem
Clean your CouchPotato databases with Database Cleaner.
See https://github.com/DatabaseCleaner/database_cleaner for more information.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'database_cleaner-couch_potato'
# Gemfile
group :test do
gem 'database_cleaner-couch_potato'
end
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install database_cleaner-couch_potato
## Usage
### Configuration options
## Configuration options
<table>
<tbody>
@ -39,16 +33,6 @@ Or install it yourself as:
</tbody>
</table>
## Development
## COPYRIGHT
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/database_cleaner-couch_potato.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
See [LICENSE] for details.

View file

@ -1,28 +1,22 @@
# DatabaseCleaner::DataMapper
# Database Cleaner Adapter for DataMapper
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/database_cleaner/data_mapper`. To experiment with that code, run `bin/console` for an interactive prompt.
[![Build Status](https://travis-ci.org/DatabaseCleaner/database_cleaner-data_mapper.svg?branch=master)](https://travis-ci.org/DatabaseCleaner/database_cleaner-data_mapper)
[![Code Climate](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-data_mapper/badges/gpa.svg)](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-data_mapper)
TODO: Delete this and the text above, and describe your gem
Clean your DataMapper databases with Database Cleaner.
See https://github.com/DatabaseCleaner/database_cleaner for more information.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'database_cleaner-data_mapper'
# Gemfile
group :test do
gem 'database_cleaner-data_mapper'
end
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install database_cleaner-data_mapper
## Usage
### Configuration options
## Configuration options
<table>
<tbody>
@ -39,16 +33,6 @@ Or install it yourself as:
</tbody>
</table>
## Development
## COPYRIGHT
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/database_cleaner-data_mapper.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
See [LICENSE] for details.

View file

@ -1,39 +1,21 @@
# DatabaseCleaner::Mongo
# Database Cleaner Adapter for Mongo
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/database_cleaner/mongo`. To experiment with that code, run `bin/console` for an interactive prompt.
[![Build Status](https://travis-ci.org/DatabaseCleaner/database_cleaner-mongo.svg?branch=master)](https://travis-ci.org/DatabaseCleaner/database_cleaner-mongo)
[![Code Climate](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-mongo/badges/gpa.svg)](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-mongo)
TODO: Delete this and the text above, and describe your gem
Clean your Mongo databases with Database Cleaner.
See https://github.com/DatabaseCleaner/database_cleaner for more information.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'database_cleaner-mongo'
# Gemfile
group :test do
gem 'database_cleaner-mongo'
end
```
And then execute:
## COPYRIGHT
$ bundle
Or install it yourself as:
$ gem install database_cleaner-mongo
## Usage
TODO: Write usage instructions here
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/database_cleaner-mongo.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
See [LICENSE] for details.

View file

@ -1,28 +1,22 @@
# DatabaseCleaner::MongoMapper
# Database Cleaner Adapter for MongoMapper
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/database_cleaner/mongo_mapper`. To experiment with that code, run `bin/console` for an interactive prompt.
[![Build Status](https://travis-ci.org/DatabaseCleaner/database_cleaner-mongo_mapper.svg?branch=master)](https://travis-ci.org/DatabaseCleaner/database_cleaner-mongo_mapper)
[![Code Climate](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-mongo_mapper/badges/gpa.svg)](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-mongo_mapper)
TODO: Delete this and the text above, and describe your gem
Clean your MongoMapper databases with Database Cleaner.
See https://github.com/DatabaseCleaner/database_cleaner for more information.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'database_cleaner-mongo_mapper'
# Gemfile
group :test do
gem 'database_cleaner-mongo_mapper'
end
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install database_cleaner-mongo_mapper
## Usage
### Configuration options
## Configuration options
<table>
<tbody>
@ -39,16 +33,6 @@ Or install it yourself as:
</tbody>
</table>
## Development
## COPYRIGHT
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/database_cleaner-mongo_mapper.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
See [LICENSE] for details.

View file

@ -1,28 +1,22 @@
# DatabaseCleaner::Mongoid
# Database Cleaner Adapter for Mongoid
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/database_cleaner/mongoid`. To experiment with that code, run `bin/console` for an interactive prompt.
[![Build Status](https://travis-ci.org/DatabaseCleaner/database_cleaner-mongoid.svg?branch=master)](https://travis-ci.org/DatabaseCleaner/database_cleaner-mongoid)
[![Code Climate](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-mongoid/badges/gpa.svg)](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-mongoid)
TODO: Delete this and the text above, and describe your gem
Clean your Mongoid databases with Database Cleaner.
See https://github.com/DatabaseCleaner/database_cleaner for more information.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'database_cleaner-mongoid'
# Gemfile
group :test do
gem 'database_cleaner-mongoid'
end
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install database_cleaner-mongoid
## Usage
### Configuration options
## Configuration options
<table>
<tbody>
@ -39,16 +33,6 @@ Or install it yourself as:
</tbody>
</table>
## Development
## COPYRIGHT
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/database_cleaner-mongoid.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
See [LICENSE] for details.

View file

@ -1,28 +1,22 @@
# DatabaseCleaner::Moped
# Database Cleaner Adapter for Moped
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/database_cleaner/moped`. To experiment with that code, run `bin/console` for an interactive prompt.
[![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)
TODO: Delete this and the text above, and describe your gem
Clean your Moped databases with Database Cleaner.
See https://github.com/DatabaseCleaner/database_cleaner for more information.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'database_cleaner-moped'
# Gemfile
group :test do
gem 'database_cleaner-moped'
end
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install database_cleaner-moped
## Usage
### Configuration options
## Configuration options
<table>
<tbody>
@ -39,16 +33,6 @@ Or install it yourself as:
</tbody>
</table>
## Development
## COPYRIGHT
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/database_cleaner-moped.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
See [LICENSE] for details.

View file

@ -1,30 +1,22 @@
# DatabaseCleaner::Neo4j
# Database Cleaner Adapter for Neo4j
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/database_cleaner/neo4j`. To experiment with that code, run `bin/console` for an interactive prompt.
[![Build Status](https://travis-ci.org/DatabaseCleaner/database_cleaner-neo4j.svg?branch=master)](https://travis-ci.org/DatabaseCleaner/database_cleaner-neo4j)
[![Code Climate](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-neo4j/badges/gpa.svg)](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-neo4j)
TODO: Delete this and the text above, and describe your gem
Clean your Neo4j databases with Database Cleaner.
See https://github.com/DatabaseCleaner/database_cleaner for more information.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'database_cleaner-neo4j'
# Gemfile
group :test do
gem 'database_cleaner-neo4j'
end
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install database_cleaner-neo4j
## Usage
Truncation and Deletion strategies for Neo4j will just delete all nodes and relationships from the database.
### Configuration options
## Configuration options
<table>
<tbody>
@ -41,31 +33,24 @@ Truncation and Deletion strategies for Neo4j will just delete all nodes and rela
</tbody>
</table>
Note that Truncation and Deletion strategies for Neo4j will just delete all nodes and relationships from the database.
## Common Errors
### Model fails to load with Neo4j using transactions
When you are using [neo4j](https://github.com/neo4jrb/neo4j) gem it creates schema and reads indexes upon loading models. These operations can't be done during a transaction. You have to preload your models before DatabaseCleaner starts a transaction.
Add to your rails_helper or spec_helper after requiring database_cleaner:
Add to your rails_helper or spec_helper after requiring database_cleaner-neo4j:
```ruby
require 'database_cleaner-neo4j'
require 'database_cleaner/neo4j'
Dir["#{Rails.root}/app/models/**/*.rb"].each do |model|
load model
end
```
## Development
## COPYRIGHT
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/database_cleaner-neo4j.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
See [LICENSE] for details.

View file

@ -1,28 +1,22 @@
# DatabaseCleaner::Ohm
# Database Cleaner Adapter for Ohm
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/database_cleaner/ohm`. To experiment with that code, run `bin/console` for an interactive prompt.
[![Build Status](https://travis-ci.org/DatabaseCleaner/database_cleaner-ohm.svg?branch=master)](https://travis-ci.org/DatabaseCleaner/database_cleaner-ohm)
[![Code Climate](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-ohm/badges/gpa.svg)](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-ohm)
TODO: Delete this and the text above, and describe your gem
Clean your Ohm databases with Database Cleaner.
See https://github.com/DatabaseCleaner/database_cleaner for more information.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'database_cleaner-ohm'
# Gemfile
group :test do
gem 'database_cleaner-ohm'
end
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install database_cleaner-ohm
## Usage
### Configuration options
## Configuration options
`:only` and `:except` take a list of strings to be passed to [`keys`](http://redis.io/commands/keys)).
@ -41,16 +35,6 @@ Or install it yourself as:
</tbody>
</table>
## Development
## COPYRIGHT
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/database_cleaner-ohm.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
See [LICENSE] for details.

View file

@ -1,28 +1,22 @@
# DatabaseCleaner::Redis
# Database Cleaner Adapter for Redis
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/database_cleaner/redis`. To experiment with that code, run `bin/console` for an interactive prompt.
[![Build Status](https://travis-ci.org/DatabaseCleaner/database_cleaner-redis.svg?branch=master)](https://travis-ci.org/DatabaseCleaner/database_cleaner-redis)
[![Code Climate](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-redis/badges/gpa.svg)](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-redis)
TODO: Delete this and the text above, and describe your gem
Clean your Redis databases with Database Cleaner.
See https://github.com/DatabaseCleaner/database_cleaner for more information.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'database_cleaner-redis'
# Gemfile
group :test do
gem 'database_cleaner-redis'
end
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install database_cleaner-redis
## Usage
### Configuration options
## Configuration options
`:only` and `:except` take a list of strings to be passed to [`keys`](http://redis.io/commands/keys)).
@ -41,16 +35,6 @@ Or install it yourself as:
</tbody>
</table>
## Development
## COPYRIGHT
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/database_cleaner-redis.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
See [LICENSE] for details.

View file

@ -1,28 +1,22 @@
# DatabaseCleaner::Sequel
# Database Cleaner Adapter for Sequel
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/database_cleaner/sequel`. To experiment with that code, run `bin/console` for an interactive prompt.
[![Build Status](https://travis-ci.org/DatabaseCleaner/database_cleaner-sequel.svg?branch=master)](https://travis-ci.org/DatabaseCleaner/database_cleaner-sequel)
[![Code Climate](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-sequel/badges/gpa.svg)](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-sequel)
TODO: Delete this and the text above, and describe your gem
Clean your Sequel databases with Database Cleaner.
See https://github.com/DatabaseCleaner/database_cleaner for more information.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'database_cleaner-sequel'
# Gemfile
group :test do
gem 'database_cleaner-sequel'
end
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install database_cleaner-sequel
## Usage
### Configuration options
## Configuration options
<table>
<tbody>
@ -45,16 +39,6 @@ Or install it yourself as:
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.
## Development
## COPYRIGHT
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/database_cleaner-sequel.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
See [LICENSE] for details.