koala 1.0.0.beta2.1 → 1.0.0.rc
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/CHANGELOG +6 -1
- data/Gemfile +3 -0
- data/Rakefile +13 -14
- data/koala.gemspec +35 -20
- data/lib/koala.rb +8 -17
- data/lib/koala/graph_api.rb +2 -2
- data/lib/koala/http_services.rb +32 -27
- data/lib/koala/test_users.rb +4 -4
- data/lib/koala/uploadable_io.rb +1 -1
- data/spec/cases/api_base_spec.rb +101 -0
- data/spec/cases/graph_and_rest_api_spec.rb +31 -0
- data/spec/cases/graph_api_spec.rb +25 -0
- data/spec/{koala/http_services/http_service_tests.rb → cases/http_services/http_service_spec.rb} +8 -5
- data/spec/cases/http_services/net_http_service_spec.rb +350 -0
- data/spec/cases/http_services/typhoeus_service_spec.rb +144 -0
- data/spec/cases/oauth_spec.rb +374 -0
- data/spec/cases/realtime_updates_spec.rb +184 -0
- data/spec/cases/rest_api_spec.rb +25 -0
- data/spec/{koala/test_users/test_users_tests.rb → cases/test_users_spec.rb} +34 -29
- data/spec/cases/uploadable_io_spec.rb +151 -0
- data/spec/{koala/assets → fixtures}/beach.jpg +0 -0
- data/spec/{facebook_data.yml → fixtures/facebook_data.yml} +5 -5
- data/spec/{mock_facebook_responses.yml → fixtures/mock_facebook_responses.yml} +311 -311
- data/spec/spec_helper.rb +18 -0
- data/spec/support/graph_api_shared_examples.rb +424 -0
- data/spec/{koala → support}/live_testing_data_helper.rb +39 -42
- data/spec/{mock_http_service.rb → support/mock_http_service.rb} +94 -94
- data/spec/{koala/rest_api/rest_api_tests.rb → support/rest_api_shared_examples.rb} +43 -0
- data/spec/support/setup_mocks_or_live.rb +52 -0
- data/spec/support/uploadable_io_shared_examples.rb +76 -0
- metadata +109 -53
- data/init.rb +0 -2
- data/spec/koala/api_base_tests.rb +0 -102
- data/spec/koala/graph_and_rest_api/graph_and_rest_api_no_token_tests.rb +0 -14
- data/spec/koala/graph_and_rest_api/graph_and_rest_api_with_token_tests.rb +0 -16
- data/spec/koala/graph_api/graph_api_no_access_token_tests.rb +0 -65
- data/spec/koala/graph_api/graph_api_tests.rb +0 -85
- data/spec/koala/graph_api/graph_api_with_access_token_tests.rb +0 -194
- data/spec/koala/graph_api/graph_collection_tests.rb +0 -104
- data/spec/koala/http_services/net_http_service_tests.rb +0 -339
- data/spec/koala/http_services/typhoeus_service_tests.rb +0 -162
- data/spec/koala/oauth/oauth_tests.rb +0 -372
- data/spec/koala/realtime_updates/realtime_updates_tests.rb +0 -187
- data/spec/koala/rest_api/rest_api_no_access_token_tests.rb +0 -25
- data/spec/koala/rest_api/rest_api_with_access_token_tests.rb +0 -38
- data/spec/koala/uploadable_io/uploadable_io_tests.rb +0 -246
- data/spec/koala_spec.rb +0 -18
- data/spec/koala_spec_helper.rb +0 -74
- data/spec/koala_spec_without_mocks.rb +0 -19
@@ -1,95 +1,95 @@
|
|
1
|
-
require 'erb'
|
2
|
-
require 'yaml'
|
3
|
-
|
4
|
-
module Koala
|
5
|
-
module MockHTTPService
|
6
|
-
# Mocks all HTTP requests for with koala_spec_with_mocks.rb
|
7
|
-
IS_MOCK = true # this lets our tests figure out if we want to stub methods
|
8
|
-
|
9
|
-
# Mocked values to be included in TEST_DATA used in specs
|
10
|
-
ACCESS_TOKEN = '*'
|
11
|
-
OAUTH_CODE = 'OAUTHCODE'
|
12
|
-
|
13
|
-
# Loads testing data
|
14
|
-
TEST_DATA = YAML.load_file(File.join(File.dirname(__FILE__), 'facebook_data.yml'))
|
15
|
-
TEST_DATA.merge!('oauth_token' => Koala::MockHTTPService::ACCESS_TOKEN)
|
16
|
-
TEST_DATA['oauth_test_data'].merge!('code' => Koala::MockHTTPService::OAUTH_CODE)
|
17
|
-
|
18
|
-
# Useful in mock_facebook_responses.yml
|
19
|
-
OAUTH_DATA = TEST_DATA['oauth_test_data']
|
20
|
-
OAUTH_DATA.merge!({
|
21
|
-
'app_access_token' => Koala::MockHTTPService::ACCESS_TOKEN,
|
22
|
-
'session_key' => "session_key",
|
23
|
-
'multiple_session_keys' => ["session_key", "session_key_2"]
|
24
|
-
})
|
25
|
-
APP_ID = OAUTH_DATA['app_id']
|
26
|
-
SECRET = OAUTH_DATA['secret']
|
27
|
-
SUBSCRIPTION_DATA = TEST_DATA["subscription_test_data"]
|
28
|
-
|
29
|
-
# Loads the mock response data via ERB to substitue values for TEST_DATA (see oauth/access_token)
|
30
|
-
mock_response_file_path = File.join(File.dirname(__FILE__), 'mock_facebook_responses.yml')
|
31
|
-
RESPONSES = YAML.load(ERB.new(IO.read(mock_response_file_path)).result(binding))
|
32
|
-
|
33
|
-
def self.included(base)
|
34
|
-
base.class_eval do
|
35
|
-
|
36
|
-
include Koala::HTTPService
|
37
|
-
|
38
|
-
def self.make_request(path, args, verb, options = {})
|
39
|
-
path = 'root' if path == '' || path == '/'
|
40
|
-
verb ||= 'get'
|
41
|
-
server = options[:rest_api] ? 'rest_api' : 'graph_api'
|
42
|
-
with_token = args.delete('access_token') == ACCESS_TOKEN ? 'with_token' : 'no_token'
|
43
|
-
|
44
|
-
# Assume format is always JSON
|
45
|
-
args.delete('format')
|
46
|
-
|
47
|
-
# Create a hash key for the arguments
|
48
|
-
args = create_params_key(args)
|
49
|
-
|
50
|
-
begin
|
51
|
-
response = RESPONSES[server][path][args][verb][with_token]
|
52
|
-
|
53
|
-
# Raises an error of with_token/no_token key is missing
|
54
|
-
raise NoMethodError unless response
|
55
|
-
|
56
|
-
# create response class object
|
57
|
-
response_object = if response.is_a? String
|
58
|
-
Koala::Response.new(200, response, {})
|
59
|
-
else
|
60
|
-
Koala::Response.new(response["code"] || 200, response["body"] || "", response["headers"] || {})
|
61
|
-
end
|
62
|
-
|
63
|
-
rescue NoMethodError
|
64
|
-
# Raises an error message with the place in the data YML
|
65
|
-
# to place a mock as well as a URL to request from
|
66
|
-
# Facebook's servers for the actual data
|
67
|
-
# (Don't forget to replace ACCESS_TOKEN with a real access token)
|
68
|
-
data_trace = [server, path, args, verb, with_token] * ': '
|
69
|
-
|
70
|
-
args = args == 'no_args' ? '' : "#{args}&"
|
71
|
-
args += 'format=json'
|
72
|
-
args += "&access_token=#{ACCESS_TOKEN}" if with_token
|
73
|
-
|
74
|
-
raise "Missing a mock response for #{data_trace}\nAPI PATH: #{[path, args].join('?')}"
|
75
|
-
end
|
76
|
-
|
77
|
-
response_object
|
78
|
-
end
|
79
|
-
|
80
|
-
protected
|
81
|
-
def self.create_params_key(params_hash)
|
82
|
-
if params_hash.empty?
|
83
|
-
'no_args'
|
84
|
-
else
|
85
|
-
params_hash.sort{ |a,b| a[0].to_s <=> b[0].to_s}.map do |arr|
|
86
|
-
arr[1] = '[FILE]' if arr[1].kind_of?(Koala::UploadableIO)
|
87
|
-
arr.join('=')
|
88
|
-
end.join('&')
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
|
-
end # class_eval
|
93
|
-
end # included
|
94
|
-
end
|
1
|
+
require 'erb'
|
2
|
+
require 'yaml'
|
3
|
+
|
4
|
+
module Koala
|
5
|
+
module MockHTTPService
|
6
|
+
# Mocks all HTTP requests for with koala_spec_with_mocks.rb
|
7
|
+
IS_MOCK = true # this lets our tests figure out if we want to stub methods
|
8
|
+
|
9
|
+
# Mocked values to be included in TEST_DATA used in specs
|
10
|
+
ACCESS_TOKEN = '*'
|
11
|
+
OAUTH_CODE = 'OAUTHCODE'
|
12
|
+
|
13
|
+
# Loads testing data
|
14
|
+
TEST_DATA = YAML.load_file(File.join(File.dirname(__FILE__), '..', 'fixtures', 'facebook_data.yml'))
|
15
|
+
TEST_DATA.merge!('oauth_token' => Koala::MockHTTPService::ACCESS_TOKEN)
|
16
|
+
TEST_DATA['oauth_test_data'].merge!('code' => Koala::MockHTTPService::OAUTH_CODE)
|
17
|
+
|
18
|
+
# Useful in mock_facebook_responses.yml
|
19
|
+
OAUTH_DATA = TEST_DATA['oauth_test_data']
|
20
|
+
OAUTH_DATA.merge!({
|
21
|
+
'app_access_token' => Koala::MockHTTPService::ACCESS_TOKEN,
|
22
|
+
'session_key' => "session_key",
|
23
|
+
'multiple_session_keys' => ["session_key", "session_key_2"]
|
24
|
+
})
|
25
|
+
APP_ID = OAUTH_DATA['app_id']
|
26
|
+
SECRET = OAUTH_DATA['secret']
|
27
|
+
SUBSCRIPTION_DATA = TEST_DATA["subscription_test_data"]
|
28
|
+
|
29
|
+
# Loads the mock response data via ERB to substitue values for TEST_DATA (see oauth/access_token)
|
30
|
+
mock_response_file_path = File.join(File.dirname(__FILE__), '..', 'fixtures', 'mock_facebook_responses.yml')
|
31
|
+
RESPONSES = YAML.load(ERB.new(IO.read(mock_response_file_path)).result(binding))
|
32
|
+
|
33
|
+
def self.included(base)
|
34
|
+
base.class_eval do
|
35
|
+
|
36
|
+
include Koala::HTTPService
|
37
|
+
|
38
|
+
def self.make_request(path, args, verb, options = {})
|
39
|
+
path = 'root' if path == '' || path == '/'
|
40
|
+
verb ||= 'get'
|
41
|
+
server = options[:rest_api] ? 'rest_api' : 'graph_api'
|
42
|
+
with_token = args.delete('access_token') == ACCESS_TOKEN ? 'with_token' : 'no_token'
|
43
|
+
|
44
|
+
# Assume format is always JSON
|
45
|
+
args.delete('format')
|
46
|
+
|
47
|
+
# Create a hash key for the arguments
|
48
|
+
args = create_params_key(args)
|
49
|
+
|
50
|
+
begin
|
51
|
+
response = RESPONSES[server][path][args][verb][with_token]
|
52
|
+
|
53
|
+
# Raises an error of with_token/no_token key is missing
|
54
|
+
raise NoMethodError unless response
|
55
|
+
|
56
|
+
# create response class object
|
57
|
+
response_object = if response.is_a? String
|
58
|
+
Koala::Response.new(200, response, {})
|
59
|
+
else
|
60
|
+
Koala::Response.new(response["code"] || 200, response["body"] || "", response["headers"] || {})
|
61
|
+
end
|
62
|
+
|
63
|
+
rescue NoMethodError
|
64
|
+
# Raises an error message with the place in the data YML
|
65
|
+
# to place a mock as well as a URL to request from
|
66
|
+
# Facebook's servers for the actual data
|
67
|
+
# (Don't forget to replace ACCESS_TOKEN with a real access token)
|
68
|
+
data_trace = [server, path, args, verb, with_token] * ': '
|
69
|
+
|
70
|
+
args = args == 'no_args' ? '' : "#{args}&"
|
71
|
+
args += 'format=json'
|
72
|
+
args += "&access_token=#{ACCESS_TOKEN}" if with_token
|
73
|
+
|
74
|
+
raise "Missing a mock response for #{data_trace}\nAPI PATH: #{[path, args].join('?')}"
|
75
|
+
end
|
76
|
+
|
77
|
+
response_object
|
78
|
+
end
|
79
|
+
|
80
|
+
protected
|
81
|
+
def self.create_params_key(params_hash)
|
82
|
+
if params_hash.empty?
|
83
|
+
'no_args'
|
84
|
+
else
|
85
|
+
params_hash.sort{ |a,b| a[0].to_s <=> b[0].to_s}.map do |arr|
|
86
|
+
arr[1] = '[FILE]' if arr[1].kind_of?(Koala::UploadableIO)
|
87
|
+
arr.join('=')
|
88
|
+
end.join('&')
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
end # class_eval
|
93
|
+
end # included
|
94
|
+
end
|
95
95
|
end
|
@@ -115,4 +115,47 @@ shared_examples_for "Koala RestAPI" do
|
|
115
115
|
end
|
116
116
|
end
|
117
117
|
end
|
118
|
+
end
|
119
|
+
|
120
|
+
|
121
|
+
shared_examples_for "Koala RestAPI with an access token" do
|
122
|
+
# FQL
|
123
|
+
it "should be able to access public information via FQL" do
|
124
|
+
result = @api.fql_query('select first_name from user where uid = 216743')
|
125
|
+
result.size.should == 1
|
126
|
+
result.first['first_name'].should == 'Chris'
|
127
|
+
end
|
128
|
+
|
129
|
+
it "should be able to access protected information via FQL" do
|
130
|
+
# Tests agains the permissions fql table
|
131
|
+
|
132
|
+
# get the current user's ID
|
133
|
+
# we're sneakily using the Graph API, which should be okay since it has its own tests
|
134
|
+
g = Koala::Facebook::GraphAPI.new(@token)
|
135
|
+
id = g.get_object("me", :fields => "id")["id"]
|
136
|
+
|
137
|
+
# now send a query about your permissions
|
138
|
+
result = @api.fql_query("select read_stream from permissions where uid = #{id}")
|
139
|
+
|
140
|
+
result.size.should == 1
|
141
|
+
# we assume that you have read_stream permissions, so we can test against that
|
142
|
+
# (should we keep this?)
|
143
|
+
result.first["read_stream"].should == 1
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
|
148
|
+
shared_examples_for "Koala RestAPI without an access token" do
|
149
|
+
# FQL_QUERY
|
150
|
+
describe "when making a FQL request" do
|
151
|
+
it "should be able to access public information via FQL" do
|
152
|
+
@result = @api.fql_query("select first_name from user where uid = 216743")
|
153
|
+
@result.size.should == 1
|
154
|
+
@result.first["first_name"].should == "Chris"
|
155
|
+
end
|
156
|
+
|
157
|
+
it "should not be able to access protected information via FQL" do
|
158
|
+
lambda { @api.fql_query("select read_stream from permissions where uid = 216743") }.should raise_error(Koala::Facebook::APIError)
|
159
|
+
end
|
160
|
+
end
|
118
161
|
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# small helper method for live testing
|
2
|
+
module KoalaTest
|
3
|
+
def self.validate_user_info(token)
|
4
|
+
print "Validating permissions for live testing..."
|
5
|
+
# make sure we have the necessary permissions
|
6
|
+
api = Koala::Facebook::GraphAndRestAPI.new(token)
|
7
|
+
uid = api.get_object("me")["id"]
|
8
|
+
perms = api.fql_query("select read_stream, publish_stream, user_photos from permissions where uid = #{uid}")[0]
|
9
|
+
perms.each_pair do |perm, value|
|
10
|
+
unless value == 1
|
11
|
+
puts "failed!\n" # put a new line after the print above
|
12
|
+
raise ArgumentError, "Your access token must have the read_stream, publish_stream, and user_photos permissions. You have: #{perms.inspect}"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
puts "done!"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
|
20
|
+
unless ENV['LIVE']
|
21
|
+
# By default the Koala specs are run using stubs for HTTP requests
|
22
|
+
#
|
23
|
+
# Valid OAuth token and code are not necessary to run these
|
24
|
+
# specs. Because of this, specs do not fail due to Facebook
|
25
|
+
# imposed rate-limits or server timeouts.
|
26
|
+
#
|
27
|
+
# However as a result they are more brittle since
|
28
|
+
# we are not testing the latest responses from the Facebook servers.
|
29
|
+
# Therefore, to be certain all specs pass with the current
|
30
|
+
# Facebook services, run koala_spec_without_mocks.rb.
|
31
|
+
Koala.http_service = Koala::MockHTTPService
|
32
|
+
|
33
|
+
$testing_data = Koala::MockHTTPService::TEST_DATA
|
34
|
+
else
|
35
|
+
# Runs Koala specs through the Facebook servers
|
36
|
+
#
|
37
|
+
# Note that you need a valid OAuth token and code for these
|
38
|
+
# specs to run. See facebook_data.yml for more information.
|
39
|
+
|
40
|
+
# load testing data (see note in readme.md)
|
41
|
+
$testing_data = YAML.load_file(File.join(File.dirname(__FILE__), '../fixtures/facebook_data.yml'))
|
42
|
+
|
43
|
+
unless $testing_data["oauth_token"]
|
44
|
+
puts "Access token tests will fail until you store a valid token in facebook_data.yml"
|
45
|
+
end
|
46
|
+
|
47
|
+
unless $testing_data["oauth_test_data"] && $testing_data["oauth_test_data"]["code"] && $testing_data["oauth_test_data"]["secret"]
|
48
|
+
puts "OAuth code tests will fail until you store valid data for the user's OAuth code and the app secret in facebook_data.yml"
|
49
|
+
end
|
50
|
+
|
51
|
+
KoalaTest.validate_user_info $testing_data["oauth_token"]
|
52
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
shared_examples_for "MIME::Types can't return results" do
|
2
|
+
{
|
3
|
+
"jpg" => "image/jpeg",
|
4
|
+
"jpeg" => "image/jpeg",
|
5
|
+
"png" => "image/png",
|
6
|
+
"gif" => "image/gif"
|
7
|
+
}.each_pair do |extension, mime_type|
|
8
|
+
it "should properly get content types for #{extension} using basic analysis" do
|
9
|
+
path = "filename.#{extension}"
|
10
|
+
if @koala_io_params[0].is_a?(File)
|
11
|
+
@koala_io_params[0].stub!(:path).and_return(path)
|
12
|
+
else
|
13
|
+
@koala_io_params[0] = path
|
14
|
+
end
|
15
|
+
Koala::UploadableIO.new(*@koala_io_params).content_type.should == mime_type
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should get content types for #{extension} using basic analysis with file names with more than one dot" do
|
19
|
+
path = "file.name.#{extension}"
|
20
|
+
if @koala_io_params[0].is_a?(File)
|
21
|
+
@koala_io_params[0].stub!(:path).and_return(path)
|
22
|
+
else
|
23
|
+
@koala_io_params[0] = path
|
24
|
+
end
|
25
|
+
Koala::UploadableIO.new(*@koala_io_params).content_type.should == mime_type
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe "if the MIME type can't be determined" do
|
30
|
+
before :each do
|
31
|
+
path = "badfile.badextension"
|
32
|
+
if @koala_io_params[0].is_a?(File)
|
33
|
+
@koala_io_params[0].stub!(:path).and_return(path)
|
34
|
+
else
|
35
|
+
@koala_io_params[0] = path
|
36
|
+
end
|
37
|
+
end
|
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)
|
41
|
+
lambda { Koala::UploadableIO.new(*@koala_io_params) }.should raise_exception(Koala::KoalaError)
|
42
|
+
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
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
shared_examples_for "determining a mime type" do
|
52
|
+
describe "if MIME::Types is available" do
|
53
|
+
it "should return an UploadIO with MIME::Types-determined type if the type exists" do
|
54
|
+
type_result = ["type"]
|
55
|
+
Koala::MIME::Types.stub(:type_for).and_return(type_result)
|
56
|
+
Koala::UploadableIO.new(*@koala_io_params).content_type.should == type_result.first
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
describe "if MIME::Types is unavailable" do
|
61
|
+
before :each do
|
62
|
+
# fake that MIME::Types doesn't exist
|
63
|
+
Koala::MIME::Types.stub(:type_for).and_raise(NameError)
|
64
|
+
end
|
65
|
+
it_should_behave_like "MIME::Types can't return results"
|
66
|
+
end
|
67
|
+
|
68
|
+
describe "if MIME::Types can't find the result" do
|
69
|
+
before :each do
|
70
|
+
# fake that MIME::Types doesn't exist
|
71
|
+
Koala::MIME::Types.stub(:type_for).and_return([])
|
72
|
+
end
|
73
|
+
|
74
|
+
it_should_behave_like "MIME::Types can't return results"
|
75
|
+
end
|
76
|
+
end
|
metadata
CHANGED
@@ -1,16 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: koala
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7712010
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
9
|
- 0
|
10
|
-
-
|
11
|
-
|
12
|
-
- 1
|
13
|
-
version: 1.0.0.beta2.1
|
10
|
+
- rc
|
11
|
+
version: 1.0.0.rc
|
14
12
|
platform: ruby
|
15
13
|
authors:
|
16
14
|
- Alex Koppel, Chris Baclig, Rafi Jacoby, Context Optional
|
@@ -18,61 +16,103 @@ autorequire:
|
|
18
16
|
bindir: bin
|
19
17
|
cert_chain: []
|
20
18
|
|
21
|
-
date: 2011-04-
|
19
|
+
date: 2011-04-18 00:00:00 +02:00
|
22
20
|
default_executable:
|
23
21
|
dependencies:
|
24
22
|
- !ruby/object:Gem::Dependency
|
25
|
-
name: json
|
26
|
-
prerelease: false
|
27
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
28
24
|
none: false
|
29
25
|
requirements:
|
30
|
-
- -
|
26
|
+
- - ~>
|
31
27
|
- !ruby/object:Gem::Version
|
32
28
|
hash: 15
|
33
29
|
segments:
|
34
30
|
- 1
|
35
31
|
- 0
|
36
32
|
version: "1.0"
|
37
|
-
|
33
|
+
prerelease: false
|
38
34
|
version_requirements: *id001
|
35
|
+
type: :runtime
|
36
|
+
name: json
|
39
37
|
- !ruby/object:Gem::Dependency
|
40
|
-
name: multipart-post
|
41
|
-
prerelease: false
|
42
38
|
requirement: &id002 !ruby/object:Gem::Requirement
|
43
39
|
none: false
|
44
40
|
requirements:
|
45
|
-
- -
|
41
|
+
- - ~>
|
46
42
|
- !ruby/object:Gem::Version
|
47
43
|
hash: 15
|
48
44
|
segments:
|
49
45
|
- 1
|
50
46
|
- 0
|
51
47
|
version: "1.0"
|
52
|
-
|
48
|
+
prerelease: false
|
53
49
|
version_requirements: *id002
|
54
|
-
|
50
|
+
type: :runtime
|
51
|
+
name: multipart-post
|
52
|
+
- !ruby/object:Gem::Dependency
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ~>
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
hash: 27
|
59
|
+
segments:
|
60
|
+
- 2
|
61
|
+
- 5
|
62
|
+
- 0
|
63
|
+
version: 2.5.0
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: *id003
|
66
|
+
type: :development
|
67
|
+
name: rspec
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
71
|
+
requirements:
|
72
|
+
- - ~>
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
hash: 49
|
75
|
+
segments:
|
76
|
+
- 0
|
77
|
+
- 8
|
78
|
+
- 7
|
79
|
+
version: 0.8.7
|
80
|
+
prerelease: false
|
81
|
+
version_requirements: *id004
|
82
|
+
type: :development
|
83
|
+
name: rake
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
86
|
+
none: false
|
87
|
+
requirements:
|
88
|
+
- - ~>
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
hash: 31
|
91
|
+
segments:
|
92
|
+
- 0
|
93
|
+
- 2
|
94
|
+
- 4
|
95
|
+
version: 0.2.4
|
96
|
+
prerelease: false
|
97
|
+
version_requirements: *id005
|
98
|
+
type: :development
|
99
|
+
name: typhoeus
|
100
|
+
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.
|
55
101
|
email: alex@alexkoppel.com
|
56
102
|
executables: []
|
57
103
|
|
58
104
|
extensions: []
|
59
105
|
|
60
106
|
extra_rdoc_files:
|
107
|
+
- readme.md
|
61
108
|
- CHANGELOG
|
62
|
-
- LICENSE
|
63
|
-
- lib/koala.rb
|
64
|
-
- lib/koala/graph_api.rb
|
65
|
-
- lib/koala/http_services.rb
|
66
|
-
- lib/koala/realtime_updates.rb
|
67
|
-
- lib/koala/rest_api.rb
|
68
|
-
- lib/koala/test_users.rb
|
69
|
-
- lib/koala/uploadable_io.rb
|
70
109
|
files:
|
110
|
+
- .gitignore
|
71
111
|
- CHANGELOG
|
112
|
+
- Gemfile
|
72
113
|
- LICENSE
|
73
114
|
- Manifest
|
74
115
|
- Rakefile
|
75
|
-
- init.rb
|
76
116
|
- koala.gemspec
|
77
117
|
- lib/koala.rb
|
78
118
|
- lib/koala/graph_api.rb
|
@@ -82,31 +122,27 @@ files:
|
|
82
122
|
- lib/koala/test_users.rb
|
83
123
|
- lib/koala/uploadable_io.rb
|
84
124
|
- readme.md
|
85
|
-
- spec/
|
86
|
-
- spec/
|
87
|
-
- spec/
|
88
|
-
- spec/
|
89
|
-
- spec/
|
90
|
-
- spec/
|
91
|
-
- spec/
|
92
|
-
- spec/
|
93
|
-
- spec/
|
94
|
-
- spec/
|
95
|
-
- spec/
|
96
|
-
- spec/
|
97
|
-
- spec/
|
98
|
-
- spec/
|
99
|
-
- spec/
|
100
|
-
- spec/
|
101
|
-
- spec/
|
102
|
-
- spec/
|
103
|
-
- spec/
|
104
|
-
- spec/
|
105
|
-
- spec/
|
106
|
-
- spec/koala_spec_helper.rb
|
107
|
-
- spec/koala_spec_without_mocks.rb
|
108
|
-
- spec/mock_facebook_responses.yml
|
109
|
-
- spec/mock_http_service.rb
|
125
|
+
- spec/cases/api_base_spec.rb
|
126
|
+
- spec/cases/graph_and_rest_api_spec.rb
|
127
|
+
- spec/cases/graph_api_spec.rb
|
128
|
+
- spec/cases/http_services/http_service_spec.rb
|
129
|
+
- spec/cases/http_services/net_http_service_spec.rb
|
130
|
+
- spec/cases/http_services/typhoeus_service_spec.rb
|
131
|
+
- spec/cases/oauth_spec.rb
|
132
|
+
- spec/cases/realtime_updates_spec.rb
|
133
|
+
- spec/cases/rest_api_spec.rb
|
134
|
+
- spec/cases/test_users_spec.rb
|
135
|
+
- spec/cases/uploadable_io_spec.rb
|
136
|
+
- spec/fixtures/beach.jpg
|
137
|
+
- spec/fixtures/facebook_data.yml
|
138
|
+
- spec/fixtures/mock_facebook_responses.yml
|
139
|
+
- spec/spec_helper.rb
|
140
|
+
- spec/support/graph_api_shared_examples.rb
|
141
|
+
- spec/support/live_testing_data_helper.rb
|
142
|
+
- spec/support/mock_http_service.rb
|
143
|
+
- spec/support/rest_api_shared_examples.rb
|
144
|
+
- spec/support/setup_mocks_or_live.rb
|
145
|
+
- spec/support/uploadable_io_shared_examples.rb
|
110
146
|
has_rdoc: true
|
111
147
|
homepage: http://github.com/arsduo/koala
|
112
148
|
licenses: []
|
@@ -140,10 +176,30 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
176
|
version: "1.2"
|
141
177
|
requirements: []
|
142
178
|
|
143
|
-
rubyforge_project:
|
179
|
+
rubyforge_project:
|
144
180
|
rubygems_version: 1.4.2
|
145
181
|
signing_key:
|
146
182
|
specification_version: 3
|
147
|
-
summary: A lightweight, flexible library for Facebook with support for the Graph API, the
|
148
|
-
test_files:
|
149
|
-
|
183
|
+
summary: A lightweight, flexible library for Facebook with support for the Graph API, the REST API, realtime updates, and OAuth authentication.
|
184
|
+
test_files:
|
185
|
+
- spec/cases/api_base_spec.rb
|
186
|
+
- spec/cases/graph_and_rest_api_spec.rb
|
187
|
+
- spec/cases/graph_api_spec.rb
|
188
|
+
- spec/cases/http_services/http_service_spec.rb
|
189
|
+
- spec/cases/http_services/net_http_service_spec.rb
|
190
|
+
- spec/cases/http_services/typhoeus_service_spec.rb
|
191
|
+
- spec/cases/oauth_spec.rb
|
192
|
+
- spec/cases/realtime_updates_spec.rb
|
193
|
+
- spec/cases/rest_api_spec.rb
|
194
|
+
- spec/cases/test_users_spec.rb
|
195
|
+
- spec/cases/uploadable_io_spec.rb
|
196
|
+
- spec/fixtures/beach.jpg
|
197
|
+
- spec/fixtures/facebook_data.yml
|
198
|
+
- spec/fixtures/mock_facebook_responses.yml
|
199
|
+
- spec/spec_helper.rb
|
200
|
+
- spec/support/graph_api_shared_examples.rb
|
201
|
+
- spec/support/live_testing_data_helper.rb
|
202
|
+
- spec/support/mock_http_service.rb
|
203
|
+
- spec/support/rest_api_shared_examples.rb
|
204
|
+
- spec/support/setup_mocks_or_live.rb
|
205
|
+
- spec/support/uploadable_io_shared_examples.rb
|