cbaclig-koala 0.5.0.1 → 0.5.0.2

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/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ v0.5.0.2
2
+ -- Changed #fql to #query because it makes more sense
3
+
1
4
  v0.5.0.1
2
5
  -- Added #fql method to allow easy FQL queries
3
6
  -- Added fql tests
@@ -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.1"
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"]
@@ -169,9 +169,9 @@ module Koala
169
169
  response
170
170
  end
171
171
 
172
- def fql(query)
172
+ def query(fql)
173
173
  args = {
174
- "query" => query,
174
+ "query" => fql,
175
175
  "format" => "json",
176
176
  }
177
177
 
@@ -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.fql('select first_name from user where uid = 216743')
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.fql("select read_stream from permissions where uid = 216743") }.should raise_error(Koala::Facebook::RestAPIError)
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.fql('select first_name from user where uid = 216743')
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.fql("select read_stream from permissions where uid = #{YOUR_ID}")
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
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 5
8
8
  - 0
9
- - 1
10
- version: 0.5.0.1
9
+ - 2
10
+ version: 0.5.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alex Koppel, Rafi Jacoby, Context Optional