koala 2.2.0rc1 → 2.2.0rc2
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 +1 -0
- data/lib/koala/api/graph_collection.rb +4 -1
- data/lib/koala/version.rb +1 -1
- data/spec/cases/graph_collection_spec.rb +6 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1e7b90f3b13d2c6f60d4c8a9e34204de7ab9ab3
|
4
|
+
data.tar.gz: c32873fb598b147a635937b11185ee50c1447655
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
@@ -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.
|
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-
|
11
|
+
date: 2015-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|