lhs 15.2.2.pre.favorites.1 → 15.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lhs/concerns/record/request.rb +2 -6
- data/lib/lhs/version.rb +1 -1
- data/spec/concerns/record/request_spec.rb +0 -36
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 846f2dcb99c6c1a4b153e1d1b998c51c32f2c82b
|
4
|
+
data.tar.gz: d2e4703f188e3e60611ca2c819275d9d6daa0a3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aad4ca989ca9c836050891eb6b3223c4598fa1319a56d5f21ada0e76c8e59224a677ced8895c8aea5920e4fec3b70c53c1a271cbf928dc0653cfbe32b42a42d4
|
7
|
+
data.tar.gz: 2ced9df1e871c81eb07c45123c4af13e6afea3dc7cc4e14257949d25d5e5e7dcdc28dea5633b693aa8e7a9585aa1f14861168fcf924e50010fc6589b346a89db
|
@@ -267,18 +267,14 @@ class LHS::Record
|
|
267
267
|
|
268
268
|
def load_and_merge_set_of_paginated_collections!(data, options)
|
269
269
|
options_for_this_batch = []
|
270
|
-
data_record = data._record
|
271
|
-
data = data.compact
|
272
270
|
options.compact.each_with_index do |_, index|
|
273
271
|
record = data[index]._record
|
274
272
|
pagination = record.pagination(data[index])
|
275
273
|
next if pagination.pages_left.zero?
|
276
274
|
options_for_this_batch.push(options_for_next_batch(record, pagination, options[index], data[index]))
|
277
275
|
end
|
278
|
-
|
279
|
-
|
280
|
-
merge_batch_data_with_parent!(batch_data, batch_data._request.options[:parent_data])
|
281
|
-
end
|
276
|
+
data._record.request(options_for_this_batch.flatten).each do |batch_data|
|
277
|
+
merge_batch_data_with_parent!(batch_data, batch_data._request.options[:parent_data])
|
282
278
|
end
|
283
279
|
end
|
284
280
|
|
data/lib/lhs/version.rb
CHANGED
@@ -73,40 +73,4 @@ describe LHS::Record::Request do
|
|
73
73
|
params: { limit: 100 })
|
74
74
|
end
|
75
75
|
end
|
76
|
-
|
77
|
-
describe 'load_and_merge_set_of_paginated_collections!' do
|
78
|
-
let(:options) do
|
79
|
-
[
|
80
|
-
{
|
81
|
-
url: 'http://localhost:3000/test/resource?abc=def&limit=1&offset=3&test=1',
|
82
|
-
all: true,
|
83
|
-
auth: { bearer: 'xxx' },
|
84
|
-
params: { limit: 100 }
|
85
|
-
},
|
86
|
-
nil,
|
87
|
-
{
|
88
|
-
url: 'http://localhost:3000/test/resource?abc=def&limit=1&offset=3&test=3',
|
89
|
-
all: true,
|
90
|
-
auth: { bearer: 'xxx' },
|
91
|
-
params: { limit: 100 }
|
92
|
-
},
|
93
|
-
]
|
94
|
-
end
|
95
|
-
|
96
|
-
let(:data_array) do
|
97
|
-
[
|
98
|
-
LHS::Record.new,
|
99
|
-
nil,
|
100
|
-
LHS::Record.new,
|
101
|
-
]
|
102
|
-
end
|
103
|
-
|
104
|
-
let(:data) do
|
105
|
-
LHS::Record.new(data_array)
|
106
|
-
end
|
107
|
-
|
108
|
-
it 'does not raise an error when data has nil objects' do
|
109
|
-
expect(subject.send(:load_and_merge_set_of_paginated_collections!, data, options)).to_not be_nil
|
110
|
-
end
|
111
|
-
end
|
112
76
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lhs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 15.2.2
|
4
|
+
version: 15.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- https://github.com/local-ch/lhs/graphs/contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lhc
|
@@ -431,13 +431,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
431
431
|
version: 2.3.0
|
432
432
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
433
433
|
requirements:
|
434
|
-
- - "
|
434
|
+
- - ">="
|
435
435
|
- !ruby/object:Gem::Version
|
436
|
-
version:
|
436
|
+
version: '0'
|
437
437
|
requirements:
|
438
438
|
- Ruby >= 2.3.0
|
439
439
|
rubyforge_project:
|
440
|
-
rubygems_version: 2.
|
440
|
+
rubygems_version: 2.6.14
|
441
441
|
signing_key:
|
442
442
|
specification_version: 4
|
443
443
|
summary: Rails gem providing an easy, active-record-like interface for http json services
|