happy_seed 0.0.19 → 0.0.21
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.
- checksums.yaml +4 -4
- data/Rakefile +4 -69
- data/bin/rails +12 -0
- data/bin/rspec +16 -0
- data/happy_seed.rb +5 -1
- data/happy_seed.txt +25 -18
- data/lib/generators/happy_seed/admin/admin_generator.rb +40 -5
- data/lib/generators/happy_seed/admin/templates/app/admin/campaigns.rb +10 -14
- data/lib/generators/happy_seed/admin/templates/app/admin/newsletter.rb +2 -2
- data/lib/generators/happy_seed/admin/templates/app/admin/user.rb +4 -1
- data/lib/generators/happy_seed/admin/templates/app/controllers/admin/stats_controller.rb +1 -1
- data/lib/generators/happy_seed/admin/templates/docs/README.07.admin.rdoc +33 -4
- data/lib/generators/happy_seed/angular_view/templates/docs/README.11.angular_view.rdoc +2 -4
- data/lib/generators/happy_seed/api/api_generator.rb +38 -39
- data/lib/generators/happy_seed/api/templates/app/controllers/api/v1/base_controller.rb +4 -5
- data/lib/generators/happy_seed/api/templates/app/controllers/api/v1/model_hash.rb +3 -20
- data/lib/generators/happy_seed/api/templates/app/controllers/api/v1/user_tokens_controller.rb +13 -36
- data/lib/generators/happy_seed/api/templates/app/controllers/api/v1/users_controller.rb +14 -40
- data/lib/generators/happy_seed/api/templates/config/initializers/apitome.rb +1 -1
- data/lib/generators/happy_seed/api/templates/docs/README.01.api.rdoc +4 -1
- data/lib/generators/happy_seed/api/templates/docs/api.md +2 -2
- data/lib/generators/happy_seed/api/templates/spec/acceptance/api/v1/user_tokens_spec.rb +10 -53
- data/lib/generators/happy_seed/api/templates/spec/acceptance/api/v1/users_spec.rb +17 -61
- data/lib/generators/happy_seed/base/base_generator.rb +47 -19
- data/lib/generators/happy_seed/base/templates/app/controllers/setup_controller.rb +1 -1
- data/lib/generators/happy_seed/base/templates/app/views/setup/index.html.haml +6 -3
- data/lib/generators/happy_seed/base/templates/application_controller.rb +1 -1
- data/lib/generators/happy_seed/base/templates/docs/README.00.base.rdoc +3 -3
- data/lib/generators/happy_seed/bootstrap/bootstrap_generator.rb +5 -2
- data/lib/generators/happy_seed/bootstrap/templates/app/assets/stylesheets/application.scss +5 -1
- data/lib/generators/happy_seed/bootstrap/templates/app/assets/stylesheets/components/_profile_panels.scss +62 -0
- data/lib/generators/happy_seed/bootstrap/templates/app/assets/stylesheets/components/_slideup_header.scss +51 -0
- data/lib/generators/happy_seed/bootstrap/templates/app/assets/stylesheets/shared/_grid.scss +0 -12
- data/lib/generators/happy_seed/bootstrap/templates/app/views/application/_javascripts.html.haml +7 -4
- data/lib/generators/happy_seed/bootstrap/templates/docs/README.01.bootstrap.rdoc +3 -0
- data/lib/generators/happy_seed/ckeditor/ckeditor_generator.rb +31 -0
- data/lib/generators/happy_seed/ckeditor/templates/docs/README.01.ckeditor.rdoc +35 -0
- data/lib/generators/happy_seed/devise/devise_generator.rb +12 -19
- data/lib/generators/happy_seed/devise/templates/app/views/devise/confirmations/new.html.haml +17 -0
- data/lib/generators/happy_seed/devise/templates/app/views/devise/mailer/confirmation_instructions.html.erb +14 -0
- data/lib/generators/happy_seed/devise/templates/app/views/devise/mailer/confirmation_instructions.text.rhtml +7 -0
- data/lib/generators/happy_seed/devise/templates/app/views/devise/mailer/password_change.html.erb +3 -0
- data/lib/generators/happy_seed/devise/templates/app/views/devise/mailer/reset_password_instructions.html.erb +15 -0
- data/lib/generators/happy_seed/devise/templates/app/views/devise/mailer/reset_password_instructions.text.erb +11 -0
- data/lib/generators/happy_seed/devise/templates/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/lib/generators/happy_seed/devise/templates/app/views/devise/passwords/edit.html.haml +14 -13
- data/lib/generators/happy_seed/devise/templates/app/views/devise/passwords/new.html.haml +12 -16
- data/lib/generators/happy_seed/devise/templates/app/views/devise/registrations/edit.html.haml +28 -40
- data/lib/generators/happy_seed/devise/templates/app/views/devise/registrations/new.html.haml +16 -24
- data/lib/generators/happy_seed/devise/templates/app/views/devise/sessions/new.html.haml +13 -18
- data/lib/generators/happy_seed/devise/templates/app/views/devise/shared/_links.html.erb +25 -0
- data/lib/generators/happy_seed/devise/templates/app/views/devise/unlocks/new.html.erb +16 -0
- data/lib/generators/happy_seed/devise/templates/docs/README.03.devise.rdoc +2 -2
- data/lib/generators/happy_seed/devise/templates/spec/factories/users.rb +5 -4
- data/lib/generators/happy_seed/devise/templates/spec/features/registration_spec.rb +149 -0
- data/lib/generators/happy_seed/devise/templates/spec/mailers/previews/devise_preview.rb +28 -0
- data/lib/generators/happy_seed/devise_confirmable/devise_confirmable_generator.rb +45 -0
- data/lib/generators/happy_seed/devise_confirmable/templates/add_confirmable_to_devise.rb +24 -0
- data/lib/generators/happy_seed/devise_confirmable/templates/app/controllers/confirmations_controller.rb +10 -0
- data/lib/generators/happy_seed/devise_confirmable/templates/app/views/devise/invitations/edit.html.haml +22 -0
- data/lib/generators/happy_seed/devise_confirmable/templates/app/views/devise/invitations/new.html.haml +20 -0
- data/lib/generators/happy_seed/devise_confirmable/templates/app/views/devise/mailer/invitation_instructions.html.erb +20 -0
- data/lib/generators/happy_seed/devise_confirmable/templates/docs/README.03.devise_confirmable.rdoc +23 -0
- data/lib/generators/happy_seed/devise_invitable/devise_invitable_generator.rb +3 -1
- data/lib/generators/happy_seed/devise_invitable/templates/app/views/devise/invitations/edit.html.haml +3 -2
- data/lib/generators/happy_seed/devise_invitable/templates/app/views/devise/invitations/new.html.haml +3 -2
- data/lib/generators/happy_seed/devise_invitable/templates/app/views/devise/mailer/invitation_instructions.html.erb +20 -0
- data/lib/generators/happy_seed/devise_invitable/templates/spec/features/invitations_spec.rb +61 -0
- data/lib/generators/happy_seed/facebook/facebook_generator.rb +2 -0
- data/lib/generators/happy_seed/facebook/templates/spec/features/facebook_registration_spec.rb +72 -0
- data/lib/generators/happy_seed/googleoauth/googleoauth_generator.rb +1 -1
- data/lib/generators/happy_seed/happy_seed_generator.rb +1 -3
- data/lib/generators/happy_seed/html_email/html_email_generator.rb +32 -0
- data/lib/generators/happy_seed/html_email/templates/app/views/layouts/mailer.html.erb +244 -0
- data/lib/generators/happy_seed/html_email/templates/docs/README.01.html_email.rdoc +25 -0
- data/lib/generators/happy_seed/omniauth/omniauth_generator.rb +4 -2
- data/lib/generators/happy_seed/omniauth/templates/app/controllers/omniauth_callbacks_controller.rb +3 -13
- data/lib/generators/happy_seed/omniauth/templates/app/models/identity.rb +13 -9
- data/lib/generators/happy_seed/omniauth/templates/docs/README.04.omniauth.rdoc +5 -5
- data/lib/generators/happy_seed/omniauth/templates/spec/factories/oauth.rb +6 -1
- data/lib/generators/happy_seed/omniauth/templates/spec/features/oauth_registration_spec.rb +80 -0
- data/lib/generators/happy_seed/omniauth/templates/spec/models/identity_spec.rb +39 -12
- data/lib/generators/happy_seed/omniauth/templates/{app/models/form_user.rb → user.rb} +4 -5
- data/lib/generators/happy_seed/plugin/plugin_generator.rb +13 -11
- data/lib/generators/happy_seed/react/react_generator.rb +36 -0
- data/lib/generators/happy_seed/react/templates/docs/README.10.react.rdoc +20 -0
- data/lib/generators/happy_seed/roles/roles_generator.rb +38 -0
- data/lib/generators/happy_seed/roles/templates/ability.rb +9 -0
- data/lib/generators/happy_seed/roles/templates/docs/README.03.roles.rdoc +23 -0
- data/lib/generators/happy_seed/simple_cms/simple_cms_generator.rb +41 -0
- data/lib/generators/happy_seed/simple_cms/templates/app/admin/simple_content.rb +42 -0
- data/lib/generators/happy_seed/simple_cms/templates/app/controllers/simple_content_controller.rb +7 -0
- data/lib/generators/happy_seed/simple_cms/templates/app/models/simple_content.rb +5 -0
- data/lib/generators/happy_seed/simple_cms/templates/app/views/splash/faq.html.haml +13 -0
- data/lib/generators/happy_seed/simple_cms/templates/app/views/splash/index.html.haml +79 -0
- data/lib/generators/happy_seed/simple_cms/templates/application_helper.rb +18 -0
- data/lib/generators/happy_seed/simple_cms/templates/create_simple_contents.rb +14 -0
- data/lib/generators/happy_seed/simple_cms/templates/docs/README.04.simple_cms.rdoc +32 -0
- data/lib/generators/happy_seed/simple_cms/templates/spec/factories/oauth.rb +10 -0
- data/lib/generators/happy_seed/simple_cms/templates/spec/features/oauth_registration_spec.rb +80 -0
- data/lib/generators/happy_seed/simple_cms/templates/spec/models/identity_spec.rb +49 -0
- data/lib/generators/happy_seed/splash/templates/app/assets/stylesheets/splash.css.scss +119 -84
- data/lib/generators/happy_seed/splash/templates/app/controllers/splash_controller.rb +1 -1
- data/lib/generators/happy_seed/splash/templates/app/views/layouts/splash.html.haml +15 -18
- data/lib/generators/happy_seed/splash/templates/app/views/splash/index.html.haml +54 -92
- data/lib/generators/happy_seed/splash/templates/docs/README.02.splash.rdoc +2 -2
- data/lib/generators/happy_seed/splash/templates/spec/controllers/splash_controller_spec.rb +11 -3
- data/lib/generators/happy_seed/static/templates/source/stylesheets/application.css.scss +1 -1
- data/lib/generators/happy_seed/static_blog/templates/Gemfile.lock +45 -49
- data/lib/generators/happy_seed/twitter/templates/spec/features/twitter_oauth_registration_spec.rb +57 -0
- data/lib/generators/happy_seed/twitter/twitter_generator.rb +2 -1
- data/lib/happy_seed/cli.rb +1 -1
- data/lib/happy_seed/engine.rb +12 -0
- data/lib/happy_seed/version.rb +1 -1
- data/lib/tasks/seed.rake +56 -0
- data/{test → spec}/dummy/Rakefile +0 -0
- data/spec/dummy/app/assets/config/manifest.js +5 -0
- data/{test → spec}/dummy/app/assets/javascripts/application.js +3 -3
- data/spec/dummy/app/assets/javascripts/cable.coffee +11 -0
- data/{test → spec}/dummy/app/assets/stylesheets/application.css +4 -4
- data/spec/dummy/app/channels/application_cable/channel.rb +5 -0
- data/spec/dummy/app/channels/application_cable/connection.rb +5 -0
- data/{test → spec}/dummy/app/controllers/application_controller.rb +0 -0
- data/{test → spec}/dummy/app/helpers/application_helper.rb +0 -0
- data/spec/dummy/app/jobs/application_job.rb +2 -0
- data/spec/dummy/app/mailers/application_mailer.rb +4 -0
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/app/views/layouts/application.html.erb +15 -0
- data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/{test → spec}/dummy/bin/bundle +0 -0
- data/{test → spec}/dummy/bin/rails +1 -1
- data/{test → spec}/dummy/bin/rake +0 -0
- data/spec/dummy/bin/setup +34 -0
- data/spec/dummy/bin/update +29 -0
- data/spec/dummy/config.ru +8 -0
- data/spec/dummy/config/application.rb +21 -0
- data/{test → spec}/dummy/config/boot.rb +0 -0
- data/spec/dummy/config/cable.yml +10 -0
- data/{test → spec}/dummy/config/database.yml +0 -0
- data/{test → spec}/dummy/config/environment.rb +0 -0
- data/{test → spec}/dummy/config/environments/development.rb +28 -3
- data/{test → spec}/dummy/config/environments/production.rb +29 -24
- data/{test → spec}/dummy/config/environments/test.rb +6 -3
- data/spec/dummy/config/initializers/active_record_belongs_to_required_by_default.rb +6 -0
- data/spec/dummy/config/initializers/application_controller_renderer.rb +6 -0
- data/{test → spec}/dummy/config/initializers/assets.rb +3 -0
- data/{test → spec}/dummy/config/initializers/backtrace_silencers.rb +0 -0
- data/spec/dummy/config/initializers/callback_terminator.rb +6 -0
- data/{test → spec}/dummy/config/initializers/cookies_serializer.rb +3 -1
- data/{test → spec}/dummy/config/initializers/filter_parameter_logging.rb +0 -0
- data/{test → spec}/dummy/config/initializers/inflections.rb +0 -0
- data/{test → spec}/dummy/config/initializers/mime_types.rb +0 -0
- data/spec/dummy/config/initializers/per_form_csrf_tokens.rb +4 -0
- data/spec/dummy/config/initializers/request_forgery_protection.rb +4 -0
- data/{test → spec}/dummy/config/initializers/session_store.rb +0 -0
- data/{test → spec}/dummy/config/initializers/wrap_parameters.rb +2 -2
- data/{test → spec}/dummy/config/locales/en.yml +0 -0
- data/spec/dummy/config/puma.rb +47 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/{test → spec}/dummy/config/secrets.yml +3 -3
- data/spec/dummy/db/schema.rb +16 -0
- data/{test → spec}/dummy/public/404.html +0 -0
- data/{test → spec}/dummy/public/422.html +0 -0
- data/{test → spec}/dummy/public/500.html +0 -0
- data/{test/dummy/public/favicon.ico → spec/dummy/public/apple-touch-icon-precomposed.png} +0 -0
- data/spec/dummy/public/apple-touch-icon.png +0 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/rails_helper.rb +58 -0
- data/spec/spec_helper.rb +91 -0
- metadata +195 -89
- data/lib/generators/happy_seed/api/templates/app/controllers/api/v1/configurations_controller.rb +0 -11
- data/lib/generators/happy_seed/api/templates/spec/acceptance/api/v1/configurations_spec.rb +0 -21
- data/lib/generators/happy_seed/base/templates/config/puma.rb +0 -15
- data/lib/generators/happy_seed/base/templates/spec/support/controller_helpers.rb +0 -12
- data/lib/generators/happy_seed/bootstrap/templates/app/assets/stylesheets/sections/_profile_page.scss +0 -9
- data/lib/generators/happy_seed/bootstrap/templates/lib/templates/haml/scaffold/_form.html.haml +0 -5
- data/lib/generators/happy_seed/devise/templates/spec/features/forgot_password_spec.rb +0 -54
- data/lib/generators/happy_seed/devise/templates/test/mailers/previews/devise_preview.rb +0 -13
- data/lib/generators/happy_seed/omniauth/templates/spec/features/registration_spec.rb +0 -81
- data/lib/generators/happy_seed/static/templates/Gemfile.lock +0 -158
- data/lib/tasks/seed_tasks.rake +0 -4
- data/test/dummy/README.rdoc +0 -28
- data/test/dummy/app/views/layouts/application.html.erb +0 -14
- data/test/dummy/config.ru +0 -4
- data/test/dummy/config/application.rb +0 -23
- data/test/dummy/config/initializers/jazz_hands.rb +0 -5
- data/test/dummy/config/routes.rb +0 -56
- data/test/seed_test.rb +0 -7
- data/test/test_helper.rb +0 -15
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'generators/happy_seed/happy_seed_generator'
|
2
2
|
require 'generators/happy_seed/bootstrap/bootstrap_generator'
|
3
|
+
require 'generators/happy_seed/html_email/html_email_generator'
|
3
4
|
|
4
5
|
module HappySeed
|
5
6
|
module Generators
|
@@ -14,8 +15,9 @@ module HappySeed
|
|
14
15
|
return if already_installed
|
15
16
|
|
16
17
|
require_generator BootstrapGenerator
|
18
|
+
require_generator HtmlEmailGenerator
|
17
19
|
|
18
|
-
gem 'devise', '~>
|
20
|
+
gem 'devise', '~> 4.2'
|
19
21
|
|
20
22
|
Bundler.with_clean_env do
|
21
23
|
run "bundle install --without production"
|
@@ -23,14 +25,12 @@ module HappySeed
|
|
23
25
|
|
24
26
|
run 'bin/spring stop'
|
25
27
|
|
26
|
-
puts "Devise: #{self.class.fingerprint}"
|
27
|
-
|
28
28
|
Bundler.with_clean_env do
|
29
29
|
run 'rails generate devise:install'
|
30
30
|
run 'rails generate devise User'
|
31
31
|
run 'rails generate devise:views'
|
32
32
|
end
|
33
|
-
|
33
|
+
|
34
34
|
if gem_available?( "haml-rails" )
|
35
35
|
remove_file 'app/views/devise/registrations/new.html.erb'
|
36
36
|
remove_file 'app/views/devise/registrations/edit.html.erb'
|
@@ -39,31 +39,20 @@ module HappySeed
|
|
39
39
|
remove_file 'app/views/devise/passwords/new.html.erb'
|
40
40
|
end
|
41
41
|
|
42
|
+
remove_file 'app/views/devise/mailer/reset_password_instructions.html.erb'
|
43
|
+
remove_file 'app/views/devise/mailer/confirmation_instructions.html.erb'
|
44
|
+
|
42
45
|
remove_file "spec/factories/users.rb"
|
43
46
|
|
44
47
|
begin
|
45
48
|
prepend_to_file 'spec/spec_helper.rb', "require 'devise'\n"
|
46
|
-
prepend_to_file 'spec/spec_helper.rb', "require_relative 'support/controller_helpers'\n"
|
47
|
-
inject_into_file 'spec/spec_helper.rb', "\n config.include Devise::TestHelpers, type: :controller\n", :before => "\nend\n"
|
48
|
-
inject_into_file 'spec/spec_helper.rb', "\n config.include Warden::Test::Helpers, type: :feature\n config.include ControllerHelpers, type: :controller\n Warden.test_mode!\n", :before => "\nend\n"
|
49
49
|
rescue
|
50
50
|
say_status :spec, "Unable to add devise helpers to spec_helper.rb", :red
|
51
51
|
end
|
52
52
|
|
53
|
-
begin
|
54
|
-
inject_into_file 'spec/rails_helper.rb', "\n config.include Devise::TestHelpers, type: :controller\n config.include Warden::Test::Helpers, type: :feature\n", :after => "FactoryGirl::Syntax::Methods\n"
|
55
|
-
rescue
|
56
|
-
say_status :spec, "Unable to add devise helpers to rails_helper.rb", :red
|
57
|
-
end
|
58
|
-
|
59
|
-
append_to_file "features/support/env.rb", "
|
60
|
-
Warden.test_mode!
|
61
|
-
World(Warden::Test::Helpers)
|
62
|
-
After{ Warden.test_reset! }"
|
63
|
-
|
64
53
|
directory 'app'
|
65
54
|
directory 'docs'
|
66
|
-
directory 'test'
|
55
|
+
# directory 'test'
|
67
56
|
directory 'spec'
|
68
57
|
|
69
58
|
application(nil, env: "development") do
|
@@ -79,6 +68,10 @@ After{ Warden.test_reset! }"
|
|
79
68
|
else
|
80
69
|
say_status :gsub_file, "Can't find application/_header.html.haml, skipping"
|
81
70
|
end
|
71
|
+
|
72
|
+
gsub_file "config/initializers/devise.rb", "# config.parent_mailer = 'ActionMailer::Base'", "config.parent_mailer = 'ApplicationMailer'"
|
73
|
+
|
74
|
+
gsub_file 'config/routes.rb', "devise_for :users", "devise_for :users, :controllers => { }"
|
82
75
|
end
|
83
76
|
|
84
77
|
private
|
@@ -0,0 +1,17 @@
|
|
1
|
+
.container
|
2
|
+
.row
|
3
|
+
.profile.center
|
4
|
+
= panel title: 'Resend confirmation instructions', context: :primary do
|
5
|
+
= simple_form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post, class: 'form-horizontal' }, wrapper: :horizontal_form, wrapper_mappings: { check_boxes: :horizontal_radio_and_checkboxes, boolean: :horizontal_boolean } ) do |f|
|
6
|
+
.panel-body
|
7
|
+
= f.error_notification
|
8
|
+
= f.full_error :confirmation_token
|
9
|
+
|
10
|
+
.form-inputs
|
11
|
+
= f.input :email, required: true, autofocus: true
|
12
|
+
.panel-footer
|
13
|
+
.buttons
|
14
|
+
= f.button :submit, "Resend confirmation instructions", class: "btn-primary"
|
15
|
+
|
16
|
+
.links
|
17
|
+
= render "devise/shared/links"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<p class="center">Welcome <%= @resource.email %>!</p>
|
2
|
+
|
3
|
+
<p>You can confirm your account email through the link below:</p>
|
4
|
+
|
5
|
+
<!-- button -->
|
6
|
+
<table class="btn-primary center" cellpadding="0" cellspacing="0" border="0">
|
7
|
+
<tr>
|
8
|
+
<td>
|
9
|
+
<a href="<%= confirmation_url(@resource, confirmation_token: @token) %>">Confirm my account</a>
|
10
|
+
</td>
|
11
|
+
</tr>
|
12
|
+
</table>
|
13
|
+
<!-- /button -->
|
14
|
+
<p>Thanks, have a lovely day.</p>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<p class="center">Hello <%= @resource.email %>!</p>
|
2
|
+
|
3
|
+
<p>Someone has requested a link to change your password. You can do this
|
4
|
+
through the link below:</p>
|
5
|
+
|
6
|
+
<!-- button -->
|
7
|
+
<table class="btn-primary center" cellpadding="0" cellspacing="0" border="0">
|
8
|
+
<tr>
|
9
|
+
<td>
|
10
|
+
<a href="<%= edit_password_url(@resource, reset_password_token: @token) %>">Click here to reset your password</a>
|
11
|
+
</td>
|
12
|
+
</tr>
|
13
|
+
</table>
|
14
|
+
<!-- /button -->
|
15
|
+
<p>Thanks, have a lovely day.</p>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Hello <%= @resource.email %>!
|
2
|
+
|
3
|
+
Someone has requested a link to change your password. You can do this
|
4
|
+
through the link below:
|
5
|
+
|
6
|
+
<%= edit_password_url(@resource, reset_password_token: @token) %>
|
7
|
+
|
8
|
+
If you didn't request this, please ignore this email.
|
9
|
+
|
10
|
+
Your password won't change until you access the link above and
|
11
|
+
create a new one.
|
data/lib/generators/happy_seed/devise/templates/app/views/devise/mailer/unlock_instructions.html.erb
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
<p>Hello <%= @resource.email %>!</p>
|
2
|
+
|
3
|
+
<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
|
4
|
+
|
5
|
+
<p>Click the link below to unlock your account:</p>
|
6
|
+
|
7
|
+
<p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
|
@@ -1,19 +1,20 @@
|
|
1
1
|
.container
|
2
2
|
.row
|
3
|
-
.
|
4
|
-
|
3
|
+
.profile.center
|
4
|
+
= panel title: 'Change your password', context: :primary do
|
5
|
+
= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: 'form-horizontal' }, wrapper: :horizontal_form, wrapper_mappings: { check_boxes: :horizontal_radio_and_checkboxes, boolean: :horizontal_boolean } ) do |f|
|
6
|
+
.panel-body
|
7
|
+
= f.error_notification
|
5
8
|
|
6
|
-
|
7
|
-
|
9
|
+
= f.input :reset_password_token, as: :hidden
|
10
|
+
= f.full_error :reset_password_token
|
8
11
|
|
9
|
-
|
12
|
+
= f.input :password, label: "New password", required: true, autofocus: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length)
|
13
|
+
= f.input :password_confirmation, label: "Confirm your new password", required: true
|
10
14
|
|
11
|
-
|
15
|
+
.panel-footer
|
16
|
+
.buttons
|
17
|
+
= f.button :submit, "Change my password", class: "btn-primary"
|
12
18
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
= f.password_field :password, autocomplete: "off", autofocus: true
|
17
|
-
= f.password_field :password_confirmation, autocomplete: "off"
|
18
|
-
|
19
|
-
= f.submit "Change my password", :class=>'btn btn-primary form-control'
|
19
|
+
.links
|
20
|
+
= render "devise/shared/links"
|
@@ -1,20 +1,16 @@
|
|
1
1
|
.container
|
2
2
|
.row
|
3
|
-
.
|
4
|
-
|
3
|
+
.profile.center
|
4
|
+
= panel title: 'Forgot your password?', context: :primary do
|
5
|
+
= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post, class: 'form-horizontal' }, wrapper: :horizontal_form, wrapper_mappings: { check_boxes: :horizontal_radio_and_checkboxes, boolean: :horizontal_boolean } ) do |f|
|
6
|
+
.panel-body
|
7
|
+
= f.error_notification
|
5
8
|
|
6
|
-
|
7
|
-
|
9
|
+
.form-inputs
|
10
|
+
= f.input :email, required: true, autofocus: true
|
11
|
+
.panel-footer
|
12
|
+
.buttons
|
13
|
+
= f.button :submit, "Send me reset password instructions", class: "btn-primary"
|
8
14
|
|
9
|
-
|
10
|
-
|
11
|
-
= form_for(resource, as: resource_name, url: password_path(resource_name), layout: :horizontal) do |f|
|
12
|
-
|
13
|
-
/ = devise_error_messages!
|
14
|
-
|
15
|
-
= f.email_field :email, autofocus: true
|
16
|
-
|
17
|
-
= f.submit "Send me reset password instructions"
|
18
|
-
|
19
|
-
%p.text-right
|
20
|
-
= render partial: "devise/shared/links"
|
15
|
+
.links
|
16
|
+
= render "devise/shared/links"
|
data/lib/generators/happy_seed/devise/templates/app/views/devise/registrations/edit.html.haml
CHANGED
@@ -1,50 +1,38 @@
|
|
1
|
-
- @title = "Edit #{resource_name.to_s.humanize}"
|
2
1
|
.container
|
3
2
|
.row
|
4
|
-
.
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
.panel-body
|
11
|
-
|
12
|
-
= form_for resource, as: resource_name, url: registration_path(resource_name), layout: :horizontal do |f|
|
13
|
-
|
14
|
-
/ = devise_error_messages!
|
15
|
-
|
16
|
-
= f.email_field :email, autofocus: true
|
3
|
+
.profile.large_panel
|
4
|
+
= panel title: 'Edit Profile', context: :primary do
|
5
|
+
= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
|
6
|
+
.panel-body
|
7
|
+
= f.error_notification
|
17
8
|
|
18
|
-
-
|
19
|
-
|
20
|
-
Currently waiting confirmation for:
|
21
|
-
= resource.unconfirmed_email
|
9
|
+
.form-inputs
|
10
|
+
= f.input :email, required: true, autofocus: true
|
22
11
|
|
23
|
-
|
24
|
-
|
25
|
-
|
12
|
+
= if devise_mapping.confirmable? && resource.pending_reconfirmation?
|
13
|
+
%p
|
14
|
+
Currently waiting confirmation for:
|
15
|
+
= resource.unconfirmed_email
|
26
16
|
|
27
|
-
|
17
|
+
= f.input :password, autocomplete: "off", hint: "leave it blank if you don't want to change it", required: false
|
18
|
+
= f.input :password_confirmation, required: false
|
19
|
+
= f.input :current_password, hint: "we need your current password to confirm your changes", required: true
|
20
|
+
.panel-footer
|
21
|
+
.form-actions
|
22
|
+
= f.button :submit, "Update", class: "btn-primary"
|
28
23
|
|
29
24
|
- if devise_mapping.omniauthable?
|
30
|
-
|
31
|
-
.panel-heading
|
32
|
-
Connect your accounts
|
33
|
-
|
25
|
+
= panel title: 'Connect your accounts', context: :primary do
|
34
26
|
.panel-body
|
35
|
-
|
36
|
-
-
|
37
|
-
|
38
|
-
|
39
|
-
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
.panel-heading
|
45
|
-
Cancel my account
|
46
|
-
|
27
|
+
- resource_class.omniauth_providers.each do |provider|
|
28
|
+
- if resource.identities.where( :provider => provider ).first
|
29
|
+
%p= link_to "Reconnect with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider), class: "btn btn-default"
|
30
|
+
- else
|
31
|
+
%p= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider), class: "btn btn-default"
|
32
|
+
|
33
|
+
.profile.sidebar
|
34
|
+
= panel title: "Cancel my Account", context: :danger do
|
47
35
|
.panel-body
|
48
36
|
%p
|
49
|
-
Unhappy?
|
50
|
-
=
|
37
|
+
Unhappy?
|
38
|
+
= link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete, class: "btn btn-danger"
|
data/lib/generators/happy_seed/devise/templates/app/views/devise/registrations/new.html.haml
CHANGED
@@ -1,26 +1,18 @@
|
|
1
|
-
- @title = "Sign Up"
|
2
1
|
.container
|
3
2
|
.row
|
4
|
-
.
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- if devise_mapping.rememberable?
|
21
|
-
= f.check_box :remember_me
|
22
|
-
|
23
|
-
= f.submit "Sign Up"
|
24
|
-
|
25
|
-
%p.text-right
|
26
|
-
= render partial: "devise/shared/links"
|
3
|
+
.profile.center
|
4
|
+
= panel title: 'Signup', context: :primary do
|
5
|
+
= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { class: 'form-horizontal' }, wrapper: :horizontal_form, wrapper_mappings: { check_boxes: :horizontal_radio_and_checkboxes, boolean: :horizontal_boolean } ) do |f|
|
6
|
+
.panel-body
|
7
|
+
= f.error_notification
|
8
|
+
|
9
|
+
.form-inputs
|
10
|
+
= f.input :email, required: true, autofocus: true
|
11
|
+
= f.input :password, required: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length)
|
12
|
+
= f.input :password_confirmation, required: true
|
13
|
+
.panel-footer
|
14
|
+
.buttons
|
15
|
+
= f.button :submit, "Sign up", class: "btn-primary"
|
16
|
+
|
17
|
+
.links
|
18
|
+
= render "devise/shared/links"
|
@@ -1,22 +1,17 @@
|
|
1
|
-
- @title = "Sign In"
|
2
1
|
.container
|
3
2
|
.row
|
4
|
-
.
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
.profile.center
|
4
|
+
= panel title: 'Log in', context: :primary do
|
5
|
+
= simple_form_for(resource, as: resource_name, url: session_path(resource_name), html: { class: 'form-horizontal' }, wrapper: :horizontal_form, wrapper_mappings: { check_boxes: :horizontal_radio_and_checkboxes, boolean: :horizontal_boolean } ) do |f|
|
6
|
+
.panel-body
|
7
|
+
= f.error_notification
|
8
8
|
|
9
|
-
|
9
|
+
= f.input :email, required: true, autofocus: true
|
10
|
+
= f.input :password, required: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length)
|
11
|
+
= f.input :remember_me, as: :boolean if devise_mapping.rememberable?
|
12
|
+
.panel-footer
|
13
|
+
.buttons
|
14
|
+
= f.button :submit, "Log in", class: "btn-primary"
|
10
15
|
|
11
|
-
|
12
|
-
|
13
|
-
= f.email_field :email, autofocus: true
|
14
|
-
= f.password_field :password, autocomplete: "off"
|
15
|
-
|
16
|
-
- if devise_mapping.rememberable?
|
17
|
-
= f.check_box :remember_me
|
18
|
-
|
19
|
-
= f.submit "Sign in", :class=>'btn btn-primary form-control'
|
20
|
-
|
21
|
-
%p.text-right
|
22
|
-
= render partial: "devise/shared/links"
|
16
|
+
.links
|
17
|
+
= render "devise/shared/links"
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<%- if controller_name != 'sessions' %>
|
2
|
+
<%= link_to "Log in", new_session_path(resource_name) %><br />
|
3
|
+
<% end -%>
|
4
|
+
|
5
|
+
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
6
|
+
<%= link_to "Sign up", new_registration_path(resource_name) %><br />
|
7
|
+
<% end -%>
|
8
|
+
|
9
|
+
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
|
10
|
+
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
|
11
|
+
<% end -%>
|
12
|
+
|
13
|
+
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
14
|
+
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
|
15
|
+
<% end -%>
|
16
|
+
|
17
|
+
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
18
|
+
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
|
19
|
+
<% end -%>
|
20
|
+
|
21
|
+
<%- if devise_mapping.omniauthable? %>
|
22
|
+
<%- resource_class.omniauth_providers.each do |provider| %>
|
23
|
+
<%= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider) %><br />
|
24
|
+
<% end -%>
|
25
|
+
<% end -%>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<h2>Resend unlock instructions</h2>
|
2
|
+
|
3
|
+
<%= simple_form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
|
4
|
+
<%= f.error_notification %>
|
5
|
+
<%= f.full_error :unlock_token %>
|
6
|
+
|
7
|
+
<div class="form-inputs">
|
8
|
+
<%= f.input :email, required: true, autofocus: true %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="form-actions">
|
12
|
+
<%= f.button :submit, "Resend unlock instructions" %>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<%= render "devise/shared/links" %>
|
@@ -10,6 +10,7 @@ The happy_seed:devise generator
|
|
10
10
|
* Copies over devise views
|
11
11
|
* Gives them bootstrap views
|
12
12
|
* Installs MailPreview for the device mailer.
|
13
|
+
* HTML Emails
|
13
14
|
|
14
15
|
### Why do you want this?
|
15
16
|
|
@@ -25,5 +26,4 @@ Take a look at the user model to see if you want to configure any other features
|
|
25
26
|
|
26
27
|
Once you feel good about it run "rake db:migrate" and you should be good to go.
|
27
28
|
|
28
|
-
|
29
|
-
|
29
|
+
For more information on devise please consult the docs [here.](https://github.com/plataformatec/devise)
|