exvo-auth 0.2.1 → 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.2.1
1
+ 0.2.2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{exvo-auth}
8
- s.version = "0.2.1"
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 = ["Jacek Becela"]
12
- s.date = %q{2010-06-28}
12
+ s.date = %q{2010-06-29}
13
13
  s.description = %q{Sign in with Exvo account}
14
14
  s.email = %q{jacek.becela@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -1,36 +1,17 @@
1
1
  module ExvoAuth::PathHelpers
2
2
  def self.included(base)
3
3
  if base.respond_to?(:helper_method)
4
- base.helper_method :interactive_sign_in_path, :non_interactive_sign_in_path,
5
- :auth_sign_out_url, :auth_sign_in_url, :auth_sign_up_url
4
+ base.helper_method :auth_sign_out_url, :auth_sign_in_path
6
5
  end
7
6
  end
8
-
9
- def interactive_sign_in_path(params = {})
10
- path_with_query("/auth/interactive", params)
11
- end
12
-
13
- def non_interactive_sign_in_path(params = {})
14
- path_with_query("/auth/non_interactive", params)
15
- end
16
-
7
+
17
8
  # Redirect users after logout there
18
9
  def auth_sign_out_url
19
10
  ExvoAuth::Config.host + "/users/sign_out"
20
11
  end
21
12
 
22
- def auth_sign_in_url
23
- ExvoAuth::Config.host + "/users/sign_in"
24
- end
25
-
26
- def auth_sign_up_url
27
- ExvoAuth::Config.host + "/users/sign_up"
28
- end
29
-
30
- private
31
-
32
- def path_with_query(path, params = {})
33
- query = Rack::Utils.build_query(params)
34
- query.empty? ? path : "#{path}?#{query}"
13
+ # Redirect users to sign in / sign up
14
+ def auth_sign_in_path
15
+ "/auth/interactive"
35
16
  end
36
17
  end
@@ -37,4 +37,19 @@ module ExvoAuth::Rails::ControllerHelpers
37
37
  def stored_location
38
38
  session.delete(:return_to)
39
39
  end
40
+
41
+ private
42
+
43
+ def interactive_sign_in_path(params = {})
44
+ path_with_query("/auth/interactive", params)
45
+ end
46
+
47
+ def non_interactive_sign_in_path(params = {})
48
+ path_with_query("/auth/non_interactive", params)
49
+ end
50
+
51
+ def path_with_query(path, params = {})
52
+ query = Rack::Utils.build_query(params)
53
+ query.empty? ? path : "#{path}?#{query}"
54
+ end
40
55
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 1
9
- version: 0.2.1
8
+ - 2
9
+ version: 0.2.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jacek Becela
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-06-28 00:00:00 +02:00
17
+ date: 2010-06-29 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency