ditty 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.pryrc +2 -0
- data/.rubocop.yml +1 -1
- data/.travis.yml +5 -4
- data/CNAME +1 -0
- data/Dockerfile +18 -0
- data/Gemfile.ci +0 -2
- data/Rakefile +2 -2
- data/_config.yml +1 -0
- data/config.ru +4 -4
- data/ditty.gemspec +9 -3
- data/docs/CNAME +1 -0
- data/docs/_config.yml +1 -0
- data/docs/index.md +34 -0
- data/exe/ditty +2 -0
- data/lib/ditty.rb +4 -2
- data/lib/ditty/cli.rb +28 -4
- data/lib/ditty/components/{app.rb → ditty.rb} +19 -14
- data/lib/ditty/controllers/{application.rb → application_controller.rb} +58 -29
- data/lib/ditty/controllers/{audit_logs.rb → audit_logs_controller.rb} +2 -2
- data/lib/ditty/controllers/{auth.rb → auth_controller.rb} +17 -16
- data/lib/ditty/controllers/{component.rb → component_controller.rb} +19 -18
- data/lib/ditty/controllers/{main.rb → main_controller.rb} +6 -2
- data/lib/ditty/controllers/roles_controller.rb +23 -0
- data/lib/ditty/controllers/{user_login_traits.rb → user_login_traits_controller.rb} +4 -3
- data/lib/ditty/controllers/{users.rb → users_controller.rb} +11 -10
- data/lib/ditty/db.rb +4 -3
- data/lib/ditty/emails/base.rb +5 -2
- data/lib/ditty/generators/crud_generator.rb +104 -0
- data/lib/ditty/generators/migration_generator.rb +26 -0
- data/lib/ditty/generators/project_generator.rb +51 -0
- data/lib/ditty/helpers/component.rb +2 -1
- data/lib/ditty/helpers/pundit.rb +20 -4
- data/lib/ditty/helpers/response.rb +20 -13
- data/lib/ditty/helpers/views.rb +7 -3
- data/lib/ditty/listener.rb +5 -3
- data/lib/ditty/memcached.rb +8 -0
- data/lib/ditty/middleware/accept_extension.rb +2 -2
- data/lib/ditty/middleware/error_catchall.rb +2 -2
- data/lib/ditty/models/base.rb +4 -0
- data/lib/ditty/models/role.rb +1 -0
- data/lib/ditty/models/user.rb +14 -1
- data/lib/ditty/policies/role_policy.rb +1 -1
- data/lib/ditty/policies/user_login_trait_policy.rb +1 -1
- data/lib/ditty/services/authentication.rb +11 -10
- data/lib/ditty/services/email.rb +8 -4
- data/lib/ditty/services/logger.rb +1 -1
- data/lib/ditty/tasks/ditty.rake +17 -0
- data/lib/ditty/tasks/omniauth-ldap.rake +2 -2
- data/lib/ditty/templates/.gitignore +5 -0
- data/lib/ditty/templates/.rspec +2 -0
- data/lib/ditty/templates/.rubocop.yml +7 -0
- data/lib/ditty/templates/Rakefile +12 -0
- data/lib/ditty/templates/application.rb +12 -0
- data/lib/ditty/templates/config.ru +37 -0
- data/lib/ditty/templates/controller.rb.erb +58 -0
- data/lib/ditty/templates/env.example +4 -0
- data/lib/ditty/templates/lib/project.rb.erb +5 -0
- data/lib/ditty/templates/migration.rb.erb +7 -0
- data/lib/ditty/templates/model.rb.erb +26 -0
- data/lib/ditty/templates/pids/.empty_directory +0 -0
- data/lib/ditty/templates/policy.rb.erb +48 -0
- data/lib/ditty/templates/public/css/sb-admin-2.min.css +10 -0
- data/lib/ditty/templates/public/js/sb-admin-2.min.js +7 -0
- data/lib/ditty/templates/settings.yml.erb +18 -0
- data/lib/ditty/templates/sidekiq.rb +18 -0
- data/lib/ditty/templates/sidekiq.yml +9 -0
- data/lib/ditty/templates/spec_helper.rb +43 -0
- data/lib/ditty/templates/type.rb.erb +21 -0
- data/lib/ditty/templates/views/display.haml.tt +20 -0
- data/lib/ditty/templates/views/edit.haml.tt +10 -0
- data/lib/ditty/templates/views/form.haml.tt +11 -0
- data/lib/ditty/templates/views/index.haml.tt +29 -0
- data/lib/ditty/templates/views/new.haml.tt +10 -0
- data/lib/ditty/version.rb +1 -1
- data/lib/rubocop/cop/ditty/call_services_directly.rb +2 -2
- data/migrate/20181209_add_user_login_traits.rb +4 -4
- data/migrate/20190220_add_parent_id_to_roles.rb +9 -0
- data/public/css/styles.css +13 -0
- data/public/js/scripts.js +1 -0
- data/views/404.haml +2 -4
- data/views/audit_logs/index.haml +32 -34
- data/views/auth/forgot_password.haml +27 -16
- data/views/auth/identity.haml +14 -13
- data/views/auth/ldap.haml +2 -2
- data/views/auth/login.haml +22 -17
- data/views/auth/register.haml +19 -18
- data/views/auth/register_identity.haml +27 -12
- data/views/auth/reset_password.haml +2 -2
- data/views/blank.haml +42 -0
- data/views/index.haml +1 -1
- data/views/layout.haml +37 -30
- data/views/partials/content_tag.haml +0 -0
- data/views/partials/delete_form.haml +1 -1
- data/views/partials/filter_control.haml +1 -1
- data/views/partials/footer.haml +5 -5
- data/views/partials/form_control.haml +19 -12
- data/views/partials/navitems.haml +44 -0
- data/views/partials/notifications.haml +12 -8
- data/views/partials/pager.haml +17 -17
- data/views/partials/search.haml +6 -7
- data/views/partials/sidebar.haml +15 -37
- data/views/partials/topbar.haml +68 -0
- data/views/roles/display.haml +27 -6
- data/views/roles/edit.haml +3 -3
- data/views/roles/form.haml +1 -0
- data/views/roles/index.haml +23 -16
- data/views/roles/new.haml +2 -2
- data/views/user_login_traits/display.haml +4 -4
- data/views/user_login_traits/edit.haml +3 -3
- data/views/user_login_traits/index.haml +4 -4
- data/views/user_login_traits/new.haml +2 -2
- data/views/users/display.haml +11 -12
- data/views/users/edit.haml +3 -3
- data/views/users/form.haml +0 -0
- data/views/users/index.haml +31 -24
- data/views/users/login_traits.haml +6 -8
- data/views/users/new.haml +2 -2
- data/views/users/profile.haml +13 -13
- metadata +143 -15
- data/lib/ditty/controllers/roles.rb +0 -13
- data/views/partials/navbar.haml +0 -22
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'ditty/controllers/component'
|
4
|
-
require 'ditty/models/role'
|
5
|
-
require 'ditty/policies/role_policy'
|
6
|
-
|
7
|
-
module Ditty
|
8
|
-
class Roles < Ditty::Component
|
9
|
-
SEARCHABLE = %i[name].freeze
|
10
|
-
|
11
|
-
set model_class: Role
|
12
|
-
end
|
13
|
-
end
|
data/views/partials/navbar.haml
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
.navbar.navbar-default.navbar-static-top{ role: 'navigation', style: 'margin-bottom: 0' }
|
2
|
-
.navbar-header
|
3
|
-
%button.navbar-toggle.collapsed{ 'type' => 'button', 'data-toggle' => 'collapse', 'data-target' => '.navbar-collapse' }
|
4
|
-
%span.sr-only Toggle navigation
|
5
|
-
%span.icon-bar
|
6
|
-
%span.icon-bar
|
7
|
-
%span.icon-bar
|
8
|
-
%span.navbar-brand
|
9
|
-
= config('ditty.title', 'Ditty')
|
10
|
-
|
11
|
-
%nav.nav.navbar-top-links.navbar-right.navbar-form{ style: 'border: 0;' }
|
12
|
-
- if authenticated?
|
13
|
-
= delete_form_tag("#{settings.map_path}/auth") do
|
14
|
-
%a.btn.btn-default{ href: "#{settings.map_path}/users/profile" } My Account
|
15
|
-
%button.btn.btn-default{ type: 'submit' }
|
16
|
-
Logout
|
17
|
-
- else
|
18
|
-
%a.btn.btn-default{ href: "#{settings.map_path}/auth/login" }
|
19
|
-
Log In
|
20
|
-
|
21
|
-
.navbar-default.sidebar{ role: 'navigation' }
|
22
|
-
= haml :'partials/sidebar'
|