acfs 0.49.0 → 0.49.1
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/acfs/resource/query_methods.rb +5 -2
- data/lib/acfs/version.rb +1 -1
- data/spec/acfs/resource/query_methods_spec.rb +10 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7f08aee5d888f6ec728aaf1ca42e67a28465db2
|
4
|
+
data.tar.gz: 9ce7ae3230a279c09a718fc3385168c87411f5d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 458283362a08bedb6e63e2465211a705aa0818ebe020eeab5de2c30341008587653637ce2dcfed0cba5646733636c6e917526a1730ddd920cc0d40ee43e91e5f
|
7
|
+
data.tar.gz: ad04e635dd0e1712b4f359a77573e537bc779cc19e8bc3e827026c3bab700155f486974360d89fd451806fc2d022b3bc3cd9de6d900289c40d314cda813d1f8e
|
data/CHANGELOG.md
CHANGED
@@ -193,10 +193,13 @@ class Acfs::Resource
|
|
193
193
|
#
|
194
194
|
# @yield [item] Callback that will be invoked for each item.
|
195
195
|
# @yieldparam item [self] Resource.
|
196
|
+
# @yieldparam collection [Acfs::Collection] Collection.
|
196
197
|
#
|
197
|
-
def each_item(opts = {}
|
198
|
+
def each_item(opts = {})
|
198
199
|
each_page(opts) do |collection|
|
199
|
-
collection.each
|
200
|
+
collection.each do |item|
|
201
|
+
yield item, collection
|
202
|
+
end
|
200
203
|
end
|
201
204
|
end
|
202
205
|
|
data/lib/acfs/version.rb
CHANGED
@@ -519,14 +519,21 @@ describe Acfs::Resource::QueryMethods do
|
|
519
519
|
end
|
520
520
|
|
521
521
|
it 'should iterate all pages' do
|
522
|
-
|
522
|
+
indices = []
|
523
523
|
model.each_item do |item|
|
524
524
|
expect(item).to be_a MyUser
|
525
|
-
|
525
|
+
indices << item.id
|
526
526
|
end
|
527
527
|
Acfs.run
|
528
528
|
|
529
|
-
expect(
|
529
|
+
expect(indices).to eq [1, 2, 3, 4, 5]
|
530
|
+
end
|
531
|
+
|
532
|
+
it 'should pass the collection to the provided block' do
|
533
|
+
model.each_item do |_item, collection|
|
534
|
+
expect(collection).to be_a Acfs::Collection
|
535
|
+
end
|
536
|
+
Acfs.run
|
530
537
|
end
|
531
538
|
end
|
532
539
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acfs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.49.
|
4
|
+
version: 0.49.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Graichen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -228,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
228
228
|
version: '0'
|
229
229
|
requirements: []
|
230
230
|
rubyforge_project:
|
231
|
-
rubygems_version: 2.
|
231
|
+
rubygems_version: 2.5.2
|
232
232
|
signing_key:
|
233
233
|
specification_version: 4
|
234
234
|
summary: An abstract API base client for service oriented application.
|