mongoid_includes 3.0.2 → 3.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8d1edc191e71925a3462bf7016a3df71eca0d73c3257e805b1484b58ea5ecd9
4
- data.tar.gz: 89b4566f274c31a0df1d61b34cc5f3c04dc8bc51718a6528987df2f3d5eb122c
3
+ metadata.gz: 48e36bb9b9e6b5ad9bef681c5ea1b2fbc041d87cc24beacb65a6fafc3454d435
4
+ data.tar.gz: 361559262111d541da7f085b20ad2bf4d305e7f5d65cd5d6a511c9501c467883
5
5
  SHA512:
6
- metadata.gz: f2adc7ec100121a377091f850489cd60e0de8a6f5a0c55f506482fc0241c2a679297bd6c20dd017ce1b223c186d3067008ef2d4673bc827ba4e82e9f17e867fc
7
- data.tar.gz: c8c5b23eef7064c2f7e9f8af75806c3507e385684202140653d21dc6bb1f8f57ee628bf9b4f013b3d647bc5558eaffa14931d1edd73efd249aacded0ed518ef1
6
+ metadata.gz: bd46468001e42037d5364e5e4e08aad6f8758381d57f128244e61b92ff9b562b98414d17c4a95fad8cc1a51bcfac6623c064596a7bfdd9d405bd63b1ec721616
7
+ data.tar.gz: 3ba71596e0ae09549469a0bbae88b5a3b4d8824fe64f7ce0e5d89946e917ff5631c0c7fd1d163ac7d5aaaadef5e456d8c9125f6cd8d72d8b354a42d9230261ce
data/LICENSE.txt CHANGED
@@ -1,4 +1,5 @@
1
1
  Copyright (c) 2015 Máximo Mussini
2
+ Copyright (c) 2025 Cache Ventures (https://cacheventures.com)
2
3
 
3
4
  Permission is hereby granted, free of charge, to any person obtaining
4
5
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,11 +1,8 @@
1
1
  Mongoid::Includes
2
2
  =====================
3
- [![Gem Version](https://badge.fury.io/rb/mongoid_includes.svg)](http://badge.fury.io/rb/mongoid_includes)
4
- [![Build Status](https://travis-ci.org/ElMassimo/mongoid_includes.svg)](https://travis-ci.org/ElMassimo/mongoid_includes)
5
- [![Test Coverage](https://codeclimate.com/github/ElMassimo/mongoid_includes/badges/coverage.svg)](https://codeclimate.com/github/ElMassimo/mongoid_includes)
6
- [![Code Climate](https://codeclimate.com/github/ElMassimo/mongoid_includes.svg)](https://codeclimate.com/github/ElMassimo/mongoid_includes)
7
- [![Inline docs](http://inch-ci.org/github/ElMassimo/mongoid_includes.svg)](http://inch-ci.org/github/ElMassimo/mongoid_includes)
8
- [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/ElMassimo/mongoid_includes/blob/main/LICENSE.txt)
3
+
4
+ [![Gem Version](https://badge.fury.io/rb/mongoid_includes.svg)](https://rubygems.org/gems/mongoid_includes)
5
+ [![Build Status](https://github.com/cacheventures/mongoid_includes/workflows/ci/badge.svg)](https://github.com/cacheventures/mongoid_includes/actions)
9
6
 
10
7
  `Mongoid::Includes` improves eager loading in Mongoid, supporting polymorphic associations, and nested eager loading.
11
8
 
@@ -48,26 +45,6 @@ Or install it yourself running:
48
45
  gem install mongoid_includes
49
46
  ```
50
47
 
51
- License
52
- --------
53
-
54
- Copyright (c) 2015 Máximo Mussini
55
-
56
- Permission is hereby granted, free of charge, to any person obtaining
57
- a copy of this software and associated documentation files (the
58
- "Software"), to deal in the Software without restriction, including
59
- without limitation the rights to use, copy, modify, merge, publish,
60
- distribute, sublicense, and/or sell copies of the Software, and to
61
- permit persons to whom the Software is furnished to do so, subject to
62
- the following conditions:
63
-
64
- The above copyright notice and this permission notice shall be
65
- included in all copies or substantial portions of the Software.
66
-
67
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
68
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
69
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
70
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
71
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
72
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
73
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
48
+ ## License
49
+
50
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -5,6 +5,6 @@ module Mongoid
5
5
  module Includes
6
6
 
7
7
  # Public: This library will attempt to follow semantic versioning (whatever that's supposed to be).
8
- VERSION = '3.0.2'
8
+ VERSION = '3.0.3'
9
9
  end
10
10
  end
@@ -9,4 +9,8 @@ Mongoid::Contextual::Mongo.send :prepend, Mongoid::Includes::EagerLoad
9
9
  Mongoid::Contextual::Memory.send :prepend, Mongoid::Includes::EagerLoad
10
10
 
11
11
  Mongoid::Criteria.send :prepend, Mongoid::Includes::Criteria
12
- Mongoid::Association::Referenced::Eager::Base.send :prepend, Mongoid::Includes::Association::Eager
12
+ if defined?(Mongoid::Association::Referenced::Eager::Base)
13
+ Mongoid::Association::Referenced::Eager::Base.send :prepend, Mongoid::Includes::Association::Eager
14
+ else
15
+ Mongoid::Association::Eager.send :prepend, Mongoid::Includes::Association::Eager
16
+ end
data/spec/spec_helper.rb CHANGED
@@ -54,3 +54,5 @@ RSpec.configure do |config|
54
54
  Mongoid.purge!
55
55
  end
56
56
  end
57
+
58
+ Time.zone = 'UTC'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid_includes
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Máximo Mussini
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-04 00:00:00.000000000 Z
11
+ date: 2025-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: 7.0.10
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: 9.0.0
22
+ version: 10.0.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: 7.0.10
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: 9.0.0
32
+ version: 10.0.0
33
33
  description: Mongoid::Includes improves eager loading in Mongoid, supporting polymorphic
34
34
  associations, and up to two-levels of eager loading.
35
35
  email:
@@ -38,7 +38,6 @@ executables: []
38
38
  extensions: []
39
39
  extra_rdoc_files: []
40
40
  files:
41
- - CHANGELOG.md
42
41
  - LICENSE.txt
43
42
  - README.md
44
43
  - Rakefile
@@ -54,7 +53,6 @@ files:
54
53
  - lib/mongoid/includes/inclusions.rb
55
54
  - lib/mongoid/includes/version.rb
56
55
  - lib/mongoid_includes.rb
57
- - spec/mongo.log
58
56
  - spec/mongoid/includes/criteria_spec.rb
59
57
  - spec/mongoid/includes/errors/invalid_includes_spec.rb
60
58
  - spec/mongoid/includes/errors/invalid_polymorphic_includes_spec.rb
@@ -77,7 +75,7 @@ files:
77
75
  - spec/support/models/preference.rb
78
76
  - spec/support/models/record.rb
79
77
  - spec/support/models/song.rb
80
- homepage: https://github.com/ElMassimo/mongoid_includes
78
+ homepage: https://github.com/cacheventures/mongoid_includes
81
79
  licenses:
82
80
  - MIT
83
81
  metadata: {}
@@ -97,12 +95,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
95
  - !ruby/object:Gem::Version
98
96
  version: '0'
99
97
  requirements: []
100
- rubygems_version: 3.2.32
98
+ rubygems_version: 3.3.3
101
99
  signing_key:
102
100
  specification_version: 4
103
101
  summary: Improved eager loading support for Mongoid.
104
102
  test_files:
105
- - spec/mongo.log
106
103
  - spec/mongoid/includes/criteria_spec.rb
107
104
  - spec/mongoid/includes/errors/invalid_includes_spec.rb
108
105
  - spec/mongoid/includes/errors/invalid_polymorphic_includes_spec.rb
data/CHANGELOG.md DELETED
@@ -1,54 +0,0 @@
1
- ## Mongoid::Includes 3.0.2 (2022-11-03) ##
2
-
3
- * [perf: avoid queries when foreign keys are empty](https://github.com/ElMassimo/mongoid_includes/commit/9f4c0c8bf1560a319c663fae77015c638caec56b)
4
-
5
- ## Mongoid::Includes 3.0.1 (2022-11-03) ##
6
-
7
- * Allow installing this library with Mongoid `8.0`.
8
-
9
- ## Mongoid::Includes 3.0.0 (2020-10-29) ##
10
-
11
- * Add support for Mongoid `7.1`.
12
- * Avoid making a query when the foreign keys are empty.
13
-
14
- ## Mongoid::Includes 2.1.0 (2017-07-03) ##
15
-
16
- * Fix bug where `includes` ignores the `:with` option if the association is polymorphic. Thanks @nickcherry for the bug report!
17
-
18
- ## Mongoid::Includes 2.0.0 (2017-01-10) ##
19
-
20
- * Support Mongoid 6.0.1, fixes related to [changes in Mongoid internals](https://github.com/mongodb/mongoid/pull/4326). Thanks @mityakoval and @forumd for the bug reports!
21
-
22
- ## Mongoid::Includes 1.1.3 (2016-10-17) ##
23
-
24
- * Fix eager loading for [self-referencing associations](https://github.com/ElMassimo/mongoid_includes/pull/6). Thanks @rmachielse!
25
-
26
- ## Mongoid::Includes 1.1.2 (2016-05-26) ##
27
-
28
- * Change gem dependencies to [support Mongoid 6](https://github.com/ElMassimo/mongoid_includes/pull/3). Thanks @joostverdoorn!
29
-
30
- ## Mongoid::Includes 1.1.1 (2016-01-12) ##
31
-
32
- * Fix bug with nested includes when the related document is `nil`.
33
-
34
- ## Mongoid::Includes 1.1.0 (2015-11-04) ##
35
-
36
- * Fix bug with optional polymorphic `belongs_to` relations where the name of the relation does not match an actual class name.
37
-
38
- ## Mongoid::Includes 1.0.3 (2015-10-10) ##
39
-
40
- * Add support for Mongoid 5.
41
-
42
- ## Mongoid::Includes 1.0.2 (2015-10-08) ##
43
-
44
- * Fix error when using `merge` or `merge!` with a criteria and `includes`.
45
- * Replace the internal structure with a Set to be more robust when avoiding duplicate relations.
46
-
47
- ## Mongoid::Includes 1.0.1 (August 5, 2015) ##
48
-
49
- * Fix error messages for polymorphic includes.
50
- * Add :with option that receives the criteria that will be used to include documents.
51
-
52
- ## Mongoid::Includes 1.0.0 (July 30, 2015) ##
53
-
54
- * Initial Version.