koala 1.1.0 → 1.2.0beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/.travis.yml +2 -1
  2. data/CHANGELOG +26 -0
  3. data/Gemfile +6 -2
  4. data/Rakefile +0 -1
  5. data/koala.gemspec +8 -8
  6. data/lib/koala.rb +42 -45
  7. data/lib/koala/batch_operation.rb +15 -15
  8. data/lib/koala/graph_api.rb +81 -58
  9. data/lib/koala/graph_batch_api.rb +10 -10
  10. data/lib/koala/graph_collection.rb +6 -6
  11. data/lib/koala/http_service.rb +177 -0
  12. data/lib/koala/oauth.rb +2 -2
  13. data/lib/koala/realtime_updates.rb +20 -17
  14. data/lib/koala/rest_api.rb +1 -1
  15. data/lib/koala/test_users.rb +33 -16
  16. data/lib/koala/uploadable_io.rb +47 -42
  17. data/lib/koala/utils.rb +11 -0
  18. data/readme.md +38 -38
  19. data/spec/cases/api_base_spec.rb +2 -2
  20. data/spec/cases/error_spec.rb +32 -0
  21. data/spec/cases/graph_and_rest_api_spec.rb +20 -3
  22. data/spec/cases/graph_api_batch_spec.rb +88 -97
  23. data/spec/cases/graph_api_spec.rb +21 -4
  24. data/spec/cases/http_service_spec.rb +446 -0
  25. data/spec/cases/koala_spec.rb +33 -38
  26. data/spec/cases/oauth_spec.rb +219 -200
  27. data/spec/cases/realtime_updates_spec.rb +45 -31
  28. data/spec/cases/rest_api_spec.rb +23 -7
  29. data/spec/cases/test_users_spec.rb +112 -52
  30. data/spec/cases/uploadable_io_spec.rb +49 -36
  31. data/spec/cases/utils_spec.rb +10 -0
  32. data/spec/fixtures/facebook_data.yml +23 -22
  33. data/spec/fixtures/mock_facebook_responses.yml +126 -96
  34. data/spec/spec_helper.rb +29 -5
  35. data/spec/support/graph_api_shared_examples.rb +59 -52
  36. data/spec/support/json_testing_fix.rb +35 -11
  37. data/spec/support/koala_test.rb +163 -0
  38. data/spec/support/mock_http_service.rb +6 -4
  39. data/spec/support/ordered_hash.rb +205 -0
  40. data/spec/support/rest_api_shared_examples.rb +37 -37
  41. data/spec/support/uploadable_io_shared_examples.rb +2 -8
  42. metadata +78 -79
  43. data/lib/koala/http_services.rb +0 -46
  44. data/lib/koala/http_services/net_http_service.rb +0 -92
  45. data/lib/koala/http_services/typhoeus_service.rb +0 -37
  46. data/spec/cases/http_services/http_service_spec.rb +0 -129
  47. data/spec/cases/http_services/net_http_service_spec.rb +0 -532
  48. data/spec/cases/http_services/typhoeus_service_spec.rb +0 -152
  49. data/spec/support/live_testing_data_helper.rb +0 -40
  50. data/spec/support/setup_mocks_or_live.rb +0 -51
@@ -38,7 +38,7 @@ module Koala
38
38
  path = 'root' if path == '' || path == '/'
39
39
  verb ||= 'get'
40
40
  server = options[:rest_api] ? 'rest_api' : 'graph_api'
41
- token = args.delete('access_token')
41
+ token = args.delete('access_token')
42
42
  with_token = (token == ACCESS_TOKEN || token == APP_ACCESS_TOKEN) ? 'with_token' : 'no_token'
43
43
 
44
44
  # Assume format is always JSON
@@ -77,11 +77,13 @@ module Koala
77
77
  response_object
78
78
  end
79
79
 
80
- def self.mock?
81
- true
80
+ def self.encode_params(*args)
81
+ # use HTTPService's encode_params
82
+ HTTPService.encode_params(*args)
82
83
  end
83
84
 
84
85
  protected
86
+
85
87
  def self.create_params_key(params_hash)
86
88
  if params_hash.empty?
87
89
  'no_args'
@@ -93,4 +95,4 @@ module Koala
93
95
  end
94
96
  end
95
97
  end
96
- end
98
+ end
@@ -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('select first_name from user where uid = 216743')
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 == 'Chris'
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 => 'select first_name from user where uid = 216743',
215
- :query2 => 'select first_name from user where uid = 2905623'
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 == 'Chris'
219
- result["query2"].first['first_name'].should == 'Alex'
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::GraphAPI.new(@token)
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
- @result = @api.fql_query("select first_name from user where uid = 216743")
257
- @result.size.should == 1
258
- @result.first["first_name"].should == "Chris"
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 => 'select first_name from user where uid = 216743',
264
- :query2 => 'select first_name from user where uid = 2905623'
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 == 'Chris'
268
- result["query2"].first['first_name'].should == 'Alex'
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 = 216743") }.should raise_error(Koala::Facebook::APIError)
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 if the MIME type can't be determined and the HTTP service requires content type" do
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,84 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: koala
3
- version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 1.1.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.0beta1
5
+ prerelease: 5
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
- date: 2011-07-18 00:00:00 +02:00
12
+ date: 2011-08-17 00:00:00.000000000 +02:00
14
13
  default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
17
16
  name: multi_json
18
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: &70190931210420 !ruby/object:Gem::Requirement
19
18
  none: false
20
- requirements:
19
+ requirements:
21
20
  - - ~>
22
- - !ruby/object:Gem::Version
23
- version: "1.0"
21
+ - !ruby/object:Gem::Version
22
+ version: '1.0'
24
23
  type: :runtime
25
24
  prerelease: false
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
28
- name: multipart-post
29
- requirement: &id002 !ruby/object:Gem::Requirement
25
+ version_requirements: *70190931210420
26
+ - !ruby/object:Gem::Dependency
27
+ name: faraday
28
+ requirement: &70190931209740 !ruby/object:Gem::Requirement
30
29
  none: false
31
- requirements:
30
+ requirements:
32
31
  - - ~>
33
- - !ruby/object:Gem::Version
34
- version: "1.0"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.7.4
35
34
  type: :runtime
36
35
  prerelease: false
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
39
- name: rspec
40
- requirement: &id003 !ruby/object:Gem::Requirement
36
+ version_requirements: *70190931209740
37
+ - !ruby/object:Gem::Dependency
38
+ name: faraday-stack
39
+ requirement: &70190931200940 !ruby/object:Gem::Requirement
41
40
  none: false
42
- requirements:
41
+ requirements:
43
42
  - - ~>
44
- - !ruby/object:Gem::Version
45
- version: "2.5"
46
- type: :development
43
+ - !ruby/object:Gem::Version
44
+ version: 0.1.3
45
+ type: :runtime
47
46
  prerelease: false
48
- version_requirements: *id003
49
- - !ruby/object:Gem::Dependency
50
- name: rake
51
- requirement: &id004 !ruby/object:Gem::Requirement
47
+ version_requirements: *70190931200940
48
+ - !ruby/object:Gem::Dependency
49
+ name: rspec
50
+ requirement: &70190931200100 !ruby/object:Gem::Requirement
52
51
  none: false
53
- requirements:
52
+ requirements:
54
53
  - - ~>
55
- - !ruby/object:Gem::Version
56
- version: 0.8.7
54
+ - !ruby/object:Gem::Version
55
+ version: '2.5'
57
56
  type: :development
58
57
  prerelease: false
59
- version_requirements: *id004
60
- - !ruby/object:Gem::Dependency
61
- name: typhoeus
62
- requirement: &id005 !ruby/object:Gem::Requirement
58
+ version_requirements: *70190931200100
59
+ - !ruby/object:Gem::Dependency
60
+ name: rake
61
+ requirement: &70190931198560 !ruby/object:Gem::Requirement
63
62
  none: false
64
- requirements:
63
+ requirements:
65
64
  - - ~>
66
- - !ruby/object:Gem::Version
67
- version: 0.2.4
65
+ - !ruby/object:Gem::Version
66
+ version: 0.8.7
68
67
  type: :development
69
68
  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.
69
+ version_requirements: *70190931198560
70
+ description: Koala is a lightweight, flexible Ruby SDK for Facebook. It allows read/write
71
+ access to the social graph via the Graph and REST APIs, as well as support for realtime
72
+ updates and OAuth and Facebook Connect authentication. Koala is fully tested and
73
+ supports Net::HTTP and Typhoeus connections out of the box and can accept custom
74
+ modules for other services.
72
75
  email: alex@alexkoppel.com
73
76
  executables: []
74
-
75
77
  extensions: []
76
-
77
- extra_rdoc_files:
78
+ extra_rdoc_files:
78
79
  - readme.md
79
80
  - CHANGELOG
80
- files:
81
+ files:
81
82
  - .autotest
82
83
  - .gitignore
83
84
  - .travis.yml
@@ -93,28 +94,27 @@ files:
93
94
  - lib/koala/graph_api.rb
94
95
  - lib/koala/graph_batch_api.rb
95
96
  - lib/koala/graph_collection.rb
96
- - lib/koala/http_services.rb
97
- - lib/koala/http_services/net_http_service.rb
98
- - lib/koala/http_services/typhoeus_service.rb
97
+ - lib/koala/http_service.rb
99
98
  - lib/koala/oauth.rb
100
99
  - lib/koala/realtime_updates.rb
101
100
  - lib/koala/rest_api.rb
102
101
  - lib/koala/test_users.rb
103
102
  - lib/koala/uploadable_io.rb
103
+ - lib/koala/utils.rb
104
104
  - readme.md
105
105
  - spec/cases/api_base_spec.rb
106
+ - spec/cases/error_spec.rb
106
107
  - spec/cases/graph_and_rest_api_spec.rb
107
108
  - spec/cases/graph_api_batch_spec.rb
108
109
  - spec/cases/graph_api_spec.rb
109
- - spec/cases/http_services/http_service_spec.rb
110
- - spec/cases/http_services/net_http_service_spec.rb
111
- - spec/cases/http_services/typhoeus_service_spec.rb
110
+ - spec/cases/http_service_spec.rb
112
111
  - spec/cases/koala_spec.rb
113
112
  - spec/cases/oauth_spec.rb
114
113
  - spec/cases/realtime_updates_spec.rb
115
114
  - spec/cases/rest_api_spec.rb
116
115
  - spec/cases/test_users_spec.rb
117
116
  - spec/cases/uploadable_io_spec.rb
117
+ - spec/cases/utils_spec.rb
118
118
  - spec/fixtures/beach.jpg
119
119
  - spec/fixtures/cat.m4v
120
120
  - spec/fixtures/facebook_data.yml
@@ -122,59 +122,58 @@ files:
122
122
  - spec/spec_helper.rb
123
123
  - spec/support/graph_api_shared_examples.rb
124
124
  - spec/support/json_testing_fix.rb
125
- - spec/support/live_testing_data_helper.rb
125
+ - spec/support/koala_test.rb
126
126
  - spec/support/mock_http_service.rb
127
+ - spec/support/ordered_hash.rb
127
128
  - spec/support/rest_api_shared_examples.rb
128
- - spec/support/setup_mocks_or_live.rb
129
129
  - spec/support/uploadable_io_shared_examples.rb
130
130
  has_rdoc: true
131
131
  homepage: http://github.com/arsduo/koala
132
132
  licenses: []
133
-
134
133
  post_install_message:
135
- rdoc_options:
134
+ rdoc_options:
136
135
  - --line-numbers
137
136
  - --inline-source
138
137
  - --title
139
138
  - Koala
140
- require_paths:
139
+ require_paths:
141
140
  - lib
142
- required_ruby_version: !ruby/object:Gem::Requirement
141
+ required_ruby_version: !ruby/object:Gem::Requirement
143
142
  none: false
144
- requirements:
145
- - - ">="
146
- - !ruby/object:Gem::Version
147
- hash: -702788258280667645
148
- segments:
143
+ requirements:
144
+ - - ! '>='
145
+ - !ruby/object:Gem::Version
146
+ version: '0'
147
+ segments:
149
148
  - 0
150
- version: "0"
151
- required_rubygems_version: !ruby/object:Gem::Requirement
149
+ hash: 4017352999765369439
150
+ required_rubygems_version: !ruby/object:Gem::Requirement
152
151
  none: false
153
- requirements:
154
- - - ">="
155
- - !ruby/object:Gem::Version
156
- version: "1.2"
152
+ requirements:
153
+ - - ! '>='
154
+ - !ruby/object:Gem::Version
155
+ version: '1.2'
157
156
  requirements: []
158
-
159
157
  rubyforge_project:
160
158
  rubygems_version: 1.6.2
161
159
  signing_key:
162
160
  specification_version: 3
163
- summary: A lightweight, flexible library for Facebook with support for the Graph API, the REST API, realtime updates, and OAuth authentication.
164
- test_files:
161
+ summary: A lightweight, flexible library for Facebook with support for the Graph API,
162
+ the REST API, realtime updates, and OAuth authentication.
163
+ test_files:
165
164
  - spec/cases/api_base_spec.rb
165
+ - spec/cases/error_spec.rb
166
166
  - spec/cases/graph_and_rest_api_spec.rb
167
167
  - spec/cases/graph_api_batch_spec.rb
168
168
  - spec/cases/graph_api_spec.rb
169
- - spec/cases/http_services/http_service_spec.rb
170
- - spec/cases/http_services/net_http_service_spec.rb
171
- - spec/cases/http_services/typhoeus_service_spec.rb
169
+ - spec/cases/http_service_spec.rb
172
170
  - spec/cases/koala_spec.rb
173
171
  - spec/cases/oauth_spec.rb
174
172
  - spec/cases/realtime_updates_spec.rb
175
173
  - spec/cases/rest_api_spec.rb
176
174
  - spec/cases/test_users_spec.rb
177
175
  - spec/cases/uploadable_io_spec.rb
176
+ - spec/cases/utils_spec.rb
178
177
  - spec/fixtures/beach.jpg
179
178
  - spec/fixtures/cat.m4v
180
179
  - spec/fixtures/facebook_data.yml
@@ -182,8 +181,8 @@ test_files:
182
181
  - spec/spec_helper.rb
183
182
  - spec/support/graph_api_shared_examples.rb
184
183
  - spec/support/json_testing_fix.rb
185
- - spec/support/live_testing_data_helper.rb
184
+ - spec/support/koala_test.rb
186
185
  - spec/support/mock_http_service.rb
186
+ - spec/support/ordered_hash.rb
187
187
  - spec/support/rest_api_shared_examples.rb
188
- - spec/support/setup_mocks_or_live.rb
189
188
  - spec/support/uploadable_io_shared_examples.rb