fb_rails 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +2 -2
- data/lib/fb_rails/graph.rb +1 -1
- data/lib/fb_rails/test_helper.rb +8 -0
- data/lib/fb_rails.rb +1 -0
- data/test/connect_test.rb +1 -1
- data/test/fb_test.rb +1 -1
- data/test/log_subscriber_test.rb +1 -1
- data/test/mock_test.rb +1 -1
- data/test/test_helper.rb +2 -5
- metadata +4 -3
data/README.rdoc
CHANGED
@@ -24,7 +24,7 @@ FBML and the Facebook Javascript API are for. Here's an example:
|
|
24
24
|
<div id="fb-root"></div>
|
25
25
|
<script src="http://connect.facebook.net/en_US/all.js"></script>
|
26
26
|
<script>
|
27
|
-
FB.init({appId: '<%= fb.app_id
|
27
|
+
FB.init({appId: '<%= fb.app_id %>', status: true, cookie: true, xfbml: true});
|
28
28
|
</script>
|
29
29
|
<%= fbml 'login-button' %>
|
30
30
|
|
@@ -83,4 +83,4 @@ connections. This is done with FbRails::Mock:
|
|
83
83
|
mock.add 'me', 'first_name' => 'Matt', 'last_name' => 'Higgins'
|
84
84
|
end
|
85
85
|
|
86
|
-
|
86
|
+
Now, a call to 'fb.graph.get 'me' returns the above response.
|
data/lib/fb_rails/graph.rb
CHANGED
@@ -39,7 +39,7 @@ module FbRails
|
|
39
39
|
|
40
40
|
def build_path(url, params)
|
41
41
|
params = params.merge(:access_token => connect.access_token)
|
42
|
-
param_string = params.map { |key, value| "#{key}=#{
|
42
|
+
param_string = params.map { |key, value| "#{key}=#{Rack::Utils.escape(value)}" }.join('&')
|
43
43
|
url = "#{url}?#{param_string}"
|
44
44
|
end
|
45
45
|
|
data/lib/fb_rails.rb
CHANGED
data/test/connect_test.rb
CHANGED
data/test/fb_test.rb
CHANGED
data/test/log_subscriber_test.rb
CHANGED
@@ -17,7 +17,7 @@ class FbRails::LogSubscriberTest < ActiveSupport::TestCase
|
|
17
17
|
end
|
18
18
|
|
19
19
|
test 'request notification' do
|
20
|
-
graph = FbRails::Graph.new(FbRails::Connect.new(
|
20
|
+
graph = FbRails::Graph.new(FbRails::Connect.new(fb_cookie))
|
21
21
|
graph.get 'test'
|
22
22
|
|
23
23
|
wait
|
data/test/mock_test.rb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -10,9 +10,6 @@ require 'sample/test_controller'
|
|
10
10
|
FbRails::Config.app_id = 'foo'
|
11
11
|
FbRails::Config.secret = 'bar'
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
value = FbRails::Cookie.encode({:uid => uid, :access_token => access_token}, FbRails::Config.secret)
|
16
|
-
{FbRails::Connect.cookie_name => value}
|
17
|
-
end
|
13
|
+
ActiveSupport::TestCase.class_eval do
|
14
|
+
include FbRails::TestHelper
|
18
15
|
end
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
7
|
+
- 4
|
8
8
|
- 0
|
9
|
-
version: 0.
|
9
|
+
version: 0.4.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Matthew Higgins
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date:
|
17
|
+
date: 2011-01-11 00:00:00 -08:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -55,6 +55,7 @@ files:
|
|
55
55
|
- lib/fb_rails/log_subscriber.rb
|
56
56
|
- lib/fb_rails/mock.rb
|
57
57
|
- lib/fb_rails/railtie.rb
|
58
|
+
- lib/fb_rails/test_helper.rb
|
58
59
|
- lib/fb_rails.rb
|
59
60
|
- test/config_test.rb
|
60
61
|
- test/connect_test.rb
|