better_auth-mongo-adapter 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +18 -4
- data/lib/better_auth/mongo_adapter/version.rb +1 -1
- data/lib/better_auth/mongo_adapter.rb +1 -0
- metadata +8 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 885937469aee592354774de5e22139b24a070675b77a5cee62a7bbe2b6ba47cf
|
|
4
|
+
data.tar.gz: e95fde465e263c3f838af56177c0868276deea2450399b706b52b2a48e712089
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f5391e10a89e96a1dfaf7beb2cd92f824197e2887fe56c9f0b02d006de16a497b18a29897d6d4a773b94a2d118281b7f88fb401d00e1fe615c6e97733b32dc4d
|
|
7
|
+
data.tar.gz: fe025a79b52a843431c622c9d86c07b42acb1c44f1dc99f76e65a79e9d3a5f4de84934cbd60a099e45172ead7d04e17789818a861d7e7968d530ce9255856ad4
|
data/CHANGELOG.md
CHANGED
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.10.0 - 2026-05-21
|
|
6
|
+
|
|
5
7
|
- Deprecated this package in favor of `better_auth-mongodb`.
|
|
6
8
|
- Kept `require "better_auth/mongo_adapter"` as a compatibility entrypoint.
|
|
9
|
+
- Kept compatibility behavior aligned with the canonical MongoDB adapter.
|
|
7
10
|
|
|
8
11
|
## 0.7.0 - 2026-05-05
|
|
9
12
|
|
data/README.md
CHANGED
|
@@ -108,9 +108,23 @@ auth = BetterAuth.auth(
|
|
|
108
108
|
|
|
109
109
|
The same default applies to one-to-many join lookups when the join config does not set `limit:`. Passing an explicit `limit:` to `find_many` or to the join config overrides the default.
|
|
110
110
|
|
|
111
|
+
Explicit `limit:` values must be positive integers. Explicit `offset:` values
|
|
112
|
+
must be zero or positive integers. Invalid configured defaults, including
|
|
113
|
+
non-positive `default_find_many_limit` values, fall back to the built-in cap of
|
|
114
|
+
100 records.
|
|
115
|
+
|
|
111
116
|
One-to-one joins ignore one-to-many limits. They are returned as a single object or `nil`.
|
|
112
117
|
|
|
113
|
-
Ruby's
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
118
|
+
Ruby's MongoDB adapter matches upstream's adapter factory by requiring array
|
|
119
|
+
values for the `in` filter operator. The Ruby adapter still accepts scalar
|
|
120
|
+
values for `not_in` and coerces them to a one-element list, matching the Ruby
|
|
121
|
+
adapter-family behavior.
|
|
122
|
+
|
|
123
|
+
Update calls intentionally strip logical `id` / Mongo `_id` from `$set` payloads
|
|
124
|
+
so callers cannot mutate immutable Mongo identifiers. If an update contains no
|
|
125
|
+
caller-supplied schema fields after id and unknown fields are ignored, the
|
|
126
|
+
adapter raises `BAD_REQUEST` before calling MongoDB.
|
|
127
|
+
|
|
128
|
+
Default storage field names use Ruby's snake_case convention. For example, an
|
|
129
|
+
additional or plugin field named `camelCaseField` is stored as
|
|
130
|
+
`camel_case_field` unless the schema config provides an explicit `fieldName`.
|
|
@@ -5,5 +5,6 @@ warn "The better_auth-mongo-adapter gem is deprecated; use better_auth-mongodb a
|
|
|
5
5
|
require "better_auth/mongodb"
|
|
6
6
|
|
|
7
7
|
module BetterAuth
|
|
8
|
+
remove_const(:MongoAdapter) if const_defined?(:MongoAdapter, false) && const_get(:MongoAdapter) != MongoDB
|
|
8
9
|
MongoAdapter = MongoDB unless const_defined?(:MongoAdapter, false)
|
|
9
10
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: better_auth-mongo-adapter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sebastian Sala
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.
|
|
18
|
+
version: 0.10.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.
|
|
25
|
+
version: 0.10.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: bundler
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -105,14 +105,14 @@ files:
|
|
|
105
105
|
- README.md
|
|
106
106
|
- lib/better_auth/mongo_adapter.rb
|
|
107
107
|
- lib/better_auth/mongo_adapter/version.rb
|
|
108
|
-
homepage: https://github.com/sebasxsala/better-auth
|
|
108
|
+
homepage: https://github.com/sebasxsala/better-auth-rb
|
|
109
109
|
licenses:
|
|
110
110
|
- MIT
|
|
111
111
|
metadata:
|
|
112
|
-
homepage_uri: https://github.com/sebasxsala/better-auth
|
|
113
|
-
source_code_uri: https://github.com/sebasxsala/better-auth
|
|
114
|
-
changelog_uri: https://github.com/sebasxsala/better-auth/blob/main/packages/better_auth-mongo-adapter/CHANGELOG.md
|
|
115
|
-
bug_tracker_uri: https://github.com/sebasxsala/better-auth/issues
|
|
112
|
+
homepage_uri: https://github.com/sebasxsala/better-auth-rb
|
|
113
|
+
source_code_uri: https://github.com/sebasxsala/better-auth-rb
|
|
114
|
+
changelog_uri: https://github.com/sebasxsala/better-auth-rb/blob/main/packages/better_auth-mongo-adapter/CHANGELOG.md
|
|
115
|
+
bug_tracker_uri: https://github.com/sebasxsala/better-auth-rb/issues
|
|
116
116
|
rdoc_options: []
|
|
117
117
|
require_paths:
|
|
118
118
|
- lib
|