innetra-easy_authentication 2.0.0 → 2.0.1

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/Manifest CHANGED
@@ -1,3 +1,4 @@
1
+ easy_authentication.gemspec
1
2
  Manifest
2
3
  generators/easy_authentication/templates/stylesheets/users.css
3
4
  generators/easy_authentication/templates/stylesheets/login.css
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('easy_authentication', '2.0.0') do |e|
5
+ Echoe.new('easy_authentication', '2.0.1') do |e|
6
6
  e.description = "Easy Role Authentication for Ruby on Rails 2.2 (i18n)"
7
7
  e.url = "http://github.com/innetra/easy_authentication"
8
8
  e.author = "Ivan Torres"
@@ -2,15 +2,15 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{easy_authentication}
5
- s.version = "2.0.0"
5
+ s.version = "2.0.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Ivan Torres"]
9
- s.date = %q{2009-01-23}
9
+ s.date = %q{2009-01-27}
10
10
  s.description = %q{Easy Role Authentication for Ruby on Rails 2.2 (i18n)}
11
11
  s.email = %q{mexpolk@gmail.com}
12
12
  s.extra_rdoc_files = ["lib/user_methods.rb", "lib/easy_authentication.rb", "lib/password_authentication.rb", "lib/helper_methods.rb", "lib/controller_methods.rb", "lib/cookie_authentication.rb"]
13
- s.files = ["Manifest", "generators/easy_authentication/templates/stylesheets/users.css", "generators/easy_authentication/templates/stylesheets/login.css", "generators/easy_authentication/templates/stylesheets/roles.css", "generators/easy_authentication/templates/stylesheets/default.css", "generators/easy_authentication/templates/helpers/shadowbox_helper.rb", "generators/easy_authentication/templates/helpers/form_helper.rb", "generators/easy_authentication/templates/migrations/easy_authentication.rb", "generators/easy_authentication/templates/tasks/sysadmin.rake", "generators/easy_authentication/templates/tasks/rights.rake", "generators/easy_authentication/templates/views/user_roles/edit.html.erb", "generators/easy_authentication/templates/views/user_password/edit.html.erb", "generators/easy_authentication/templates/views/user_password/reset_password.html.erb", "generators/easy_authentication/templates/views/user_password/forgot_password.html.erb", "generators/easy_authentication/templates/views/sessions/new.html.erb", "generators/easy_authentication/templates/views/users/index.html.erb", "generators/easy_authentication/templates/views/users/show.html.erb", "generators/easy_authentication/templates/views/users/_user.html.erb", "generators/easy_authentication/templates/views/users/edit.html.erb", "generators/easy_authentication/templates/views/users/new.html.erb", "generators/easy_authentication/templates/views/users/_form.html.erb", "generators/easy_authentication/templates/views/roles/index.html.erb", "generators/easy_authentication/templates/views/roles/show.html.erb", "generators/easy_authentication/templates/views/roles/edit.html.erb", "generators/easy_authentication/templates/views/roles/new.html.erb", "generators/easy_authentication/templates/views/roles/_form.html.erb", "generators/easy_authentication/templates/site_keys.rb", "generators/easy_authentication/templates/models/user_mailer.rb", "generators/easy_authentication/templates/models/right.rb", "generators/easy_authentication/templates/models/user.rb", "generators/easy_authentication/templates/models/role.rb", "generators/easy_authentication/templates/controllers/user_roles_controller.rb", "generators/easy_authentication/templates/controllers/sessions_controller.rb", "generators/easy_authentication/templates/controllers/roles_controller.rb", "generators/easy_authentication/templates/controllers/user_password_controller.rb", "generators/easy_authentication/templates/controllers/users_controller.rb", "generators/easy_authentication/templates/locales/en.easy_authentication.yml", "generators/easy_authentication/templates/locales/es-MX.easy_authentication.yml", "generators/easy_authentication/templates/layouts/easy_authentication_login.erb", "generators/easy_authentication/templates/layouts/easy_authentication.erb", "generators/easy_authentication/easy_authentication_generator.rb", "test/test_helper.rb", "test/easy_authentication_test.rb", "Rakefile", "init.rb", "lib/user_methods.rb", "lib/easy_authentication.rb", "lib/password_authentication.rb", "lib/helper_methods.rb", "lib/controller_methods.rb", "lib/cookie_authentication.rb", "easy_authentication.gemspec"]
13
+ s.files = ["easy_authentication.gemspec", "Manifest", "generators/easy_authentication/templates/stylesheets/users.css", "generators/easy_authentication/templates/stylesheets/login.css", "generators/easy_authentication/templates/stylesheets/roles.css", "generators/easy_authentication/templates/stylesheets/default.css", "generators/easy_authentication/templates/helpers/shadowbox_helper.rb", "generators/easy_authentication/templates/helpers/form_helper.rb", "generators/easy_authentication/templates/migrations/easy_authentication.rb", "generators/easy_authentication/templates/tasks/sysadmin.rake", "generators/easy_authentication/templates/tasks/rights.rake", "generators/easy_authentication/templates/views/user_roles/edit.html.erb", "generators/easy_authentication/templates/views/user_password/edit.html.erb", "generators/easy_authentication/templates/views/user_password/reset_password.html.erb", "generators/easy_authentication/templates/views/user_password/forgot_password.html.erb", "generators/easy_authentication/templates/views/sessions/new.html.erb", "generators/easy_authentication/templates/views/users/index.html.erb", "generators/easy_authentication/templates/views/users/show.html.erb", "generators/easy_authentication/templates/views/users/_user.html.erb", "generators/easy_authentication/templates/views/users/edit.html.erb", "generators/easy_authentication/templates/views/users/new.html.erb", "generators/easy_authentication/templates/views/users/_form.html.erb", "generators/easy_authentication/templates/views/roles/index.html.erb", "generators/easy_authentication/templates/views/roles/show.html.erb", "generators/easy_authentication/templates/views/roles/edit.html.erb", "generators/easy_authentication/templates/views/roles/new.html.erb", "generators/easy_authentication/templates/views/roles/_form.html.erb", "generators/easy_authentication/templates/site_keys.rb", "generators/easy_authentication/templates/models/user_mailer.rb", "generators/easy_authentication/templates/models/right.rb", "generators/easy_authentication/templates/models/user.rb", "generators/easy_authentication/templates/models/role.rb", "generators/easy_authentication/templates/controllers/user_roles_controller.rb", "generators/easy_authentication/templates/controllers/sessions_controller.rb", "generators/easy_authentication/templates/controllers/roles_controller.rb", "generators/easy_authentication/templates/controllers/user_password_controller.rb", "generators/easy_authentication/templates/controllers/users_controller.rb", "generators/easy_authentication/templates/locales/en.easy_authentication.yml", "generators/easy_authentication/templates/locales/es-MX.easy_authentication.yml", "generators/easy_authentication/templates/layouts/easy_authentication_login.erb", "generators/easy_authentication/templates/layouts/easy_authentication.erb", "generators/easy_authentication/easy_authentication_generator.rb", "test/test_helper.rb", "test/easy_authentication_test.rb", "Rakefile", "init.rb", "lib/user_methods.rb", "lib/easy_authentication.rb", "lib/password_authentication.rb", "lib/helper_methods.rb", "lib/controller_methods.rb", "lib/cookie_authentication.rb"]
14
14
  s.has_rdoc = true
15
15
  s.homepage = %q{http://github.com/innetra/easy_authentication}
16
16
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Easy_authentication"]
@@ -41,8 +41,8 @@ class UserPasswordController < ApplicationController
41
41
 
42
42
  def send_password_token
43
43
 
44
- if User.reset_password(params[:login])
45
- flash[:notice] = t("user_password.send_password_token.flash.sent")
44
+ if user = User.reset_password(params[:login])
45
+ flash[:notice] = t("user_password.send_password_token.flash.sent", :name => @user.first_name, :email => @user.email)
46
46
  else
47
47
  flash[:error] = t("user_password.send_password_token.flash.error")
48
48
  end
@@ -55,7 +55,7 @@
55
55
  users:
56
56
  actions:
57
57
  change_password_link: "Cambiar Contraseña"
58
- logout_link: "Cerrar Sesión"
58
+ logout_link: "Cerrar Sesión {{name}}"
59
59
  flash:
60
60
  create: "Usuario creado."
61
61
  update: "Usuario actualizado."
@@ -85,7 +85,13 @@
85
85
  title: "Roles del usuario"
86
86
  edit_link: "Editar"
87
87
  user_password:
88
+ send_password_token:
89
+ flash:
90
+ sent: "{{name}} se ha enviado un correo a tu cuenta \"{{email}}\" con instrucciones para reiniciar tu contraseña."
91
+ error: "Usuario no registrado."
88
92
  edit:
93
+ flash:
94
+ update: "Contraseña actualizada."
89
95
  title: "Cambiar Contraseña \"{{full_name}}\" ({{login}})"
90
96
  new_password: "Nueva Contraseña"
91
97
  forgot_password:
@@ -1,4 +1,4 @@
1
1
  <div class="user_actions">
2
2
  <%%= link_to t("users.actions.change_password_link"), edit_user_password_url(current_user) %>&nbsp;|
3
- <%%= link_to t("users.actions.logout_link"), logout_url %>
3
+ <%%= link_to t("users.actions.logout_link", :name => current_user.full_name), logout_url %>
4
4
  </div>
data/lib/user_methods.rb CHANGED
@@ -53,6 +53,7 @@ module EasyAuthentication
53
53
  return unless u = User.first(:conditions => "login = '#{login}' OR email = '#{login}'")
54
54
  u.password_reset_token = make_token
55
55
  u.save
56
+ return u
56
57
  end
57
58
 
58
59
  def authenticate(login, password)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: innetra-easy_authentication
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Torres
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-23 00:00:00 -08:00
12
+ date: 2009-01-27 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -27,6 +27,7 @@ extra_rdoc_files:
27
27
  - lib/controller_methods.rb
28
28
  - lib/cookie_authentication.rb
29
29
  files:
30
+ - easy_authentication.gemspec
30
31
  - Manifest
31
32
  - generators/easy_authentication/templates/stylesheets/users.css
32
33
  - generators/easy_authentication/templates/stylesheets/login.css
@@ -78,7 +79,6 @@ files:
78
79
  - lib/helper_methods.rb
79
80
  - lib/controller_methods.rb
80
81
  - lib/cookie_authentication.rb
81
- - easy_authentication.gemspec
82
82
  has_rdoc: true
83
83
  homepage: http://github.com/innetra/easy_authentication
84
84
  post_install_message: