lobby 0.0.15 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. data/MIT-LICENSE +0 -0
  2. data/README.rdoc +0 -0
  3. data/Rakefile +0 -0
  4. data/app/assets/javascripts/lobby/application.js +0 -0
  5. data/app/assets/stylesheets/lobby/application.css +0 -0
  6. data/app/controllers/lobby/application_controller.rb +1 -1
  7. data/app/controllers/lobby/confirmation_controller.rb +0 -0
  8. data/app/controllers/lobby/password_forgotten_controller.rb +0 -0
  9. data/app/controllers/lobby/sessions_controller.rb +4 -4
  10. data/app/controllers/lobby/users_controller.rb +0 -0
  11. data/app/forms/lobby/password_forgotten_form.rb +0 -0
  12. data/app/helpers/lobby/application_helper.rb +0 -0
  13. data/app/mailers/lobby/confirmation_mailer.rb +4 -0
  14. data/app/models/lobby/auth_user.rb +0 -0
  15. data/app/models/lobby/authentication.rb +0 -0
  16. data/app/models/lobby/password_forgotten_form_abstract.rb +0 -0
  17. data/config/locales/de.yml +0 -0
  18. data/config/locales/en.bootstrap.yml +0 -0
  19. data/config/locales/en.yml +0 -0
  20. data/config/routes.rb +0 -0
  21. data/lib/generators/lobby/install_generator.rb +0 -0
  22. data/lib/generators/templates/config/config.yml +0 -0
  23. data/lib/generators/templates/config/initializers/action_mailer.rb +0 -0
  24. data/lib/generators/templates/config/initializers/constants.rb +0 -0
  25. data/lib/generators/templates/config/locales/de.yml +0 -0
  26. data/lib/generators/templates/config/locales/en.yml +0 -0
  27. data/lib/generators/templates/db/migrate/create_users.rb +0 -0
  28. data/lib/generators/templates/views/common/_form_errors.html.haml +0 -0
  29. data/lib/generators/templates/views/confirmation/new_email_token.html.haml +0 -0
  30. data/lib/generators/templates/views/confirmation/registration.html.haml +0 -0
  31. data/lib/generators/templates/views/confirmation/resend_signup_token.html.haml +0 -0
  32. data/lib/generators/templates/views/confirmation_mailer/new_email_request.text.haml +0 -0
  33. data/lib/generators/templates/views/confirmation_mailer/registration.text.haml +0 -0
  34. data/lib/generators/templates/views/confirmation_mailer/resend_signup_token.text.haml +0 -0
  35. data/lib/generators/templates/views/confirmation_mailer/send_password_reset.text.haml +0 -0
  36. data/lib/generators/templates/views/password_forgotten/new.html.haml +0 -0
  37. data/lib/generators/templates/views/password_forgotten/order_new_password.html.haml +0 -0
  38. data/lib/generators/templates/views/password_forgotten/recover_password_auth.html.haml +0 -0
  39. data/lib/generators/templates/views/sessions/new.html.haml +0 -0
  40. data/lib/generators/templates/views/users/new.html.haml +0 -0
  41. data/lib/lobby.rb +0 -8
  42. data/lib/lobby.rb~ +0 -7
  43. data/lib/lobby/engine.rb +1 -1
  44. data/lib/lobby/version.rb +1 -1
  45. data/lib/lobby/version.rb~ +1 -1
  46. data/lib/tasks/lobby_tasks.rake +0 -0
  47. metadata +1 -7
  48. data/app/controllers/lobby/application_controller.rb~ +0 -3
  49. data/app/controllers/lobby/sessions_controller.rb~ +0 -33
  50. data/app/mailers/lobby/confirmation_mailer.rb~ +0 -28
  51. data/config/locales/de.yml~ +0 -146
  52. data/config/locales/en.yml~ +0 -142
  53. data/lib/lobby/engine.rb~ +0 -13
data/MIT-LICENSE CHANGED
File without changes
data/README.rdoc CHANGED
File without changes
data/Rakefile CHANGED
File without changes
File without changes
File without changes
@@ -1,3 +1,3 @@
1
- class Lobby::ApplicationController < ActionController::Base
1
+ class Lobby::ApplicationController < ApplicationController
2
2
 
3
3
  end
File without changes
@@ -10,14 +10,14 @@ 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_path
13
+ redirect_to root_url
14
14
  else
15
15
  flash.now[:danger] = t( '.flash.error.not_active' )
16
- redirect_to log_in_path
16
+ redirect_to log_in_url
17
17
  end
18
18
  else
19
19
  flash.now[:danger] = t( '.flash.error.not_confirmed' )
20
- redirect_to confirm_path( :action => "registration" )
20
+ redirect_to confirm_url( :action => "registration" )
21
21
  end
22
22
  else
23
23
  flash.now[:danger] = t( '.flash.error.wrong_password_or_email' )
@@ -27,7 +27,7 @@ module Lobby
27
27
 
28
28
  def destroy
29
29
  session[:user_id] = nil
30
- redirect_to root_path, flash: {success: t( '.success' ) }
30
+ redirect_to root_url, flash: {success: t( '.success' ) }
31
31
  end
32
32
  end
33
33
  end
File without changes
File without changes
File without changes
@@ -1,6 +1,10 @@
1
1
  module Lobby
2
2
  class ConfirmationMailer < ActionMailer::Base
3
3
 
4
+ helper :application
5
+
6
+ default :from => APP_CONFIG['registration_mailer']['from']
7
+
4
8
  def registration( user )
5
9
  @confirmation_url = confirm_url( :registration, user.signup_token )
6
10
  mail( :to => user.email, :subject => t( '.subject' ))
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/config/routes.rb CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/lib/lobby.rb CHANGED
@@ -2,12 +2,4 @@ module Lobby
2
2
  require "lobby/engine"
3
3
  require File.expand_path('../../app/models/lobby/authentication', __FILE__)
4
4
  require File.expand_path('../../app/models/lobby/auth_user', __FILE__)
5
- require File.expand_path('../../app/models/lobby/password_forgotten_form_abstract', __FILE__)
6
- require File.expand_path('../../app/mailers/lobby/confirmation_mailer', __FILE__)
7
- require File.expand_path('../../app/forms/lobby/password_forgotten_form', __FILE__)
8
- require File.expand_path('../../app/controllers/lobby/application_controller', __FILE__)
9
- require File.expand_path('../../app/controllers/lobby/confirmation_controller', __FILE__)
10
- require File.expand_path('../../app/controllers/lobby/password_forgotten_controller', __FILE__)
11
- require File.expand_path('../../app/controllers/lobby/sessions_controller', __FILE__)
12
- require File.expand_path('../../app/controllers/lobby/users_controller', __FILE__)
13
5
  end
data/lib/lobby.rb~ CHANGED
@@ -2,11 +2,4 @@ module Lobby
2
2
  require "lobby/engine"
3
3
  require File.expand_path('../../app/models/lobby/authentication', __FILE__)
4
4
  require File.expand_path('../../app/models/lobby/auth_user', __FILE__)
5
- require File.expand_path('../../app/models/lobby/password_forgotten_form_abstract', __FILE__)
6
- require File.expand_path('../../app/mailers/lobby/confirmation_mailer', __FILE__)
7
- require File.expand_path('../../app/forms/lobby/password_forgotten_form', __FILE__)
8
- require File.expand_path('../../app/controllers/lobby/confirmation_controller', __FILE__)
9
- require File.expand_path('../../app/controllers/lobby/password_forgotten_controller', __FILE__)
10
- require File.expand_path('../../app/controllers/lobby/sessions_controller', __FILE__)
11
- require File.expand_path('../../app/controllers/lobby/users_controller', __FILE__)
12
5
  end
data/lib/lobby/engine.rb CHANGED
@@ -8,6 +8,6 @@ module Lobby
8
8
  g.fixture_replacement :factory_girl, :dir => 'spec/factories'
9
9
  end
10
10
 
11
- config.autoload_paths += Dir["#{config.root}/lib"]
11
+ config.autoload_paths += Dir["#{config.root}/lib/**/"]
12
12
  end
13
13
  end
data/lib/lobby/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lobby
2
- VERSION = "0.0.15"
2
+ VERSION = "0.0.16"
3
3
  end
@@ -1,3 +1,3 @@
1
1
  module Lobby
2
- VERSION = "0.0.14"
2
+ VERSION = "0.0.6"
3
3
  end
File without changes
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.15
4
+ version: 0.0.16
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -228,27 +228,21 @@ extra_rdoc_files: []
228
228
  files:
229
229
  - app/forms/lobby/password_forgotten_form.rb
230
230
  - app/mailers/lobby/confirmation_mailer.rb
231
- - app/mailers/lobby/confirmation_mailer.rb~
232
231
  - app/assets/stylesheets/lobby/application.css
233
232
  - app/assets/javascripts/lobby/application.js
234
233
  - app/controllers/lobby/application_controller.rb
235
234
  - app/controllers/lobby/confirmation_controller.rb
236
- - app/controllers/lobby/sessions_controller.rb~
237
235
  - app/controllers/lobby/users_controller.rb
238
236
  - app/controllers/lobby/sessions_controller.rb
239
- - app/controllers/lobby/application_controller.rb~
240
237
  - app/controllers/lobby/password_forgotten_controller.rb
241
238
  - app/helpers/lobby/application_helper.rb
242
239
  - app/models/lobby/auth_user.rb
243
240
  - app/models/lobby/authentication.rb
244
241
  - app/models/lobby/password_forgotten_form_abstract.rb
245
242
  - config/locales/de.yml
246
- - config/locales/en.yml~
247
243
  - config/locales/en.yml
248
244
  - config/locales/en.bootstrap.yml
249
- - config/locales/de.yml~
250
245
  - config/routes.rb
251
- - lib/lobby/engine.rb~
252
246
  - lib/lobby/engine.rb
253
247
  - lib/lobby/version.rb
254
248
  - lib/lobby/version.rb~
@@ -1,3 +0,0 @@
1
- class Lobby::ApplicationController < ApplicationController
2
-
3
- end
@@ -1,33 +0,0 @@
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 main_app.root_url, flash: {success: t( '.success' ) }
31
- end
32
- end
33
- end
@@ -1,28 +0,0 @@
1
- module Lobby
2
- class ConfirmationMailer < ActionMailer::Base
3
-
4
- default :from => APP_CONFIG['registration_mailer']['from']
5
-
6
- def registration( user )
7
- @confirmation_url = confirm_url( :registration, user.signup_token )
8
- mail( :to => user.email, :subject => t( '.subject' ))
9
- end
10
-
11
- def resend_signup_token( user )
12
- @user = user
13
- @confirmation_url = confirm_url( :registration, @user.signup_token )
14
- mail( :to => user.email, :subject => t( '.subject' ))
15
- end
16
-
17
- def send_password_reset( user )
18
- @confirmation_url = recover_password_form_url( :token => user.password_token )
19
- mail( :to => user.email, :subject => t( '.subject' ))
20
- end
21
-
22
- def new_email_request( user )
23
- @user = user
24
- @confirmation_url = new_email_url( @user.new_email_token )
25
- mail( :to => @user.new_email, :subject => t( '.subject' ))
26
- end
27
- end
28
- end
@@ -1,146 +0,0 @@
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
-
101
- password_forgotten:
102
- create:
103
- notice:
104
- success: "Das neue Password wurde erfolgreich angelegt."
105
- recover_password_auth:
106
- title: 'Jetzt neues Passwort erstellen'
107
- label_token: 'Token'
108
- order_new_password:
109
- title: "Neues Passwort generieren"
110
- label_email: "Deine registrierte E-Mail"
111
- flash:
112
- success: 'Bitte prüfe Deine E-Mails. Dort findest Du einen Link zum Setzen Deines Passwortes.'
113
-
114
- confirmation_mailer:
115
-
116
- registration:
117
- subject: 'Bitte Anmeldung bestätigen'
118
- body: "Hallo,
119
- vielen Danke für die Registrierung bei XYZ. Um Deine Registrierung abzuschließen klicke bitte auf folgenden Link:
120
-
121
- %{url}
122
-
123
- Vielen Dank"
124
-
125
-
126
- send_password_reset:
127
- subject: 'Neues Passwort angefordert'
128
- body: "Hallo,
129
- dies ist eine automatisch generierte Nachricht von XYZ für Nutzer die ihre Zugangsdaten vergessen haben. Anbei erhälst Du,
130
- wie angefordert, einen Link mit dem Du Dein Passwort neu setzen kannst:
131
-
132
- %{url}
133
-
134
- Vielen Dank"
135
-
136
-
137
-
138
- resend_signup_token:
139
- subject: 'Neuer Registrierungstoken'
140
- body: "Hallo,
141
- dies ist eine automatisch generierte Nachricht von XYZ für Nutzer die ihre Registrierungsmail verloren haben. Anbei erhälst Du,
142
- wie angefordert, einen Link mit dem Du Deine Registrierung bestätigen kannst:
143
-
144
- %{url}
145
-
146
- Vielen Dank"
@@ -1,142 +0,0 @@
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
- recover_password_auth:
103
- title: 'Create new password'
104
- label_token: 'Token'
105
- order_new_password:
106
- title: "Generate new password"
107
- label_email: "Your registered e-mail"
108
- flash:
109
- success: 'Please check your e-mails. There you will find a link to set your password.'
110
-
111
- confirmation_mailer:
112
-
113
- registration:
114
- subject: 'Please confirm registration'
115
- body: "Hello,
116
- many Thanks for registering with XYZ. To complete your registration please click on the following link:
117
-
118
- %{url}
119
-
120
- Thank you very much"
121
-
122
-
123
- send_password_reset:
124
- subject: 'Requested new password'
125
- body: "Hello.
126
- This is an automatically generated message from XYZ for users who have forgotten their login details. Enclosed you will receive,
127
-    as requested, a link with which you can generate your new password:
128
-
129
- %{url}
130
-
131
- Thank you very much"
132
-
133
-
134
- resend_signup_token:
135
- subject: 'New registration token'
136
- body: "Hello.
137
- This is an automatically generated message from XYZ for users who have lost their registration email. Enclosed you will receive,
138
-    as requested, a link with which you can confirm your registration:
139
-
140
- %{url}
141
-
142
- VThank you very much"
data/lib/lobby/engine.rb~ DELETED
@@ -1,13 +0,0 @@
1
- module Lobby
2
- class Engine < ::Rails::Engine
3
- isolate_namespace Lobby
4
-
5
- config.generators do |g|
6
- g.test_framework :rspec, :view_specs => false
7
- g.integration_tool :rspec
8
- g.fixture_replacement :factory_girl, :dir => 'spec/factories'
9
- end
10
-
11
- config.autoload_paths += Dir["#{config.root}/lib/**/"]
12
- end
13
- end