nyauth 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -1
- data/app/models/concerns/nyauth/reset_password_ability.rb +0 -1
- data/app/views/nyauth/confirmation_requests/new.html.erb +4 -0
- data/app/views/nyauth/confirmations/edit.html.erb +1 -0
- data/app/views/nyauth/passwords/edit.html.erb +6 -0
- data/app/views/nyauth/registrations/new.html.erb +7 -0
- data/app/views/nyauth/request_mailer/request_confirmation.html.erb +6 -0
- data/app/views/nyauth/request_mailer/request_reset_password.html.erb +6 -0
- data/app/views/nyauth/reset_password_requests/new.html.erb +4 -0
- data/app/views/nyauth/reset_passwords/edit.html.erb +6 -0
- data/app/views/nyauth/sessions/new.html.erb +6 -0
- data/config/routes.rb +4 -7
- data/lib/generators/nyauth/views_generator.rb +12 -0
- data/lib/nyauth/rails.rb +12 -0
- data/lib/nyauth/route.rb +21 -0
- data/lib/nyauth/version.rb +1 -1
- data/lib/nyauth.rb +1 -0
- data/spec/dummy/app/assets/javascripts/application.js +2 -0
- data/spec/dummy/config/routes.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +231 -0
- data/spec/dummy/log/test.log +14687 -0
- data/spec/featrues/nyauth/passwords_spec.rb +1 -1
- data/spec/featrues/nyauth/registrations_spec.rb +1 -1
- data/spec/lib/generators/nyauth/tmp/app/views/nyauth/confirmation_requests/new.html.erb +4 -0
- data/spec/lib/generators/nyauth/tmp/app/views/nyauth/confirmations/edit.html.erb +1 -0
- data/spec/lib/generators/nyauth/tmp/app/views/nyauth/passwords/edit.html.erb +6 -0
- data/spec/lib/generators/nyauth/tmp/app/views/nyauth/registrations/new.html.erb +7 -0
- data/spec/lib/generators/nyauth/tmp/app/views/nyauth/request_mailer/request_confirmation.html.erb +6 -0
- data/spec/lib/generators/nyauth/tmp/app/views/nyauth/request_mailer/request_confirmation.text.erb +3 -0
- data/spec/lib/generators/nyauth/tmp/app/views/nyauth/request_mailer/request_reset_password.html.erb +6 -0
- data/spec/lib/generators/nyauth/tmp/app/views/nyauth/request_mailer/request_reset_password.text.erb +3 -0
- data/spec/lib/generators/nyauth/tmp/app/views/nyauth/reset_password_requests/new.html.erb +4 -0
- data/spec/lib/generators/nyauth/tmp/app/views/nyauth/reset_passwords/edit.html.erb +6 -0
- data/spec/lib/generators/nyauth/tmp/app/views/nyauth/sessions/new.html.erb +6 -0
- data/spec/lib/generators/nyauth/views_generator_spec.rb +27 -0
- metadata +41 -63
- data/app/views/nyauth/confirmation_requests/new.html.slim +0 -5
- data/app/views/nyauth/confirmations/edit.html.slim +0 -5
- data/app/views/nyauth/layouts/application.html.slim +0 -15
- data/app/views/nyauth/layouts/mailer.html.slim +0 -1
- data/app/views/nyauth/layouts/mailer.text.slim +0 -1
- data/app/views/nyauth/passwords/edit.html.slim +0 -11
- data/app/views/nyauth/registrations/new.html.slim +0 -12
- data/app/views/nyauth/request_mailer/request_confirmation.html.slim +0 -2
- data/app/views/nyauth/request_mailer/request_reset_password.html.slim +0 -2
- data/app/views/nyauth/reset_password_requests/new.html.slim +0 -5
- data/app/views/nyauth/reset_passwords/edit.html.slim +0 -11
- data/app/views/nyauth/sessions/new.html.slim +0 -11
- data/spec/dummy/tmp/pids/server.pid +0 -1
- data/spec/lib/generators/nyauth/tmp/config/initializers/nyauth.rb +0 -7
- /data/spec/dummy/app/views/pages/{index.html.slim → index.html.erb} +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
<%= @client.errors.full_messages.join ',' %>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<%= form_for @client, url: registration_path_for(client_name) do |f| %>
|
2
|
+
<%= f.object.errors.full_messages.join ',' %>
|
3
|
+
<%= f.email_field :email %>
|
4
|
+
<%= f.password_field :password %>
|
5
|
+
<%= f.password_field :password_confirmation %>
|
6
|
+
<%= f.submit 'Sign up' %>
|
7
|
+
<% end %>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'rails_helper'
|
2
|
+
require 'generators/nyauth/views_generator'
|
3
|
+
|
4
|
+
describe Nyauth::ViewsGenerator, type: :generator do
|
5
|
+
destination ::File.expand_path('../tmp/', __FILE__)
|
6
|
+
|
7
|
+
before do
|
8
|
+
prepare_destination
|
9
|
+
run_generator
|
10
|
+
end
|
11
|
+
|
12
|
+
describe 'rails g nyauth:views' do
|
13
|
+
it 'creates a test views' do
|
14
|
+
assert_file 'app/views/nyauth/confirmation_requests/new.html.erb'
|
15
|
+
assert_file 'app/views/nyauth/confirmations/edit.html.erb'
|
16
|
+
assert_file 'app/views/nyauth/passwords/edit.html.erb'
|
17
|
+
assert_file 'app/views/nyauth/registrations/new.html.erb'
|
18
|
+
assert_file 'app/views/nyauth/request_mailer/request_confirmation.html.erb'
|
19
|
+
assert_file 'app/views/nyauth/request_mailer/request_confirmation.text.erb'
|
20
|
+
assert_file 'app/views/nyauth/request_mailer/request_reset_password.html.erb'
|
21
|
+
assert_file 'app/views/nyauth/request_mailer/request_reset_password.text.erb'
|
22
|
+
assert_file 'app/views/nyauth/reset_password_requests/new.html.erb'
|
23
|
+
assert_file 'app/views/nyauth/reset_passwords/edit.html.erb'
|
24
|
+
assert_file 'app/views/nyauth/sessions/new.html.erb'
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
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.2.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-06-
|
11
|
+
date: 2015-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -38,49 +38,7 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.0'
|
41
|
-
|
42
|
-
name: slim-rails
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '3.0'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '3.0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: sprockets-rails
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '2.2'
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '2.2'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: email_validator
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '1.5'
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '1.5'
|
83
|
-
description: Simple & modualbe authentication gem
|
41
|
+
description: Simple and modualbe authentication gem
|
84
42
|
email:
|
85
43
|
- koshikawa@ppworks.jp
|
86
44
|
executables: []
|
@@ -114,29 +72,29 @@ files:
|
|
114
72
|
- app/services/nyauth/session_service.rb
|
115
73
|
- app/views/layouts/nyauth/mailer.html.erb
|
116
74
|
- app/views/layouts/nyauth/mailer.text.erb
|
117
|
-
- app/views/nyauth/confirmation_requests/new.html.
|
118
|
-
- app/views/nyauth/confirmations/edit.html.
|
119
|
-
- app/views/nyauth/
|
120
|
-
- app/views/nyauth/
|
121
|
-
- app/views/nyauth/
|
122
|
-
- app/views/nyauth/passwords/edit.html.slim
|
123
|
-
- app/views/nyauth/registrations/new.html.slim
|
124
|
-
- app/views/nyauth/request_mailer/request_confirmation.html.slim
|
75
|
+
- app/views/nyauth/confirmation_requests/new.html.erb
|
76
|
+
- app/views/nyauth/confirmations/edit.html.erb
|
77
|
+
- app/views/nyauth/passwords/edit.html.erb
|
78
|
+
- app/views/nyauth/registrations/new.html.erb
|
79
|
+
- app/views/nyauth/request_mailer/request_confirmation.html.erb
|
125
80
|
- app/views/nyauth/request_mailer/request_confirmation.text.erb
|
126
|
-
- app/views/nyauth/request_mailer/request_reset_password.html.
|
81
|
+
- app/views/nyauth/request_mailer/request_reset_password.html.erb
|
127
82
|
- app/views/nyauth/request_mailer/request_reset_password.text.erb
|
128
|
-
- app/views/nyauth/reset_password_requests/new.html.
|
129
|
-
- app/views/nyauth/reset_passwords/edit.html.
|
130
|
-
- app/views/nyauth/sessions/new.html.
|
83
|
+
- app/views/nyauth/reset_password_requests/new.html.erb
|
84
|
+
- app/views/nyauth/reset_passwords/edit.html.erb
|
85
|
+
- app/views/nyauth/sessions/new.html.erb
|
131
86
|
- config/application.yml
|
132
87
|
- config/locales/en.yml
|
133
88
|
- config/routes.rb
|
134
89
|
- lib/generators/nyauth/install_generator.rb
|
135
90
|
- lib/generators/nyauth/templates/nyauth_install_initializer.rb
|
91
|
+
- lib/generators/nyauth/views_generator.rb
|
136
92
|
- lib/nyauth.rb
|
137
93
|
- lib/nyauth/configuration.rb
|
138
94
|
- lib/nyauth/encryptor.rb
|
139
95
|
- lib/nyauth/engine.rb
|
96
|
+
- lib/nyauth/rails.rb
|
97
|
+
- lib/nyauth/route.rb
|
140
98
|
- lib/nyauth/version.rb
|
141
99
|
- lib/tasks/nyauth_tasks.rake
|
142
100
|
- spec/controllers/application_controller_spec.rb
|
@@ -151,7 +109,7 @@ files:
|
|
151
109
|
- spec/dummy/app/models/admin.rb
|
152
110
|
- spec/dummy/app/models/user.rb
|
153
111
|
- spec/dummy/app/views/layouts/application.html.erb
|
154
|
-
- spec/dummy/app/views/pages/index.html.
|
112
|
+
- spec/dummy/app/views/pages/index.html.erb
|
155
113
|
- spec/dummy/bin/bundle
|
156
114
|
- spec/dummy/bin/rails
|
157
115
|
- spec/dummy/bin/rake
|
@@ -204,7 +162,6 @@ files:
|
|
204
162
|
- spec/dummy/tmp/capybara/capybara-201503172346495241516033.html
|
205
163
|
- spec/dummy/tmp/capybara/capybara-201503172354248621830336.html
|
206
164
|
- spec/dummy/tmp/capybara/capybara-20150623002226753539811.html
|
207
|
-
- spec/dummy/tmp/pids/server.pid
|
208
165
|
- spec/factories/admins.rb
|
209
166
|
- spec/factories/users.rb
|
210
167
|
- spec/featrues/nyauth/confirmation_requests_spec.rb
|
@@ -215,7 +172,18 @@ files:
|
|
215
172
|
- spec/featrues/url_helper_on_application_spec.rb
|
216
173
|
- spec/helpers/nyauth/application_helper_spec.rb
|
217
174
|
- spec/lib/generators/nyauth/install_generator_spec.rb
|
218
|
-
- spec/lib/generators/nyauth/tmp/
|
175
|
+
- spec/lib/generators/nyauth/tmp/app/views/nyauth/confirmation_requests/new.html.erb
|
176
|
+
- spec/lib/generators/nyauth/tmp/app/views/nyauth/confirmations/edit.html.erb
|
177
|
+
- spec/lib/generators/nyauth/tmp/app/views/nyauth/passwords/edit.html.erb
|
178
|
+
- spec/lib/generators/nyauth/tmp/app/views/nyauth/registrations/new.html.erb
|
179
|
+
- spec/lib/generators/nyauth/tmp/app/views/nyauth/request_mailer/request_confirmation.html.erb
|
180
|
+
- spec/lib/generators/nyauth/tmp/app/views/nyauth/request_mailer/request_confirmation.text.erb
|
181
|
+
- spec/lib/generators/nyauth/tmp/app/views/nyauth/request_mailer/request_reset_password.html.erb
|
182
|
+
- spec/lib/generators/nyauth/tmp/app/views/nyauth/request_mailer/request_reset_password.text.erb
|
183
|
+
- spec/lib/generators/nyauth/tmp/app/views/nyauth/reset_password_requests/new.html.erb
|
184
|
+
- spec/lib/generators/nyauth/tmp/app/views/nyauth/reset_passwords/edit.html.erb
|
185
|
+
- spec/lib/generators/nyauth/tmp/app/views/nyauth/sessions/new.html.erb
|
186
|
+
- spec/lib/generators/nyauth/views_generator_spec.rb
|
219
187
|
- spec/lib/nyauth/configuration_spec.rb
|
220
188
|
- spec/mailers/nyauth/request_mailer_spec.rb
|
221
189
|
- spec/models/user_spec.rb
|
@@ -263,7 +231,7 @@ test_files:
|
|
263
231
|
- spec/dummy/app/models/admin.rb
|
264
232
|
- spec/dummy/app/models/user.rb
|
265
233
|
- spec/dummy/app/views/layouts/application.html.erb
|
266
|
-
- spec/dummy/app/views/pages/index.html.
|
234
|
+
- spec/dummy/app/views/pages/index.html.erb
|
267
235
|
- spec/dummy/bin/bundle
|
268
236
|
- spec/dummy/bin/rails
|
269
237
|
- spec/dummy/bin/rake
|
@@ -318,7 +286,6 @@ test_files:
|
|
318
286
|
- spec/dummy/tmp/capybara/capybara-201503172346495241516033.html
|
319
287
|
- spec/dummy/tmp/capybara/capybara-201503172354248621830336.html
|
320
288
|
- spec/dummy/tmp/capybara/capybara-20150623002226753539811.html
|
321
|
-
- spec/dummy/tmp/pids/server.pid
|
322
289
|
- spec/factories/admins.rb
|
323
290
|
- spec/factories/users.rb
|
324
291
|
- spec/featrues/nyauth/confirmation_requests_spec.rb
|
@@ -329,7 +296,18 @@ test_files:
|
|
329
296
|
- spec/featrues/url_helper_on_application_spec.rb
|
330
297
|
- spec/helpers/nyauth/application_helper_spec.rb
|
331
298
|
- spec/lib/generators/nyauth/install_generator_spec.rb
|
332
|
-
- spec/lib/generators/nyauth/tmp/
|
299
|
+
- spec/lib/generators/nyauth/tmp/app/views/nyauth/confirmation_requests/new.html.erb
|
300
|
+
- spec/lib/generators/nyauth/tmp/app/views/nyauth/confirmations/edit.html.erb
|
301
|
+
- spec/lib/generators/nyauth/tmp/app/views/nyauth/passwords/edit.html.erb
|
302
|
+
- spec/lib/generators/nyauth/tmp/app/views/nyauth/registrations/new.html.erb
|
303
|
+
- spec/lib/generators/nyauth/tmp/app/views/nyauth/request_mailer/request_confirmation.html.erb
|
304
|
+
- spec/lib/generators/nyauth/tmp/app/views/nyauth/request_mailer/request_confirmation.text.erb
|
305
|
+
- spec/lib/generators/nyauth/tmp/app/views/nyauth/request_mailer/request_reset_password.html.erb
|
306
|
+
- spec/lib/generators/nyauth/tmp/app/views/nyauth/request_mailer/request_reset_password.text.erb
|
307
|
+
- spec/lib/generators/nyauth/tmp/app/views/nyauth/reset_password_requests/new.html.erb
|
308
|
+
- spec/lib/generators/nyauth/tmp/app/views/nyauth/reset_passwords/edit.html.erb
|
309
|
+
- spec/lib/generators/nyauth/tmp/app/views/nyauth/sessions/new.html.erb
|
310
|
+
- spec/lib/generators/nyauth/views_generator_spec.rb
|
333
311
|
- spec/lib/nyauth/configuration_spec.rb
|
334
312
|
- spec/mailers/nyauth/request_mailer_spec.rb
|
335
313
|
- spec/models/user_spec.rb
|
@@ -1,5 +0,0 @@
|
|
1
|
-
= form_for(client_class.new, url: confirmation_requests_path_for(client_name), mehotd: :post, html: { class: 'pure-form' }) do |f|
|
2
|
-
fieldset
|
3
|
-
legend= t 'nav.confirmation_requests.new'
|
4
|
-
= f.text_field(:email, placeholder: :email)
|
5
|
-
= f.submit 'request confirmation', data: { disable_with: '...' }, class: 'pure-button pure-button-primary'
|
@@ -1,15 +0,0 @@
|
|
1
|
-
DOCTYPE
|
2
|
-
html
|
3
|
-
head
|
4
|
-
title circleaf
|
5
|
-
= stylesheet_link_tag 'application', media: 'all'
|
6
|
-
= javascript_include_tag 'application'
|
7
|
-
= csrf_meta_tags
|
8
|
-
body
|
9
|
-
= render 'navigation'
|
10
|
-
- if flash[:notice].present?
|
11
|
-
.messages= flash[:notice]
|
12
|
-
- if flash[:alert].present? # FIXME: DRY
|
13
|
-
.messages= flash[:alert]
|
14
|
-
.main-content
|
15
|
-
== yield
|
@@ -1 +0,0 @@
|
|
1
|
-
== yield
|
@@ -1 +0,0 @@
|
|
1
|
-
== yield
|
@@ -1,11 +0,0 @@
|
|
1
|
-
= form_for(@client, url: password_path_for(client_name), html: { class: 'pure-form pure-form-stacked' }) do |f|
|
2
|
-
fieldset
|
3
|
-
legend
|
4
|
-
- if @client.errors.present?
|
5
|
-
h2 errors
|
6
|
-
ul.errors
|
7
|
-
- @client.errors.full_messages.each do |e|
|
8
|
-
li #{e}
|
9
|
-
= f.password_field :password, placeholder: :password
|
10
|
-
= f.password_field :password_confirmation, placeholder: :confirmation
|
11
|
-
= f.submit 'Update', data: { disable_with: '...' }, class: 'pure-button pure-button-primary'
|
@@ -1,12 +0,0 @@
|
|
1
|
-
= form_for @client, url: registration_path_for(client_name), html: { class: 'pure-form pure-form-stacked' } do |f|
|
2
|
-
fieldset
|
3
|
-
legend= t 'nav.registrations.new'
|
4
|
-
- if @client.errors.present?
|
5
|
-
h2 errors
|
6
|
-
ul.errors
|
7
|
-
- @client.errors.full_messages.each do |e|
|
8
|
-
li #{e}
|
9
|
-
= f.text_field :email, placeholder: :email
|
10
|
-
= f.password_field :password, placeholder: :password
|
11
|
-
= f.password_field :password_confirmation, placeholder: :confirmation
|
12
|
-
= f.submit 'Sign up', data: { disable_with: '...' }, class: 'pure-button pure-button-primary'
|
@@ -1,5 +0,0 @@
|
|
1
|
-
= form_for(client_class.new, url: reset_password_requests_path_for(client_name), mehotd: :post, html: { class: 'pure-form' }) do |f|
|
2
|
-
fieldset
|
3
|
-
legend= t 'nav.reset_password_requests.new'
|
4
|
-
= f.text_field(:email, placeholder: :email)
|
5
|
-
= f.submit 'reset password', data: { disable_with: '...' }, class: 'pure-button pure-button-primary'
|
@@ -1,11 +0,0 @@
|
|
1
|
-
= form_for(@client, url: reset_password_path_for(client_name, params[:reset_password_key]), html: { class: 'pure-form pure-form-stacked' }) do |f|
|
2
|
-
fieldset
|
3
|
-
legend
|
4
|
-
- if @client.errors.present?
|
5
|
-
h2 errors
|
6
|
-
ul.errors
|
7
|
-
- @client.errors.full_messages.each do |e|
|
8
|
-
li #{e}
|
9
|
-
= f.password_field :password, placeholder: :password
|
10
|
-
= f.password_field :password_confirmation, placeholder: :confirmation
|
11
|
-
= f.submit 'Update', data: { disable_with: '...' }, class: 'pure-button pure-button-primary'
|
@@ -1,11 +0,0 @@
|
|
1
|
-
= form_for @session_service, url: session_path_for(client_name), html: { class: 'pure-form' } do |f|
|
2
|
-
fieldset
|
3
|
-
legend= t 'nav.sessions.new'
|
4
|
-
- if @session_service.errors.present?
|
5
|
-
h2 errors
|
6
|
-
ul.errors
|
7
|
-
- @session_service.errors.full_messages.each do |e|
|
8
|
-
li #{e}
|
9
|
-
= f.email_field :email, placeholder: :email
|
10
|
-
= f.password_field :password, placeholder: :password
|
11
|
-
= f.submit 'Sign in', data: { disable_with: '...' }, class: 'pure-button pure-button-primary'
|
@@ -1 +0,0 @@
|
|
1
|
-
62060
|
File without changes
|