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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fd4c6e56d2678d03d389be05ba3e141724089e76
4
- data.tar.gz: b7395c6ceab56b95dc79db04cfb0891564fb1b7a
3
+ metadata.gz: 28ddc0bdac8932398a7129cd657ae2b80b5614ad
4
+ data.tar.gz: f2d47820b607c3d89fdffe2ad0958f031abbd2cb
5
5
  SHA512:
6
- metadata.gz: bea2e880324d48b95e68289b5a41c0a21c7a42f55c62db2ac4233c8a81f29dbae606b381aa597733722e3bbb3ca5eac5e320a84a4c2f2b90b85ebc10cc483d28
7
- data.tar.gz: c9e4065f15a4b4b15e05b50984f6403e811ce86311d1342f0f0eb6b19c56bed3d1572736a9ec6d7d1de8ff9c9651461692f1265167e7cc499b4a6ea6f13cc65c
6
+ metadata.gz: 8b88ce008228e17b33da355a96bad95572dc1b8df0231c2b9a36340cdf97ac34c3e4f137e4659b83a0d3da62162f0ee3f1eb21fd1594ae9cd56b6014f1d19a9b
7
+ data.tar.gz: 08f58c8995d09445c69688d072790687a82b35effbf16c0679e402aea548958abbde4ad84b1fae25f654365183767e20b82f2a7239c1b792e3103584a4ab881c
@@ -1,6 +1,9 @@
1
1
  language: ruby
2
+ before_install:
3
+ - gem install bundler
2
4
  rvm:
3
5
  - 1.9.3
4
6
  - 2.0
5
7
  - 2.1
6
8
  - 2.2
9
+ - 2.3
@@ -1,3 +1,6 @@
1
+ ## 0.2.2 (2016-06-06)
2
+ - Add `@client.Record.peek_all` to return all items currently in identity map
3
+ ## 0.2.1 (2016-06-06) (Yanked)
1
4
  ## 0.2.0 (2016-06-06)
2
5
  - Support `writeable_on :create` for attributes
3
6
  - Allow passing query parameters to `Adapter#count`
@@ -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
- # Returns all cached records for testing
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
@@ -1,3 +1,3 @@
1
1
  module Gecko
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.2'
3
3
  end
@@ -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.all
17
+ collection = adapter.peek_all
18
18
  assert_equal(collection.first, adapter.find(collection.first.id))
19
19
  end
20
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gecko-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bradley Priest