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.
- data/.gitignore +3 -1
- data/.travis.yml +4 -0
- data/.yardopts +3 -0
- data/CHANGELOG +7 -0
- data/Gemfile +14 -0
- data/Guardfile +6 -0
- data/lib/koala.rb +16 -97
- data/lib/koala/api.rb +93 -0
- data/lib/koala/api/batch_operation.rb +83 -0
- data/lib/koala/api/graph_api.rb +476 -0
- data/lib/koala/{graph_batch_api.rb → api/graph_batch_api.rb} +20 -16
- data/lib/koala/api/graph_collection.rb +107 -0
- data/lib/koala/api/legacy.rb +26 -0
- data/lib/koala/{rest_api.rb → api/rest_api.rb} +33 -3
- data/lib/koala/http_service.rb +69 -19
- data/lib/koala/http_service/multipart_request.rb +41 -0
- data/lib/koala/http_service/response.rb +18 -0
- data/lib/koala/http_service/uploadable_io.rb +187 -0
- data/lib/koala/oauth.rb +117 -14
- data/lib/koala/realtime_updates.rb +89 -51
- data/lib/koala/test_users.rb +109 -33
- data/lib/koala/utils.rb +4 -0
- data/lib/koala/version.rb +1 -1
- data/spec/cases/api_spec.rb +19 -12
- data/spec/cases/graph_api_batch_spec.rb +41 -41
- data/spec/cases/http_service_spec.rb +1 -22
- data/spec/cases/legacy_spec.rb +107 -0
- data/spec/cases/multipart_request_spec.rb +5 -5
- data/spec/cases/oauth_spec.rb +9 -9
- data/spec/cases/realtime_updates_spec.rb +154 -47
- data/spec/cases/test_users_spec.rb +268 -219
- data/spec/fixtures/mock_facebook_responses.yml +10 -6
- data/spec/support/graph_api_shared_examples.rb +17 -12
- data/spec/support/koala_test.rb +1 -1
- data/spec/support/mock_http_service.rb +2 -2
- data/spec/support/rest_api_shared_examples.rb +1 -1
- metadata +82 -104
- data/lib/koala/batch_operation.rb +0 -74
- data/lib/koala/graph_api.rb +0 -289
- data/lib/koala/graph_collection.rb +0 -63
- data/lib/koala/multipart_request.rb +0 -35
- data/lib/koala/uploadable_io.rb +0 -181
- data/spec/cases/graph_and_rest_api_spec.rb +0 -22
- data/spec/cases/graph_api_spec.rb +0 -22
- 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
|
data/spec/cases/rest_api_spec.rb
DELETED
@@ -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
|