cbaclig-koala 0.5.0.1 → 0.5.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -0
- data/cbaclig-koala.gemspec +1 -1
- data/lib/koala.rb +2 -2
- data/test/facebook_data.yml +2 -2
- data/test/koala/facebook_no_access_token_tests.rb +2 -2
- data/test/koala/facebook_with_access_token_tests.rb +2 -2
- metadata +2 -2
data/CHANGELOG
CHANGED
data/cbaclig-koala.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{cbaclig-koala}
|
5
|
-
s.version = "0.5.0.
|
5
|
+
s.version = "0.5.0.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Alex Koppel, Rafi Jacoby, Context Optional"]
|
data/lib/koala.rb
CHANGED
data/test/facebook_data.yml
CHANGED
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
# You must supply this value yourself to test the GraphAPI class.
|
7
7
|
# Your OAuth token should have publish_stream and read_stream permissions
|
8
|
-
oauth_token:
|
8
|
+
oauth_token: 119908831367602|2.Fz6dNs_PJoB5z1qq_27rog__.3600.1273640400-216743|3mfRhd1CWxWbLqIkB7asZS7cJuE.
|
9
9
|
|
10
10
|
|
11
11
|
# for testing the OAuth class
|
12
12
|
# baseline app
|
13
13
|
oauth_test_data:
|
14
14
|
# You must supply this value yourself, since they will expire.
|
15
|
-
code:
|
15
|
+
code: 2.Fz6dNs_PJoB5z1qq_27rog__.3600.1273640400-216743|n62wVWDEAeDIGH6Yb9z0_18OkDo.
|
16
16
|
|
17
17
|
# These values will work out of the box
|
18
18
|
app_id: 119908831367602
|
@@ -110,13 +110,13 @@ class FacebookNoAccessTokenTests < Test::Unit::TestCase
|
|
110
110
|
|
111
111
|
# FQL
|
112
112
|
it "should be able to access public information via FQL" do
|
113
|
-
@result = @graph.
|
113
|
+
@result = @graph.query('select first_name from user where uid = 216743')
|
114
114
|
@result.size.should == 1
|
115
115
|
@result.first['first_name'].should == 'Chris'
|
116
116
|
end
|
117
117
|
|
118
118
|
it "should not be able to access protected information via FQL" do
|
119
|
-
lambda { @graph.
|
119
|
+
lambda { @graph.query("select read_stream from permissions where uid = 216743") }.should raise_error(Koala::Facebook::RestAPIError)
|
120
120
|
end
|
121
121
|
|
122
122
|
# API
|
@@ -133,7 +133,7 @@ class FacebookWithAccessTokenTests < Test::Unit::TestCase
|
|
133
133
|
|
134
134
|
# FQL
|
135
135
|
it "should be able to access public information via FQL" do
|
136
|
-
result = @graph.
|
136
|
+
result = @graph.query('select first_name from user where uid = 216743')
|
137
137
|
result.size.should == 1
|
138
138
|
result.first['first_name'].should == 'Chris'
|
139
139
|
end
|
@@ -141,7 +141,7 @@ class FacebookWithAccessTokenTests < Test::Unit::TestCase
|
|
141
141
|
it "should be able to access protected information via FQL" do
|
142
142
|
# Tests agains read_stream since these tests assume we have that permission
|
143
143
|
YOUR_ID = 216743
|
144
|
-
result = @graph.
|
144
|
+
result = @graph.query("select read_stream from permissions where uid = #{YOUR_ID}")
|
145
145
|
|
146
146
|
result.size.should == 1
|
147
147
|
result.first['read_stream'].should == 1
|