koala 1.3.0rc1 → 1.3.0rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. data/.gitignore +3 -1
  2. data/.travis.yml +4 -0
  3. data/.yardopts +3 -0
  4. data/CHANGELOG +7 -0
  5. data/Gemfile +14 -0
  6. data/Guardfile +6 -0
  7. data/lib/koala.rb +16 -97
  8. data/lib/koala/api.rb +93 -0
  9. data/lib/koala/api/batch_operation.rb +83 -0
  10. data/lib/koala/api/graph_api.rb +476 -0
  11. data/lib/koala/{graph_batch_api.rb → api/graph_batch_api.rb} +20 -16
  12. data/lib/koala/api/graph_collection.rb +107 -0
  13. data/lib/koala/api/legacy.rb +26 -0
  14. data/lib/koala/{rest_api.rb → api/rest_api.rb} +33 -3
  15. data/lib/koala/http_service.rb +69 -19
  16. data/lib/koala/http_service/multipart_request.rb +41 -0
  17. data/lib/koala/http_service/response.rb +18 -0
  18. data/lib/koala/http_service/uploadable_io.rb +187 -0
  19. data/lib/koala/oauth.rb +117 -14
  20. data/lib/koala/realtime_updates.rb +89 -51
  21. data/lib/koala/test_users.rb +109 -33
  22. data/lib/koala/utils.rb +4 -0
  23. data/lib/koala/version.rb +1 -1
  24. data/spec/cases/api_spec.rb +19 -12
  25. data/spec/cases/graph_api_batch_spec.rb +41 -41
  26. data/spec/cases/http_service_spec.rb +1 -22
  27. data/spec/cases/legacy_spec.rb +107 -0
  28. data/spec/cases/multipart_request_spec.rb +5 -5
  29. data/spec/cases/oauth_spec.rb +9 -9
  30. data/spec/cases/realtime_updates_spec.rb +154 -47
  31. data/spec/cases/test_users_spec.rb +268 -219
  32. data/spec/fixtures/mock_facebook_responses.yml +10 -6
  33. data/spec/support/graph_api_shared_examples.rb +17 -12
  34. data/spec/support/koala_test.rb +1 -1
  35. data/spec/support/mock_http_service.rb +2 -2
  36. data/spec/support/rest_api_shared_examples.rb +1 -1
  37. metadata +82 -104
  38. data/lib/koala/batch_operation.rb +0 -74
  39. data/lib/koala/graph_api.rb +0 -289
  40. data/lib/koala/graph_collection.rb +0 -63
  41. data/lib/koala/multipart_request.rb +0 -35
  42. data/lib/koala/uploadable_io.rb +0 -181
  43. data/spec/cases/graph_and_rest_api_spec.rb +0 -22
  44. data/spec/cases/graph_api_spec.rb +0 -22
  45. data/spec/cases/rest_api_spec.rb +0 -22
@@ -1,22 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe "Koala::Facebook::GraphAndRestAPI" do
4
- describe "class consolidation" do
5
- before :each do
6
- Koala::Utils.stub(:deprecate) # avoid actual messages to stderr
7
- end
8
-
9
- it "still allows you to instantiate a GraphAndRestAPI object" do
10
- api = Koala::Facebook::GraphAndRestAPI.new("token").should be_a(Koala::Facebook::GraphAndRestAPI)
11
- end
12
-
13
- it "ultimately creates an API object" do
14
- api = Koala::Facebook::GraphAndRestAPI.new("token").should be_a(Koala::Facebook::API)
15
- end
16
-
17
- it "fires a depreciation warning" do
18
- Koala::Utils.should_receive(:deprecate)
19
- api = Koala::Facebook::GraphAndRestAPI.new("token")
20
- end
21
- end
22
- end
@@ -1,22 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe "Koala::Facebook::GraphAPI" do
4
- describe "class consolidation" do
5
- before :each do
6
- Koala::Utils.stub(:deprecate) # avoid actual messages to stderr
7
- end
8
-
9
- it "still allows you to instantiate a GraphAndRestAPI object" do
10
- api = Koala::Facebook::GraphAPI.new("token").should be_a(Koala::Facebook::GraphAPI)
11
- end
12
-
13
- it "ultimately creates an API object" do
14
- api = Koala::Facebook::GraphAPI.new("token").should be_a(Koala::Facebook::API)
15
- end
16
-
17
- it "fires a depreciation warning" do
18
- Koala::Utils.should_receive(:deprecate)
19
- api = Koala::Facebook::GraphAPI.new("token")
20
- end
21
- end
22
- end
@@ -1,22 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe "Koala::Facebook::RestAPI" do
4
- describe "class consolidation" do
5
- before :each do
6
- Koala::Utils.stub(:deprecate) # avoid actual messages to stderr
7
- end
8
-
9
- it "still allows you to instantiate a GraphAndRestAPI object" do
10
- api = Koala::Facebook::RestAPI.new("token").should be_a(Koala::Facebook::RestAPI)
11
- end
12
-
13
- it "ultimately creates an API object" do
14
- api = Koala::Facebook::RestAPI.new("token").should be_a(Koala::Facebook::API)
15
- end
16
-
17
- it "fires a depreciation warning" do
18
- Koala::Utils.should_receive(:deprecate)
19
- api = Koala::Facebook::RestAPI.new("token")
20
- end
21
- end
22
- end