fb_rails 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
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
 
@@ -1,6 +1,6 @@
1
1
  module FbRails
2
2
  class Config
3
- class_attribute :app_id, :secret, :user_class_name, :use_ssl
3
+ class_attribute :app_id, :secret, :user_class_name
4
4
 
5
5
  class << self
6
6
  def user_class
@@ -7,10 +7,7 @@ module FbRails
7
7
  class Graph
8
8
  class << self
9
9
  def facebook_uri
10
- @facebook_uri ||= begin
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) if facebook_uri.is_a?(URI::HTTPS)
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
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: fb_rails
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.7.0
5
+ version: 0.8.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Matthew Higgins