Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge commit 'mmangino/master'

  • Loading branch information...
commit d4f24b9431e283188a8866cfb3d8148cdbe83adf 2 parents 7743ddb + 5b6ad81
Erik Ogan authored
View
8 lib/facebooker/attachment.rb
@@ -42,6 +42,14 @@ def add_flash(swfsource, imgsource, width=nil, height=nil, expanded_width=nil, e
params[:expanded_height] = expanded_height unless expanded_height.nil?
add_media(params)
end
+
+
+ def add_property(key, value)
+ @storage[:properties] ||= {}
+ @storage[:properties][key] = value
+ end
+
+
def to_hash
@storage
View
4 lib/facebooker/rails/facebook_url_rewriting.rb
@@ -31,7 +31,7 @@ def link_to_new_canvas?
one_or_true @request.parameters["fb_sig_in_new_facebook"]
end
- def link_to_canvas?(params, options)
+ def link_to_canvas?(options)
option_override = options[:canvas]
return false if option_override == false # important to check for false. nil should use default behavior
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"]) ))
@@ -44,7 +44,7 @@ def can_safely_access_request_parameters?
def rewrite_url_with_facebooker(*args)
options = args.first.is_a?(Hash) ? args.first : args.last
- is_link_to_canvas = @request.env["REQUEST_METHOD"] == "POST" && link_to_canvas?(@request.request_parameters, options)
+ is_link_to_canvas = link_to_canvas?(options)
if is_link_to_canvas && !options.has_key?(:host)
options[:host] = Facebooker.canvas_server_base
end
View
2  lib/facebooker/version.rb
@@ -2,7 +2,7 @@ module Facebooker #:nodoc:
module VERSION #:nodoc:
MAJOR = 1
MINOR = 0
- TINY = 71
+ TINY = 74
STRING = [MAJOR, MINOR, TINY].join('.')
end
View
4 lib/tasks/facebooker.rake
@@ -6,8 +6,8 @@ namespace :facebooker do
task :setup => :environment do
facebook_config = File.join(RAILS_ROOT,"config","facebooker.yml")
unless File.exist?(facebook_config)
- plugin_root = File.join(RAILS_ROOT,"vendor","plugins")
- facebook_config_tpl = File.join(plugin_root,"facebooker","generators","facebook","templates","config","facebooker.yml")
+ facebooker_root = File.expand_path(File.join(File.dirname(__FILE__),"..",".."))
+ facebook_config_tpl = File.join(facebooker_root,"generators","facebook","templates","config","facebooker.yml")
FileUtils.cp facebook_config_tpl, facebook_config
puts "Ensure 'GatewayPorts yes' is enabled in the remote development server's sshd config when using any of the facebooker:tunnel:*' rake tasks"
puts "Configuration created in #{RAILS_ROOT}/config/facebooker.yml"
View
2  test/test_helper.rb
@@ -11,7 +11,7 @@
require 'multi_rails_init'
rescue LoadError
# multi rails not installed, test against newest supported version of Rails
- gem 'rails', '2.3.8'
+ gem 'rails', (ENV['RAILS_VERSION'] || '2.3.8')
end
require 'active_support'
require 'flexmock/test_unit'
Please sign in to comment.
Something went wrong with that request. Please try again.