Skip to content

Commit 65d47f7

Browse files
committed
Upgraded mongoid-scroll to 2.0.
1 parent d9a3fa3 commit 65d47f7

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
### Changelog
22

3-
### 2.1.2 (Next)
3+
### 2.2.0 (Next)
44

5-
* Your contribution here.
5+
* [#176](https://github.com/slack-ruby/slack-ruby-bot-server/pull/176): Deps: bump mongoid-scroll to 2.0 - [@markokajzer](https://github.com/markokajzer).
66
* [#175](https://github.com/slack-ruby/slack-ruby-bot-server/pull/175): Fix(activerecord): correctly check for database in rails 7.2+ - [@markokajzer](https://github.com/markokajzer).
7+
* Your contribution here.
78

89
### 2.1.1 (2023/07/25)
910

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ case ENV.fetch('DATABASE_ADAPTER', nil)
44
when 'mongoid' then
55
gem 'kaminari-mongoid'
66
gem 'mongoid', ENV['MONGOID_VERSION'] || '~> 7.3.0'
7-
gem 'mongoid-scroll', '~> 1.0.1'
7+
gem 'mongoid-scroll', '~> 2.0'
88
gem 'mongoid-shell'
99

1010
group :development, :test do

lib/slack-ruby-bot-server/api/helpers/cursor_helpers.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ def paginate_by_cursor(coll, _options)
1616
coll = coll.skip(params[:offset].to_i) if params.key?(:offset)
1717
size = (params[:size] || 10).to_i
1818
coll = coll.limit(size)
19-
coll.scroll(params[:cursor]) do |record, next_cursor|
19+
coll.scroll(params[:cursor]) do |record, iterator|
2020
results[:results] << record if record
21-
results[:next] = next_cursor.to_s
21+
results[:next] = iterator.next_cursor.to_s
2222
break if results[:results].count >= size
2323
end
2424
results[:total_count] = coll.count if params[:total_count] && coll.respond_to?(:count)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module SlackRubyBotServer
2-
VERSION = '2.1.2'.freeze
2+
VERSION = '2.2.0'.freeze
33
end

0 commit comments

Comments
 (0)