mongoid-compatibility 0.6.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/danger.yml +5 -7
- data/.github/workflows/test.yml +63 -60
- data/.gitignore +1 -0
- data/.rubocop_todo.yml +9 -0
- data/Appraisals +34 -0
- data/CHANGELOG.md +5 -0
- data/Dangerfile +2 -0
- data/Gemfile +2 -31
- data/LICENSE.md +1 -1
- data/README.md +5 -3
- data/Rakefile +3 -1
- data/gemfiles/mongoid_2.gemfile +10 -0
- data/gemfiles/mongoid_3.gemfile +9 -0
- data/gemfiles/mongoid_4.gemfile +9 -0
- data/gemfiles/mongoid_5.gemfile +9 -0
- data/gemfiles/mongoid_6.gemfile +9 -0
- data/gemfiles/mongoid_7.gemfile +9 -0
- data/gemfiles/mongoid_8.gemfile +9 -0
- data/gemfiles/mongoid_9.gemfile +9 -0
- data/gemfiles/mongoid_head.gemfile +19 -0
- data/lib/mongoid/compatibility/object_id.rb +2 -0
- data/lib/mongoid/compatibility/self.rb +3 -1
- data/lib/mongoid/compatibility/version.rb +3 -1
- data/lib/mongoid/compatibility.rb +2 -0
- data/lib/mongoid-compatibility.rb +2 -0
- data/lib/mongoid_compatibility.rb +2 -0
- data/mongoid-compatibility.gemspec +10 -2
- data/spec/config/mongoid9.yml +8 -0
- data/spec/mongoid/compatibility/object_id_spec.rb +2 -0
- data/spec/mongoid/compatibility/self_spec.rb +2 -0
- data/spec/mongoid/compatibility/version_spec.rb +5 -3
- data/spec/spec_helper.rb +4 -0
- data/spec/support/mongoid.rb +4 -2
- metadata +86 -6
- data/.travis.yml +0 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96242e8dafcc50fb30c71364aaa0ae2e4fef1dc0a4fb1b53dacd7e6a05633ddd
|
4
|
+
data.tar.gz: 9bacbead3c2d71b3127b63afacb54a79da599fd8eb5616764ee4e70ae1beaf72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5ab33ff6bf40cce9fb20c666af1d660cd9730225f592bc552c9c81a0b2b111cc3e68a7b5c051498aa529f9df7a60e01e2738b8b8cc038a8f373ad6b758f4463
|
7
|
+
data.tar.gz: 5c882b1b39c3b3c66d1a2e2527f7d211607cf83be373066fe9da70977611aab34dcbcd0a4ce3fffd76c9c2e708bfc4e9aeaeb396fe7c5f6bdb0a128c6eca737e
|
@@ -3,17 +3,15 @@ on: [pull_request]
|
|
3
3
|
jobs:
|
4
4
|
danger:
|
5
5
|
runs-on: ubuntu-latest
|
6
|
-
env:
|
7
|
-
BUNDLE_GEMFILE: ${{ github.workspace }}/Gemfile.danger
|
8
6
|
steps:
|
9
|
-
- uses: actions/checkout@
|
7
|
+
- uses: actions/checkout@v3
|
10
8
|
with:
|
11
9
|
fetch-depth: 0
|
12
10
|
- uses: ruby/setup-ruby@v1
|
13
11
|
with:
|
14
|
-
ruby-version: 2.
|
12
|
+
ruby-version: 2.7
|
15
13
|
bundler-cache: true
|
16
14
|
- run: |
|
17
|
-
#
|
18
|
-
TOKEN=$(echo -n
|
19
|
-
DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose
|
15
|
+
# Personal access token for dangerpr-bot - public, but base64 encoded to avoid tripping up GitHub
|
16
|
+
TOKEN=$(echo -n Z2hwX0xNQ3VmanBFeTBvYkZVTWh6NVNqVFFBOEUxU25abzBqRUVuaAo= | base64 --decode)
|
17
|
+
DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose
|
data/.github/workflows/test.yml
CHANGED
@@ -5,76 +5,79 @@ on: [push, pull_request]
|
|
5
5
|
jobs:
|
6
6
|
build:
|
7
7
|
name: >-
|
8
|
-
Mongoid ${{ matrix.entry.
|
8
|
+
Mongoid Test with: - Ruby ${{ matrix.entry.ruby }} - MongoDB ${{ matrix.entry.mongodb }} - Gemfile ${{ matrix.entry.gemfile }})
|
9
9
|
env:
|
10
10
|
CI: true
|
11
|
-
TESTOPTS: -v
|
11
|
+
TESTOPTS: "-v"
|
12
|
+
BUNDLE_GEMFILE: gemfiles/${{ matrix.entry.gemfile }}.gemfile
|
12
13
|
runs-on: ubuntu-latest
|
13
14
|
continue-on-error: false
|
14
15
|
strategy:
|
15
16
|
matrix:
|
16
17
|
entry:
|
17
|
-
- { ruby: "2.
|
18
|
-
- { ruby: "2.
|
19
|
-
- { ruby: "2.
|
20
|
-
- { ruby: "2.
|
21
|
-
- { ruby: "2.
|
22
|
-
- { ruby: "2.
|
23
|
-
- { ruby: "2.
|
24
|
-
- { ruby: "2.
|
25
|
-
- { ruby: "2.6",
|
26
|
-
- { ruby: "2.6",
|
27
|
-
- { ruby: "2.7",
|
28
|
-
- { ruby: "3.0",
|
29
|
-
- { ruby: "3.1",
|
30
|
-
- { ruby: "2.
|
31
|
-
- { ruby: "2.6",
|
32
|
-
- { ruby: "2.6",
|
33
|
-
- { ruby: "2.7",
|
34
|
-
- { ruby: "3.0",
|
35
|
-
- { ruby: "3.1",
|
36
|
-
- { ruby: "2.
|
37
|
-
- { ruby: "2.6",
|
38
|
-
- { ruby: "2.6",
|
39
|
-
- { ruby: "2.7",
|
40
|
-
- { ruby: "3.0",
|
41
|
-
- { ruby: "3.1",
|
42
|
-
- { ruby: "2.
|
43
|
-
- { ruby: "2.6",
|
44
|
-
- { ruby: "2.6",
|
45
|
-
- { ruby: "2.7",
|
46
|
-
- { ruby: "3.0",
|
47
|
-
- { ruby: "3.1",
|
48
|
-
- { ruby: "2.
|
49
|
-
- { ruby: "2.6",
|
50
|
-
- { ruby: "2.6",
|
51
|
-
- { ruby: "2.7",
|
52
|
-
- { ruby: "3.0",
|
53
|
-
- { ruby: "3.1",
|
18
|
+
- { ruby: "2.6", gemfile: 'mongoid_3', mongodb: "3.6" }
|
19
|
+
- { ruby: "2.6", gemfile: 'mongoid_4', mongodb: "3.6" }
|
20
|
+
- { ruby: "2.6", gemfile: 'mongoid_4', mongodb: "3.6" }
|
21
|
+
- { ruby: "2.6", gemfile: 'mongoid_5', mongodb: "3.6" }
|
22
|
+
- { ruby: "2.6", gemfile: 'mongoid_5', mongodb: "3.6" }
|
23
|
+
- { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "3.6" }
|
24
|
+
- { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "3.6" }
|
25
|
+
- { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "3.6" }
|
26
|
+
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "3.6" }
|
27
|
+
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "3.6" }
|
28
|
+
- { ruby: "2.7", gemfile: 'mongoid_7', mongodb: "3.6" }
|
29
|
+
- { ruby: "3.0", gemfile: 'mongoid_8', mongodb: "3.6" }
|
30
|
+
- { ruby: "3.1", gemfile: 'mongoid_8', mongodb: "3.6" }
|
31
|
+
- { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "4.0" }
|
32
|
+
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "4.0" }
|
33
|
+
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "4.0" }
|
34
|
+
- { ruby: "2.7", gemfile: 'mongoid_7', mongodb: "4.0" }
|
35
|
+
- { ruby: "3.0", gemfile: 'mongoid_8', mongodb: "4.0" }
|
36
|
+
- { ruby: "3.1", gemfile: 'mongoid_8', mongodb: "4.0" }
|
37
|
+
- { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "4.2" }
|
38
|
+
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "4.2" }
|
39
|
+
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "4.2" }
|
40
|
+
- { ruby: "2.7", gemfile: 'mongoid_7', mongodb: "4.2" }
|
41
|
+
- { ruby: "3.0", gemfile: 'mongoid_8', mongodb: "4.2" }
|
42
|
+
- { ruby: "3.1", gemfile: 'mongoid_8', mongodb: "4.2" }
|
43
|
+
- { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "4.4" }
|
44
|
+
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "4.4" }
|
45
|
+
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "4.4" }
|
46
|
+
- { ruby: "2.7", gemfile: 'mongoid_7', mongodb: "4.4" }
|
47
|
+
- { ruby: "3.0", gemfile: 'mongoid_8', mongodb: "4.4" }
|
48
|
+
- { ruby: "3.1", gemfile: 'mongoid_8', mongodb: "4.4" }
|
49
|
+
- { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "5.0" }
|
50
|
+
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "5.0" }
|
51
|
+
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "5.0" }
|
52
|
+
- { ruby: "2.7", gemfile: 'mongoid_7', mongodb: "5.0" }
|
53
|
+
- { ruby: "3.0", gemfile: 'mongoid_8', mongodb: "5.0" }
|
54
|
+
- { ruby: "3.1", gemfile: 'mongoid_8', mongodb: "5.0" }
|
55
|
+
- { ruby: "3.1", gemfile: 'mongoid_9', mongodb: "5.0" }
|
56
|
+
- { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "6.0" }
|
57
|
+
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "6.0" }
|
58
|
+
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "6.0" }
|
59
|
+
- { ruby: "2.7", gemfile: 'mongoid_7', mongodb: "6.0" }
|
60
|
+
- { ruby: "3.0", gemfile: 'mongoid_8', mongodb: "6.0" }
|
61
|
+
- { ruby: "3.1", gemfile: 'mongoid_8', mongodb: "6.0" }
|
62
|
+
- { ruby: "3.1", gemfile: 'mongoid_9', mongodb: "6.0" }
|
63
|
+
- { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "7.0" }
|
64
|
+
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "7.0" }
|
65
|
+
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "7.0" }
|
66
|
+
- { ruby: "2.7", gemfile: 'mongoid_7', mongodb: "7.0" }
|
67
|
+
- { ruby: "3.0", gemfile: 'mongoid_8', mongodb: "7.0" }
|
68
|
+
- { ruby: "3.1", gemfile: 'mongoid_8', mongodb: "7.0" }
|
69
|
+
- { ruby: "3.1", gemfile: 'mongoid_9', mongodb: "7.0" }
|
54
70
|
steps:
|
55
|
-
- name:
|
56
|
-
uses:
|
57
|
-
|
58
|
-
- name: start mongodb
|
59
|
-
uses: supercharge/mongodb-github-action@1.6.0
|
71
|
+
- name: Set up MongoDB ${{ matrix.entry.mongodb }}
|
72
|
+
uses: supercharge/mongodb-github-action@1.8.0
|
60
73
|
with:
|
61
74
|
mongodb-version: ${{ matrix.entry.mongodb }}
|
62
|
-
|
63
|
-
|
64
|
-
- name: load ruby
|
75
|
+
- uses: actions/checkout@v3
|
76
|
+
- name: Set up Ruby
|
65
77
|
uses: ruby/setup-ruby@v1
|
66
78
|
with:
|
67
79
|
ruby-version: ${{ matrix.entry.ruby }}
|
68
|
-
bundler:
|
69
|
-
|
70
|
-
- name:
|
71
|
-
run:
|
72
|
-
env:
|
73
|
-
MONGOID_VERSION: ${{ matrix.entry.mongoid }}
|
74
|
-
|
75
|
-
- name: test
|
76
|
-
timeout-minutes: 10
|
77
|
-
run: bundle exec rspec spec
|
78
|
-
continue-on-error: false
|
79
|
-
env:
|
80
|
-
MONGOID_VERSION: ${{ matrix.entry.mongoid }}
|
80
|
+
bundler: '2'
|
81
|
+
bundler-cache: true
|
82
|
+
- name: Run tests
|
83
|
+
run: bundle exec rake
|
data/.gitignore
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -11,6 +11,15 @@
|
|
11
11
|
Metrics/LineLength:
|
12
12
|
Max: 118
|
13
13
|
|
14
|
+
Gemspec/RequiredRubyVersion:
|
15
|
+
Exclude:
|
16
|
+
- 'mongoid-compatibility.gemspec'
|
17
|
+
|
18
|
+
Metrics/BlockLength:
|
19
|
+
Exclude:
|
20
|
+
- 'spec/**/*'
|
21
|
+
- 'test/**/*'
|
22
|
+
|
14
23
|
# Offense count: 4
|
15
24
|
Style/Documentation:
|
16
25
|
Exclude:
|
data/Appraisals
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
appraise 'mongoid-9' do
|
4
|
+
gem 'mongoid', '~> 9.0.0'
|
5
|
+
end
|
6
|
+
|
7
|
+
appraise 'mongoid-8' do
|
8
|
+
gem 'mongoid', '~> 8.0.0'
|
9
|
+
end
|
10
|
+
|
11
|
+
appraise 'mongoid-7' do
|
12
|
+
gem 'mongoid', '~> 7.0.0'
|
13
|
+
end
|
14
|
+
|
15
|
+
appraise 'mongoid-6' do
|
16
|
+
gem 'mongoid', '~> 6.0.2'
|
17
|
+
end
|
18
|
+
|
19
|
+
appraise 'mongoid-5' do
|
20
|
+
gem 'mongoid', '~> 5.0.0'
|
21
|
+
end
|
22
|
+
|
23
|
+
appraise 'mongoid-4' do
|
24
|
+
gem 'mongoid', '~> 4.0.0'
|
25
|
+
end
|
26
|
+
|
27
|
+
appraise 'mongoid-3' do
|
28
|
+
gem 'mongoid', '~> 3.0.0'
|
29
|
+
end
|
30
|
+
|
31
|
+
appraise 'mongoid-2' do
|
32
|
+
gem 'mongoid', '~> 2.0.0'
|
33
|
+
gem 'bson_ext', platforms: :ruby
|
34
|
+
end
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
### 1.0.0 (2024/06/19)
|
2
|
+
|
3
|
+
* [#18](https://github.com/mongoid/mongoid-compatibility/pull/18): Test MongoDB 6 and 7 - [@saisrinivasan](https://github.com/SairamSrinivasan).
|
4
|
+
* [#16](https://github.com/mongoid/mongoid-compatibility/pull/16): Add support for Mongoid 9 - [@saisrinivasan](https://github.com/SairamSrinivasan).
|
5
|
+
|
1
6
|
### 0.6.0 (2022/08/18)
|
2
7
|
|
3
8
|
* [#13](https://github.com/mongoid/mongoid-compatibility/pull/13): Compatibility with Mongoid 8.x - [@joe1chen](https://github.com/joe1chen).
|
data/Dangerfile
CHANGED
data/Gemfile
CHANGED
@@ -1,34 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source 'http://rubygems.org'
|
2
4
|
|
3
5
|
gemspec
|
4
|
-
|
5
|
-
case version = ENV['MONGOID_VERSION'] || '8.0.2'
|
6
|
-
when 'HEAD'
|
7
|
-
gem 'mongoid', github: 'mongodb/mongoid'
|
8
|
-
when /^8/
|
9
|
-
gem 'mongoid', '~> 8.0'
|
10
|
-
when /^7/
|
11
|
-
gem 'mongoid', '~> 7.0'
|
12
|
-
when /^6/
|
13
|
-
gem 'mongoid', '~> 6.0'
|
14
|
-
when /^5/
|
15
|
-
gem 'mongoid', '~> 5.0'
|
16
|
-
when /^4/
|
17
|
-
gem 'mongoid', '~> 4.0'
|
18
|
-
when /^3/
|
19
|
-
gem 'mongoid', '~> 3.1'
|
20
|
-
when /^2/
|
21
|
-
gem 'mongoid', '~> 2.0'
|
22
|
-
gem 'bson_ext', platforms: :ruby
|
23
|
-
else
|
24
|
-
gem 'mongoid', version
|
25
|
-
end
|
26
|
-
|
27
|
-
group :test do
|
28
|
-
gem 'rspec'
|
29
|
-
end
|
30
|
-
|
31
|
-
group :development do
|
32
|
-
gem 'rake', '< 12'
|
33
|
-
gem 'rubocop', '0.33.0'
|
34
|
-
end
|
data/LICENSE.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
MIT License
|
2
2
|
|
3
|
-
Copyright (c) 2015-
|
3
|
+
Copyright (c) 2015-2022 Daniel Doubrovkine, Artsy and Contributors
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
6
6
|
a copy of this software and associated documentation files (the
|
data/README.md
CHANGED
@@ -5,7 +5,9 @@ Mongoid::Compatibility
|
|
5
5
|
[![Build Status](https://github.com/mongoid/mongoid-compatibility/actions/workflows/test.yml/badge.svg)](https://github.com/mongoid/mongoid-compatibility/actions)
|
6
6
|
[![Code Climate](https://codeclimate.com/github/mongoid/mongoid-compatibility.svg)](https://codeclimate.com/github/mongoid/mongoid-compatibility)
|
7
7
|
|
8
|
-
|
8
|
+
[Tested](https://github.com/mongoid/mongoid-compatibility/actions) against:
|
9
|
+
- MRI: `2.6.x`, `2.7.x`, `3.0.x`, `3.1.x`
|
10
|
+
- Compatibility helpers for Mongoid versions 2, 3, 4, 5, 6, 7, 8, and 9.
|
9
11
|
|
10
12
|
### Install
|
11
13
|
|
@@ -44,7 +46,7 @@ Mongoid::Compatibility::Version.mongoid8?
|
|
44
46
|
# => is this Mongoid 8.x?
|
45
47
|
```
|
46
48
|
|
47
|
-
Instead of checking for
|
49
|
+
Instead of checking specifically for a specific version, use `newer` and `older` helpers. For example:
|
48
50
|
|
49
51
|
``` ruby
|
50
52
|
Mongoid::Compatibility::Version.mongoid6_or_newer?
|
@@ -67,6 +69,6 @@ See [CONTRIBUTING](CONTRIBUTING.md).
|
|
67
69
|
|
68
70
|
### Copyright and License
|
69
71
|
|
70
|
-
Copyright Daniel Doubrovkine and Contributors, Artsy Inc., 2015-
|
72
|
+
Copyright Daniel Doubrovkine and Contributors, Artsy Inc., 2015-2022
|
71
73
|
|
72
74
|
[MIT License](LICENSE.md)
|
data/Rakefile
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# This file was generated by Appraisal
|
4
|
+
|
5
|
+
source 'http://rubygems.org'
|
6
|
+
|
7
|
+
gem 'mongoid', github: 'mongodb/mongoid'
|
8
|
+
|
9
|
+
group :development do
|
10
|
+
gem 'appraisal', '~> 2.0'
|
11
|
+
gem 'rake', '< 12'
|
12
|
+
gem 'rubocop', '0.33.0'
|
13
|
+
end
|
14
|
+
|
15
|
+
group :test do
|
16
|
+
gem 'rspec'
|
17
|
+
end
|
18
|
+
|
19
|
+
gemspec path: '../'
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$LOAD_PATH.push File.expand_path('lib', __dir__)
|
2
4
|
require 'mongoid/compatibility/self'
|
3
5
|
|
4
6
|
Gem::Specification.new do |s|
|
@@ -13,6 +15,12 @@ Gem::Specification.new do |s|
|
|
13
15
|
s.homepage = 'http://github.com/mongoid/mongoid-compatibility'
|
14
16
|
s.licenses = ['MIT']
|
15
17
|
s.summary = 'Compatibility helpers for Mongoid.'
|
16
|
-
s.add_dependency 'mongoid', '>= 2.0'
|
17
18
|
s.add_dependency 'activesupport'
|
19
|
+
s.add_dependency 'mongoid', '>= 2.0'
|
20
|
+
|
21
|
+
s.add_development_dependency 'appraisal', '~> 2.0'
|
22
|
+
s.add_development_dependency 'mongoid-danger', '~> 0.2'
|
23
|
+
s.add_development_dependency 'rake', '< 12'
|
24
|
+
s.add_development_dependency 'rspec'
|
25
|
+
s.add_development_dependency 'rubocop', '~> 1.36.0'
|
18
26
|
end
|
@@ -1,9 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
describe Mongoid::Compatibility::Version do
|
4
6
|
context 'mongoid? methods' do
|
5
7
|
it 'only true for one version' do
|
6
|
-
expect((2..
|
8
|
+
expect((2..9).one? do |v|
|
7
9
|
Mongoid::Compatibility::Version.send("mongoid#{v}?")
|
8
10
|
end).to be true
|
9
11
|
end
|
@@ -31,10 +33,10 @@ describe Mongoid::Compatibility::Version do
|
|
31
33
|
expect(Mongoid::Compatibility::Version.send("mongoid#{version}_or_older?")).to be true
|
32
34
|
end
|
33
35
|
end
|
34
|
-
(2..
|
36
|
+
(2..9).each do |v|
|
35
37
|
context "mongoid #{v}" do
|
36
38
|
before do
|
37
|
-
stub_const('::Mongoid::VERSION',
|
39
|
+
stub_const('::Mongoid::VERSION', v.to_s)
|
38
40
|
stub_const("::Mongoid::Compatibility::Version::ClassMethods::V#{v}", 1)
|
39
41
|
end
|
40
42
|
it "responds to mongoid#{v}?" do
|
data/spec/spec_helper.rb
CHANGED
data/spec/support/mongoid.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
if Mongoid::Compatibility::Version.mongoid2?
|
4
4
|
Mongoid.load! 'spec/config/mongoid2.yml'
|
@@ -14,8 +14,10 @@ elsif Mongoid::Compatibility::Version.mongoid7?
|
|
14
14
|
Mongoid.load! 'spec/config/mongoid7.yml'
|
15
15
|
elsif Mongoid::Compatibility::Version.mongoid8?
|
16
16
|
Mongoid.load! 'spec/config/mongoid8.yml'
|
17
|
+
elsif Mongoid::Compatibility::Version.mongoid9?
|
18
|
+
Mongoid.load! 'spec/config/mongoid9.yml'
|
17
19
|
else
|
18
|
-
|
20
|
+
raise "unsupported Mongoid version #{Mongoid::VERSION}"
|
19
21
|
end
|
20
22
|
|
21
23
|
RSpec.configure do |config|
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid-compatibility
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Doubrovkine
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: mongoid
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -25,19 +39,75 @@ dependencies:
|
|
25
39
|
- !ruby/object:Gem::Version
|
26
40
|
version: '2.0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
42
|
+
name: appraisal
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: mongoid-danger
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.2'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.2'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "<"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '12'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "<"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '12'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
29
85
|
requirement: !ruby/object:Gem::Requirement
|
30
86
|
requirements:
|
31
87
|
- - ">="
|
32
88
|
- !ruby/object:Gem::Version
|
33
89
|
version: '0'
|
34
|
-
type: :
|
90
|
+
type: :development
|
35
91
|
prerelease: false
|
36
92
|
version_requirements: !ruby/object:Gem::Requirement
|
37
93
|
requirements:
|
38
94
|
- - ">="
|
39
95
|
- !ruby/object:Gem::Version
|
40
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 1.36.0
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 1.36.0
|
41
111
|
description:
|
42
112
|
email: dblock@dblock.org
|
43
113
|
executables: []
|
@@ -51,7 +121,7 @@ files:
|
|
51
121
|
- ".rspec"
|
52
122
|
- ".rubocop.yml"
|
53
123
|
- ".rubocop_todo.yml"
|
54
|
-
-
|
124
|
+
- Appraisals
|
55
125
|
- CHANGELOG.md
|
56
126
|
- CONTRIBUTING.md
|
57
127
|
- Dangerfile
|
@@ -61,6 +131,15 @@ files:
|
|
61
131
|
- README.md
|
62
132
|
- RELEASING.md
|
63
133
|
- Rakefile
|
134
|
+
- gemfiles/mongoid_2.gemfile
|
135
|
+
- gemfiles/mongoid_3.gemfile
|
136
|
+
- gemfiles/mongoid_4.gemfile
|
137
|
+
- gemfiles/mongoid_5.gemfile
|
138
|
+
- gemfiles/mongoid_6.gemfile
|
139
|
+
- gemfiles/mongoid_7.gemfile
|
140
|
+
- gemfiles/mongoid_8.gemfile
|
141
|
+
- gemfiles/mongoid_9.gemfile
|
142
|
+
- gemfiles/mongoid_head.gemfile
|
64
143
|
- lib/mongoid-compatibility.rb
|
65
144
|
- lib/mongoid/compatibility.rb
|
66
145
|
- lib/mongoid/compatibility/object_id.rb
|
@@ -75,6 +154,7 @@ files:
|
|
75
154
|
- spec/config/mongoid6.yml
|
76
155
|
- spec/config/mongoid7.yml
|
77
156
|
- spec/config/mongoid8.yml
|
157
|
+
- spec/config/mongoid9.yml
|
78
158
|
- spec/mongoid/compatibility/object_id_spec.rb
|
79
159
|
- spec/mongoid/compatibility/self_spec.rb
|
80
160
|
- spec/mongoid/compatibility/version_spec.rb
|
@@ -99,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
179
|
- !ruby/object:Gem::Version
|
100
180
|
version: 1.3.6
|
101
181
|
requirements: []
|
102
|
-
rubygems_version: 3.
|
182
|
+
rubygems_version: 3.5.10
|
103
183
|
signing_key:
|
104
184
|
specification_version: 4
|
105
185
|
summary: Compatibility helpers for Mongoid.
|
data/.travis.yml
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
services:
|
2
|
-
- mongodb
|
3
|
-
|
4
|
-
matrix:
|
5
|
-
include:
|
6
|
-
- rvm: 2.3.1
|
7
|
-
script:
|
8
|
-
- bundle exec danger
|
9
|
-
- rvm: 2.4.0
|
10
|
-
env:
|
11
|
-
- MONGOID_VERSION=7
|
12
|
-
- rvm: 2.4.0
|
13
|
-
env:
|
14
|
-
- MONGOID_VERSION=6
|
15
|
-
- rvm: 2.3.1
|
16
|
-
env:
|
17
|
-
- MONGOID_VERSION=6
|
18
|
-
- rvm: 2.3.1
|
19
|
-
env:
|
20
|
-
- MONGOID_VERSION=5
|
21
|
-
- rvm: 2.3.1
|
22
|
-
env:
|
23
|
-
- MONGOID_VERSION=4
|
24
|
-
- rvm: 2.3.1
|
25
|
-
env:
|
26
|
-
- MONGOID_VERSION=3
|
27
|
-
- rvm: 2.3.1
|
28
|
-
env:
|
29
|
-
- MONGOID_VERSION=2
|
30
|
-
- rvm: 2.3.1
|
31
|
-
env:
|
32
|
-
- MONGOID_VERSION=HEAD
|
33
|
-
- rvm: 2.3.0
|