okkez-multi_auth 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/README +15 -1
  2. data/app/controllers/application_controller.rb +1 -0
  3. data/app/controllers/auth/email_controller.rb +1 -1
  4. data/app/controllers/auth/open_id_controller.rb +3 -3
  5. data/app/controllers/credentials/email_controller.rb +10 -9
  6. data/app/controllers/credentials/open_id_controller.rb +7 -1
  7. data/app/controllers/signup/email_controller.rb +5 -5
  8. data/app/controllers/signup/open_id_controller.rb +3 -1
  9. data/app/models/activation_mailer.rb +6 -6
  10. data/app/models/email_credential.rb +5 -0
  11. data/app/models/open_id_credential.rb +5 -0
  12. data/app/models/session.rb +4 -0
  13. data/app/views/activation_mailer/complete_for_credential.erb +1 -1
  14. data/app/views/activation_mailer/complete_for_notice.erb +1 -1
  15. data/app/views/activation_mailer/complete_for_signup.erb +1 -1
  16. data/app/views/activation_mailer/request_for_credential.erb +5 -5
  17. data/app/views/activation_mailer/request_for_notice.erb +5 -5
  18. data/app/views/activation_mailer/request_for_signup.erb +5 -5
  19. data/app/views/auth/email/index.html.erb +3 -3
  20. data/app/views/auth/index.html.erb +5 -5
  21. data/app/views/auth/logged_in.html.erb +5 -3
  22. data/app/views/auth/logged_out.html.erb +5 -3
  23. data/app/views/auth/open_id/index.html.erb +3 -3
  24. data/app/views/credentials/email/activated.html.erb +4 -1
  25. data/app/views/credentials/email/activation.html.erb +3 -3
  26. data/app/views/credentials/email/created.html.erb +4 -4
  27. data/app/views/credentials/email/delete.html.erb +7 -4
  28. data/app/views/credentials/email/edit_password.html.erb +4 -4
  29. data/app/views/credentials/email/new.html.erb +2 -2
  30. data/app/views/credentials/index.html.erb +16 -16
  31. data/app/views/credentials/open_id/delete.html.erb +6 -3
  32. data/app/views/credentials/open_id/new.html.erb +2 -2
  33. data/app/views/signup/email/_progress.html.erb +14 -14
  34. data/app/views/signup/email/activated.html.erb +4 -4
  35. data/app/views/signup/email/activation.html.erb +8 -8
  36. data/app/views/signup/email/created.html.erb +6 -4
  37. data/app/views/signup/email/index.html.erb +3 -3
  38. data/app/views/signup/email/validated.html.erb +5 -5
  39. data/app/views/signup/index.html.erb +22 -9
  40. data/app/views/signup/open_id/authenticated.html.erb +3 -3
  41. data/app/views/signup/open_id/created.html.erb +3 -3
  42. data/app/views/signup/open_id/index.html.erb +3 -3
  43. data/config/cucumber.yml +7 -0
  44. data/config/database.yml +4 -1
  45. data/config/environment.rb +1 -1
  46. data/config/routes.rb +21 -20
  47. data/db/test.sqlite3 +0 -0
  48. data/lib/multi_auth.rb +5 -0
  49. data/lib/multi_auth/action_controller.rb +32 -1
  50. data/lib/open_id_authentication/result.rb +5 -5
  51. data/locale/ja/LC_MESSAGES/multi_auth.mo +0 -0
  52. data/po/ja/multi_auth.po +639 -0
  53. data/po/multi_auth.pot +637 -0
  54. data/test/functional/auth/open_id_controller_test.rb +1 -1
  55. data/test/functional/auth_controller_test.rb +10 -7
  56. data/test/functional/credentials_controller_test.rb +9 -0
  57. data/test/unit/activation_mailer_test.rb +2 -2
  58. metadata +7 -2
@@ -44,7 +44,7 @@ class Auth::OpenIdControllerTest < ActionController::TestCase
44
44
  }
45
45
  assert_response(:redirect)
46
46
  assert_redirected_to(:controller => 'signup/open_id', :action => 'index')
47
- assert_equal('OpenID がまだ登録されていません。', @response.flash[:notice])
47
+ assert_equal('この OpenID はまだ登録されていません。', @response.flash[:notice])
48
48
  end
49
49
 
50
50
  [
@@ -2,13 +2,16 @@
2
2
  require 'test_helper'
3
3
 
4
4
  class AuthControllerTest < ActionController::TestCase
5
- test "routes" do
6
- base = {:controller => "auth"}
7
-
8
- assert_routing("/auth", base.merge(:action => "index"))
9
- assert_routing("/auth/logged_in", base.merge(:action => "logged_in"))
10
- assert_routing("/auth/logout", base.merge(:action => "logout"))
11
- assert_routing("/auth/logged_out", base.merge(:action => "logged_out"))
5
+ [
6
+ [:get, "/auth", "index"],
7
+ [:get, "/auth/logged_in", "logged_in"],
8
+ [:post, "/auth/logout", "logout"],
9
+ [:get, "/auth/logged_out", "logged_out"]
10
+ ].each do |method, path, action|
11
+ test "routes #{method} #{path}" do
12
+ base = {:controller => "auth"}
13
+ assert_routing({ :method => method, :path => path }, base.merge(:action => action))
14
+ end
12
15
  end
13
16
 
14
17
  test "GET index" do
@@ -46,4 +46,13 @@ class CredentialsControllerTest < ActionController::TestCase
46
46
  assert_redirected_to(root_path)
47
47
  assert_flash_error
48
48
  end
49
+
50
+ test "GET index, session expired" do
51
+ session[:expires_at] = Time.now - 1
52
+
53
+ get :index
54
+
55
+ assert_response(:success)
56
+ assert_flash_error
57
+ end
49
58
  end
@@ -59,7 +59,7 @@ class ActivationMailerTest < ActionMailer::TestCase
59
59
  :activation_url => "http://activation/url",
60
60
  }
61
61
  expected = {
62
- :subject => "[#{MultiAuth.application_name}] メールアドレス認証登録",
62
+ :subject => "[#{MultiAuth.application_name}] 認証用メールアドレス登録",
63
63
  :from => @klass::FromAddress,
64
64
  :recipients => "recipients@example.jp",
65
65
  :body => {:activation_url => "http://activation/url"},
@@ -80,7 +80,7 @@ class ActivationMailerTest < ActionMailer::TestCase
80
80
  :recipients => "recipients@example.jp",
81
81
  }
82
82
  expected = {
83
- :subject => "[#{MultiAuth.application_name}] メールアドレス認証登録完了",
83
+ :subject => "[#{MultiAuth.application_name}] 認証用メールアドレス登録完了",
84
84
  :from => @klass::FromAddress,
85
85
  :recipients => "recipients@example.jp",
86
86
  :body => {},
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: okkez-multi_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - okkez
8
+ - nayutaya
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
12
 
12
- date: 2009-12-16 00:00:00 +09:00
13
+ date: 2010-01-06 00:00:00 +09:00
13
14
  default_executable:
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
@@ -92,6 +93,7 @@ files:
92
93
  - app/views/signup/email/validated.html.erb
93
94
  - app/views/signup/email/activation.html.erb
94
95
  - config/routes.rb
96
+ - config/cucumber.yml
95
97
  - config/database.yml.sqlite3
96
98
  - config/environment.rb
97
99
  - config/boot.rb
@@ -138,6 +140,9 @@ files:
138
140
  - generators/multi_auth_public_assets/templates/images/icons/fam/bin.png
139
141
  - generators/multi_auth_public_assets/templates/images/icons/fam/user.png
140
142
  - generators/multi_auth_public_assets/templates/images/icons/fam/bomb.png
143
+ - po/ja/multi_auth.po
144
+ - po/multi_auth.pot
145
+ - locale/ja/LC_MESSAGES/multi_auth.mo
141
146
  - test/unit/token_util_test.rb
142
147
  - test/unit/open_id_login_form_test.rb
143
148
  - test/unit/notice_formatter_test.rb