Sha256: 6e0611cdc5e4860d5af38bb707749aa71886e4b77a5f4f1ca428b4bf5bcbf4f6
Contents?: true
Size: 1.39 KB
Versions: 2
Compression:
Stored size: 1.39 KB
Contents
#make sure we're running inside Merb require 'merb_facebooker/controller' require 'merb_facebooker/helpers' if defined?(Merb::Plugins) dependency "facebooker" dependency "merb-helpers" # Merb gives you a Merb::Plugins.config hash...feel free to put your stuff in your piece of it facebook_config = "#{Merb.root}/config/facebooker.yml" if File.exist?(facebook_config) Merb::Plugins.config[:merb_facebooker] = YAML.load_file(facebook_config)[Merb.environment] ENV['FACEBOOK_API_KEY'] = Merb::Plugins.config[:merb_facebooker]['api_key'] ENV['FACEBOOK_SECRET_KEY'] = Merb::Plugins.config[:merb_facebooker]['secret_key'] ENV['FACEBOOKER_RELATIVE_URL_ROOT'] = Merb::Plugins.config[:merb_facebooker]['canvas_page_name'] #ActionController::Base.asset_host = FACEBOOKER['callback_url'] end Merb.add_mime_type(:fbml, :to_fbml, %w[application/fbml text/fbml], :Encoding => "UTF-8") Merb::Request.http_method_overrides.push( proc { |c| c.params[:fb_sig_request_method] } ) Merb::BootLoader.before_app_loads do Merb::Controller.send(:include, Facebooker::Merb::Controller) Merb::Controller.send(:include, Facebooker::Merb::Helpers) # require code that must be loaded before the application end Merb::BootLoader.after_app_loads do # code that can be required after the application loads end Merb::Plugins.add_rakefiles "merb_facebooker/merbtasks" end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rpbertp13-merb_facebooker-0.0.2.3 | lib/merb_facebooker.rb |
rpbertp13-merb_facebooker-0.0.2.4 | lib/merb_facebooker.rb |