lobby 0.0.26 → 0.0.27

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,7 @@ module Lobby
7
7
  if @user
8
8
  @user.confirm_signup!
9
9
  session[:user_id] = @user.id
10
- redirect_to root_url, flash: { success: t( '.flash.success' ) }
10
+ redirect_to :controller => "/home", :action => "index", flash: { success: t( '.flash.success' ) }
11
11
  else
12
12
  flash.now[:notice] = t( '.flash.error') if params[:token]
13
13
  end
@@ -7,7 +7,7 @@ module Lobby
7
7
  if @user
8
8
  @user.confirm_signup!
9
9
  session[:user_id] = @user.id
10
- redirect_to root_url, flash: { success: t( '.flash.success' ) }
10
+ redirect_to :controller => "/home", :action => "index", flash: { success: t( '.flash.success' ) }
11
11
  else
12
12
  flash.now[:notice] = t( '.flash.error') if params[:token]
13
13
  end
@@ -10,7 +10,7 @@ module Lobby
10
10
  if @user.active?
11
11
  session[:user_id] = @user.id
12
12
  flash.now[:success] = t( '.flash.success' )
13
- redirect_to root_url
13
+ redirect_to :controller => "/home", :action => "index"
14
14
  else
15
15
  flash.now[:danger] = t( '.flash.error.not_active' )
16
16
  redirect_to log_in_url
@@ -0,0 +1,33 @@
1
+ module Lobby
2
+ class SessionsController < ApplicationController
3
+ def new
4
+ end
5
+
6
+ def create
7
+ @user = User.where('email = ? OR username = ?', params[:email], params[:email]).first
8
+ if @user && @user.authenticate(params[:password])
9
+ if @user.confirmed?
10
+ if @user.active?
11
+ session[:user_id] = @user.id
12
+ flash.now[:success] = t( '.flash.success' )
13
+ redirect_to root_url
14
+ else
15
+ flash.now[:danger] = t( '.flash.error.not_active' )
16
+ redirect_to log_in_url
17
+ end
18
+ else
19
+ flash.now[:danger] = t( '.flash.error.not_confirmed' )
20
+ redirect_to confirm_url( :action => "registration" )
21
+ end
22
+ else
23
+ flash.now[:danger] = t( '.flash.error.wrong_password_or_email' )
24
+ render :new
25
+ end
26
+ end
27
+
28
+ def destroy
29
+ session[:user_id] = nil
30
+ redirect_to root_url, flash: {success: t( '.success' ) }
31
+ end
32
+ end
33
+ end
@@ -87,7 +87,7 @@ de:
87
87
  title: "Token"
88
88
  resend_signup_token_link: "oder den Token nochmal senden."
89
89
  flash:
90
- success: 'Deine Registrierung war erfolgreich. Nun kannst Du Dich einloggen.'
90
+ success: 'Deine Registrierung war erfolgreich und Du bist jetzt eingeloggt.'
91
91
  error: 'Deine Registrierung konnte nicht bestätigt werden. War der Link korrekt? Sollte Dein E-Mail-Programm den Bestätigungslink nicht richtig darstellen, so kannst Du den Aktivierungstoken auch unten in das Feld kopieren.'
92
92
  resend_signup_token:
93
93
  label_email: "E-Mail"
@@ -0,0 +1,154 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ de:
5
+ common:
6
+ button:
7
+ send: 'Abschicken'
8
+ form:
9
+ error: "Fehler"
10
+
11
+ activerecord:
12
+ errors:
13
+ full_messages:
14
+ format: "{{message}}"
15
+ messages:
16
+ confirmation: "Passwortwiederholung ist falsch."
17
+ models:
18
+ user:
19
+ attributes:
20
+ password:
21
+ blank: "Bitte gib ein Passwort ein."
22
+ too_short: "Passwort ist zu kurz."
23
+ password_confirmation:
24
+ blank: "Passwort bitte wiederholen."
25
+ email:
26
+ taken: 'Diese E-Mail ist schon im System.'
27
+ blank: "Bitte gib eine E-Mail an."
28
+ invalid: "Die E-Mail hat ein falsches Format."
29
+ password_digest:
30
+ blank: "Bitte gib ein Passwort ein."
31
+ username:
32
+ blank: "Bitte gib einen Username an."
33
+ taken: 'Dieser Username ist schon im System.'
34
+ activemodel:
35
+ errors:
36
+ models:
37
+ password_forgotten_form:
38
+ attributes:
39
+ new_password:
40
+ too_short: 'Das neue Passwort ist zu kurz (mind. 5 Zeichen)'
41
+ new_password_confirmation:
42
+ confirmation: 'Die Passwortbestätigung war falsch.'
43
+
44
+ lobby:
45
+
46
+ users:
47
+ new:
48
+ title: 'Registrieren'
49
+ label_email: 'E-Mail'
50
+ label_username: 'Username'
51
+ label_password: 'Passwort'
52
+ label_password_confirmation: 'Passwort wiederholen'
53
+ create:
54
+ success: "Um die Registrierung abzuschließen, klicke bitte auf den Link den wir Dir soeben geschickt haben."
55
+
56
+ sessions:
57
+ destroy:
58
+ success: "Du bis nun ausgeloggt. Bis zum nächsten Mal."
59
+ new:
60
+ title: 'Login'
61
+ label_email: 'E-Mail oder Username'
62
+ label_password: 'Passwort'
63
+ link_password_forgotten: 'Passwort vergessen?'
64
+ create:
65
+ flash:
66
+ success: "Du bist drin."
67
+ error:
68
+ not_active: "Dein Account wurde deaktiviert."
69
+ not_confirmed: "Bitte erst die Registrierung bestätigen."
70
+ wrong_password_or_email: "Falsche E-Mail und/oder Passwort"
71
+
72
+ info:
73
+ login_status:
74
+ logged_in:
75
+ message_html: "Du bist angemeldet als: %{email}. %{logout_link}"
76
+ link1: "Abmelden?"
77
+ logged_out:
78
+ message_html: "Sie sind nicht angemeldet. %{signin_link} or %{signup_link}"
79
+ link1: "Registrieren?"
80
+ link2: "Anmelden?"
81
+
82
+ confirmation:
83
+ new_email:
84
+ flash:
85
+ success: "Deine E-Mail-Adresse wurde geändert."
86
+ registration:
87
+ title: "Token"
88
+ resend_signup_token_link: "oder den Token nochmal senden."
89
+ flash:
90
+ success: 'Deine Registrierung war erfolgreich. Nun kannst Du Dich einloggen.'
91
+ error: 'Deine Registrierung konnte nicht bestätigt werden. War der Link korrekt? Sollte Dein E-Mail-Programm den Bestätigungslink nicht richtig darstellen, so kannst Du den Aktivierungstoken auch unten in das Feld kopieren.'
92
+ resend_signup_token:
93
+ label_email: "E-Mail"
94
+ label_password: "Passwort"
95
+ title: "Aktivierungstoken bitte nochmal zusenden"
96
+ flash:
97
+ success: "Der Aktivierungstoken wurde nochmal gesendet"
98
+ error: "Du bist schon freigeschaltet. Dieser Link ist nicht mehr gültig."
99
+
100
+ password_forgotten:
101
+ new:
102
+ title: "Neues Passwort erstellen"
103
+ label_new_password: "Neues Passwort"
104
+ label_new_password_confirmation: "Neues Passwort wiederholen"
105
+ flash:
106
+ success: "Dein Passwort wurde geändert. Du kannst Dich nun mit Deinem neuen Passwort einloggen."
107
+ create:
108
+ notice:
109
+ success: "Dein Passwort wurde geändert."
110
+ create:
111
+ notice:
112
+ success: "Das neue Password wurde erfolgreich angelegt."
113
+ recover_password_auth:
114
+ title: 'Jetzt neues Passwort erstellen'
115
+ label_token: 'Token'
116
+ order_new_password:
117
+ title: "Neues Passwort generieren"
118
+ label_email: "Deine registrierte E-Mail"
119
+ flash:
120
+ success: 'Bitte prüfe Deine E-Mails. Dort findest Du einen Link zum Setzen Deines Passwortes.'
121
+
122
+ confirmation_mailer:
123
+
124
+ registration:
125
+ subject: 'Bitte Anmeldung bestätigen'
126
+ body: "Hallo,
127
+ vielen Danke für die Registrierung bei XYZ. Um Deine Registrierung abzuschließen klicke bitte auf folgenden Link:
128
+
129
+ %{url}
130
+
131
+ Vielen Dank"
132
+
133
+
134
+ send_password_reset:
135
+ subject: 'Neues Passwort angefordert'
136
+ body: "Hallo,
137
+ dies ist eine automatisch generierte Nachricht von XYZ für Nutzer die ihre Zugangsdaten vergessen haben. Anbei erhälst Du,
138
+ wie angefordert, einen Link mit dem Du Dein Passwort neu setzen kannst:
139
+
140
+ %{url}
141
+
142
+ Vielen Dank"
143
+
144
+
145
+
146
+ resend_signup_token:
147
+ subject: 'Neuer Registrierungstoken'
148
+ body: "Hallo,
149
+ dies ist eine automatisch generierte Nachricht von XYZ für Nutzer die ihre Registrierungsmail verloren haben. Anbei erhälst Du,
150
+ wie angefordert, einen Link mit dem Du Deine Registrierung bestätigen kannst:
151
+
152
+ %{url}
153
+
154
+ Vielen Dank"
@@ -87,7 +87,7 @@ en:
87
87
  title: "Token"
88
88
  resend_signup_token_link: "or send token again."
89
89
  flash:
90
- success: 'Your registration was successful. Now you can login'
90
+ success: 'Your registration was successful and you are logged in now.'
91
91
  error: 'Your registration could not be confirmed. Was the link incorrect? If your email program does not properly represent the confirmation link, so you can copy it to the field activation token below.'
92
92
  resend_signup_token:
93
93
  label_email: "E-mail"
@@ -0,0 +1,145 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ common:
6
+ button:
7
+ send: 'send'
8
+ form:
9
+ error: "error"
10
+
11
+ activerecord:
12
+ errors:
13
+ full_messages:
14
+ format: "{{message}}"
15
+ messages:
16
+ confirmation: "Repeat Password is incorrect."
17
+ models:
18
+ user:
19
+ attributes:
20
+ password:
21
+ blank: "Please enter a password."
22
+ too_short: "Password is too short."
23
+ password_confirmation:
24
+ blank: "Please verify the password."
25
+ email:
26
+ taken: 'This e-mail is already in the system.'
27
+ blank: "Please enter an e-mail."
28
+ invalid: "The e-mail has an incorrect format."
29
+ password_digest:
30
+ blank: "Please enter a password"
31
+ username:
32
+ blank: "Please enter a user name."
33
+ taken: 'This username is already in the system.'
34
+ activemodel:
35
+ errors:
36
+ models:
37
+ password_forgotten_form:
38
+ attributes:
39
+ new_password:
40
+ too_short: 'The new password is too short (minimum 5 characters)'
41
+ new_password_confirmation:
42
+ confirmation: 'Incorrect password confirmation.'
43
+
44
+ lobby:
45
+
46
+ users:
47
+ new:
48
+ title: 'Register'
49
+ label_email: 'e-mail'
50
+ label_username: 'Username'
51
+ label_password: 'Password'
52
+ label_password_confirmation: 'Password confirmation'
53
+ create:
54
+ success: "To complete the registration please click on the link we've just sent you."
55
+
56
+ sessions:
57
+ destroy:
58
+ success: "You logged out. Bye."
59
+ new:
60
+ title: 'Login'
61
+ label_email: 'e-mail or username'
62
+ label_password: 'password'
63
+ link_password_forgotten: 'Forgot Password?'
64
+ create:
65
+ flash:
66
+ success: "You're in."
67
+ error:
68
+ not_active: "Your account has been disabled."
69
+ not_confirmed: "Please confirm the registration first."
70
+ wrong_password_or_email: "Incorrect email and / or password"
71
+
72
+ info:
73
+ login_status:
74
+ logged_in:
75
+ message_html: "You are logged in as: %{email}. %{logout_link}"
76
+ link1: "log off?"
77
+ logged_out:
78
+ message_html: "You are not logged in. %{signin_link} or %{signup_link}"
79
+ link1: "Sign up?"
80
+ link2: "Log in?"
81
+
82
+ confirmation:
83
+ new_email:
84
+ flash:
85
+ success: "Your e-mail was updated."
86
+ registration:
87
+ title: "Token"
88
+ resend_signup_token_link: "or send token again."
89
+ flash:
90
+ success: 'Your registration was successful. Now you can login'
91
+ error: 'Your registration could not be confirmed. Was the link incorrect? If your email program does not properly represent the confirmation link, so you can copy it to the field activation token below.'
92
+ resend_signup_token:
93
+ label_email: "E-mail"
94
+ label_password: "Password"
95
+ title: "Send activation token again"
96
+ flash:
97
+ success: "The activation token was again sent"
98
+ error: "You are already confirmed. This link is no longer valid."
99
+
100
+
101
+ password_forgotten:
102
+ create:
103
+ notice:
104
+ success: "New password created."
105
+ recover_password_auth:
106
+ title: 'Create new password'
107
+ label_token: 'Token'
108
+ order_new_password:
109
+ title: "Generate new password"
110
+ label_email: "Your registered e-mail"
111
+ flash:
112
+ success: 'Please check your e-mails. There you will find a link to set your password.'
113
+
114
+ confirmation_mailer:
115
+
116
+ registration:
117
+ subject: 'Please confirm registration'
118
+ body: "Hello,
119
+ many Thanks for registering with XYZ. To complete your registration please click on the following link:
120
+
121
+ %{url}
122
+
123
+ Thank you very much"
124
+
125
+
126
+ send_password_reset:
127
+ subject: 'Requested new password'
128
+ body: "Hello.
129
+ This is an automatically generated message from XYZ for users who have forgotten their login details. Enclosed you will receive,
130
+    as requested, a link with which you can generate your new password:
131
+
132
+ %{url}
133
+
134
+ Thank you very much"
135
+
136
+
137
+ resend_signup_token:
138
+ subject: 'New registration token'
139
+ body: "Hello.
140
+ This is an automatically generated message from XYZ for users who have lost their registration email. Enclosed you will receive,
141
+    as requested, a link with which you can confirm your registration:
142
+
143
+ %{url}
144
+
145
+ VThank you very much"
@@ -1,3 +1,3 @@
1
1
  module Lobby
2
- VERSION = "0.0.26"
2
+ VERSION = "0.0.27"
3
3
  end
@@ -1,3 +1,3 @@
1
1
  module Lobby
2
- VERSION = "0.0.25"
2
+ VERSION = "0.0.26"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lobby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.26
4
+ version: 0.0.27
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: 2014-03-19 00:00:00.000000000 Z
12
+ date: 2014-03-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -234,6 +234,7 @@ files:
234
234
  - app/controllers/lobby/application_controller.rb
235
235
  - app/controllers/lobby/confirmation_controller.rb
236
236
  - app/controllers/lobby/password_forgotten_controller.rb~
237
+ - app/controllers/lobby/sessions_controller.rb~
237
238
  - app/controllers/lobby/users_controller.rb
238
239
  - app/controllers/lobby/confirmation_controller.rb~
239
240
  - app/controllers/lobby/sessions_controller.rb
@@ -241,8 +242,10 @@ files:
241
242
  - app/helpers/lobby/application_helper.rb
242
243
  - app/models/lobby/password_forgotten_form_abstract.rb
243
244
  - config/locales/de.yml
245
+ - config/locales/en.yml~
244
246
  - config/locales/en.yml
245
247
  - config/locales/en.bootstrap.yml
248
+ - config/locales/de.yml~
246
249
  - config/routes.rb~
247
250
  - config/routes.rb
248
251
  - lib/lobby/engine.rb~