muck-users 3.2.13 → 3.2.14

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.2.13
1
+ 3.2.14
@@ -22,18 +22,22 @@ class Muck::UserSessionsController < ApplicationController
22
22
  end
23
23
 
24
24
  def create
25
- @title = t('muck.users.sign_in_title')
25
+ @title = t('muck.users.sign_in_title')
26
26
  @user_session = UserSession.new(params[:user_session])
27
+ before_create_user_session
27
28
  @user_session.save do |result|
29
+ after_create_user_session(result)
28
30
  after_create_response(result)
29
31
  end
30
32
  end
31
33
 
32
34
  def destroy
33
35
  @title = t('muck.users.sign_out_title')
36
+ before_destroy_user_session
34
37
  current_user.reset_single_access_token! if params[:reset_api_key]
35
38
  current_user_session.destroy
36
39
  flash[:notice] = t('muck.users.login_out_success')
40
+ after_destroy_user_session
37
41
  respond_to do |format|
38
42
  format.html { redirect_to logout_complete_path }
39
43
  format.json { render :json => { :logged_in => false, :message => t('muck.users.login_out_success') } }
@@ -46,6 +50,23 @@ class Muck::UserSessionsController < ApplicationController
46
50
 
47
51
  protected
48
52
 
53
+ # Override to act on @user_session before it is created
54
+ def before_create_user_session
55
+ end
56
+
57
+ # Override to act on @user_session after it is created
58
+ # success indicates whether or not the user was successfully created
59
+ def after_create_user_session(success)
60
+ end
61
+
62
+ # Override to act on @user_session before it is destroyed
63
+ def before_destroy_user_session
64
+ end
65
+
66
+ # Override to act on @user_session after it is destroyed
67
+ def after_destroy_user_session
68
+ end
69
+
49
70
  def after_create_response(success)
50
71
  if success
51
72
  respond_to do |format|
data/muck-users.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "muck-users"
8
- s.version = "3.2.13"
8
+ s.version = "3.2.14"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin Ball", "Joel Duffin"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muck-users
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 2
9
- - 13
10
- version: 3.2.13
9
+ - 14
10
+ version: 3.2.14
11
11
  platform: ruby
12
12
  authors:
13
13
  - Justin Ball