Skip to content

Commit

Permalink
Rename Mongoid --> ActiveDocument
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyshields committed May 17, 2024
1 parent 6ce91d0 commit 9eaac0a
Show file tree
Hide file tree
Showing 1,035 changed files with 5,992 additions and 6,185 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Style/IfUnlessModifier:
# --------------------------------------------------
# These cops are intentionally disabled due to incompatibility.

# Mongoid behavior differs from ActiveRecord
# ActiveDocument behavior differs from ActiveRecord
Rails/RedundantPresenceValidationOnBelongsTo:
Enabled: false

Expand Down
50 changes: 25 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
![Mongoid: Ultra Edition](https://repository-images.githubusercontent.com/298015080/6028fc36-ae5d-46c1-af7a-19dc3c7f56f1)
![ActiveDocument](https://repository-images.githubusercontent.com/298015080/6028fc36-ae5d-46c1-af7a-19dc3c7f56f1)

# Mongoid: Ultra Edition
# ActiveDocument: Ultra Edition

[![Build Status][build-img]][build-url]👨‍🔧
[![Gem Version][rubygems-img]][rubygems-url]🔜
[![License][license-img]][license-url]

The no-baloney fork of Mongoid. Made by the community, for the community.
Mongoid is the Ruby Object Document Mapper (ODM) for MongoDB.
The no-baloney fork of ActiveDocument. Made by the community, for the community.
ActiveDocument is the Ruby Object Document Mapper (ODM) for MongoDB.

This fork of Mongoid is **not** endorsed by or affiliated with MongoDB Inc. 👍
This fork of ActiveDocument is **not** endorsed by or affiliated with MongoDB Inc. 👍

## 📣 Open Call for Community Steering Committee

Expand All @@ -24,7 +24,7 @@ gem 'mongoid-ultra'
```

Do **not** install the `mongoid` and `mongoid-ultra` gems at the same time.
When loading, Mongoid Ultra will raise a `GemConflict` error if
When loading, ActiveDocument Ultra will raise a `GemConflict` error if
`mongoid` gem is present in your bundle.

## Compatibility
Expand All @@ -34,14 +34,14 @@ When loading, Mongoid Ultra will raise a `GemConflict` error if
- JRuby 9.4+
- MongoDB server 4.4+

Version support may differ from MongoDB Mongoid. We will target to have support for new
Ruby and Rails versions within 1 month of release. As a general policy, Mongoid Ultra will
Version support may differ from MongoDB ActiveDocument. We will target to have support for new
Ruby and Rails versions within 1 month of release. As a general policy, ActiveDocument Ultra will
drop support for end-of-life (EOL) versions soon after EOL. If you are using unsupported EOL
software, please stick with an older version of Mongoid until you upgrade.
software, please stick with an older version of ActiveDocument until you upgrade.

## Purpose & Principles

This is a *community-driven fork of Mongoid*, intended to improve the following over MongoDB's Mongoid:
This is a *community-driven fork of ActiveDocument*, intended to improve the following over MongoDB's ActiveDocument:

- Performance
- Feature robustness
Expand All @@ -58,7 +58,7 @@ the upstream will merge them.

## Releases & Versioning

**Important:** Mongoid Ultra is currently in `alpha` state. The first full release will be `9.0.0.0`.
**Important:** ActiveDocument Ultra is currently in `alpha` state. The first full release will be `9.0.0.0`.

For the time being, version numbers will shadow those of `mongodb/mongoid` with an additional "patch" number added:

Expand All @@ -72,15 +72,15 @@ We will also use `.alpha1`, `.beta1`, `.rc1`, etc. suffixes to denote pre-releas
removing functionality *except* in major `X` releases. We may introduce new features in new patch `P` releases,
and will use feature flags prefixed with `ultra_` to allow users to opt-in.

You may distinguish Mongoid Ultra from MongoDB Mongoid by the constant `Mongoid::ULTRA == true`.
You may distinguish ActiveDocument Ultra from MongoDB ActiveDocument by the constant `ActiveDocument::ULTRA == true`.

All new versions will undergo battle-testing in production at TableCheck prior to being released.

## Roadmap

Refer to the [Roadmap issue](https://github.com/tablecheck/mongoid-ultra/issues/13).

## Differences versus MongoDB Mongoid
## Differences versus MongoDB ActiveDocument

#### Additions

Expand All @@ -103,33 +103,33 @@ Refer to the [Roadmap issue](https://github.com/tablecheck/mongoid-ultra/issues/
- 🙅🏾‍♀️ Remove Evergreen CI and replace with Github Actions which is publicly visible and auto-runs on all contributor patches.
- 🙅🏼 Remove MRSS submodules and other MongoDB Inc. corporate baloney.
- 🙅🏻‍♂️️ [MONGOID-5579](https://jira.mongodb.org/browse/MONGOID-5579) - Drop support for versions earlier than MongoDB 4.4, Ruby 2.7, Rails 6.0, JRuby 9.4 and remove deprecated cruft.
- 🙅🏾‍♀️ [MONGOID-5597](https://jira.mongodb.org/browse/MONGOID-5597) - Remove `Mongoid::QueryCache` in favor of `Mongo::QueryCache`.
- 🙅🏾‍♀️ [MONGOID-5597](https://jira.mongodb.org/browse/MONGOID-5597) - Remove `ActiveDocument::QueryCache` in favor of `Mongo::QueryCache`.

## Documentation

The documentation of this fork will be hosted at: https://tablecheck.github.io/mongoid-ultra/ (not online yet!)

## Support

For beginners, please use MongoDB's existing Mongoid support resources:
For beginners, please use MongoDB's existing ActiveDocument support resources:

* [Stack Overflow](http://stackoverflow.com/questions/tagged/mongoid)
* [MongoDB Community Forum](https://developer.mongodb.com/community/forums/tags/c/drivers-odms-connectors/7/mongoid-odm)
* [#mongoid](http://webchat.freenode.net/?channels=mongoid) on Freenode IRC

## Issues & Contributing

Feature requests and bugs affecting both upstream and Mongoid Ultra should be reported in the [MongoDB MONGOID Jira](https://jira.mongodb.org/browse/MONGOID/).
Please also raise a [Mongoid Ultra Github issue](https://github.com/tablecheck/mongoid-ultra/issues) in this project to track the fix. We prefer if upstream can make the fix first then we merge it.
Feature requests and bugs affecting both upstream and ActiveDocument Ultra should be reported in the [MongoDB MONGOID Jira](https://jira.mongodb.org/browse/MONGOID/).
Please also raise a [ActiveDocument Ultra Github issue](https://github.com/tablecheck/mongoid-ultra/issues) in this project to track the fix. We prefer if upstream can make the fix first then we merge it.

Issues specific to Mongoid Ultra should be raised in the [Mongoid Ultra Github issue tracker](https://github.com/tablecheck/mongoid-ultra/issues)
Issues specific to ActiveDocument Ultra should be raised in the [ActiveDocument Ultra Github issue tracker](https://github.com/tablecheck/mongoid-ultra/issues)

## Security Issues

Security issues affecting both upstream and Mongoid Ultra should be
Security issues affecting both upstream and ActiveDocument Ultra should be
[reported to MongoDB](https://www.mongodb.com/docs/manual/tutorial/create-a-vulnerability-report/).

Security issues affecting only Mongoid Ultra should be reported to [[email protected]](mailto:[email protected]).
Security issues affecting only ActiveDocument Ultra should be reported to [[email protected]](mailto:[email protected]).
The email should be encrypted with the following PGP public key:

* Key ID: `0xDF7D22A0E8772326`
Expand All @@ -139,16 +139,16 @@ We appreciate your help to disclose security issues responsibly.

## Project Governance

Mongoid Ultra is shepherded by the team at TableCheck. TableCheck have been avid Mongoid users since 2013,
contributing over 150 PRs to Mongoid and MongoDB Ruby projects. TableCheck uses Mongoid to power millions of
ActiveDocument Ultra is shepherded by the team at TableCheck. TableCheck have been avid ActiveDocument users since 2013,
contributing over 150 PRs to ActiveDocument and MongoDB Ruby projects. TableCheck uses ActiveDocument to power millions of
restaurant reservations each month, and are *personally invested* in the making the best user experience possible.

We invite experienced Mongoid hands in the community to apply for co-maintainership.
Please raise a [Mongoid Ultra Github issue](https://github.com/tablecheck/mongoid-ultra/issues) if interested.
We invite experienced ActiveDocument hands in the community to apply for co-maintainership.
Please raise a [ActiveDocument Ultra Github issue](https://github.com/tablecheck/mongoid-ultra/issues) if interested.

## Reasons for Forking

Mongoid started as an open-source project created by Durran Jordan in 2009. MongoDB Inc. took over maintainership in 2015.
ActiveDocument started as an open-source project created by Durran Jordan in 2009. MongoDB Inc. took over maintainership in 2015.
Since the transition, the hallmarks of user-disconnect and corporate fumbling have become apparent:

- Introduction of [critical semver-breaking issues](https://serpapi.com/blog/how-a-routine-gem-update-ended-up-charging/), with [no](https://jira.mongodb.org/browse/MONGOID-5272) [sign](https://github.com/mongodb/mongoid/pull/5601#issuecomment-1506630267) of [improvement](https://jira.mongodb.org/browse/MONGOID-5016).
Expand Down
14 changes: 7 additions & 7 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ RSpec::Core::RakeTask.new('spec:progress') do |spec|
end

namespace :generate do
desc 'Generates a mongoid.yml from the template'
desc 'Generates a activedocument.yml from the template'
task config: :environment do
require 'mongoid'
require 'active_document'
require 'erb'

template_path = 'lib/rails/generators/mongoid/config/templates/mongoid.yml'
template_path = 'lib/rails/generators/mongoid/config/templates/activedocument.yml'
config = ERB.new(File.read(template_path), trim_mode: '-').result(binding)
File.write('mongoid.yml', config)
File.write('activedocument.yml', config)
end
end

$LOAD_PATH.unshift File.expand_path('lib', __dir__)
require 'mongoid/version'
require 'active_document/version'

task default: :spec

Expand All @@ -39,9 +39,9 @@ task docs: %i[docs:yard docs:sphinx]
namespace :docs do
desc 'Generate YARD documentation'
task :yard do # rubocop:disable Rails/RakeEnvironment
out = File.join('yard-docs', Mongoid::VERSION)
out = File.join('yard-docs', ActiveDocument::VERSION)
FileUtils.rm_rf(out)
system "yardoc -o #{out} --title mongoid-#{Mongoid::VERSION}"
system "yardoc -o #{out} --title mongoid-#{ActiveDocument::VERSION}"
end

desc 'Generate Sphinx documentation'
Expand Down
8 changes: 4 additions & 4 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

## Security Patches

Given version scheme `X.Y.Z.P`, Mongoid Ultra will release gem security patches all minor versions `Y` of the most recently released two major versions `X`. For example, if the current Mongoid Ultra version is `10.1.2.15`, we will release 5 new gems versions for `10.1`, `10.0`, `9.2`, `9.1`, `9.0` (assuming those are the already released major/minor versions.)
Given version scheme `X.Y.Z.P`, ActiveDocument Ultra will release gem security patches all minor versions `Y` of the most recently released two major versions `X`. For example, if the current ActiveDocument Ultra version is `10.1.2.15`, we will release 5 new gems versions for `10.1`, `10.0`, `9.2`, `9.1`, `9.0` (assuming those are the already released major/minor versions.)

Note the first Mongoid Ultra release is `9.0.0.0`.
Note the first ActiveDocument Ultra release is `9.0.0.0`.

## Reporting a Vulnerability

Security issues affecting both upstream and Mongoid Ultra should be [reported to MongoDB](https://www.mongodb.com/docs/manual/tutorial/create-a-vulnerability-report/).
Security issues affecting both upstream and ActiveDocument Ultra should be [reported to MongoDB](https://www.mongodb.com/docs/manual/tutorial/create-a-vulnerability-report/).

Security issues affecting only Mongoid Ultra should be reported to [[email protected]](mailto:[email protected]).
Security issues affecting only ActiveDocument Ultra should be reported to [[email protected]](mailto:[email protected]).
The email should be encrypted with the following PGP public key:

* Key ID: `0xDF7D22A0E8772326`
Expand Down
41 changes: 41 additions & 0 deletions active_document.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# frozen_string_literal: true

lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

require 'active_document/version'

Gem::Specification.new do |s|
s.name = ActiveDocument::GEM_NAME
s.version = ActiveDocument::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ['Johnny Shields']
s.email = '[email protected]'
s.homepage = 'https://github.com/tablecheck/activedocument'
s.summary = 'ActiveDocument is a Ruby ODM (Object Document Mapper) framework for No-SQL databases.'
s.description = 'Ruby ODM (Object Document Mapper) framework for No-SQL databases.'
s.license = 'MIT'

s.metadata = {
'rubygems_mfa_required' => 'true',
'bug_tracker_uri' => 'https://github.com/tablecheck/active_document/issues',
'changelog_uri' => 'https://github.com/tablecheck/active_document/releases',
'documentation_uri' => 'https://www.mongodb.com/docs/active_document/',
'homepage_uri' => 'https://github.com/tablecheck/active_document',
'source_code_uri' => 'https://github.com/tablecheck/active_document'
}

s.required_ruby_version = '>= 2.7'
s.required_rubygems_version = '>= 1.3.6'

# activemodel 7.0.0 cannot be used due to Class#descendants issue
# See: https://github.com/rails/rails/pull/43951
s.add_dependency('activemodel', ['>=5.1', '<7.2', '!= 7.0.0'])
s.add_dependency('mongo', ['>=2.18.0', '<3.0.0'])
s.add_dependency('concurrent-ruby', ['>= 1.0.5', '< 2.0'])

s.add_development_dependency('bson', ['>= 4.14.0', '< 6.0.0'])

s.files = Dir.glob('lib/**/*') + %w[LICENSE README.md Rakefile]
s.require_path = 'lib'
end
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Mongoid Documentation
ActiveDocument Documentation
=================================

This subdirectory contains the high-level driver documentation, including
Expand All @@ -10,5 +10,5 @@ To build the documentation locally for review, install `sphinx` and
pip install 'sphinx<4.3' sphinx-book-theme
make html

Note: sphinx 4.3 is currently breaking when trying to render Mongoid
Note: sphinx 4.3 is currently breaking when trying to render ActiveDocument
documentation.
26 changes: 13 additions & 13 deletions docs/additional-resources.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,52 +10,52 @@ Additional Resources
:depth: 2
:class: singlecol

This page lists some of the third-party guides and blog posts about Mongoid,
as well as sample Mongoid applications. Additional resources for the driver
This page lists some of the third-party guides and blog posts about ActiveDocument,
as well as sample ActiveDocument applications. Additional resources for the driver
are listed on the `respective driver page
<https://mongodb.com/docs/ruby-driver/current/reference/additional-resources/>`_.


Screencasts
===========

- `RailsCasts: Mongoid (revised)
- `RailsCasts: ActiveDocument (revised)
<https://www.youtube.com/watch?v=L0RqU2MdqXU>`_

An overview of Mongoid, by Ryan Bates including the basics
An overview of ActiveDocument, by Ryan Bates including the basics
of setting up an app, querying for documents, adding embedded
associations, overriding the id, and more.

- `Ruby on Rails Web Services and Integration with MongoDB, Week 3: Mongoid
- `Ruby on Rails Web Services and Integration with MongoDB, Week 3: ActiveDocument
<https://www.youtube.com/watch?v=9LylgiMYsUM>`_

A detailed introduction to Mongoid and Ruby on Rails web services.
A detailed introduction to ActiveDocument and Ruby on Rails web services.

- `Create a search bar in Rails with Mongoid
- `Create a search bar in Rails with ActiveDocument
<https://www.youtube.com/watch?v=zusWR8jS5-A>`_

A Tutorial explaining how to implement text search with Mongoid.
A Tutorial explaining how to implement text search with ActiveDocument.


Articles
========

- `A Simple Content Management System in Sinatra <https://www.sitepoint.com/a-simple-content-management-system-in-sinatra>`_

Building a content management application with Sinatra and Mongoid.
Building a content management application with Sinatra and ActiveDocument.

- `How To Create A Ruby API With Sinatra <https://x-team.com/blog/how-to-create-a-ruby-api-with-sinatra>`_

Creating a Sinatra API with Mongoid.
Creating a Sinatra API with ActiveDocument.

- `Converting an existing Ruby on Rails application to MongoDB <https://ibraheem.ca/posts/convert-rails-to-mongodb>`_

How to Convert an existing Ruby on Rails application to use MongoDB and Mongoid.
How to Convert an existing Ruby on Rails application to use MongoDB and ActiveDocument.


Sample Applications
===================

- `Mongoid Demo <https://github.com/mongoid/mongoid-demo>`_
- `ActiveDocument Demo <https://github.com/mongoid/mongoid-demo>`_

A repository containing sample applications using Mongoid.
A repository containing sample applications using ActiveDocument.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# -- Project information -----------------------------------------------------

project = 'Mongoid'
project = 'ActiveDocument'
copyright = '2021, MongoDB'


Expand Down
4 changes: 2 additions & 2 deletions docs/contributing/code-documentation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Code Documentation
Code Documentation
==================

Mongoid uses its own flavor of `YARD <https://github.com/lsegal/yard>`_
ActiveDocument uses its own flavor of `YARD <https://github.com/lsegal/yard>`_
for code documentation. Please note the conventions outlined in this document.


Expand Down Expand Up @@ -72,7 +72,7 @@ Structure
external usage should be marked ``@api private``. This macro does not
require a comment.

Note that, because Mongoid's modules are mixed into application classes,
Note that, because ActiveDocument's modules are mixed into application classes,
``private`` visibility of a method does not necessarily indicate its
status as an API private method.

Expand Down
10 changes: 5 additions & 5 deletions docs/contributing/code-style.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ Code Style

.. warning::

This section only applies to Mongoid Ultra. MongoDB Mongoid does
This section only applies to ActiveDocument Ultra. MongoDB ActiveDocument does
not follow any code style conventions and does not use a code
linter such as Rubocop.

Code Style
==========

Mongoid Ultra follows the `Ruby Style Guide <https://github.com/rubocop/ruby-style-guide>`_
ActiveDocument Ultra follows the `Ruby Style Guide <https://github.com/rubocop/ruby-style-guide>`_
for code documentation. and uses `Rubocop <https://github.com/rubocop/rubocop>`_
to ensure style conformity and perform code linting.

Expand All @@ -31,7 +31,7 @@ to ensure style conformity and perform code linting.
Target Ruby Version
-------------------

We set Rubocop's ``TargetRubyVersion`` to Mongoid's minimum supported
We set Rubocop's ``TargetRubyVersion`` to ActiveDocument's minimum supported
Ruby version. Refer to the `Compatibility <configuration-options>`_ section.


Expand All @@ -55,7 +55,7 @@ as the source of truth. However, we make a few intentional deviations:

.. code-block:: ruby

module Mongoid
module ActiveDocument
module Things

# Note the space above this line.
Expand All @@ -72,7 +72,7 @@ as the source of truth. However, we make a few intentional deviations:

.. code-block:: ruby

RSpec.describe Mongoid::Things::CardboardBox do
RSpec.describe ActiveDocument::Things::CardboardBox do

describe '#transmogrify' do

Expand Down
Loading

0 comments on commit 9eaac0a

Please sign in to comment.