koala 1.0.0.beta2.1 → 1.0.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.
Files changed (52) hide show
  1. data/.gitignore +3 -0
  2. data/CHANGELOG +15 -12
  3. data/Gemfile +3 -0
  4. data/LICENSE +1 -1
  5. data/Rakefile +13 -14
  6. data/koala.gemspec +35 -20
  7. data/lib/koala/graph_api.rb +2 -2
  8. data/lib/koala/http_services.rb +32 -27
  9. data/lib/koala/test_users.rb +4 -4
  10. data/lib/koala/uploadable_io.rb +1 -1
  11. data/lib/koala.rb +29 -54
  12. data/readme.md +15 -8
  13. data/spec/cases/api_base_spec.rb +101 -0
  14. data/spec/cases/graph_and_rest_api_spec.rb +31 -0
  15. data/spec/cases/graph_api_spec.rb +25 -0
  16. data/spec/{koala/http_services/http_service_tests.rb → cases/http_services/http_service_spec.rb} +8 -5
  17. data/spec/cases/http_services/net_http_service_spec.rb +350 -0
  18. data/spec/cases/http_services/typhoeus_service_spec.rb +144 -0
  19. data/spec/cases/oauth_spec.rb +409 -0
  20. data/spec/cases/realtime_updates_spec.rb +184 -0
  21. data/spec/cases/rest_api_spec.rb +25 -0
  22. data/spec/{koala/test_users/test_users_tests.rb → cases/test_users_spec.rb} +34 -29
  23. data/spec/cases/uploadable_io_spec.rb +151 -0
  24. data/spec/{facebook_data.yml → fixtures/facebook_data.yml} +5 -5
  25. data/spec/{mock_facebook_responses.yml → fixtures/mock_facebook_responses.yml} +313 -311
  26. data/spec/spec_helper.rb +18 -0
  27. data/spec/support/graph_api_shared_examples.rb +424 -0
  28. data/spec/{koala → support}/live_testing_data_helper.rb +39 -42
  29. data/spec/{mock_http_service.rb → support/mock_http_service.rb} +94 -94
  30. data/spec/{koala/rest_api/rest_api_tests.rb → support/rest_api_shared_examples.rb} +43 -0
  31. data/spec/support/setup_mocks_or_live.rb +52 -0
  32. data/spec/support/uploadable_io_shared_examples.rb +76 -0
  33. metadata +106 -53
  34. data/init.rb +0 -2
  35. data/spec/koala/api_base_tests.rb +0 -102
  36. data/spec/koala/graph_and_rest_api/graph_and_rest_api_no_token_tests.rb +0 -14
  37. data/spec/koala/graph_and_rest_api/graph_and_rest_api_with_token_tests.rb +0 -16
  38. data/spec/koala/graph_api/graph_api_no_access_token_tests.rb +0 -65
  39. data/spec/koala/graph_api/graph_api_tests.rb +0 -85
  40. data/spec/koala/graph_api/graph_api_with_access_token_tests.rb +0 -194
  41. data/spec/koala/graph_api/graph_collection_tests.rb +0 -104
  42. data/spec/koala/http_services/net_http_service_tests.rb +0 -339
  43. data/spec/koala/http_services/typhoeus_service_tests.rb +0 -162
  44. data/spec/koala/oauth/oauth_tests.rb +0 -372
  45. data/spec/koala/realtime_updates/realtime_updates_tests.rb +0 -187
  46. data/spec/koala/rest_api/rest_api_no_access_token_tests.rb +0 -25
  47. data/spec/koala/rest_api/rest_api_with_access_token_tests.rb +0 -38
  48. data/spec/koala/uploadable_io/uploadable_io_tests.rb +0 -246
  49. data/spec/koala_spec.rb +0 -18
  50. data/spec/koala_spec_helper.rb +0 -74
  51. data/spec/koala_spec_without_mocks.rb +0 -19
  52. /data/spec/{koala/assets → fixtures}/beach.jpg +0 -0
@@ -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,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: koala
3
3
  version: !ruby/object:Gem::Version
4
- hash: 124392909
5
- prerelease: 6
4
+ hash: 23
5
+ prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
9
  - 0
10
- - beta
11
- - 2
12
- - 1
13
- version: 1.0.0.beta2.1
10
+ version: 1.0.0
14
11
  platform: ruby
15
12
  authors:
16
13
  - Alex Koppel, Chris Baclig, Rafi Jacoby, Context Optional
@@ -18,16 +15,14 @@ autorequire:
18
15
  bindir: bin
19
16
  cert_chain: []
20
17
 
21
- date: 2011-04-06 00:00:00 +02:00
22
- default_executable:
18
+ date: 2011-05-01 00:00:00 Z
23
19
  dependencies:
24
20
  - !ruby/object:Gem::Dependency
25
- name: json
26
21
  prerelease: false
27
22
  requirement: &id001 !ruby/object:Gem::Requirement
28
23
  none: false
29
24
  requirements:
30
- - - ">="
25
+ - - ~>
31
26
  - !ruby/object:Gem::Version
32
27
  hash: 15
33
28
  segments:
@@ -35,14 +30,14 @@ dependencies:
35
30
  - 0
36
31
  version: "1.0"
37
32
  type: :runtime
33
+ name: json
38
34
  version_requirements: *id001
39
35
  - !ruby/object:Gem::Dependency
40
- name: multipart-post
41
36
  prerelease: false
42
37
  requirement: &id002 !ruby/object:Gem::Requirement
43
38
  none: false
44
39
  requirements:
45
- - - ">="
40
+ - - ~>
46
41
  - !ruby/object:Gem::Version
47
42
  hash: 15
48
43
  segments:
@@ -50,29 +45,72 @@ dependencies:
50
45
  - 0
51
46
  version: "1.0"
52
47
  type: :runtime
48
+ name: multipart-post
53
49
  version_requirements: *id002
54
- description: Koala is a lightweight, flexible Ruby SDK for Facebook. It allows read/write access to the social graph via the Graph API and the older REST API, 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.
50
+ - !ruby/object:Gem::Dependency
51
+ prerelease: false
52
+ requirement: &id003 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ~>
56
+ - !ruby/object:Gem::Version
57
+ hash: 27
58
+ segments:
59
+ - 2
60
+ - 5
61
+ - 0
62
+ version: 2.5.0
63
+ type: :development
64
+ name: rspec
65
+ version_requirements: *id003
66
+ - !ruby/object:Gem::Dependency
67
+ prerelease: false
68
+ requirement: &id004 !ruby/object:Gem::Requirement
69
+ none: false
70
+ requirements:
71
+ - - ~>
72
+ - !ruby/object:Gem::Version
73
+ hash: 49
74
+ segments:
75
+ - 0
76
+ - 8
77
+ - 7
78
+ version: 0.8.7
79
+ type: :development
80
+ name: rake
81
+ version_requirements: *id004
82
+ - !ruby/object:Gem::Dependency
83
+ prerelease: false
84
+ requirement: &id005 !ruby/object:Gem::Requirement
85
+ none: false
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ hash: 31
90
+ segments:
91
+ - 0
92
+ - 2
93
+ - 4
94
+ version: 0.2.4
95
+ type: :development
96
+ name: typhoeus
97
+ version_requirements: *id005
98
+ 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
99
  email: alex@alexkoppel.com
56
100
  executables: []
57
101
 
58
102
  extensions: []
59
103
 
60
104
  extra_rdoc_files:
105
+ - readme.md
61
106
  - 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
107
  files:
108
+ - .gitignore
71
109
  - CHANGELOG
110
+ - Gemfile
72
111
  - LICENSE
73
112
  - Manifest
74
113
  - Rakefile
75
- - init.rb
76
114
  - koala.gemspec
77
115
  - lib/koala.rb
78
116
  - lib/koala/graph_api.rb
@@ -82,32 +120,27 @@ files:
82
120
  - lib/koala/test_users.rb
83
121
  - lib/koala/uploadable_io.rb
84
122
  - readme.md
85
- - spec/facebook_data.yml
86
- - spec/koala/api_base_tests.rb
87
- - spec/koala/assets/beach.jpg
88
- - spec/koala/graph_and_rest_api/graph_and_rest_api_no_token_tests.rb
89
- - spec/koala/graph_and_rest_api/graph_and_rest_api_with_token_tests.rb
90
- - spec/koala/graph_api/graph_api_no_access_token_tests.rb
91
- - spec/koala/graph_api/graph_api_tests.rb
92
- - spec/koala/graph_api/graph_api_with_access_token_tests.rb
93
- - spec/koala/graph_api/graph_collection_tests.rb
94
- - spec/koala/http_services/http_service_tests.rb
95
- - spec/koala/http_services/net_http_service_tests.rb
96
- - spec/koala/http_services/typhoeus_service_tests.rb
97
- - spec/koala/live_testing_data_helper.rb
98
- - spec/koala/oauth/oauth_tests.rb
99
- - spec/koala/realtime_updates/realtime_updates_tests.rb
100
- - spec/koala/rest_api/rest_api_no_access_token_tests.rb
101
- - spec/koala/rest_api/rest_api_tests.rb
102
- - spec/koala/rest_api/rest_api_with_access_token_tests.rb
103
- - spec/koala/test_users/test_users_tests.rb
104
- - spec/koala/uploadable_io/uploadable_io_tests.rb
105
- - spec/koala_spec.rb
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
110
- has_rdoc: true
123
+ - spec/cases/api_base_spec.rb
124
+ - spec/cases/graph_and_rest_api_spec.rb
125
+ - spec/cases/graph_api_spec.rb
126
+ - spec/cases/http_services/http_service_spec.rb
127
+ - spec/cases/http_services/net_http_service_spec.rb
128
+ - spec/cases/http_services/typhoeus_service_spec.rb
129
+ - spec/cases/oauth_spec.rb
130
+ - spec/cases/realtime_updates_spec.rb
131
+ - spec/cases/rest_api_spec.rb
132
+ - spec/cases/test_users_spec.rb
133
+ - spec/cases/uploadable_io_spec.rb
134
+ - spec/fixtures/beach.jpg
135
+ - spec/fixtures/facebook_data.yml
136
+ - spec/fixtures/mock_facebook_responses.yml
137
+ - spec/spec_helper.rb
138
+ - spec/support/graph_api_shared_examples.rb
139
+ - spec/support/live_testing_data_helper.rb
140
+ - spec/support/mock_http_service.rb
141
+ - spec/support/rest_api_shared_examples.rb
142
+ - spec/support/setup_mocks_or_live.rb
143
+ - spec/support/uploadable_io_shared_examples.rb
111
144
  homepage: http://github.com/arsduo/koala
112
145
  licenses: []
113
146
 
@@ -140,10 +173,30 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
173
  version: "1.2"
141
174
  requirements: []
142
175
 
143
- rubyforge_project: koala
144
- rubygems_version: 1.4.2
176
+ rubyforge_project:
177
+ rubygems_version: 1.7.2
145
178
  signing_key:
146
179
  specification_version: 3
147
- summary: A lightweight, flexible library for Facebook with support for the Graph API, the old REST API, realtime updates, and OAuth validation.
148
- test_files: []
149
-
180
+ summary: A lightweight, flexible library for Facebook with support for the Graph API, the REST API, realtime updates, and OAuth authentication.
181
+ test_files:
182
+ - spec/cases/api_base_spec.rb
183
+ - spec/cases/graph_and_rest_api_spec.rb
184
+ - spec/cases/graph_api_spec.rb
185
+ - spec/cases/http_services/http_service_spec.rb
186
+ - spec/cases/http_services/net_http_service_spec.rb
187
+ - spec/cases/http_services/typhoeus_service_spec.rb
188
+ - spec/cases/oauth_spec.rb
189
+ - spec/cases/realtime_updates_spec.rb
190
+ - spec/cases/rest_api_spec.rb
191
+ - spec/cases/test_users_spec.rb
192
+ - spec/cases/uploadable_io_spec.rb
193
+ - spec/fixtures/beach.jpg
194
+ - spec/fixtures/facebook_data.yml
195
+ - spec/fixtures/mock_facebook_responses.yml
196
+ - spec/spec_helper.rb
197
+ - spec/support/graph_api_shared_examples.rb
198
+ - spec/support/live_testing_data_helper.rb
199
+ - spec/support/mock_http_service.rb
200
+ - spec/support/rest_api_shared_examples.rb
201
+ - spec/support/setup_mocks_or_live.rb
202
+ - spec/support/uploadable_io_shared_examples.rb
data/init.rb DELETED
@@ -1,2 +0,0 @@
1
- # init.rb
2
- require 'koala'