Skip to content

Commit 5fc1fa6

Browse files
committed
Drop support for mongoid 5.
1 parent 5f41285 commit 5fc1fa6

File tree

8 files changed

+3
-326
lines changed

8 files changed

+3
-326
lines changed

.github/workflows/ci.yml

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ jobs:
77
strategy:
88
matrix:
99
entry:
10-
- { ruby: '2.6', mongodb: '4.4', mongoid: '5' }
11-
- { ruby: '3.2', mongodb: '6.0', mongoid: '5' }
1210
- { ruby: '2.7', mongodb: '4.4', mongoid: '6' }
1311
- { ruby: '2.7', mongodb: '4.4', mongoid: '7' }
1412
- { ruby: '3.0', mongodb: '4.4', mongoid: '6' }

Gemfile

-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ when 'HEAD' then gem 'mongoid', github: 'mongodb/mongoid'
77
when /8/ then gem 'mongoid', '~> 8.0'
88
when /7/ then gem 'mongoid', '~> 7.0'
99
when /6/ then gem 'mongoid', '~> 6.0'
10-
when /5/ then
11-
gem 'bigdecimal', '1.3.5'
12-
gem 'mongoid', '~> 5.0'
1310
else gem 'mongoid', version
1411
end
1512

README.md

+2-27
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
- [The Problem](#the-problem)
55
- [Installation](#installation)
66
- [Usage](#usage)
7-
- [Mongoid](#mongoid)
8-
- [Mongo-Ruby-Driver (Mongoid 5)](#mongo-ruby-driver-mongoid-5)
97
- [Indexes and Performance](#indexes-and-performance)
108
- [Cursors](#cursors)
119
- [Standard Cursor](#standard-cursor)
@@ -24,7 +22,7 @@ Mongoid extension that enables infinite scrolling for `Mongoid::Criteria` and `M
2422

2523
## Compatibility
2624

27-
This gem supports Mongoid 5, 6, 7 and 8.
25+
This gem supports Mongoid 6, 7 and 8.
2826

2927
## Demo
3028

@@ -51,8 +49,6 @@ gem 'mongoid-scroll'
5149

5250
## Usage
5351

54-
### Mongoid
55-
5652
A sample model.
5753

5854
```ruby
@@ -106,27 +102,6 @@ Feed::Item.desc(:position).limit(5).scroll(saved_iterator.next_cursor) do |recor
106102
end
107103
```
108104

109-
### Mongo-Ruby-Driver (Mongoid 5)
110-
111-
Scroll a `Mongo::Collection::View` and save a cursor to the last item. You must also supply a `field_type` of the sort criteria.
112-
113-
```ruby
114-
saved_iterator = nil
115-
client[:feed_items].find.sort(position: -1).limit(5).scroll(nil, { field_type: DateTime }) do |record, iterator|
116-
# each record, one-by-one
117-
saved_iterator = iterator
118-
end
119-
```
120-
121-
Resume iterating using the previously saved cursor.
122-
123-
```ruby
124-
session[:feed_items].find.sort(position: -1).limit(5).scroll(saved_iterator.next_cursor, { field_type: DateTime }) do |record, iterator|
125-
# each record, one-by-one
126-
saved_iterator = iterator
127-
end
128-
```
129-
130105
## Indexes and Performance
131106

132107
A query without a cursor is identical to a query without a scroll.
@@ -212,4 +187,4 @@ Fork the project. Make your feature addition or bug fix with tests. Send a pull
212187

213188
MIT License, see [LICENSE](http://github.com/mongoid/mongoid-scroll/raw/master/LICENSE.md) for details.
214189

215-
(c) 2013-2023 [Daniel Doubrovkine](http://github.com/dblock), based on code by [Frank Macreery](http://github.com/macreery), [Artsy Inc.](http://artsy.net)
190+
(c) 2013-2024 [Daniel Doubrovkine](http://github.com/dblock), based on code by [Frank Macreery](http://github.com/macreery), [Artsy Inc.](http://artsy.net)
File renamed without changes.

examples/mongo_ruby_driver_scroll_feed.rb

-45
This file was deleted.

lib/mongo/scrollable.rb

-62
This file was deleted.

mongoid-scroll.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
1313
s.homepage = 'http://github.com/mongoid/mongoid-scroll'
1414
s.licenses = ['MIT']
1515
s.summary = 'Mongoid extensions to enable infinite scroll.'
16-
s.add_dependency 'mongoid', '>= 3.0'
16+
s.add_dependency 'mongoid', '>= 6.0'
1717
s.add_dependency 'mongoid-compatibility'
1818
s.add_dependency 'i18n'
1919
end

spec/mongo/collection_view_spec.rb

-186
This file was deleted.

0 commit comments

Comments
 (0)