mongoid-scroll 0.3.2 → 0.3.7
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 +5 -5
- data/.rubocop.yml +0 -2
- data/.rubocop_todo.yml +38 -17
- data/.travis.yml +31 -12
- data/CHANGELOG.md +32 -16
- data/Dangerfile +1 -0
- data/Gemfile +13 -10
- data/LICENSE.md +1 -1
- data/README.md +31 -11
- data/RELEASING.md +67 -0
- data/Rakefile +1 -1
- data/examples/mongo_ruby_driver_scroll_feed.rb +45 -0
- data/examples/mongoid_scroll_feed.rb +8 -3
- data/examples/moped_scroll_feed.rb +2 -0
- data/lib/config/locales/en.yml +1 -1
- data/lib/mongo/scrollable.rb +34 -0
- data/lib/mongoid-scroll.rb +3 -6
- data/lib/mongoid/criteria/scrollable.rb +81 -0
- data/lib/mongoid/scroll/cursor.rb +15 -11
- data/lib/mongoid/scroll/errors/base.rb +1 -1
- data/lib/mongoid/scroll/version.rb +1 -1
- data/lib/moped/scrollable.rb +7 -6
- data/mongoid-scroll.gemspec +2 -1
- data/spec/mongo/collection_view_spec.rb +126 -0
- data/spec/mongoid/criteria_spec.rb +39 -4
- data/spec/mongoid/scroll_cursor_spec.rb +25 -25
- data/spec/moped/query_spec.rb +100 -98
- data/spec/spec_helper.rb +6 -1
- data/spec/support/feed/item.rb +5 -1
- data/spec/support/feed/publisher.rb +9 -0
- data/spec/support/mongodb.rb +9 -0
- metadata +30 -11
- data/lib/mongoid/criterion/scrollable.rb +0 -33
- data/lib/mongoid/scroll/mongoid.rb +0 -7
|
@@ -17,21 +17,21 @@ describe Mongoid::Scroll::Cursor do
|
|
|
17
17
|
end
|
|
18
18
|
context 'an id field cursor' do
|
|
19
19
|
let(:feed_item) { Feed::Item.create!(a_string: 'astring') }
|
|
20
|
-
field_type = Mongoid::
|
|
20
|
+
field_type = Mongoid::Compatibility::Version.mongoid3? ? Moped::BSON::ObjectId : BSON::ObjectId
|
|
21
21
|
subject do
|
|
22
22
|
Mongoid::Scroll::Cursor.new "#{feed_item.id}:#{feed_item.id}", field_name: '_id', field_type: field_type, direction: 1
|
|
23
23
|
end
|
|
24
24
|
its(:value) { should eq feed_item.id.to_s }
|
|
25
25
|
its(:tiebreak_id) { should eq feed_item.id }
|
|
26
26
|
its(:criteria) do
|
|
27
|
-
if Mongoid::
|
|
27
|
+
if Mongoid::Compatibility::Version.mongoid3?
|
|
28
28
|
should eq('$or' => [
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
{ '_id' => { '$gt' => Moped::BSON::ObjectId(feed_item.id.to_s) } }
|
|
30
|
+
])
|
|
31
31
|
else
|
|
32
32
|
should eq('$or' => [
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
{ '_id' => { '$gt' => BSON::ObjectId(feed_item.id.to_s) } }
|
|
34
|
+
])
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
end
|
|
@@ -44,9 +44,9 @@ describe Mongoid::Scroll::Cursor do
|
|
|
44
44
|
its(:tiebreak_id) { should eq feed_item.id }
|
|
45
45
|
its(:criteria) do
|
|
46
46
|
should eq('$or' => [
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
{ 'a_string' => { '$gt' => feed_item.a_string } },
|
|
48
|
+
{ 'a_string' => feed_item.a_string, '_id' => { '$gt' => feed_item.id } }
|
|
49
|
+
])
|
|
50
50
|
end
|
|
51
51
|
end
|
|
52
52
|
context 'an integer field cursor' do
|
|
@@ -58,9 +58,9 @@ describe Mongoid::Scroll::Cursor do
|
|
|
58
58
|
its(:tiebreak_id) { should eq feed_item.id }
|
|
59
59
|
its(:criteria) do
|
|
60
60
|
should eq('$or' => [
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
{ 'a_integer' => { '$gt' => feed_item.a_integer } },
|
|
62
|
+
{ 'a_integer' => feed_item.a_integer, '_id' => { '$gt' => feed_item.id } }
|
|
63
|
+
])
|
|
64
64
|
end
|
|
65
65
|
end
|
|
66
66
|
context 'a date/time field cursor' do
|
|
@@ -73,9 +73,9 @@ describe Mongoid::Scroll::Cursor do
|
|
|
73
73
|
its(:to_s) { should eq "#{feed_item.a_datetime.utc.to_i}:#{feed_item.id}" }
|
|
74
74
|
its(:criteria) do
|
|
75
75
|
should eq('$or' => [
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
{ 'a_datetime' => { '$gt' => feed_item.a_datetime } },
|
|
77
|
+
{ 'a_datetime' => feed_item.a_datetime, '_id' => { '$gt' => feed_item.id } }
|
|
78
|
+
])
|
|
79
79
|
end
|
|
80
80
|
end
|
|
81
81
|
context 'a date field cursor' do
|
|
@@ -88,9 +88,9 @@ describe Mongoid::Scroll::Cursor do
|
|
|
88
88
|
its(:to_s) { should eq "#{feed_item.a_date.to_datetime.to_i}:#{feed_item.id}" }
|
|
89
89
|
its(:criteria) do
|
|
90
90
|
should eq('$or' => [
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
{ 'a_date' => { '$gt' => feed_item.a_date.to_datetime } },
|
|
92
|
+
{ 'a_date' => feed_item.a_date.to_datetime, '_id' => { '$gt' => feed_item.id } }
|
|
93
|
+
])
|
|
94
94
|
end
|
|
95
95
|
end
|
|
96
96
|
context 'a time field cursor' do
|
|
@@ -103,9 +103,9 @@ describe Mongoid::Scroll::Cursor do
|
|
|
103
103
|
its(:to_s) { should eq "#{feed_item.a_time.to_i}:#{feed_item.id}" }
|
|
104
104
|
its(:criteria) do
|
|
105
105
|
should eq('$or' => [
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
{ 'a_time' => { '$gt' => feed_item.a_time } },
|
|
107
|
+
{ 'a_time' => feed_item.a_time, '_id' => { '$gt' => feed_item.id } }
|
|
108
|
+
])
|
|
109
109
|
end
|
|
110
110
|
end
|
|
111
111
|
context 'a time field cursor with a field option' do
|
|
@@ -118,13 +118,13 @@ describe Mongoid::Scroll::Cursor do
|
|
|
118
118
|
its(:to_s) { should eq "#{feed_item.a_time.to_i}:#{feed_item.id}" }
|
|
119
119
|
its(:criteria) do
|
|
120
120
|
should eq('$or' => [
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
{ 'a_time' => { '$gt' => feed_item.a_time } },
|
|
122
|
+
{ 'a_time' => feed_item.a_time, '_id' => { '$gt' => feed_item.id } }
|
|
123
|
+
])
|
|
124
124
|
end
|
|
125
125
|
end
|
|
126
126
|
context 'an array field cursor' do
|
|
127
|
-
let(:feed_item) { Feed::Item.create!(a_array: %w
|
|
127
|
+
let(:feed_item) { Feed::Item.create!(a_array: %w[x y]) }
|
|
128
128
|
it 'is not supported' do
|
|
129
129
|
expect do
|
|
130
130
|
Mongoid::Scroll::Cursor.from_record feed_item, field_name: 'a_array', field_type: Array
|
data/spec/moped/query_spec.rb
CHANGED
|
@@ -1,124 +1,126 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
context 'with multiple sort fields' do
|
|
13
|
-
subject do
|
|
14
|
-
Mongoid.default_session['feed_items'].find.sort(name: 1, value: -1)
|
|
15
|
-
end
|
|
16
|
-
it 'raises Mongoid::Scroll::Errors::MultipleSortFieldsError' do
|
|
17
|
-
expect { subject.scroll }.to raise_error Mongoid::Scroll::Errors::MultipleSortFieldsError,
|
|
18
|
-
/You're attempting to scroll over data with a sort order that includes multiple fields: name, value./
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
context 'with no sort' do
|
|
22
|
-
subject do
|
|
23
|
-
Mongoid.default_session['feed_items'].find
|
|
3
|
+
if Object.const_defined?(:Moped)
|
|
4
|
+
describe Moped::Query do
|
|
5
|
+
context 'scrollable' do
|
|
6
|
+
subject do
|
|
7
|
+
Mongoid.default_session['feed_items'].find
|
|
8
|
+
end
|
|
9
|
+
it ':scroll' do
|
|
10
|
+
expect(subject).to respond_to(:scroll)
|
|
11
|
+
end
|
|
24
12
|
end
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
context 'with multiple sort fields' do
|
|
14
|
+
subject do
|
|
15
|
+
Mongoid.default_session['feed_items'].find.sort(name: 1, value: -1)
|
|
16
|
+
end
|
|
17
|
+
it 'raises Mongoid::Scroll::Errors::MultipleSortFieldsError' do
|
|
18
|
+
expect { subject.scroll }.to raise_error Mongoid::Scroll::Errors::MultipleSortFieldsError,
|
|
19
|
+
/You're attempting to scroll over data with a sort order that includes multiple fields: name, value./
|
|
20
|
+
end
|
|
27
21
|
end
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
a_integer: i,
|
|
35
|
-
a_datetime: DateTime.mongoize(DateTime.new(2013, i + 1, 21, 1, 42, 3, 'UTC')),
|
|
36
|
-
a_date: Date.mongoize(Date.new(2013, i + 1, 21)),
|
|
37
|
-
a_time: Time.mongoize(Time.at(Time.now.to_i + i))
|
|
38
|
-
)
|
|
22
|
+
context 'with no sort' do
|
|
23
|
+
subject do
|
|
24
|
+
Mongoid.default_session['feed_items'].find
|
|
25
|
+
end
|
|
26
|
+
it 'adds a default sort by _id' do
|
|
27
|
+
expect(subject.scroll.operation.selector['$orderby']).to eq(_id: 1)
|
|
39
28
|
end
|
|
40
29
|
end
|
|
41
|
-
context '
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
30
|
+
context 'with data' do
|
|
31
|
+
before :each do
|
|
32
|
+
10.times do |i|
|
|
33
|
+
Mongoid.default_session['feed_items'].insert(
|
|
34
|
+
a_string: i.to_s,
|
|
35
|
+
a_integer: i,
|
|
36
|
+
a_datetime: DateTime.mongoize(DateTime.new(2013, i + 1, 21, 1, 42, 3, 'UTC')),
|
|
37
|
+
a_date: Date.mongoize(Date.new(2013, i + 1, 21)),
|
|
38
|
+
a_time: Time.mongoize(Time.at(Time.now.to_i + i))
|
|
39
|
+
)
|
|
46
40
|
end
|
|
47
|
-
expect(records.size).to eq 10
|
|
48
|
-
expect(records).to eq Mongoid.default_session['feed_items'].find.to_a
|
|
49
41
|
end
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
context field_type do
|
|
53
|
-
it 'scrolls all with a block' do
|
|
42
|
+
context 'default' do
|
|
43
|
+
it 'scrolls all' do
|
|
54
44
|
records = []
|
|
55
|
-
Mongoid.default_session['feed_items'].find.
|
|
45
|
+
Mongoid.default_session['feed_items'].find.scroll do |record, _next_cursor|
|
|
56
46
|
records << record
|
|
57
47
|
end
|
|
58
48
|
expect(records.size).to eq 10
|
|
59
49
|
expect(records).to eq Mongoid.default_session['feed_items'].find.to_a
|
|
60
50
|
end
|
|
61
|
-
|
|
51
|
+
end
|
|
52
|
+
{ a_string: String, a_integer: Integer, a_date: Date, a_datetime: DateTime }.each_pair do |field_name, field_type|
|
|
53
|
+
context field_type do
|
|
54
|
+
it 'scrolls all with a block' do
|
|
55
|
+
records = []
|
|
56
|
+
Mongoid.default_session['feed_items'].find.sort(field_name => 1).scroll(nil, field_type: field_type) do |record, _next_cursor|
|
|
57
|
+
records << record
|
|
58
|
+
end
|
|
59
|
+
expect(records.size).to eq 10
|
|
60
|
+
expect(records).to eq Mongoid.default_session['feed_items'].find.to_a
|
|
61
|
+
end
|
|
62
|
+
it 'scrolls all with a break' do
|
|
63
|
+
records = []
|
|
64
|
+
cursor = nil
|
|
65
|
+
Mongoid.default_session['feed_items'].find.sort(field_name => 1).limit(5).scroll(nil, field_type: field_type) do |record, next_cursor|
|
|
66
|
+
records << record
|
|
67
|
+
cursor = next_cursor
|
|
68
|
+
end
|
|
69
|
+
expect(records.size).to eq 5
|
|
70
|
+
Mongoid.default_session['feed_items'].find.sort(field_name => 1).scroll(cursor, field_type: field_type) do |record, next_cursor|
|
|
71
|
+
records << record
|
|
72
|
+
cursor = next_cursor
|
|
73
|
+
end
|
|
74
|
+
expect(records.size).to eq 10
|
|
75
|
+
expect(records).to eq Mongoid.default_session['feed_items'].find.to_a
|
|
76
|
+
end
|
|
77
|
+
it 'scrolls in descending order' do
|
|
78
|
+
records = []
|
|
79
|
+
Mongoid.default_session['feed_items'].find.sort(field_name => -1).limit(3).scroll(nil, field_type: field_type, field_name: field_name) do |record, _next_cursor|
|
|
80
|
+
records << record
|
|
81
|
+
end
|
|
82
|
+
expect(records.size).to eq 3
|
|
83
|
+
expect(records).to eq Mongoid.default_session['feed_items'].find.sort(field_name => -1).limit(3).to_a
|
|
84
|
+
end
|
|
85
|
+
it 'map' do
|
|
86
|
+
record = Mongoid.default_session['feed_items'].find.limit(3).scroll(nil, field_type: field_type, field_name: field_name).map { |r| r }.last
|
|
87
|
+
cursor = Mongoid::Scroll::Cursor.from_record(record, field_type: field_type, field_name: field_name)
|
|
88
|
+
expect(cursor).to_not be nil
|
|
89
|
+
expect(cursor.to_s.split(':')).to eq [
|
|
90
|
+
Mongoid::Scroll::Cursor.transform_field_value(field_type, field_name, record[field_name.to_s]).to_s,
|
|
91
|
+
record['_id'].to_s
|
|
92
|
+
]
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
context 'with overlapping data', if: MongoDB.mmapv1? do
|
|
98
|
+
before :each do
|
|
99
|
+
3.times { Feed::Item.create! a_integer: 5 }
|
|
100
|
+
Feed::Item.first.update_attributes!(name: Array(1000).join('a'))
|
|
101
|
+
end
|
|
102
|
+
it 'natural order is different from order by id' do
|
|
103
|
+
# natural order isn't necessarily going to be the same as _id order
|
|
104
|
+
# if a document is updated and grows in size, it may need to be relocated and
|
|
105
|
+
# thus cause the natural order to change
|
|
106
|
+
expect(Feed::Item.order_by('$natural' => 1).to_a).to_not eq Feed::Item.order_by(_id: 1).to_a
|
|
107
|
+
end
|
|
108
|
+
[{ a_integer: 1 }, { a_integer: -1 }].each do |sort_order|
|
|
109
|
+
it "scrolls by #{sort_order}" do
|
|
62
110
|
records = []
|
|
63
111
|
cursor = nil
|
|
64
|
-
Mongoid.default_session['feed_items'].find.sort(
|
|
112
|
+
Mongoid.default_session['feed_items'].find.sort(sort_order).limit(2).scroll do |record, next_cursor|
|
|
65
113
|
records << record
|
|
66
114
|
cursor = next_cursor
|
|
67
115
|
end
|
|
68
|
-
expect(records.size).to eq
|
|
69
|
-
Mongoid.default_session['feed_items'].find.sort(
|
|
70
|
-
records << record
|
|
71
|
-
cursor = next_cursor
|
|
72
|
-
end
|
|
73
|
-
expect(records.size).to eq 10
|
|
74
|
-
expect(records).to eq Mongoid.default_session['feed_items'].find.to_a
|
|
75
|
-
end
|
|
76
|
-
it 'scrolls in descending order' do
|
|
77
|
-
records = []
|
|
78
|
-
Mongoid.default_session['feed_items'].find.sort(field_name => -1).limit(3).scroll(nil, field_type: field_type, field_name: field_name) do |record, _next_cursor|
|
|
116
|
+
expect(records.size).to eq 2
|
|
117
|
+
Mongoid.default_session['feed_items'].find.sort(sort_order).scroll(cursor) do |record, _next_cursor|
|
|
79
118
|
records << record
|
|
80
119
|
end
|
|
81
120
|
expect(records.size).to eq 3
|
|
82
|
-
expect(records).to eq Mongoid.default_session['feed_items'].find.sort(
|
|
83
|
-
end
|
|
84
|
-
it 'map' do
|
|
85
|
-
record = Mongoid.default_session['feed_items'].find.limit(3).scroll(nil, field_type: field_type, field_name: field_name).map { |r| r }.last
|
|
86
|
-
cursor = Mongoid::Scroll::Cursor.from_record(record, field_type: field_type, field_name: field_name)
|
|
87
|
-
expect(cursor).to_not be nil
|
|
88
|
-
expect(cursor.to_s.split(':')).to eq [
|
|
89
|
-
Mongoid::Scroll::Cursor.transform_field_value(field_type, field_name, record[field_name.to_s]).to_s,
|
|
90
|
-
record['_id'].to_s
|
|
91
|
-
]
|
|
92
|
-
end
|
|
93
|
-
end
|
|
94
|
-
end
|
|
95
|
-
end
|
|
96
|
-
context 'with overlapping data' do
|
|
97
|
-
before :each do
|
|
98
|
-
3.times { Feed::Item.create! a_integer: 5 }
|
|
99
|
-
Feed::Item.first.update_attributes!(name: Array(1000).join('a'))
|
|
100
|
-
end
|
|
101
|
-
it 'natural order is different from order by id' do
|
|
102
|
-
# natural order isn't necessarily going to be the same as _id order
|
|
103
|
-
# if a document is updated and grows in size, it may need to be relocated and
|
|
104
|
-
# thus cause the natural order to change
|
|
105
|
-
expect(Feed::Item.order_by('$natural' => 1).to_a).to_not eq Feed::Item.order_by(_id: 1).to_a
|
|
106
|
-
end
|
|
107
|
-
[{ a_integer: 1 }, { a_integer: -1 }].each do |sort_order|
|
|
108
|
-
it "scrolls by #{sort_order}" do
|
|
109
|
-
records = []
|
|
110
|
-
cursor = nil
|
|
111
|
-
Mongoid.default_session['feed_items'].find.sort(sort_order).limit(2).scroll do |record, next_cursor|
|
|
112
|
-
records << record
|
|
113
|
-
cursor = next_cursor
|
|
114
|
-
end
|
|
115
|
-
expect(records.size).to eq 2
|
|
116
|
-
Mongoid.default_session['feed_items'].find.sort(sort_order).scroll(cursor) do |record, _next_cursor|
|
|
117
|
-
records << record
|
|
121
|
+
expect(records).to eq Mongoid.default_session['feed_items'].find.sort(sort_order.merge(_id: sort_order[:a_integer])).to_a
|
|
118
122
|
end
|
|
119
|
-
expect(records.size).to eq 3
|
|
120
|
-
expect(records).to eq Mongoid.default_session['feed_items'].find.sort(_id: sort_order[:a_integer]).to_a
|
|
121
123
|
end
|
|
122
124
|
end
|
|
123
125
|
end
|
|
124
|
-
end
|
|
126
|
+
end
|
data/spec/spec_helper.rb
CHANGED
|
@@ -4,6 +4,7 @@ $LOAD_PATH.unshift(File.dirname(__FILE__))
|
|
|
4
4
|
require 'rubygems'
|
|
5
5
|
require 'rspec'
|
|
6
6
|
require 'rspec/its'
|
|
7
|
+
require 'database_cleaner'
|
|
7
8
|
require 'mongoid-scroll'
|
|
8
9
|
|
|
9
10
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each do |f|
|
|
@@ -15,7 +16,11 @@ Mongoid.configure do |config|
|
|
|
15
16
|
end
|
|
16
17
|
|
|
17
18
|
RSpec.configure do |config|
|
|
19
|
+
config.before :all do
|
|
20
|
+
Mongoid.logger.level = Logger::INFO
|
|
21
|
+
Mongo::Logger.logger.level = Logger::INFO if Mongoid::Compatibility::Version.mongoid5_or_newer?
|
|
22
|
+
end
|
|
18
23
|
config.before :each do
|
|
19
|
-
|
|
24
|
+
DatabaseCleaner.clean
|
|
20
25
|
end
|
|
21
26
|
end
|
data/spec/support/feed/item.rb
CHANGED
|
@@ -10,6 +10,10 @@ module Feed
|
|
|
10
10
|
field :a_time, type: Time
|
|
11
11
|
field :a_array, type: Array
|
|
12
12
|
|
|
13
|
-
embeds_many :embedded_items
|
|
13
|
+
embeds_many :embedded_items, class_name: 'Feed::EmbeddedItem'
|
|
14
|
+
|
|
15
|
+
publisher_options = { class_name: 'Feed::Publisher' }
|
|
16
|
+
publisher_options[:optional] = true if Mongoid::Compatibility::Version.mongoid6? || Mongoid::Compatibility::Version.mongoid7?
|
|
17
|
+
belongs_to :publisher, publisher_options
|
|
14
18
|
end
|
|
15
19
|
end
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
module MongoDB
|
|
2
|
+
def self.mmapv1?
|
|
3
|
+
if Mongoid.respond_to?(:default_session)
|
|
4
|
+
Mongoid.default_session.command(serverStatus: 1)['storageEngine']['name'] == 'mmapv1'
|
|
5
|
+
else
|
|
6
|
+
Mongoid.default_client.command(serverStatus: 1).first['storageEngine']['name'] == 'mmapv1'
|
|
7
|
+
end
|
|
8
|
+
end
|
|
9
|
+
end
|
metadata
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mongoid-scroll
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Doubrovkine
|
|
8
8
|
- Frank Macreery
|
|
9
|
-
autorequire:
|
|
9
|
+
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2021-06-01 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: mongoid
|
|
@@ -25,6 +25,20 @@ dependencies:
|
|
|
25
25
|
- - ">="
|
|
26
26
|
- !ruby/object:Gem::Version
|
|
27
27
|
version: '3.0'
|
|
28
|
+
- !ruby/object:Gem::Dependency
|
|
29
|
+
name: mongoid-compatibility
|
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
|
31
|
+
requirements:
|
|
32
|
+
- - ">="
|
|
33
|
+
- !ruby/object:Gem::Version
|
|
34
|
+
version: '0'
|
|
35
|
+
type: :runtime
|
|
36
|
+
prerelease: false
|
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
38
|
+
requirements:
|
|
39
|
+
- - ">="
|
|
40
|
+
- !ruby/object:Gem::Version
|
|
41
|
+
version: '0'
|
|
28
42
|
- !ruby/object:Gem::Dependency
|
|
29
43
|
name: i18n
|
|
30
44
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -39,7 +53,7 @@ dependencies:
|
|
|
39
53
|
- - ">="
|
|
40
54
|
- !ruby/object:Gem::Version
|
|
41
55
|
version: '0'
|
|
42
|
-
description:
|
|
56
|
+
description:
|
|
43
57
|
email: dblock@dblock.org
|
|
44
58
|
executables: []
|
|
45
59
|
extensions: []
|
|
@@ -51,15 +65,19 @@ files:
|
|
|
51
65
|
- ".rubocop_todo.yml"
|
|
52
66
|
- ".travis.yml"
|
|
53
67
|
- CHANGELOG.md
|
|
68
|
+
- Dangerfile
|
|
54
69
|
- Gemfile
|
|
55
70
|
- LICENSE.md
|
|
56
71
|
- README.md
|
|
72
|
+
- RELEASING.md
|
|
57
73
|
- Rakefile
|
|
74
|
+
- examples/mongo_ruby_driver_scroll_feed.rb
|
|
58
75
|
- examples/mongoid_scroll_feed.rb
|
|
59
76
|
- examples/moped_scroll_feed.rb
|
|
60
77
|
- lib/config/locales/en.yml
|
|
78
|
+
- lib/mongo/scrollable.rb
|
|
61
79
|
- lib/mongoid-scroll.rb
|
|
62
|
-
- lib/mongoid/
|
|
80
|
+
- lib/mongoid/criteria/scrollable.rb
|
|
63
81
|
- lib/mongoid/scroll/cursor.rb
|
|
64
82
|
- lib/mongoid/scroll/errors.rb
|
|
65
83
|
- lib/mongoid/scroll/errors/base.rb
|
|
@@ -67,11 +85,11 @@ files:
|
|
|
67
85
|
- lib/mongoid/scroll/errors/multiple_sort_fields_error.rb
|
|
68
86
|
- lib/mongoid/scroll/errors/no_such_field_error.rb
|
|
69
87
|
- lib/mongoid/scroll/errors/unsupported_field_type_error.rb
|
|
70
|
-
- lib/mongoid/scroll/mongoid.rb
|
|
71
88
|
- lib/mongoid/scroll/version.rb
|
|
72
89
|
- lib/mongoid_scroll.rb
|
|
73
90
|
- lib/moped/scrollable.rb
|
|
74
91
|
- mongoid-scroll.gemspec
|
|
92
|
+
- spec/mongo/collection_view_spec.rb
|
|
75
93
|
- spec/mongoid/criteria_spec.rb
|
|
76
94
|
- spec/mongoid/scroll_cursor_spec.rb
|
|
77
95
|
- spec/mongoid/scroll_spec.rb
|
|
@@ -79,11 +97,13 @@ files:
|
|
|
79
97
|
- spec/spec_helper.rb
|
|
80
98
|
- spec/support/feed/embedded_item.rb
|
|
81
99
|
- spec/support/feed/item.rb
|
|
82
|
-
|
|
100
|
+
- spec/support/feed/publisher.rb
|
|
101
|
+
- spec/support/mongodb.rb
|
|
102
|
+
homepage: http://github.com/mongoid/mongoid-scroll
|
|
83
103
|
licenses:
|
|
84
104
|
- MIT
|
|
85
105
|
metadata: {}
|
|
86
|
-
post_install_message:
|
|
106
|
+
post_install_message:
|
|
87
107
|
rdoc_options: []
|
|
88
108
|
require_paths:
|
|
89
109
|
- lib
|
|
@@ -98,9 +118,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
98
118
|
- !ruby/object:Gem::Version
|
|
99
119
|
version: 1.3.6
|
|
100
120
|
requirements: []
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
signing_key:
|
|
121
|
+
rubygems_version: 3.1.3
|
|
122
|
+
signing_key:
|
|
104
123
|
specification_version: 4
|
|
105
124
|
summary: Mongoid extensions to enable infinite scroll.
|
|
106
125
|
test_files: []
|