nyauth 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/nyauth/confirmation_requests_controller.rb +12 -9
- data/app/controllers/nyauth/registrations_controller.rb +7 -7
- data/app/controllers/nyauth/reset_password_requests_controller.rb +12 -9
- data/app/controllers/nyauth/sessions_controller.rb +7 -7
- data/app/services/nyauth/confirmation_request.rb +19 -0
- data/app/services/nyauth/registration.rb +22 -0
- data/app/services/nyauth/reset_password_request.rb +19 -0
- data/app/services/nyauth/{session_service.rb → session.rb} +4 -4
- data/app/views/nyauth/confirmation_requests/new.html.erb +1 -1
- data/app/views/nyauth/registrations/new.html.erb +1 -1
- data/app/views/nyauth/reset_password_requests/new.html.erb +1 -1
- data/app/views/nyauth/sessions/new.html.erb +1 -1
- data/config/locales/en.yml +1 -0
- data/config/locales/ja.yml +1 -0
- data/lib/nyauth/version.rb +1 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +3645 -0
- data/spec/dummy/log/test.log +10449 -0
- data/spec/dummy/tmp/pids/server.pid +1 -0
- data/spec/featrues/nyauth/confirmation_requests_spec.rb +2 -2
- data/spec/featrues/nyauth/registrations_spec.rb +3 -3
- data/spec/featrues/nyauth/reset_password_requests_spec.rb +2 -2
- data/spec/featrues/nyauth/sessions_spec.rb +6 -6
- data/spec/lib/generators/nyauth/tmp/app/views/nyauth/confirmation_requests/new.html.erb +1 -1
- data/spec/lib/generators/nyauth/tmp/app/views/nyauth/registrations/new.html.erb +1 -1
- data/spec/lib/generators/nyauth/tmp/app/views/nyauth/reset_password_requests/new.html.erb +1 -1
- data/spec/lib/generators/nyauth/tmp/app/views/nyauth/sessions/new.html.erb +1 -1
- metadata +8 -4
- data/app/services/nyauth/confirmation_request_service.rb +0 -15
@@ -0,0 +1 @@
|
|
1
|
+
86775
|
@@ -9,7 +9,7 @@ RSpec.describe 'Nyauth::ConfirmationRequests' do
|
|
9
9
|
end
|
10
10
|
|
11
11
|
scenario 'request & confirm' do
|
12
|
-
fill_in('
|
12
|
+
fill_in('confirmation_request_email', with: user.email)
|
13
13
|
click_button('request confirmation')
|
14
14
|
|
15
15
|
open_email(user.email)
|
@@ -21,7 +21,7 @@ RSpec.describe 'Nyauth::ConfirmationRequests' do
|
|
21
21
|
end
|
22
22
|
|
23
23
|
scenario 'request expired' do
|
24
|
-
fill_in('
|
24
|
+
fill_in('confirmation_request_email', with: user.email)
|
25
25
|
click_button('request confirmation')
|
26
26
|
|
27
27
|
Timecop.freeze(Time.current + 3.hours) do
|
@@ -7,9 +7,9 @@ RSpec.describe 'Nyauth::Registrations' do
|
|
7
7
|
background { visit nyauth.new_registration_path }
|
8
8
|
|
9
9
|
scenario 'create user' do
|
10
|
-
fill_in('
|
11
|
-
fill_in('
|
12
|
-
fill_in('
|
10
|
+
fill_in('registration_email', with: user.email)
|
11
|
+
fill_in('registration_password', with: user.password)
|
12
|
+
fill_in('registration_password_confirmation', with: user.password)
|
13
13
|
click_button('Sign up')
|
14
14
|
|
15
15
|
expect(page).to have_content('registration success')
|
@@ -10,7 +10,7 @@ RSpec.describe 'Nyauth::NewPasswordRequests' do
|
|
10
10
|
end
|
11
11
|
|
12
12
|
scenario 'request & set reset password' do
|
13
|
-
fill_in('
|
13
|
+
fill_in('reset_password_request_email', with: user.email)
|
14
14
|
click_button('reset password')
|
15
15
|
|
16
16
|
open_email(user.email)
|
@@ -25,7 +25,7 @@ RSpec.describe 'Nyauth::NewPasswordRequests' do
|
|
25
25
|
end
|
26
26
|
|
27
27
|
scenario 'request expired' do
|
28
|
-
fill_in('
|
28
|
+
fill_in('reset_password_request_email', with: user.email)
|
29
29
|
click_button('reset password')
|
30
30
|
|
31
31
|
Timecop.freeze(Time.current + 3.hours) do
|
@@ -7,8 +7,8 @@ RSpec.describe 'Nyauth::Sessions' do
|
|
7
7
|
background { visit nyauth.new_session_path }
|
8
8
|
|
9
9
|
scenario 'sign in user' do
|
10
|
-
fill_in('
|
11
|
-
fill_in('
|
10
|
+
fill_in('session_email', with: user.email)
|
11
|
+
fill_in('session_password', with: user.password)
|
12
12
|
click_button('Sign in')
|
13
13
|
|
14
14
|
expect(page).to have_content('sign in success')
|
@@ -25,8 +25,8 @@ RSpec.describe 'Nyauth::Sessions' do
|
|
25
25
|
background { visit posts_path }
|
26
26
|
|
27
27
|
scenario 'sign in user' do
|
28
|
-
fill_in('
|
29
|
-
fill_in('
|
28
|
+
fill_in('session_email', with: user.email)
|
29
|
+
fill_in('session_password', with: user.password)
|
30
30
|
click_button('Sign in')
|
31
31
|
|
32
32
|
expect(page).to have_content('sign in success')
|
@@ -57,8 +57,8 @@ RSpec.describe 'Nyauth::Sessions' do
|
|
57
57
|
background { visit new_admin_session_path }
|
58
58
|
|
59
59
|
scenario 'sign in admin' do
|
60
|
-
fill_in('
|
61
|
-
fill_in('
|
60
|
+
fill_in('session_email', with: admin.email)
|
61
|
+
fill_in('session_password', with: admin.password)
|
62
62
|
click_button('Sign in')
|
63
63
|
|
64
64
|
expect(page).to have_content('sign in success')
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= form_for
|
1
|
+
<%= form_for @service, url: confirmation_requests_path_for(nyauth_client_name) do |f| %>
|
2
2
|
<%= f.email_field :email %>
|
3
3
|
<%= f.submit 'request confirmation' %>
|
4
4
|
<% end %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= form_for @
|
1
|
+
<%= form_for @service, url: registration_path_for(nyauth_client_name) do |f| %>
|
2
2
|
<%= f.object.errors.full_messages.join ',' %>
|
3
3
|
<%= f.email_field :email %>
|
4
4
|
<%= f.password_field :password %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= form_for
|
1
|
+
<%= form_for @service, url: reset_password_requests_path_for(nyauth_client_name) do |f| %>
|
2
2
|
<%= f.text_field :email %>
|
3
3
|
<%= f.submit 'reset password' %>
|
4
4
|
<% end %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= form_for @
|
1
|
+
<%= form_for @service, url: session_path_for(nyauth_client_name) do |f| %>
|
2
2
|
<%= f.object.errors.full_messages.join ',' %>
|
3
3
|
<%= f.email_field :email %>
|
4
4
|
<%= f.password_field :password %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nyauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ppworks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -72,8 +72,10 @@ files:
|
|
72
72
|
- app/models/concerns/nyauth/reset_password_ability.rb
|
73
73
|
- app/responders/nyauth/app_responder.rb
|
74
74
|
- app/responders/nyauth/confirmation_responder.rb
|
75
|
-
- app/services/nyauth/
|
76
|
-
- app/services/nyauth/
|
75
|
+
- app/services/nyauth/confirmation_request.rb
|
76
|
+
- app/services/nyauth/registration.rb
|
77
|
+
- app/services/nyauth/reset_password_request.rb
|
78
|
+
- app/services/nyauth/session.rb
|
77
79
|
- app/views/layouts/nyauth/mailer.html.erb
|
78
80
|
- app/views/layouts/nyauth/mailer.text.erb
|
79
81
|
- app/views/nyauth/confirmation_requests/new.html.erb
|
@@ -213,6 +215,7 @@ files:
|
|
213
215
|
- spec/dummy/tmp/capybara/capybara-201508010214202383711168.html
|
214
216
|
- spec/dummy/tmp/capybara/capybara-201508010214573127580777.html
|
215
217
|
- spec/dummy/tmp/capybara/capybara-201508010215518845010832.html
|
218
|
+
- spec/dummy/tmp/pids/server.pid
|
216
219
|
- spec/factories/admins.rb
|
217
220
|
- spec/factories/users.rb
|
218
221
|
- spec/featrues/nyauth/confirmation_requests_spec.rb
|
@@ -376,6 +379,7 @@ test_files:
|
|
376
379
|
- spec/dummy/tmp/capybara/capybara-201508010214202383711168.html
|
377
380
|
- spec/dummy/tmp/capybara/capybara-201508010214573127580777.html
|
378
381
|
- spec/dummy/tmp/capybara/capybara-201508010215518845010832.html
|
382
|
+
- spec/dummy/tmp/pids/server.pid
|
379
383
|
- spec/factories/admins.rb
|
380
384
|
- spec/factories/users.rb
|
381
385
|
- spec/featrues/nyauth/confirmation_requests_spec.rb
|