devise_materialize 0.0.5.alpha → 1.0.0.rc1

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.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/devise_materialize/version.rb +1 -1
  4. data/lib/generators/devise_materialize/install_generator.rb +8 -7
  5. data/lib/generators/templates/assets/javascripts/init_form_materialize.coffee +16 -0
  6. data/lib/generators/templates/erb/default/confirmations/new.html.erb +36 -0
  7. data/lib/generators/templates/erb/default/mailer/confirmation_instructions.html.erb +37 -0
  8. data/lib/generators/templates/erb/default/mailer/password_change.html.erb +39 -0
  9. data/lib/generators/templates/erb/default/mailer/reset_password_instructions.html.erb +46 -0
  10. data/lib/generators/templates/erb/default/mailer/unlock_instructions.html.erb +43 -0
  11. data/lib/generators/templates/erb/default/passwords/edit.html.erb +48 -0
  12. data/lib/generators/templates/erb/default/passwords/new.html.erb +36 -0
  13. data/lib/generators/templates/erb/default/registrations/edit.html.erb +58 -0
  14. data/lib/generators/templates/erb/default/registrations/new.html.erb +50 -0
  15. data/lib/generators/templates/erb/default/sessions/new.html.erb +45 -0
  16. data/lib/generators/templates/erb/default/shared/_links.html.erb +40 -0
  17. data/lib/generators/templates/erb/default/unlocks/new.html.erb +36 -0
  18. data/lib/generators/templates/erb/simple_form/confirmations/new.html.erb +1 -1
  19. data/lib/generators/templates/erb/simple_form/passwords/edit.html.erb +1 -1
  20. data/lib/generators/templates/erb/simple_form/passwords/new.html.erb +1 -1
  21. data/lib/generators/templates/erb/simple_form/registrations/edit.html.erb +1 -1
  22. data/lib/generators/templates/erb/simple_form/registrations/new.html.erb +1 -1
  23. data/lib/generators/templates/erb/simple_form/sessions/new.html.erb +1 -1
  24. data/lib/generators/templates/erb/simple_form/unlocks/new.html.erb +1 -1
  25. data/lib/generators/templates/haml/default/confirmations/new.html.haml +23 -0
  26. data/lib/generators/templates/haml/default/mailer/confirmation_instructions.html.haml +30 -0
  27. data/lib/generators/templates/haml/default/mailer/password_change.html.haml +31 -0
  28. data/lib/generators/templates/haml/default/mailer/reset_password_instructions.html.haml +37 -0
  29. data/lib/generators/templates/haml/default/mailer/unlock_instructions.html.haml +34 -0
  30. data/lib/generators/templates/haml/default/passwords/edit.html.haml +32 -0
  31. data/lib/generators/templates/haml/default/passwords/new.html.haml +23 -0
  32. data/lib/generators/templates/haml/default/registrations/edit.html.haml +40 -0
  33. data/lib/generators/templates/haml/default/registrations/new.html.haml +34 -0
  34. data/lib/generators/templates/haml/default/sessions/new.html.haml +30 -0
  35. data/lib/generators/templates/haml/default/shared/_links.html.haml +34 -0
  36. data/lib/generators/templates/haml/default/unlocks/new.html.haml +23 -0
  37. data/lib/generators/templates/haml/simple_form/confirmations/new.html.haml +1 -1
  38. data/lib/generators/templates/haml/simple_form/passwords/edit.html.haml +1 -1
  39. data/lib/generators/templates/haml/simple_form/passwords/new.html.haml +1 -1
  40. data/lib/generators/templates/haml/simple_form/registrations/edit.html.haml +1 -1
  41. data/lib/generators/templates/haml/simple_form/registrations/new.html.haml +1 -1
  42. data/lib/generators/templates/haml/simple_form/sessions/new.html.haml +1 -1
  43. data/lib/generators/templates/haml/simple_form/unlocks/new.html.haml +1 -1
  44. data/lib/generators/templates/slim/default/confirmations/new.html.slim +24 -0
  45. data/lib/generators/templates/slim/default/mailer/confirmation_instructions.html.slim +30 -0
  46. data/lib/generators/templates/slim/default/mailer/password_change.html.slim +31 -0
  47. data/lib/generators/templates/slim/default/mailer/reset_password_instructions.html.slim +38 -0
  48. data/lib/generators/templates/slim/default/mailer/unlock_instructions.html.slim +35 -0
  49. data/lib/generators/templates/slim/default/passwords/edit.html.slim +33 -0
  50. data/lib/generators/templates/slim/default/passwords/new.html.slim +24 -0
  51. data/lib/generators/templates/slim/default/registrations/edit.html.slim +41 -0
  52. data/lib/generators/templates/slim/default/registrations/new.html.slim +35 -0
  53. data/lib/generators/templates/slim/default/sessions/new.html.slim +31 -0
  54. data/lib/generators/templates/slim/default/shared/_links.html.slim +29 -0
  55. data/lib/generators/templates/slim/default/unlocks/new.html.slim +24 -0
  56. data/lib/generators/templates/slim/simple_form/confirmations/new.html.slim +1 -1
  57. data/lib/generators/templates/slim/simple_form/passwords/edit.html.slim +1 -1
  58. data/lib/generators/templates/slim/simple_form/passwords/new.html.slim +1 -1
  59. data/lib/generators/templates/slim/simple_form/registrations/edit.html.slim +1 -1
  60. data/lib/generators/templates/slim/simple_form/registrations/new.html.slim +1 -1
  61. data/lib/generators/templates/slim/simple_form/sessions/new.html.slim +1 -1
  62. data/lib/generators/templates/slim/simple_form/unlocks/new.html.slim +1 -1
  63. data/test/lib/install_generator_test.rb +1 -0
  64. metadata +3 -4
  65. data/test/rails_app/log/test.log +0 -288
@@ -0,0 +1,45 @@
1
+ <div class="row login-form">
2
+ <div class="col s12">
3
+ <div class="card hoverable">
4
+ <div class="card-content">
5
+ <span class="card-title center">Log In</span>
6
+ <div class="divider"></div>
7
+ <%= form_for resource, as: resource_name, %>
8
+ url: session_path(resource_name) do |f|
9
+ <% if devise_error_messages? || alert %>
10
+ <div class="form-errors red lighten-1">
11
+ <%= devise_error_messages! %>
12
+ <%= alert %>
13
+ </div>
14
+ <% end %>
15
+ <div class="form-inputs row">
16
+ <div class="input-field col s12">
17
+ <i class="material-icons prefix">email</i>
18
+ <%= f.email_field :email, required: true, autofocus: true %>
19
+ <%= f.label :email %>
20
+ </div>
21
+ <div class="input-field col s12">
22
+ <i class="material-icons prefix">lock</i>
23
+ <%= f.password_field :password, required: true, autocomplete: "off" %>
24
+ <%= f.label :password %>
25
+ </div>
26
+ <% if devise_mapping.rememberable? %>
27
+ <p>
28
+ <%= f.check_box :remember_me %>
29
+ <%= f.label :remember_me %>
30
+ </p>
31
+ <% end %>
32
+ </div>
33
+ <div class="form-actions center">
34
+ <%= f.button :submit, "Log In", class: "btn waves-effect" %>
35
+ </div>
36
+ <% end %>
37
+ </div>
38
+ <div class="card-action">
39
+ <div class="devise-links">
40
+ <%= render "<%= file_name %>/shared/links" %>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ </div>
45
+ </div>
@@ -0,0 +1,40 @@
1
+ <% if controller_name != 'sessions' && !current_user.present? %>
2
+ Already a Member?
3
+ <%= link_to "Log In", new_session_path(resource_name) %>
4
+ <br/>
5
+ <% end %>
6
+ <% if devise_mapping.registerable? && controller_name != 'registrations' %>
7
+ Not A Member?
8
+ <%= link_to "Sign Up", new_registration_path(resource_name) %>
9
+ <br/>
10
+ <% end %>
11
+ <% if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
12
+ Forgot
13
+ <%= link_to "Password?", new_password_path(resource_name) %>
14
+ <br/>
15
+ <% end %>
16
+ <% if devise_mapping.confirmable? && controller_name != 'confirmations' %>
17
+ <%= link_to "Didn't Receive Confirmation Instructions?", %>
18
+ new_confirmation_path(resource_name)
19
+ <% end %>
20
+ <br/>
21
+ <% end %>
22
+ <% if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
23
+ <%= link_to "Didn't Receive Unlock Instructions?", %>
24
+ new_unlock_path(resource_name)
25
+ <% end %>
26
+ <br/>
27
+ <% end %>
28
+ <% if devise_mapping.omniauthable? %>
29
+ <% resource_class.omniauth_providers.each do |provider| %>
30
+ <%= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", %>
31
+ omniauth_authorize_path(resource_name, provider)
32
+ <% end %>
33
+ <% end %>
34
+ <% end %>
35
+ <% if controller_name == 'registrations' && current_user.present? %>
36
+ <%= link_to "Cancel My Account", registration_path(resource_name), %>
37
+ data: { confirm: "Are You Sure you want to Delete Your Account?",
38
+ method: :delete }, class: "btn waves-effect red"
39
+ <% end %>
40
+ <% end %>
@@ -0,0 +1,36 @@
1
+ <div class="row login-form">
2
+ <div class="col s12 offset-m3">
3
+ <div class="card hoverable">
4
+ <div class="card-content">
5
+ <span class="card-title center">Resend Unlock Instructions</span>
6
+ <div class="divider"></div>
7
+ <%= form_for resource, as: resource_name, url: unlock_path(resource_name), %>
8
+ html: { method: :post } do |f|
9
+ <% if devise_error_messages? || alert %>
10
+ <div class="form-errors red lighten-1">
11
+ <%= devise_error_messages! %>
12
+ <%= alert %>
13
+ </div>
14
+ <% end %>
15
+ <div class="form-inputs row">
16
+ <div class="input-field col s12">
17
+ <i class="material-icons prefix">email</i>
18
+ <%= f.email_field :email, autofocus: true, required: true %>
19
+ <%= f.label :email %>
20
+ </div>
21
+ </div>
22
+ <div class="form-actions center">
23
+ <%= f.button :submit, "Resend Unlock Instructions", %>
24
+ class: "btn waves-effect"
25
+ <% end %>
26
+ </div>
27
+ <% end %>
28
+ </div>
29
+ <div class="card-action">
30
+ <div class="devise-links">
31
+ <%= render "<%= file_name %>/shared/links" %>
32
+ </div>
33
+ </div>
34
+ </div>
35
+ </div>
36
+ </div>
@@ -24,7 +24,7 @@
24
24
  </div>
25
25
  <div class="card-action">
26
26
  <div class="devise-links">
27
- <%= render "<%= namespace.downcase %>/shared/links" %>
27
+ <%= render "<%= file_name %>/shared/links" %>
28
28
  </div>
29
29
  </div>
30
30
  </div>
@@ -28,7 +28,7 @@
28
28
  </div>
29
29
  <div class="card-action">
30
30
  <div class="devise-links">
31
- <%= render "<%= namespace.downcase %>/shared/links" %>
31
+ <%= render "<%= file_name %>/shared/links" %>
32
32
  </div>
33
33
  </div>
34
34
  </div>
@@ -22,7 +22,7 @@
22
22
  </div>
23
23
  <div class="card-action">
24
24
  <div class="devise-links">
25
- <%= render "<%= namespace.downcase %>/shared/links" %>
25
+ <%= render "<%= file_name %>/shared/links" %>
26
26
  </div>
27
27
  </div>
28
28
  </div>
@@ -35,7 +35,7 @@
35
35
  <% end %>
36
36
  </div>
37
37
  <div class="card-action center">
38
- <%= render "<%= namespace.downcase %>/shared/links" %>
38
+ <%= render "<%= file_name %>/shared/links" %>
39
39
  </div>
40
40
  </div>
41
41
  </div>
@@ -28,7 +28,7 @@
28
28
  </div>
29
29
  <div class="card-action">
30
30
  <div class="devise-links">
31
- <%= render "<%= namespace.downcase %>/shared/links" %>
31
+ <%= render "<%= file_name %>/shared/links" %>
32
32
  </div>
33
33
  </div>
34
34
  </div>
@@ -26,7 +26,7 @@
26
26
  </div>
27
27
  <div class="card-action">
28
28
  <div class="devise-links">
29
- <%= render "<%= namespace.downcase %>/shared/links" %>
29
+ <%= render "<%= file_name %>/shared/links" %>
30
30
  </div>
31
31
  </div>
32
32
  </div>
@@ -22,7 +22,7 @@
22
22
  </div>
23
23
  <div class="card-action">
24
24
  <div class="devise-links">
25
- <%= render "<%= namespace.downcase %>/shared/links" %>
25
+ <%= render "<%= file_name %>/shared/links" %>
26
26
  </div>
27
27
  </div>
28
28
  </div>
@@ -0,0 +1,23 @@
1
+ .row.login-form
2
+ .col.s12
3
+ .card.hoverable
4
+ .card-content
5
+ %span.card-title.center Resend Confirmation Instructions
6
+ .divider
7
+ = form_for resource, as: resource_name,
8
+ url: confirmation_path(resource_name), html: { method: :post } do |f|
9
+ - if devise_error_messages? || alert
10
+ .form-errors.red.lighten-1
11
+ = devise_error_messages!
12
+ = alert
13
+ .form-inputs.row
14
+ .input-field.col.s12
15
+ %i.material-icons.prefix email
16
+ = f.email_field :email, autofocus: true, required: true, class: "validate"
17
+ value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email)
18
+ = f.label :email
19
+ .form-actions.center
20
+ = f.button :submit, "Resend Confirmation Instructions", class: "btn wave-effects"
21
+ .card-action
22
+ .devise-links
23
+ = render "<%= file_name %>/shared/links"
@@ -0,0 +1,30 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ %meta{ content: "text/html; charset=utf-8", "http-equiv": "Content-Type" }/
5
+ %link{ href: "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/css/materialize.min.css", rel: "stylesheet" }/
6
+ %script{ src: "https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js" }
7
+ %script{ src: "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/js/materialize.min.js" }
8
+ :scss
9
+ .form {
10
+ max-width: 650px;
11
+ margin: auto;
12
+ }
13
+
14
+ .btn {
15
+ margin-top: 20px;
16
+ }
17
+ %body.blue-grey
18
+ .row.form
19
+ .col.s12
20
+ .card.hoverable
21
+ .card-content
22
+ %span.card-title.center
23
+ Welcome
24
+ = @resource.email
25
+ !
26
+ .divider
27
+ .center
28
+ %p You can confirm your account email through the link below:
29
+ = link_to 'Confirm my Account', class: 'btn waves-effect cyan',
30
+ confirmation_url(@resource, confirmation_token: @token)
@@ -0,0 +1,31 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ %meta{ content: "text/html; charset=utf-8", "http-equiv": "Content-Type" }/
5
+ %link{ href: "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/css/materialize.min.css", rel: "stylesheet" }/
6
+ %script{ src: "https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js" }
7
+ %script{ src: "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/js/materialize.min.js" }
8
+ :scss
9
+ .form {
10
+ max-width: 650px;
11
+ margin: auto;
12
+ }
13
+
14
+ .btn {
15
+ margin-bottom: 20px;
16
+ margin-top: 20px;
17
+ }
18
+ %body.blue-grey
19
+ .row.form
20
+ .col.s12
21
+ .card.hoverable
22
+ .card-content
23
+ %span.card-title.center
24
+ Hello
25
+ = @resource.email
26
+ !
27
+ .divider
28
+ .center
29
+ %p
30
+ We're contacting you to notify you that your password has
31
+ been changed.
@@ -0,0 +1,37 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ %meta{ content: "text/html; charset=utf-8", "http-equiv": "Content-Type" }/
5
+ %link{ href: "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/css/materialize.min.css", rel: "stylesheet" }/
6
+ %script{ src: "https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js" }
7
+ %script{ src: "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/js/materialize.min.js" }
8
+ :scss
9
+ .form {
10
+ max-width: 650px;
11
+ margin: auto;
12
+ }
13
+
14
+ .btn {
15
+ margin-bottom: 20px;
16
+ margin-top: 20px;
17
+ }
18
+ %body.blue-grey
19
+ .row.form
20
+ .col.s12
21
+ .card.hoverable
22
+ .card-content
23
+ %span.card-title.center
24
+ Hello
25
+ = @resource.email
26
+ !
27
+ .divider
28
+ .center
29
+ %p
30
+ Someone has requested a link to change your password. You can
31
+ do this through the link below.
32
+ = link_to 'Change my Password', class: 'btn waves-effect cyan',
33
+ edit_password_url(@resource, reset_password_token: @token)
34
+ %p If you didn't request this, please ignore this email.
35
+ %p
36
+ Your password won't change until you access the link above and
37
+ create a new one.
@@ -0,0 +1,34 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ %meta{ content: "text/html; charset=utf-8", "http-equiv": "Content-Type" }/
5
+ %link{ href: "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/css/materialize.min.css", rel: "stylesheet" }/
6
+ %script{ src: "https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js" }
7
+ %script{ src: "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/js/materialize.min.js" }
8
+ :scss
9
+ .form {
10
+ max-width: 650px;
11
+ margin: auto;
12
+ }
13
+
14
+ .btn {
15
+ margin-bottom: 20px;
16
+ margin-top: 20px;
17
+ }
18
+ %body.blue-grey
19
+ .row.form
20
+ .col.s12
21
+ .card.hoverable
22
+ .card-content
23
+ %span.card-title.center
24
+ Hello
25
+ = @resource.email
26
+ !
27
+ .divider
28
+ .center
29
+ %p
30
+ Your account has been locked due to an excessive number of
31
+ unsuccessful sign in attempts.
32
+ %p Click the link below to unlock your account:
33
+ = link_to 'Unlock my Account', class: 'btn waves-effect cyan',
34
+ unlock_url(@resource, unlock_token: @token)
@@ -0,0 +1,32 @@
1
+ .row.login-form
2
+ .col.s12
3
+ .card.hoverable
4
+ .card-content
5
+ %span.card-title.center Change your Password
6
+ .divider
7
+ = form_for resource, as: resource_name,
8
+ url: password_path(resource_name), html: { method: :put } do |f|
9
+ - if devise_error_messages? || alert
10
+ .form-errors.red.lighten-1
11
+ = devise_error_messages!
12
+ = alert
13
+ .form-inputs.row
14
+ = f.hidden_field :reset_password_token
15
+ .input-field.col.s12
16
+ %i.material-icons.prefix lock
17
+ = f.password_field :password, autofocus: true, required: true,
18
+ autocomplete: false
19
+ = f.label :password
20
+ %span.help-text
21
+ = @minimum_password_length
22
+ Characters Minimum
23
+ .input-field.col.s12
24
+ %i.material-icons.prefix lock
25
+ = f.password_field :password_confirmation, autofocus: true, required: true,
26
+ autocomplete: false
27
+ = f.label :password_confirmation
28
+ .form-actions.center
29
+ = f.button :submit, "Change my Password", class: "btn waves-effect"
30
+ .card-action
31
+ .devise-links
32
+ = render "<%= file_name %>/shared/links"
@@ -0,0 +1,23 @@
1
+ .row.login-form
2
+ .col.s12
3
+ .card.hoverable
4
+ .card-content
5
+ %span.card-title.center Forgot your Password?
6
+ .divider
7
+ = form_for resource, as: resource_name,
8
+ url: password_path(resource_name), html: { method: :post } do |f|
9
+ - if devise_error_messages? || alert
10
+ .form-errors.red.lighten-1
11
+ = devise_error_messages!
12
+ = alert
13
+ .form-inputs.row
14
+ .input-field.col.s12
15
+ %i.material-icons.prefix email
16
+ = f.email_field :email, autofocus: true, required: true
17
+ = f.label :email
18
+ .form-actions.center
19
+ = f.button :submit, "Send Me Reset Instructions",
20
+ class: "btn waves-effect"
21
+ .card-action
22
+ .devise-links
23
+ = render "<%= file_name %>/shared/links"
@@ -0,0 +1,40 @@
1
+ .row.login-form
2
+ .col.s12.offset-m3
3
+ .card.hoverable
4
+ .card-content
5
+ %span.card-title.center
6
+ Edit
7
+ = resource_name.to_s.humanize
8
+ .divider
9
+ = form_for resource, as: resource_name,
10
+ url: registration_path(resource_name), html: { method: :put } do |f|
11
+ - if devise_error_messages? || alert || (devise_mapping.confirmable? && resource.pending_reconfirmation?)
12
+ .form-errors.red.lighten-1
13
+ = devise_error_messages!
14
+ = alert
15
+ Currently waiting confirmation for:
16
+ = resource.unconfirmed_email
17
+ .form-inputs.row
18
+ .input-field.col.s12
19
+ %i.material-icons.prefix email
20
+ = f.email_field :email, autofocus: true
21
+ = f.label :email
22
+ .input-field.col.s12
23
+ = f.password_field :password, autocomplete: "off"
24
+ = f.label :password,
25
+ "Password (leave blank if you don't want to change it)"
26
+ %span.hint-text
27
+ = @minimum_password_length
28
+ Characters Minimum
29
+ .input-field.col.s12
30
+ = f.password_field :password_confirmation, autocomplete: "off"
31
+ = f.label :password_confirmation
32
+ .input-field.col.s12
33
+ = f.password_field :current_password, autocomplete: "off"
34
+ = f.label :current_password
35
+ %span.hint-text
36
+ we need your current password to confirm your changes
37
+ .form-actions.center
38
+ = f.button :submit, "Update", class: "btn waves-effect"
39
+ .card-action.center
40
+ = render "<%= file_name %>/shared/links"