Coder Social home page Coder Social logo

database_cleaner-redis's Introduction

Database Cleaner Adapter for Redis

Build Status Code Climate codecov

Clean your Redis databases with Database Cleaner.

See https://github.com/DatabaseCleaner/database_cleaner for more information.

Installation

# Gemfile
group :test do
  gem 'database_cleaner-redis'
end

Supported Strategies

The redis adapter only has one strategy: the deletion strategy.

Strategy configuration options

:only and :except may take a list of strings to be passed to keys):

# Only delete the "users" key, and keys that start with "cache".
DatabaseCleaner[:redis].strategy = :deletion, only: ["users", "cache*"]

# Delete all keys except the "users" key.
DatabaseCleaner[:redis].strategy = :deletion, except: ["users"]

Adapter configuration options

#db defaults to Redis.new, but can be specified manually in a few ways:

# Redis URI string:
DatabaseCleaner[:redis].db = "redis://localhost:6379/0"

# Redis connection object:
DatabaseCleaner[:redis].db = Redis.new(url: "redis://localhost:6379/0")

# Back to default:
DatabaseCleaner[:redis].db = :default

COPYRIGHT

See LICENSE for details.

database_cleaner-redis's People

Contributors

andreale avatar anicholson avatar benclewis avatar betelgeuse avatar bmabey avatar botandrose-machine avatar buehmann avatar cyberdelia avatar dpisarewski avatar etagwerker avatar ethco avatar japgolly avatar jhollinger avatar jnv avatar johnf avatar jonrowe avatar kamal avatar kamui avatar netskin-ci avatar nyarly avatar rhunter avatar sanemat avatar sirkosi avatar skalee avatar snusnu avatar st0012 avatar stanislaw avatar svenfuchs avatar tommeier avatar vrinek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.