koala 2.2.0rc1 → 2.2.0rc2

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: 97051729d27eccc4d97c5140394556293d181446
4
- data.tar.gz: 0a4fba738c9919c43e570107a54024e23d167b83
3
+ metadata.gz: b1e7b90f3b13d2c6f60d4c8a9e34204de7ab9ab3
4
+ data.tar.gz: c32873fb598b147a635937b11185ee50c1447655
5
5
  SHA512:
6
- metadata.gz: a8083a54eff541caa07259f10a937e5500ae35cdf1323b6085f1f87287e2b9bdfc8f9dab7287ae326d360b570e75219e080b3b17b99fda008db56e3889374517
7
- data.tar.gz: 3a5d6929a14c0cbcc96384314cadb85c0cd8b4feb1ebfede3bdb427676b990f2c25abb936d61d49eb32de51aa141390c5af000468ebe5bcfa2577d01ef41fdaf
6
+ metadata.gz: b1bf5427055f2839d424134140869c1b37d6bc79dc9a32f4ea3be347a5fab277d35318a14cc6f6940ed13dbe2ca3084e0dd55f1c6844110bc776fc1e1ec7ab69
7
+ data.tar.gz: e8c54ab5045c917872ecab6290157a6a89abd4cfdaa273d84d35293a8d25ae4f445696550365a0c69926b3f00774b37f759f6414102cbe3d10379aeaec5d5142
data/changelog.md CHANGED
@@ -5,6 +5,7 @@ Updated features:
5
5
 
6
6
  * You can now specify format: :json in http_options to make Content-Type application/json requests (thanks, adparlor!)
7
7
  * Koala now supports uploading videos by URL (thanks, filipegiusti!)
8
+ * GraphCollections now offer direct access to the collection summary data via #summary (thanks, vhoof!)
8
9
 
9
10
  Internal Improvements:
10
11
 
@@ -10,6 +10,8 @@ module Koala
10
10
 
11
11
  # The raw paging information from Facebook (next/previous URLs).
12
12
  attr_reader :paging
13
+ # The raw summary information from Facebook (total counts).
14
+ attr_reader :summary
13
15
  # @return [Koala::Facebook::GraphAPI] the api used to make requests.
14
16
  attr_reader :api
15
17
  # The entire raw response from Facebook.
@@ -22,10 +24,11 @@ module Koala
22
24
  # (usually the API that made the original call).
23
25
  #
24
26
  # @return [Koala::Facebook::GraphCollection] an initialized GraphCollection
25
- # whose paging, raw_response, and api attributes are populated.
27
+ # whose paging, summary, raw_response, and api attributes are populated.
26
28
  def initialize(response, api)
27
29
  super response["data"]
28
30
  @paging = response["paging"]
31
+ @summary = response["summary"]
29
32
  @raw_response = response
30
33
  @api = api
31
34
  end
data/lib/koala/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Koala
2
- VERSION = "2.2.0rc1"
2
+ VERSION = "2.2.0rc2"
3
3
  end
@@ -6,7 +6,8 @@ describe Koala::Facebook::GraphCollection do
6
6
  before(:each) do
7
7
  @result = {
8
8
  "data" => [1, 2, :three],
9
- "paging" => paging
9
+ "paging" => paging,
10
+ "summary" => [3]
10
11
  }
11
12
  @api = Koala::Facebook::API.new("123")
12
13
  @collection = Koala::Facebook::GraphCollection.new(@result, @api)
@@ -33,6 +34,10 @@ describe Koala::Facebook::GraphCollection do
33
34
  expect(@collection.paging).to eq(@result["paging"])
34
35
  end
35
36
 
37
+ it "sets summary to results['summary']" do
38
+ expect(@collection.summary).to eq(@result["summary"])
39
+ end
40
+
36
41
  it "sets raw_response to the original results" do
37
42
  expect(@collection.raw_response).to eq(@result)
38
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: koala
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0rc1
4
+ version: 2.2.0rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Koppel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-01 00:00:00.000000000 Z
11
+ date: 2015-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json