koala 1.1.0 → 1.2.0
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.
- data/.travis.yml +2 -1
- data/CHANGELOG +36 -0
- data/Gemfile +6 -2
- data/Rakefile +0 -1
- data/koala.gemspec +7 -8
- data/lib/koala/batch_operation.rb +15 -15
- data/lib/koala/graph_api.rb +85 -73
- data/lib/koala/graph_batch_api.rb +21 -11
- data/lib/koala/graph_collection.rb +13 -8
- data/lib/koala/http_service.rb +176 -0
- data/lib/koala/oauth.rb +34 -24
- data/lib/koala/realtime_updates.rb +21 -18
- data/lib/koala/rest_api.rb +1 -1
- data/lib/koala/test_users.rb +33 -17
- data/lib/koala/uploadable_io.rb +49 -43
- data/lib/koala/utils.rb +11 -0
- data/lib/koala/version.rb +3 -0
- data/lib/koala.rb +47 -45
- data/readme.md +58 -38
- data/spec/cases/{api_base_spec.rb → api_spec.rb} +27 -2
- data/spec/cases/error_spec.rb +32 -0
- data/spec/cases/graph_and_rest_api_spec.rb +12 -21
- data/spec/cases/graph_api_batch_spec.rb +92 -119
- data/spec/cases/graph_api_spec.rb +11 -14
- data/spec/cases/graph_collection_spec.rb +116 -0
- data/spec/cases/http_service_spec.rb +446 -0
- data/spec/cases/koala_spec.rb +36 -37
- data/spec/cases/oauth_spec.rb +318 -212
- data/spec/cases/realtime_updates_spec.rb +45 -31
- data/spec/cases/rest_api_spec.rb +23 -7
- data/spec/cases/test_users_spec.rb +123 -75
- data/spec/cases/uploadable_io_spec.rb +77 -36
- data/spec/cases/utils_spec.rb +10 -0
- data/spec/fixtures/facebook_data.yml +26 -24
- data/spec/fixtures/mock_facebook_responses.yml +131 -101
- data/spec/spec_helper.rb +29 -5
- data/spec/support/graph_api_shared_examples.rb +80 -120
- data/spec/support/json_testing_fix.rb +35 -11
- data/spec/support/koala_test.rb +187 -0
- data/spec/support/mock_http_service.rb +8 -5
- data/spec/support/ordered_hash.rb +205 -0
- data/spec/support/rest_api_shared_examples.rb +37 -37
- data/spec/support/uploadable_io_shared_examples.rb +2 -8
- metadata +72 -83
- data/lib/koala/http_services/net_http_service.rb +0 -92
- data/lib/koala/http_services/typhoeus_service.rb +0 -37
- data/lib/koala/http_services.rb +0 -46
- data/spec/cases/http_services/http_service_spec.rb +0 -129
- data/spec/cases/http_services/net_http_service_spec.rb +0 -532
- data/spec/cases/http_services/typhoeus_service_spec.rb +0 -152
- data/spec/support/live_testing_data_helper.rb +0 -40
- data/spec/support/setup_mocks_or_live.rb +0 -51
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
module KoalaTest
|
|
2
|
+
# directly taken from Rails 3.1's OrderedHash
|
|
3
|
+
# see https://github.com/rails/rails/blob/master/activesupport/lib/active_support/ordered_hash.rb
|
|
4
|
+
|
|
5
|
+
# The order of iteration over hashes in Ruby 1.8 is undefined. For example, you do not know the
|
|
6
|
+
# order in which +keys+ will return keys, or +each+ yield pairs. <tt>ActiveSupport::OrderedHash</tt>
|
|
7
|
+
# implements a hash that preserves insertion order, as in Ruby 1.9:
|
|
8
|
+
#
|
|
9
|
+
# oh = ActiveSupport::OrderedHash.new
|
|
10
|
+
# oh[:a] = 1
|
|
11
|
+
# oh[:b] = 2
|
|
12
|
+
# oh.keys # => [:a, :b], this order is guaranteed
|
|
13
|
+
#
|
|
14
|
+
# <tt>ActiveSupport::OrderedHash</tt> is namespaced to prevent conflicts with other implementations.
|
|
15
|
+
class OrderedHash < ::Hash #:nodoc:
|
|
16
|
+
def to_yaml_type
|
|
17
|
+
"!tag:yaml.org,2002:omap"
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def encode_with(coder)
|
|
21
|
+
coder.represent_seq '!omap', map { |k,v| { k => v } }
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def to_yaml(opts = {})
|
|
25
|
+
if YAML.const_defined?(:ENGINE) && !YAML::ENGINE.syck?
|
|
26
|
+
return super
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
YAML.quick_emit(self, opts) do |out|
|
|
30
|
+
out.seq(taguri) do |seq|
|
|
31
|
+
each do |k, v|
|
|
32
|
+
seq.add(k => v)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def nested_under_indifferent_access
|
|
39
|
+
self
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Hash is ordered in Ruby 1.9!
|
|
43
|
+
if RUBY_VERSION < '1.9'
|
|
44
|
+
|
|
45
|
+
# In MRI the Hash class is core and written in C. In particular, methods are
|
|
46
|
+
# programmed with explicit C function calls and polymorphism is not honored.
|
|
47
|
+
#
|
|
48
|
+
# For example, []= is crucial in this implementation to maintain the @keys
|
|
49
|
+
# array but hash.c invokes rb_hash_aset() originally. This prevents method
|
|
50
|
+
# reuse through inheritance and forces us to reimplement stuff.
|
|
51
|
+
#
|
|
52
|
+
# For instance, we cannot use the inherited #merge! because albeit the algorithm
|
|
53
|
+
# itself would work, our []= is not being called at all by the C code.
|
|
54
|
+
|
|
55
|
+
def initialize(*args, &block)
|
|
56
|
+
super
|
|
57
|
+
@keys = []
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def self.[](*args)
|
|
61
|
+
ordered_hash = new
|
|
62
|
+
|
|
63
|
+
if (args.length == 1 && args.first.is_a?(Array))
|
|
64
|
+
args.first.each do |key_value_pair|
|
|
65
|
+
next unless (key_value_pair.is_a?(Array))
|
|
66
|
+
ordered_hash[key_value_pair[0]] = key_value_pair[1]
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
return ordered_hash
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
unless (args.size % 2 == 0)
|
|
73
|
+
raise ArgumentError.new("odd number of arguments for Hash")
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
args.each_with_index do |val, ind|
|
|
77
|
+
next if (ind % 2 != 0)
|
|
78
|
+
ordered_hash[val] = args[ind + 1]
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
ordered_hash
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def initialize_copy(other)
|
|
85
|
+
super
|
|
86
|
+
# make a deep copy of keys
|
|
87
|
+
@keys = other.keys
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def []=(key, value)
|
|
91
|
+
@keys << key unless has_key?(key)
|
|
92
|
+
super
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def delete(key)
|
|
96
|
+
if has_key? key
|
|
97
|
+
index = @keys.index(key)
|
|
98
|
+
@keys.delete_at index
|
|
99
|
+
end
|
|
100
|
+
super
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
def delete_if
|
|
104
|
+
super
|
|
105
|
+
sync_keys!
|
|
106
|
+
self
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
def reject!
|
|
110
|
+
super
|
|
111
|
+
sync_keys!
|
|
112
|
+
self
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
def reject(&block)
|
|
116
|
+
dup.reject!(&block)
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
def keys
|
|
120
|
+
@keys.dup
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
def values
|
|
124
|
+
@keys.collect { |key| self[key] }
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
def to_hash
|
|
128
|
+
self
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
def to_a
|
|
132
|
+
@keys.map { |key| [ key, self[key] ] }
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
def each_key
|
|
136
|
+
return to_enum(:each_key) unless block_given?
|
|
137
|
+
@keys.each { |key| yield key }
|
|
138
|
+
self
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
def each_value
|
|
142
|
+
return to_enum(:each_value) unless block_given?
|
|
143
|
+
@keys.each { |key| yield self[key]}
|
|
144
|
+
self
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
def each
|
|
148
|
+
return to_enum(:each) unless block_given?
|
|
149
|
+
@keys.each {|key| yield [key, self[key]]}
|
|
150
|
+
self
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
alias_method :each_pair, :each
|
|
154
|
+
|
|
155
|
+
alias_method :select, :find_all
|
|
156
|
+
|
|
157
|
+
def clear
|
|
158
|
+
super
|
|
159
|
+
@keys.clear
|
|
160
|
+
self
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
def shift
|
|
164
|
+
k = @keys.first
|
|
165
|
+
v = delete(k)
|
|
166
|
+
[k, v]
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
def merge!(other_hash)
|
|
170
|
+
if block_given?
|
|
171
|
+
other_hash.each { |k, v| self[k] = key?(k) ? yield(k, self[k], v) : v }
|
|
172
|
+
else
|
|
173
|
+
other_hash.each { |k, v| self[k] = v }
|
|
174
|
+
end
|
|
175
|
+
self
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
alias_method :update, :merge!
|
|
179
|
+
|
|
180
|
+
def merge(other_hash, &block)
|
|
181
|
+
dup.merge!(other_hash, &block)
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# When replacing with another hash, the initial order of our keys must come from the other hash -ordered or not.
|
|
185
|
+
def replace(other)
|
|
186
|
+
super
|
|
187
|
+
@keys = other.keys
|
|
188
|
+
self
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
def invert
|
|
192
|
+
OrderedHash[self.to_a.map!{|key_value_pair| key_value_pair.reverse}]
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
def inspect
|
|
196
|
+
"#<OrderedHash #{super}>"
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
private
|
|
200
|
+
def sync_keys!
|
|
201
|
+
@keys.delete_if {|k| !has_key?(k)}
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
end
|
|
@@ -87,7 +87,7 @@ shared_examples_for "Koala RestAPI" do
|
|
|
87
87
|
|
|
88
88
|
@api.rest_call('anything', {}, options)
|
|
89
89
|
end
|
|
90
|
-
|
|
90
|
+
|
|
91
91
|
it "uses get by default" do
|
|
92
92
|
@api.should_receive(:api).with(
|
|
93
93
|
anything,
|
|
@@ -98,7 +98,7 @@ shared_examples_for "Koala RestAPI" do
|
|
|
98
98
|
|
|
99
99
|
@api.rest_call('anything')
|
|
100
100
|
end
|
|
101
|
-
|
|
101
|
+
|
|
102
102
|
it "allows you to specify other http methods as the last argument" do
|
|
103
103
|
method = 'bar'
|
|
104
104
|
@api.should_receive(:api).with(
|
|
@@ -134,20 +134,20 @@ shared_examples_for "Koala RestAPI" do
|
|
|
134
134
|
|
|
135
135
|
@api.fql_query(query)
|
|
136
136
|
end
|
|
137
|
-
|
|
137
|
+
|
|
138
138
|
it "should pass on any other arguments provided" do
|
|
139
139
|
args = {:a => 2}
|
|
140
140
|
@api.should_receive(:rest_call).with(anything, hash_including(args), anything)
|
|
141
141
|
@api.fql_query("a query", args)
|
|
142
142
|
end
|
|
143
|
-
|
|
143
|
+
|
|
144
144
|
it "should pass on any http options provided" do
|
|
145
145
|
opts = {:a => 2}
|
|
146
146
|
@api.should_receive(:rest_call).with(anything, anything, hash_including(opts))
|
|
147
147
|
@api.fql_query("a query", {}, opts)
|
|
148
148
|
end
|
|
149
149
|
end
|
|
150
|
-
|
|
150
|
+
|
|
151
151
|
describe "when making a FQL-multiquery request" do
|
|
152
152
|
it "should call fql.multiquery method" do
|
|
153
153
|
@api.should_receive(:rest_call).with(
|
|
@@ -161,7 +161,7 @@ shared_examples_for "Koala RestAPI" do
|
|
|
161
161
|
queries = stub('query string')
|
|
162
162
|
queries_json = "some JSON"
|
|
163
163
|
MultiJson.stub(:encode).with(queries).and_return(queries_json)
|
|
164
|
-
|
|
164
|
+
|
|
165
165
|
@api.should_receive(:rest_call).with(
|
|
166
166
|
anything,
|
|
167
167
|
hash_including(:queries => queries_json),
|
|
@@ -170,7 +170,7 @@ shared_examples_for "Koala RestAPI" do
|
|
|
170
170
|
|
|
171
171
|
@api.fql_multiquery(queries)
|
|
172
172
|
end
|
|
173
|
-
|
|
173
|
+
|
|
174
174
|
it "simplifies the response format" do
|
|
175
175
|
raw_results = [
|
|
176
176
|
{"name" => "query1", "fql_result_set" => [1, 2, 3]},
|
|
@@ -180,18 +180,18 @@ shared_examples_for "Koala RestAPI" do
|
|
|
180
180
|
"query1" => [1, 2, 3],
|
|
181
181
|
"query2" => [:a, :b, :c]
|
|
182
182
|
}
|
|
183
|
-
|
|
183
|
+
|
|
184
184
|
@api.stub(:rest_call).and_return(raw_results)
|
|
185
185
|
results = @api.fql_multiquery({:query => true})
|
|
186
186
|
results.should == expected_results
|
|
187
187
|
end
|
|
188
|
-
|
|
188
|
+
|
|
189
189
|
it "should pass on any other arguments provided" do
|
|
190
190
|
args = {:a => 2}
|
|
191
191
|
@api.should_receive(:rest_call).with(anything, hash_including(args), anything)
|
|
192
192
|
@api.fql_multiquery("a query", args)
|
|
193
193
|
end
|
|
194
|
-
|
|
194
|
+
|
|
195
195
|
it "should pass on any http options provided" do
|
|
196
196
|
opts = {:a => 2}
|
|
197
197
|
@api.should_receive(:rest_call).with(anything, anything, hash_including(opts))
|
|
@@ -204,19 +204,19 @@ end
|
|
|
204
204
|
shared_examples_for "Koala RestAPI with an access token" do
|
|
205
205
|
# FQL
|
|
206
206
|
it "should be able to access public information via FQL" do
|
|
207
|
-
result = @api.fql_query(
|
|
207
|
+
result = @api.fql_query("select first_name from user where uid = #{KoalaTest.user2_id}")
|
|
208
208
|
result.size.should == 1
|
|
209
|
-
result.first['first_name'].should ==
|
|
209
|
+
result.first['first_name'].should == KoalaTest.user2_name
|
|
210
210
|
end
|
|
211
211
|
|
|
212
212
|
it "should be able to access public information via FQL.multiquery" do
|
|
213
213
|
result = @api.fql_multiquery(
|
|
214
|
-
:query1 =>
|
|
215
|
-
:query2 =>
|
|
214
|
+
:query1 => "select first_name from user where uid = #{KoalaTest.user2_id}",
|
|
215
|
+
:query2 => "select first_name from user where uid = #{KoalaTest.user1_id}"
|
|
216
216
|
)
|
|
217
217
|
result.size.should == 2
|
|
218
|
-
result["query1"].first['first_name'].should ==
|
|
219
|
-
result["query2"].first['first_name'].should ==
|
|
218
|
+
result["query1"].first['first_name'].should == KoalaTest.user2_name
|
|
219
|
+
result["query2"].first['first_name'].should == KoalaTest.user1_name
|
|
220
220
|
end
|
|
221
221
|
|
|
222
222
|
it "should be able to access protected information via FQL" do
|
|
@@ -224,7 +224,7 @@ shared_examples_for "Koala RestAPI with an access token" do
|
|
|
224
224
|
|
|
225
225
|
# get the current user's ID
|
|
226
226
|
# we're sneakily using the Graph API, which should be okay since it has its own tests
|
|
227
|
-
g = Koala::Facebook::
|
|
227
|
+
g = Koala::Facebook::API.new(@token)
|
|
228
228
|
id = g.get_object("me", :fields => "id")["id"]
|
|
229
229
|
|
|
230
230
|
# now send a query about your permissions
|
|
@@ -234,15 +234,15 @@ shared_examples_for "Koala RestAPI with an access token" do
|
|
|
234
234
|
# we've verified that you have read_stream permissions, so we can test against that
|
|
235
235
|
result.first["read_stream"].should == 1
|
|
236
236
|
end
|
|
237
|
-
|
|
238
|
-
|
|
237
|
+
|
|
238
|
+
|
|
239
239
|
it "should be able to access protected information via FQL.multiquery" do
|
|
240
240
|
result = @api.fql_multiquery(
|
|
241
|
-
:query1 => "select post_id from stream where source_id = me()",
|
|
242
|
-
:query2 => "select fromid from comment where post_id in (select post_id from #query1)",
|
|
241
|
+
:query1 => "select post_id from stream where source_id = me()",
|
|
242
|
+
:query2 => "select fromid from comment where post_id in (select post_id from #query1)",
|
|
243
243
|
:query3 => "select uid, name from user where uid in (select fromid from #query2)"
|
|
244
244
|
)
|
|
245
|
-
result.size.should == 3
|
|
245
|
+
result.size.should == 3
|
|
246
246
|
result.keys.should include("query1", "query2", "query3")
|
|
247
247
|
end
|
|
248
248
|
|
|
@@ -253,33 +253,33 @@ shared_examples_for "Koala RestAPI without an access token" do
|
|
|
253
253
|
# FQL_QUERY
|
|
254
254
|
describe "when making a FQL request" do
|
|
255
255
|
it "should be able to access public information via FQL" do
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
256
|
+
result = @api.fql_query("select first_name from user where uid = #{KoalaTest.user2_id}")
|
|
257
|
+
result.size.should == 1
|
|
258
|
+
result.first['first_name'].should == KoalaTest.user2_name
|
|
259
259
|
end
|
|
260
|
-
|
|
260
|
+
|
|
261
261
|
it "should be able to access public information via FQL.multiquery" do
|
|
262
262
|
result = @api.fql_multiquery(
|
|
263
|
-
:query1 =>
|
|
264
|
-
:query2 =>
|
|
263
|
+
:query1 => "select first_name from user where uid = #{KoalaTest.user2_id}",
|
|
264
|
+
:query2 => "select first_name from user where uid = #{KoalaTest.user1_id}"
|
|
265
265
|
)
|
|
266
266
|
result.size.should == 2
|
|
267
|
-
result["query1"].first['first_name'].should ==
|
|
268
|
-
result["query2"].first['first_name'].should ==
|
|
267
|
+
result["query1"].first['first_name'].should == KoalaTest.user2_name
|
|
268
|
+
result["query2"].first['first_name'].should == KoalaTest.user1_name
|
|
269
269
|
end
|
|
270
270
|
|
|
271
271
|
it "should not be able to access protected information via FQL" do
|
|
272
|
-
lambda { @api.fql_query("select read_stream from permissions where uid =
|
|
272
|
+
lambda { @api.fql_query("select read_stream from permissions where uid = #{KoalaTest.user2_id}") }.should raise_error(Koala::Facebook::APIError)
|
|
273
273
|
end
|
|
274
|
-
|
|
274
|
+
|
|
275
275
|
it "should not be able to access protected information via FQL.multiquery" do
|
|
276
|
-
lambda {
|
|
276
|
+
lambda {
|
|
277
277
|
@api.fql_multiquery(
|
|
278
|
-
:query1 => "select post_id from stream where source_id = me()",
|
|
279
|
-
:query2 => "select fromid from comment where post_id in (select post_id from #query1)",
|
|
278
|
+
:query1 => "select post_id from stream where source_id = me()",
|
|
279
|
+
:query2 => "select fromid from comment where post_id in (select post_id from #query1)",
|
|
280
280
|
:query3 => "select uid, name from user where uid in (select fromid from #query2)"
|
|
281
|
-
)
|
|
281
|
+
)
|
|
282
282
|
}.should raise_error(Koala::Facebook::APIError)
|
|
283
283
|
end
|
|
284
284
|
end
|
|
285
|
-
end
|
|
285
|
+
end
|
|
@@ -36,15 +36,9 @@ shared_examples_for "MIME::Types can't return results" do
|
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
38
|
|
|
39
|
-
it "should throw an exception
|
|
40
|
-
Koala.stub!(:multipart_requires_content_type?).and_return(true)
|
|
39
|
+
it "should throw an exception" do
|
|
41
40
|
lambda { Koala::UploadableIO.new(*@koala_io_params) }.should raise_exception(Koala::KoalaError)
|
|
42
41
|
end
|
|
43
|
-
|
|
44
|
-
it "should just have @content_type == nil if the HTTP service doesn't require content type" do
|
|
45
|
-
Koala.stub!(:multipart_requires_content_type?).and_return(false)
|
|
46
|
-
Koala::UploadableIO.new(*@koala_io_params).content_type.should be_nil
|
|
47
|
-
end
|
|
48
42
|
end
|
|
49
43
|
end
|
|
50
44
|
|
|
@@ -73,4 +67,4 @@ shared_examples_for "determining a mime type" do
|
|
|
73
67
|
|
|
74
68
|
it_should_behave_like "MIME::Types can't return results"
|
|
75
69
|
end
|
|
76
|
-
end
|
|
70
|
+
end
|
metadata
CHANGED
|
@@ -1,83 +1,72 @@
|
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: koala
|
|
3
|
-
version: !ruby/object:Gem::Version
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1.2.0
|
|
4
5
|
prerelease:
|
|
5
|
-
version: 1.1.0
|
|
6
6
|
platform: ruby
|
|
7
|
-
authors:
|
|
7
|
+
authors:
|
|
8
8
|
- Alex Koppel, Chris Baclig, Rafi Jacoby, Context Optional
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
dependencies:
|
|
16
|
-
- !ruby/object:Gem::Dependency
|
|
12
|
+
date: 2011-09-27 00:00:00.000000000Z
|
|
13
|
+
dependencies:
|
|
14
|
+
- !ruby/object:Gem::Dependency
|
|
17
15
|
name: multi_json
|
|
18
|
-
requirement: &
|
|
16
|
+
requirement: &70248641333480 !ruby/object:Gem::Requirement
|
|
19
17
|
none: false
|
|
20
|
-
requirements:
|
|
18
|
+
requirements:
|
|
21
19
|
- - ~>
|
|
22
|
-
- !ruby/object:Gem::Version
|
|
23
|
-
version:
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: '1.0'
|
|
24
22
|
type: :runtime
|
|
25
23
|
prerelease: false
|
|
26
|
-
version_requirements: *
|
|
27
|
-
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
29
|
-
requirement: &
|
|
24
|
+
version_requirements: *70248641333480
|
|
25
|
+
- !ruby/object:Gem::Dependency
|
|
26
|
+
name: faraday
|
|
27
|
+
requirement: &70248641333000 !ruby/object:Gem::Requirement
|
|
30
28
|
none: false
|
|
31
|
-
requirements:
|
|
29
|
+
requirements:
|
|
32
30
|
- - ~>
|
|
33
|
-
- !ruby/object:Gem::Version
|
|
34
|
-
version:
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: 0.7.0
|
|
35
33
|
type: :runtime
|
|
36
34
|
prerelease: false
|
|
37
|
-
version_requirements: *
|
|
38
|
-
- !ruby/object:Gem::Dependency
|
|
35
|
+
version_requirements: *70248641333000
|
|
36
|
+
- !ruby/object:Gem::Dependency
|
|
39
37
|
name: rspec
|
|
40
|
-
requirement: &
|
|
38
|
+
requirement: &70248641332520 !ruby/object:Gem::Requirement
|
|
41
39
|
none: false
|
|
42
|
-
requirements:
|
|
40
|
+
requirements:
|
|
43
41
|
- - ~>
|
|
44
|
-
- !ruby/object:Gem::Version
|
|
45
|
-
version:
|
|
42
|
+
- !ruby/object:Gem::Version
|
|
43
|
+
version: '2.5'
|
|
46
44
|
type: :development
|
|
47
45
|
prerelease: false
|
|
48
|
-
version_requirements: *
|
|
49
|
-
- !ruby/object:Gem::Dependency
|
|
46
|
+
version_requirements: *70248641332520
|
|
47
|
+
- !ruby/object:Gem::Dependency
|
|
50
48
|
name: rake
|
|
51
|
-
requirement: &
|
|
49
|
+
requirement: &70248641332040 !ruby/object:Gem::Requirement
|
|
52
50
|
none: false
|
|
53
|
-
requirements:
|
|
51
|
+
requirements:
|
|
54
52
|
- - ~>
|
|
55
|
-
- !ruby/object:Gem::Version
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
56
54
|
version: 0.8.7
|
|
57
55
|
type: :development
|
|
58
56
|
prerelease: false
|
|
59
|
-
version_requirements: *
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
- - ~>
|
|
66
|
-
- !ruby/object:Gem::Version
|
|
67
|
-
version: 0.2.4
|
|
68
|
-
type: :development
|
|
69
|
-
prerelease: false
|
|
70
|
-
version_requirements: *id005
|
|
71
|
-
description: Koala is a lightweight, flexible Ruby SDK for Facebook. It allows read/write access to the social graph via the Graph and REST APIs, as well as support for realtime updates and OAuth and Facebook Connect authentication. Koala is fully tested and supports Net::HTTP and Typhoeus connections out of the box and can accept custom modules for other services.
|
|
57
|
+
version_requirements: *70248641332040
|
|
58
|
+
description: Koala is a lightweight, flexible Ruby SDK for Facebook. It allows read/write
|
|
59
|
+
access to the social graph via the Graph and REST APIs, as well as support for realtime
|
|
60
|
+
updates and OAuth and Facebook Connect authentication. Koala is fully tested and
|
|
61
|
+
supports Net::HTTP and Typhoeus connections out of the box and can accept custom
|
|
62
|
+
modules for other services.
|
|
72
63
|
email: alex@alexkoppel.com
|
|
73
64
|
executables: []
|
|
74
|
-
|
|
75
65
|
extensions: []
|
|
76
|
-
|
|
77
|
-
extra_rdoc_files:
|
|
66
|
+
extra_rdoc_files:
|
|
78
67
|
- readme.md
|
|
79
68
|
- CHANGELOG
|
|
80
|
-
files:
|
|
69
|
+
files:
|
|
81
70
|
- .autotest
|
|
82
71
|
- .gitignore
|
|
83
72
|
- .travis.yml
|
|
@@ -93,28 +82,29 @@ files:
|
|
|
93
82
|
- lib/koala/graph_api.rb
|
|
94
83
|
- lib/koala/graph_batch_api.rb
|
|
95
84
|
- lib/koala/graph_collection.rb
|
|
96
|
-
- lib/koala/
|
|
97
|
-
- lib/koala/http_services/net_http_service.rb
|
|
98
|
-
- lib/koala/http_services/typhoeus_service.rb
|
|
85
|
+
- lib/koala/http_service.rb
|
|
99
86
|
- lib/koala/oauth.rb
|
|
100
87
|
- lib/koala/realtime_updates.rb
|
|
101
88
|
- lib/koala/rest_api.rb
|
|
102
89
|
- lib/koala/test_users.rb
|
|
103
90
|
- lib/koala/uploadable_io.rb
|
|
91
|
+
- lib/koala/utils.rb
|
|
92
|
+
- lib/koala/version.rb
|
|
104
93
|
- readme.md
|
|
105
|
-
- spec/cases/
|
|
94
|
+
- spec/cases/api_spec.rb
|
|
95
|
+
- spec/cases/error_spec.rb
|
|
106
96
|
- spec/cases/graph_and_rest_api_spec.rb
|
|
107
97
|
- spec/cases/graph_api_batch_spec.rb
|
|
108
98
|
- spec/cases/graph_api_spec.rb
|
|
109
|
-
- spec/cases/
|
|
110
|
-
- spec/cases/
|
|
111
|
-
- spec/cases/http_services/typhoeus_service_spec.rb
|
|
99
|
+
- spec/cases/graph_collection_spec.rb
|
|
100
|
+
- spec/cases/http_service_spec.rb
|
|
112
101
|
- spec/cases/koala_spec.rb
|
|
113
102
|
- spec/cases/oauth_spec.rb
|
|
114
103
|
- spec/cases/realtime_updates_spec.rb
|
|
115
104
|
- spec/cases/rest_api_spec.rb
|
|
116
105
|
- spec/cases/test_users_spec.rb
|
|
117
106
|
- spec/cases/uploadable_io_spec.rb
|
|
107
|
+
- spec/cases/utils_spec.rb
|
|
118
108
|
- spec/fixtures/beach.jpg
|
|
119
109
|
- spec/fixtures/cat.m4v
|
|
120
110
|
- spec/fixtures/facebook_data.yml
|
|
@@ -122,59 +112,58 @@ files:
|
|
|
122
112
|
- spec/spec_helper.rb
|
|
123
113
|
- spec/support/graph_api_shared_examples.rb
|
|
124
114
|
- spec/support/json_testing_fix.rb
|
|
125
|
-
- spec/support/
|
|
115
|
+
- spec/support/koala_test.rb
|
|
126
116
|
- spec/support/mock_http_service.rb
|
|
117
|
+
- spec/support/ordered_hash.rb
|
|
127
118
|
- spec/support/rest_api_shared_examples.rb
|
|
128
|
-
- spec/support/setup_mocks_or_live.rb
|
|
129
119
|
- spec/support/uploadable_io_shared_examples.rb
|
|
130
|
-
has_rdoc: true
|
|
131
120
|
homepage: http://github.com/arsduo/koala
|
|
132
121
|
licenses: []
|
|
133
|
-
|
|
134
122
|
post_install_message:
|
|
135
|
-
rdoc_options:
|
|
123
|
+
rdoc_options:
|
|
136
124
|
- --line-numbers
|
|
137
125
|
- --inline-source
|
|
138
126
|
- --title
|
|
139
127
|
- Koala
|
|
140
|
-
require_paths:
|
|
128
|
+
require_paths:
|
|
141
129
|
- lib
|
|
142
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
|
130
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
143
131
|
none: false
|
|
144
|
-
requirements:
|
|
145
|
-
- -
|
|
146
|
-
- !ruby/object:Gem::Version
|
|
147
|
-
|
|
148
|
-
segments:
|
|
132
|
+
requirements:
|
|
133
|
+
- - ! '>='
|
|
134
|
+
- !ruby/object:Gem::Version
|
|
135
|
+
version: '0'
|
|
136
|
+
segments:
|
|
149
137
|
- 0
|
|
150
|
-
|
|
151
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
|
+
hash: 2837078681376474267
|
|
139
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
140
|
none: false
|
|
153
|
-
requirements:
|
|
154
|
-
- -
|
|
155
|
-
- !ruby/object:Gem::Version
|
|
156
|
-
version:
|
|
141
|
+
requirements:
|
|
142
|
+
- - ! '>='
|
|
143
|
+
- !ruby/object:Gem::Version
|
|
144
|
+
version: '1.2'
|
|
157
145
|
requirements: []
|
|
158
|
-
|
|
159
146
|
rubyforge_project:
|
|
160
|
-
rubygems_version: 1.
|
|
147
|
+
rubygems_version: 1.8.8
|
|
161
148
|
signing_key:
|
|
162
149
|
specification_version: 3
|
|
163
|
-
summary: A lightweight, flexible library for Facebook with support for the Graph API,
|
|
164
|
-
|
|
165
|
-
|
|
150
|
+
summary: A lightweight, flexible library for Facebook with support for the Graph API,
|
|
151
|
+
the REST API, realtime updates, and OAuth authentication.
|
|
152
|
+
test_files:
|
|
153
|
+
- spec/cases/api_spec.rb
|
|
154
|
+
- spec/cases/error_spec.rb
|
|
166
155
|
- spec/cases/graph_and_rest_api_spec.rb
|
|
167
156
|
- spec/cases/graph_api_batch_spec.rb
|
|
168
157
|
- spec/cases/graph_api_spec.rb
|
|
169
|
-
- spec/cases/
|
|
170
|
-
- spec/cases/
|
|
171
|
-
- spec/cases/http_services/typhoeus_service_spec.rb
|
|
158
|
+
- spec/cases/graph_collection_spec.rb
|
|
159
|
+
- spec/cases/http_service_spec.rb
|
|
172
160
|
- spec/cases/koala_spec.rb
|
|
173
161
|
- spec/cases/oauth_spec.rb
|
|
174
162
|
- spec/cases/realtime_updates_spec.rb
|
|
175
163
|
- spec/cases/rest_api_spec.rb
|
|
176
164
|
- spec/cases/test_users_spec.rb
|
|
177
165
|
- spec/cases/uploadable_io_spec.rb
|
|
166
|
+
- spec/cases/utils_spec.rb
|
|
178
167
|
- spec/fixtures/beach.jpg
|
|
179
168
|
- spec/fixtures/cat.m4v
|
|
180
169
|
- spec/fixtures/facebook_data.yml
|
|
@@ -182,8 +171,8 @@ test_files:
|
|
|
182
171
|
- spec/spec_helper.rb
|
|
183
172
|
- spec/support/graph_api_shared_examples.rb
|
|
184
173
|
- spec/support/json_testing_fix.rb
|
|
185
|
-
- spec/support/
|
|
174
|
+
- spec/support/koala_test.rb
|
|
186
175
|
- spec/support/mock_http_service.rb
|
|
176
|
+
- spec/support/ordered_hash.rb
|
|
187
177
|
- spec/support/rest_api_shared_examples.rb
|
|
188
|
-
- spec/support/setup_mocks_or_live.rb
|
|
189
178
|
- spec/support/uploadable_io_shared_examples.rb
|