{"id":20812386,"url":"https://github.com/databasecleaner/database_cleaner-mongoid","last_synced_at":"2025-05-07T10:43:51.350Z","repository":{"id":62355210,"uuid":"58895516","full_name":"DatabaseCleaner/database_cleaner-mongoid","owner":"DatabaseCleaner","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-04T03:09:24.000Z","size":1127,"stargazers_count":9,"open_issues_count":10,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-21T11:59:11.895Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DatabaseCleaner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-16T01:51:58.000Z","updated_at":"2023-11-18T08:53:12.000Z","dependencies_parsed_at":"2023-02-18T13:15:36.983Z","dependency_job_id":null,"html_url":"https://github.com/DatabaseCleaner/database_cleaner-mongoid","commit_stats":null,"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DatabaseCleaner%2Fdatabase_cleaner-mongoid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DatabaseCleaner%2Fdatabase_cleaner-mongoid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DatabaseCleaner%2Fdatabase_cleaner-mongoid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DatabaseCleaner%2Fdatabase_cleaner-mongoid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DatabaseCleaner","download_url":"https://codeload.github.com/DatabaseCleaner/database_cleaner-mongoid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252862433,"owners_count":21815858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T20:53:50.508Z","updated_at":"2025-05-07T10:43:51.333Z","avatar_url":"https://github.com/DatabaseCleaner.png","language":"Ruby","readme":"# Database Cleaner Adapter for Mongoid\n\n[![Build Status](https://travis-ci.org/DatabaseCleaner/database_cleaner-mongoid.svg?branch=master)](https://travis-ci.org/DatabaseCleaner/database_cleaner-mongoid)\n[![Code Climate](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-mongoid/badges/gpa.svg)](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-mongoid)\n[![codecov](https://codecov.io/gh/DatabaseCleaner/database_cleaner-mongoid/branch/master/graph/badge.svg)](https://codecov.io/gh/DatabaseCleaner/database_cleaner-mongoid)\n\nClean your Mongoid databases with Database Cleaner.\n\nSee https://github.com/DatabaseCleaner/database_cleaner for more information.\n\n## Installation\n\n```ruby\n# Gemfile\ngroup :test do\n  gem 'database_cleaner-mongoid'\nend\n```\n\n## Supported Strategies\n\nThe mongoid adapter only has one strategy: the deletion strategy.\n\n## Strategy configuration options\n\n`:only` and `:except` may take a list of collection names:\n\n```ruby\n# Only delete the \"users\" collection.\nDatabaseCleaner[:mongoid].strategy = [:deletion, only: [\"users\"]]\n\n# Delete all collections except the \"users\" collection.\nDatabaseCleaner[:mongoid].strategy = [:deletion, except: [\"users\"]]\n```\n\n## Adapter configuration options\n\n`#db` defaults to the default Mongoid database, but can be specified manually in a few ways:\n\n```ruby\n# Redis URI string:\nDatabaseCleaner[:mongoid].db = :logs\n\n# Back to default:\nDatabaseCleaner[:mongoid].db = :default\n\n# Multiple Mongoid databases can be specified:\nDatabaseCleaner[:mongoid, db: :default]\nDatabaseCleaner[:mongoid, db: :shard_1]\nDatabaseCleaner[:mongoid, db: :shard_2]\n```\n\n## COPYRIGHT\n\nSee [LICENSE](LICENSE) for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatabasecleaner%2Fdatabase_cleaner-mongoid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatabasecleaner%2Fdatabase_cleaner-mongoid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatabasecleaner%2Fdatabase_cleaner-mongoid/lists"}