buddy 2.0.8 → 2.0.9
Sign up to get free protection for your applications and to get access to all the features.
data/lib/buddy/middleware.rb
CHANGED
@@ -62,7 +62,7 @@ module Buddy
|
|
62
62
|
end
|
63
63
|
|
64
64
|
signed_params = Yajl::Parser.new.parse(base64_url_decode(signed_params))
|
65
|
-
|
65
|
+
env['rack.request.form_hash'].merge!({'fb' => signed_params})
|
66
66
|
set_session(signed_params)
|
67
67
|
elsif @request.cookies["fbs_#{Buddy.current_config['app_id']}"]
|
68
68
|
payload = @request.cookies["fbs_#{Buddy.current_config['app_id']}"].chomp('"')
|
@@ -1,15 +1,16 @@
|
|
1
1
|
module Buddy
|
2
|
-
module
|
3
|
-
module
|
4
|
-
def url_for(options =
|
5
|
-
|
6
|
-
options.merge!({ :only_path => true }) if options.is_a?(Hash) &&
|
2
|
+
module Helpers
|
3
|
+
module UrlFor
|
4
|
+
def url_for(options = nil)
|
5
|
+
canvas = options.is_a?(Hash) && options.delete(:canvas)
|
6
|
+
options.merge!({ :only_path => true }) if options.is_a?(Hash) && canvas != false
|
7
7
|
|
8
8
|
url = super(options)
|
9
9
|
|
10
10
|
if url[0..6] == 'http://' or url[0..7] == 'https://'
|
11
11
|
url
|
12
|
-
elsif options.is_a?(Hash) &&
|
12
|
+
elsif options.is_a?(Hash) && canvas == false
|
13
|
+
only_path = options[:only_path] || false
|
13
14
|
base = only_path ? '' : Buddy.current_config["callback_url"]
|
14
15
|
base + url
|
15
16
|
else
|
data/lib/buddy/railtie.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'buddy'
|
2
|
-
require 'buddy/rails/
|
2
|
+
require 'buddy/rails/helpers'
|
3
3
|
require 'rails'
|
4
4
|
|
5
5
|
module Buddy
|
@@ -8,9 +8,14 @@ module Buddy
|
|
8
8
|
app.config.middleware.swap(::Rails::Rack::Logger, Buddy::Middleware::Logger)
|
9
9
|
app.config.middleware.insert_before(Buddy::Middleware::Logger, Buddy::Middleware::MethodOverride)
|
10
10
|
app.config.middleware.insert_before(ActionDispatch::ParamsParser, Buddy::Middleware::ParamsParser)
|
11
|
+
end
|
11
12
|
|
12
|
-
|
13
|
+
initializer "buddy.configure_logger", :after => :initialize_logger do |app|
|
13
14
|
Buddy.logger = ::Rails.logger
|
14
15
|
end
|
16
|
+
|
17
|
+
ActionView::Helpers::UrlHelper.send(:include, Buddy::Helpers::UrlFor)
|
18
|
+
ActionController::Base.send(:include, Buddy::Helpers::UrlFor)
|
19
|
+
ActionController::Base.send(:include, Buddy::Rails::Controller)
|
15
20
|
end
|
16
21
|
end
|
data/lib/buddy/version.rb
CHANGED
data/lib/buddy.rb
CHANGED
@@ -44,11 +44,9 @@ end
|
|
44
44
|
buddy_config = File.join(Bundler.root, "config", "buddy.yml")
|
45
45
|
|
46
46
|
BUDDY = Buddy.load_configuration(buddy_config)
|
47
|
-
Buddy.logger = Rails.logger
|
48
47
|
Buddy.rest_api_client = Buddy::Service::RestApiClient.new
|
49
48
|
|
50
|
-
require 'buddy/rails/
|
49
|
+
require 'buddy/rails/helpers'
|
51
50
|
require 'buddy/rails/controller'
|
52
|
-
require 'buddy/rails/controller_extensions'
|
53
51
|
|
54
52
|
require 'buddy/railtie'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: buddy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-10-
|
12
|
+
date: 2011-10-05 00:00:00.000000000Z
|
13
13
|
dependencies: []
|
14
14
|
description: Facebook library focusing on getting the work done.
|
15
15
|
email:
|
@@ -27,8 +27,7 @@ files:
|
|
27
27
|
- lib/buddy.rb
|
28
28
|
- lib/buddy/middleware.rb
|
29
29
|
- lib/buddy/rails/controller.rb
|
30
|
-
- lib/buddy/rails/
|
31
|
-
- lib/buddy/rails/url_helper.rb
|
30
|
+
- lib/buddy/rails/helpers.rb
|
32
31
|
- lib/buddy/railtie.rb
|
33
32
|
- lib/buddy/service.rb
|
34
33
|
- lib/buddy/session.rb
|