gecko-ruby 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/CHANGELOG.md +3 -0
- data/lib/gecko/record/base_adapter.rb +12 -0
- data/lib/gecko/record/fulfillment_line_item.rb +1 -8
- data/lib/gecko/version.rb +1 -1
- data/test/record/fulfillment_line_item_adapter_test.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28ddc0bdac8932398a7129cd657ae2b80b5614ad
|
4
|
+
data.tar.gz: f2d47820b607c3d89fdffe2ad0958f031abbd2cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b88ce008228e17b33da355a96bad95572dc1b8df0231c2b9a36340cdf97ac34c3e4f137e4659b83a0d3da62162f0ee3f1eb21fd1594ae9cd56b6014f1d19a9b
|
7
|
+
data.tar.gz: 08f58c8995d09445c69688d072790687a82b35effbf16c0679e402aea548958abbde4ad84b1fae25f654365183767e20b82f2a7239c1b792e3103584a4ab881c
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -115,6 +115,18 @@ module Gecko
|
|
115
115
|
parse_records(parsed_response)
|
116
116
|
end
|
117
117
|
|
118
|
+
# Returns all the records currently in the identity map.
|
119
|
+
#
|
120
|
+
# @example Return all Products previously fetched
|
121
|
+
# client.Product.peek_all
|
122
|
+
#
|
123
|
+
# @return [Array<Gecko::Record::Base>]
|
124
|
+
#
|
125
|
+
# @api public
|
126
|
+
def peek_all
|
127
|
+
@identity_map.values
|
128
|
+
end
|
129
|
+
|
118
130
|
# Fetch the first record for the given parameters
|
119
131
|
#
|
120
132
|
# @example Fetch via ID
|
@@ -13,14 +13,7 @@ module Gecko
|
|
13
13
|
end
|
14
14
|
|
15
15
|
class FulfillmentLineItemAdapter < BaseAdapter
|
16
|
-
|
17
|
-
#
|
18
|
-
# @return [Array<Gecko::Record::FulfillmentLineItem>]
|
19
|
-
#
|
20
|
-
# @api private
|
21
|
-
def all
|
22
|
-
@identity_map.values
|
23
|
-
end
|
16
|
+
|
24
17
|
end
|
25
18
|
end
|
26
19
|
end
|
data/lib/gecko/version.rb
CHANGED
@@ -14,7 +14,7 @@ class Gecko::Record::FulfillmentLineItemAdapterTest < Minitest::Test
|
|
14
14
|
def test_adapter_uses_identity_map
|
15
15
|
VCR.use_cassette('fulfillments') do
|
16
16
|
@client.Fulfillment.where(limit: 5)
|
17
|
-
collection = adapter.
|
17
|
+
collection = adapter.peek_all
|
18
18
|
assert_equal(collection.first, adapter.find(collection.first.id))
|
19
19
|
end
|
20
20
|
end
|