fb_rails 0.7.0 → 0.8.0
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/README.rdoc +0 -4
- data/lib/fb_rails/config.rb +1 -1
- data/lib/fb_rails/graph.rb +2 -5
- data/test/graph_test.rb +0 -5
- metadata +1 -1
data/README.rdoc
CHANGED
@@ -18,10 +18,6 @@ or
|
|
18
18
|
config.facebook.app_id = 'my_app_id'
|
19
19
|
config.facebook.secret = 'my_app_secret'
|
20
20
|
|
21
|
-
Requests use http by default. To use https, set 'use_ssl' to true:
|
22
|
-
|
23
|
-
config.facebook.use_ssl = true
|
24
|
-
|
25
21
|
Getting the user logged in is out of the scope of this gem. That's what
|
26
22
|
FBML and the Facebook Javascript API are for. Here's an example:
|
27
23
|
|
data/lib/fb_rails/config.rb
CHANGED
data/lib/fb_rails/graph.rb
CHANGED
@@ -7,10 +7,7 @@ module FbRails
|
|
7
7
|
class Graph
|
8
8
|
class << self
|
9
9
|
def facebook_uri
|
10
|
-
@facebook_uri ||=
|
11
|
-
protocol = FbRails::Config.use_ssl ? 'https': 'http'
|
12
|
-
URI.parse("#{protocol}://graph.facebook.com")
|
13
|
-
end
|
10
|
+
@facebook_uri ||= URI.parse("https://graph.facebook.com")
|
14
11
|
end
|
15
12
|
|
16
13
|
def get(path, params = {})
|
@@ -34,7 +31,7 @@ module FbRails
|
|
34
31
|
|
35
32
|
def http
|
36
33
|
result = Net::HTTP.new(facebook_uri.host, facebook_uri.port)
|
37
|
-
configure_https(result)
|
34
|
+
configure_https(result)
|
38
35
|
result
|
39
36
|
end
|
40
37
|
|
data/test/graph_test.rb
CHANGED
@@ -2,11 +2,6 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
class FbRails::GraphTest < ActiveSupport::TestCase
|
4
4
|
test 'facebook_uri' do
|
5
|
-
FbRails::Config.use_ssl = false
|
6
|
-
assert_equal 'http', FbRails::Graph.facebook_uri.scheme
|
7
|
-
|
8
|
-
FbRails::Config.use_ssl = true
|
9
|
-
FbRails::Graph.instance_variable_set('@facebook_uri', nil)
|
10
5
|
assert_equal 'https', FbRails::Graph.facebook_uri.scheme
|
11
6
|
end
|
12
7
|
end
|