dailycred 0.1.31 → 0.1.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,13 +12,11 @@ class SessionsController < ApplicationController
12
12
  #GET /logout
13
13
  def destroy
14
14
  session[:user_id] = nil
15
- redirect_to_auth
15
+ redirect_to_unauth
16
16
  end
17
17
 
18
- def failure
19
- conf = Rails.configuration.DAILYCRED_OPTIONS
20
- path = !conf[:after_unauth].nil? ? conf[:after_unauth] : dailycred_engine.auth_info_path
21
- redirect_to path, notice: params[:message]
18
+ def failure login
19
+ redirect_to_unauth, notice: params[:message]
22
20
  end
23
21
 
24
22
  def info
data/dailycred.gemspec CHANGED
@@ -15,5 +15,5 @@ Gem::Specification.new do |gem|
15
15
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
16
16
  gem.name = "dailycred"
17
17
  gem.require_paths = ["lib"]
18
- gem.version = "0.1.31"
18
+ gem.version = "0.1.32"
19
19
  end
@@ -5,7 +5,7 @@ module Dailycred
5
5
  # example:
6
6
  # before_filter :authenticate
7
7
  def authenticate
8
- redirect_to_auth unless current_user
8
+ redirect_to_unauth unless current_user
9
9
  end
10
10
 
11
11
  # helper method for getting an instance of dailycred
@@ -34,6 +34,12 @@ module Dailycred
34
34
  redirect_to path, opts
35
35
  end
36
36
 
37
+ def redirect_to_unauth opts = {}
38
+ conf = Rails.configuration.DAILYCRED_OPTIONS
39
+ path = !conf[:after_unauth].nil? ? conf[:after_unauth] : dailycred_engine.auth_info_path
40
+ redirect_to path, opts
41
+ end
42
+
37
43
 
38
44
  ActiveSupport.on_load(:action_controller) do
39
45
  helper_method :current_user, :login_path, :set_state, :dailycred, :authenticate
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dailycred
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.31
4
+ version: 0.1.32
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: