facebooker-lite 1.0.67 → 1.0.67.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest.txt +0 -1
- data/init.rb +0 -1
- data/lib/facebooker/version.rb +2 -1
- metadata +2 -2
- data/lib/facebooker/rails/facebook_url_rewriting.rb +0 -60
data/Manifest.txt
CHANGED
@@ -58,7 +58,6 @@ lib/facebooker/rails/facebook_pretty_errors.rb
|
|
58
58
|
lib/facebooker/rails/facebook_request_fix.rb
|
59
59
|
lib/facebooker/rails/facebook_request_fix_2-3.rb
|
60
60
|
lib/facebooker/rails/facebook_session_handling.rb
|
61
|
-
lib/facebooker/rails/facebook_url_rewriting.rb
|
62
61
|
lib/facebooker/rails/helpers/fb_connect.rb
|
63
62
|
lib/facebooker/rails/integration_session.rb
|
64
63
|
lib/facebooker/rails/profile_publisher_extensions.rb
|
data/init.rb
CHANGED
@@ -12,7 +12,6 @@ require 'net/http_multipart_post'
|
|
12
12
|
if defined? Rails
|
13
13
|
require 'facebooker/rails/backwards_compatible_param_checks'
|
14
14
|
require 'facebooker/rails/controller'
|
15
|
-
require 'facebooker/rails/facebook_url_rewriting'
|
16
15
|
require 'facebooker/rails/facebook_session_handling' if Rails.version < '2.3'
|
17
16
|
require 'facebooker/rails/facebook_request_fix' if Rails.version < '2.3'
|
18
17
|
require 'facebooker/rails/facebook_request_fix_2-3' if Rails.version >= '2.3'
|
data/lib/facebooker/version.rb
CHANGED
metadata
CHANGED
@@ -6,7 +6,8 @@ version: !ruby/object:Gem::Version
|
|
6
6
|
- 1
|
7
7
|
- 0
|
8
8
|
- 67
|
9
|
-
|
9
|
+
- 1
|
10
|
+
version: 1.0.67.1
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Chad Fowler
|
@@ -165,7 +166,6 @@ files:
|
|
165
166
|
- lib/facebooker/rails/facebook_request_fix.rb
|
166
167
|
- lib/facebooker/rails/facebook_request_fix_2-3.rb
|
167
168
|
- lib/facebooker/rails/facebook_session_handling.rb
|
168
|
-
- lib/facebooker/rails/facebook_url_rewriting.rb
|
169
169
|
- lib/facebooker/rails/helpers/fb_connect.rb
|
170
170
|
- lib/facebooker/rails/integration_session.rb
|
171
171
|
- lib/facebooker/rails/profile_publisher_extensions.rb
|
@@ -1,60 +0,0 @@
|
|
1
|
-
module ::ActionController
|
2
|
-
if Rails.version < '2.3'
|
3
|
-
class AbstractRequest
|
4
|
-
def relative_url_root
|
5
|
-
Facebooker.path_prefix
|
6
|
-
end
|
7
|
-
end
|
8
|
-
else
|
9
|
-
class Request
|
10
|
-
def relative_url_root
|
11
|
-
Facebooker.path_prefix
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
class Base
|
17
|
-
class << self
|
18
|
-
alias :old_relative_url_root :relative_url_root
|
19
|
-
def relative_url_root
|
20
|
-
Facebooker.path_prefix
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
class UrlRewriter
|
26
|
-
include Facebooker::Rails::BackwardsCompatibleParamChecks
|
27
|
-
|
28
|
-
RESERVED_OPTIONS << :canvas
|
29
|
-
|
30
|
-
def link_to_new_canvas?
|
31
|
-
one_or_true @request.parameters["fb_sig_in_new_facebook"]
|
32
|
-
end
|
33
|
-
|
34
|
-
def link_to_canvas?(params, options)
|
35
|
-
option_override = options[:canvas]
|
36
|
-
return false if option_override == false # important to check for false. nil should use default behavior
|
37
|
-
option_override || (can_safely_access_request_parameters? && (one_or_true(@request.parameters["fb_sig_in_canvas"]) || one_or_true(@request.parameters[:fb_sig_in_canvas]) || one_or_true(@request.parameters["fb_sig_is_ajax"]) ))
|
38
|
-
end
|
39
|
-
|
40
|
-
#rails blindly tries to merge things that may be nil into the parameters. Make sure this won't break
|
41
|
-
def can_safely_access_request_parameters?
|
42
|
-
@request.request_parameters
|
43
|
-
end
|
44
|
-
|
45
|
-
def rewrite_url_with_facebooker(*args)
|
46
|
-
options = args.first.is_a?(Hash) ? args.first : args.last
|
47
|
-
is_link_to_canvas = link_to_canvas?(@request.request_parameters, options)
|
48
|
-
if is_link_to_canvas && !options.has_key?(:host)
|
49
|
-
options[:host] = Facebooker.canvas_server_base
|
50
|
-
end
|
51
|
-
options.delete(:canvas)
|
52
|
-
Facebooker.request_for_canvas(is_link_to_canvas) do
|
53
|
-
rewrite_url_without_facebooker(*args)
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
alias_method_chain :rewrite_url, :facebooker
|
58
|
-
|
59
|
-
end
|
60
|
-
end
|