facepalm 0.1.0 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "facepalm"
8
- s.version = "0.1.0"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Aleksey V. Dmitriev"]
12
- s.date = "2011-12-28"
12
+ s.date = "2012-01-04"
13
13
  s.email = "rene.dekart@gmail.com"
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE",
@@ -22,6 +22,8 @@ module Facepalm
22
22
  end
23
23
  end
24
24
 
25
+ protected
26
+
25
27
  # Accessor to current application config. Override it in your controller
26
28
  # if you need multi-application support or per-request configuration selection.
27
29
  def facepalm
@@ -43,6 +43,8 @@ module Facepalm
43
43
  end
44
44
  end
45
45
 
46
+ protected
47
+
46
48
  # Requires a given set of permissions in context of the current action.
47
49
  # Use it to require permissions in a single action or custom filter.
48
50
  #
@@ -2,11 +2,19 @@ module Facepalm
2
2
  module Rails
3
3
  module Controller
4
4
  module Redirects
5
+ def self.included(base)
6
+ base.class_eval do
7
+ alias_method_chain :redirect_to, :signed_request
8
+ end
9
+ end
10
+
11
+ protected
12
+
5
13
  # Overrides ActionController::Base#redirect_to to pass signed_request in flash[]
6
- def redirect_to(*args)
14
+ def redirect_to_with_signed_request(*args)
7
15
  flash[:signed_request] = fb_signed_request
8
16
 
9
- super(*args)
17
+ redirect_to_without_signed_request(*args)
10
18
  end
11
19
 
12
20
  # Redirects user to a definite URL with JavaScript code that overwrites
@@ -10,6 +10,8 @@ module Facepalm
10
10
  end
11
11
  end
12
12
 
13
+ protected
14
+
13
15
  # A helper to generate an URL of the application canvas page URL
14
16
  #
15
17
  # @param protocol A request protocol, should be either 'http://' or 'https://'.
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: facepalm
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 1
9
- - 0
10
- version: 0.1.0
8
+ - 2
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Aleksey V. Dmitriev
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-12-28 00:00:00 Z
18
+ date: 2012-01-04 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  requirement: &id001 !ruby/object:Gem::Requirement