mmangino-facebooker 1.0.10 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -90,7 +90,7 @@ module ActionView
90
90
  # Altered to throw an error on :popup and sanitize the javascript
91
91
  # for Facebook.
92
92
  def convert_options_to_javascript_with_facebooker!(html_options, url ='')
93
- if !request_comes_from_facebook?
93
+ if !respond_to?(:request_comes_from_facebooker?) || !request_comes_from_facebook?
94
94
  convert_options_to_javascript_without_facebooker!(html_options,url)
95
95
  else
96
96
  confirm, popup = html_options.delete("confirm"), html_options.delete("popup")
@@ -4,7 +4,11 @@ module Facebooker
4
4
  module FbConnect
5
5
 
6
6
  def fb_connect_javascript_tag
7
- javascript_include_tag "http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php"
7
+ if request.ssl?
8
+ javascript_include_tag "https://www.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php"
9
+ else
10
+ javascript_include_tag "http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php"
11
+ end
8
12
  end
9
13
 
10
14
  def init_fb_connect(*required_features)
@@ -31,4 +35,4 @@ module Facebooker
31
35
  end
32
36
  end
33
37
  end
34
- end
38
+ end
@@ -396,6 +396,9 @@ module Facebooker
396
396
  returning ActionView::Base.new([template_root,controller_root], assigns, self) do |template|
397
397
  template.controller=self
398
398
  template.extend(self.class.master_helper_module)
399
+ def template.request_comes_from_facebook?
400
+ true
401
+ end
399
402
  end
400
403
  end
401
404
 
@@ -1,8 +1,8 @@
1
1
  begin
2
2
  require 'curb'
3
3
  Facebooker.use_curl = true
4
- rescue Exception=>e
5
- puts e
4
+ rescue LoadError
5
+ $stderr.puts "Curb not found. Using Net::HTTP."
6
6
  require 'net/http'
7
7
  end
8
8
  require 'facebooker/parser'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mmangino-facebooker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chad Fowler