lesli 5.0.1 → 5.0.2

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 (120) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/lesli_manifest.js +7 -4
  3. data/app/assets/fonts/lesli/Domine/Domine-VariableFont_wght.ttf +0 -0
  4. data/app/assets/fonts/lesli/Domine/OFL.txt +2 -0
  5. data/app/assets/javascripts/lesli/users/passwords.js +776 -0
  6. data/app/assets/javascripts/lesli/users/registrations.js +776 -0
  7. data/app/assets/javascripts/lesli/users/sessions.js +776 -1
  8. data/app/assets/stylesheets/lesli/users/passwords.scss +5 -6
  9. data/app/assets/stylesheets/lesli/users/registrations.scss +5 -6
  10. data/app/assets/stylesheets/lesli/users/sessions.scss +5 -10
  11. data/app/controllers/lesli/application_lesli_controller.rb +0 -1
  12. data/app/controllers/lesli/interfaces/application/logger.rb +9 -9
  13. data/app/controllers/lesli/roles_controller.rb +43 -0
  14. data/{lib/sass/lesli/devise/registrations.scss.erb → app/controllers/lesli/users_controller.rb} +18 -23
  15. data/app/controllers/users/registrations_controller.rb +137 -58
  16. data/app/helpers/lesli/assets_helper.rb +2 -2
  17. data/app/helpers/lesli/general_helper.rb +1 -1
  18. data/app/helpers/lesli/navigation_helper.rb +7 -10
  19. data/app/helpers/lesli/system_helper.rb +1 -1
  20. data/app/lib/lesli/system.rb +7 -3
  21. data/app/mailers/lesli/application_lesli_mailer.rb +199 -0
  22. data/app/mailers/lesli/application_mailer.rb +7 -0
  23. data/app/mailers/lesli/devise_mailer.rb +33 -0
  24. data/app/models/concerns/user_guard.rb +3 -4
  25. data/app/models/lesli/account.rb +29 -0
  26. data/{lib/sass/lesli/pages/passes.scss → app/models/lesli/descriptor.rb} +14 -8
  27. data/app/models/lesli/role.rb +90 -0
  28. data/app/models/lesli/system_controller.rb +1 -0
  29. data/app/models/lesli/user/detail.rb +55 -0
  30. data/{lib/sass/lesli/pages/otps.scss → app/models/lesli/user/role.rb} +13 -9
  31. data/app/models/lesli/user.rb +4 -3
  32. data/app/services/lesli/role_service.rb +45 -0
  33. data/app/services/lesli/user_service.rb +69 -0
  34. data/app/views/devise/passwords/new.html.erb +72 -12
  35. data/app/views/devise/registrations/new.html.erb +146 -28
  36. data/app/views/devise/sessions/new.html.erb +11 -78
  37. data/app/views/devise/shared/_links.html.erb +96 -25
  38. data/app/views/lesli/emails/devise_mailer/confirmation_instructions.html.erb +23 -0
  39. data/app/views/lesli/emails/user_mailer/invitation.html.erb +23 -0
  40. data/app/views/lesli/layouts/application-devise.html.erb +1 -1
  41. data/app/views/lesli/layouts/application-public.html.erb +2 -2
  42. data/app/views/lesli/layouts/mailer.html.erb +13 -0
  43. data/app/views/lesli/layouts/mailer.text.erb +1 -0
  44. data/app/views/lesli/partials/_application-lesli-header.html.erb +27 -41
  45. data/app/views/lesli/partials/_application-lesli-javascript.html.erb +10 -6
  46. data/app/views/lesli/partials/_application-public-javascript.html.erb +12 -8
  47. data/{lib/sass/lesli/devise/confirmations.scss.erb → app/views/lesli/wrappers/_application-devise-simple.erb} +30 -46
  48. data/app/views/lesli/wrappers/{_application-auth.html.erb → _application-devise.html.erb} +15 -0
  49. data/config/initializers/{lesli_defaults.rb → lesli.rb} +4 -2
  50. data/config/locales/translations.en.yml +7 -0
  51. data/config/locales/translations.es.yml +7 -0
  52. data/config/routes.rb +22 -17
  53. data/db/migrate/v1.0/0010000210_create_lesli_roles.rb +1 -1
  54. data/db/{tables/0010003010_create_user_details.rb → migrate/v1.0/0010003010_create_lesli_user_details.rb} +6 -6
  55. data/db/{tables/0010003510_create_user_roles.rb → migrate/v1.0/0010003410_create_lesli_user_roles.rb} +4 -4
  56. data/db/{tables/0010005010_create_descriptors.rb → migrate/v1.0/0010005010_create_lesli_descriptors.rb} +5 -6
  57. data/db/{tables/0010005110_create_descriptor_privileges.rb → migrate/v1.0/0010005110_create_lesli_descriptor_privileges.rb} +8 -7
  58. data/db/{tables/0010005210_create_descriptor_activities.rb → migrate/v1.0/0010005210_create_lesli_descriptor_activities.rb} +6 -8
  59. data/db/seeds.rb +0 -2
  60. data/lib/lesli/engine.rb +25 -2
  61. data/lib/lesli/routing.rb +26 -0
  62. data/lib/lesli/version.rb +2 -2
  63. data/lib/lesli.rb +1 -0
  64. data/lib/{sass/lesli/pages/mfas.scss → mailer_previews/devise_mailer_preview.rb} +12 -6
  65. data/lib/sass/lesli/bulma/loader.scss +3 -0
  66. data/lib/sass/lesli/elements/header.scss +1 -1
  67. data/lib/sass/lesli/fonts/families.scss +3 -3
  68. data/lib/sass/lesli/layouts/application-container.scss +4 -0
  69. data/lib/sass/lesli/{devise/passwords.scss.erb → pages/devise-simple.scss} +38 -38
  70. data/lib/sass/lesli/{templates → pages}/devise.scss +4 -26
  71. data/lib/sass/lesli/settings/variables.scss +1 -1
  72. data/lib/sass/lesli/templates/application.scss +8 -4
  73. data/lib/sass/lesli/templates/dashboards.scss +8 -0
  74. data/lib/sass/lesli/templates/public.scss +2 -3
  75. data/lib/tasks/lesli/controllers.rake +33 -0
  76. data/lib/tasks/lesli/db.rake +88 -0
  77. data/lib/tasks/lesli/git.rake +74 -0
  78. data/lib/tasks/lesli_tasks.rake +70 -20
  79. data/lib/vue/devise/registrations.js +10 -15
  80. data/lib/vue/layouts/application-container.vue +10 -2
  81. data/lib/vue/layouts/application-header.vue +10 -3
  82. data/lib/vue/stores/account.js +113 -0
  83. data/lib/vue/stores/role.js +243 -0
  84. data/lib/vue/stores/translations.json +86 -0
  85. data/lib/vue/stores/user.js +102 -0
  86. data/lib/{sass/lesli/devise/sessions.scss → vue/translation.js} +14 -5
  87. data/lib/webpack/base.js +2 -2
  88. data/lib/webpack/core.js +2 -0
  89. data/readme.md +74 -55
  90. metadata +196 -51
  91. data/app/assets/fonts/lesli/Domine/Domine-Bold.ttf +0 -0
  92. data/app/assets/fonts/lesli/Domine/Domine-Regular.ttf +0 -0
  93. data/app/assets/stylesheets/lesli/users/devise.scss +0 -32
  94. data/app/controllers/lesli/profiles_controller.rb +0 -60
  95. data/app/helpers/lesli/profiles_helper.rb +0 -4
  96. data/app/models/lesli/profile.rb +0 -4
  97. data/app/views/lesli/devise/sessions/_form.html.erb +0 -17
  98. data/app/views/lesli/devise/sessions/_session.html.erb +0 -2
  99. data/app/views/lesli/devise/sessions/edit.html.erb +0 -10
  100. data/app/views/lesli/devise/sessions/index.html.erb +0 -14
  101. data/app/views/lesli/devise/sessions/new.html.erb +0 -9
  102. data/app/views/lesli/devise/sessions/show.html.erb +0 -10
  103. data/app/views/lesli/profiles/_form.html.erb +0 -17
  104. data/app/views/lesli/profiles/_profile.html.erb +0 -2
  105. data/app/views/lesli/profiles/edit.html.erb +0 -10
  106. data/app/views/lesli/profiles/index.html.erb +0 -14
  107. data/app/views/lesli/profiles/new.html.erb +0 -9
  108. data/app/views/lesli/profiles/show.html.erb +0 -10
  109. data/lib/sass/lesli/pages/dashboards.scss +0 -57
  110. data/lib/tasks/db.rb +0 -76
  111. data/lib/vue/stores/profile.js +0 -90
  112. data/lib/vue/stores/workflow2.js +0 -345
  113. data/lib/vue/stores/workflows/actions.js +0 -327
  114. data/lib/vue/stores/workflows/associations.js +0 -130
  115. data/lib/vue/stores/workflows/checks.js +0 -210
  116. /data/lib/vue/stores/{announcements.js → entities/announcements.js} +0 -0
  117. /data/lib/vue/stores/{dashboard.js → entities/dashboard.js} +0 -0
  118. /data/lib/vue/stores/{workflow.js → entities/workflow.js} +0 -0
  119. /data/lib/vue/stores/{cloud-bell → panels}/notification.js +0 -0
  120. /data/lib/vue/stores/{firebase.js → services/firebase.js} +0 -0
@@ -17,18 +17,17 @@ GNU General Public License for more details.
17
17
  You should have received a copy of the GNU General Public License
18
18
  along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
- Lesli · Your Smart Business Assistant.
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
22
  Made with ♥ by https://www.lesli.tech
23
23
  Building a better future, one line of code at a time.
24
24
 
25
25
  @contact hello@lesli.tech
26
- @website https://lesli.tech
26
+ @website https://www.lesli.tech
27
27
  @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
28
 
29
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
- // ·
31
-
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
32
31
  */
33
32
 
34
- @import "pages/users/passwords.scss.erb";
33
+ @import "lesli/pages/devise-simple";
@@ -17,18 +17,17 @@ GNU General Public License for more details.
17
17
  You should have received a copy of the GNU General Public License
18
18
  along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
- Lesli · Your Smart Business Assistant.
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
22
  Made with ♥ by https://www.lesli.tech
23
23
  Building a better future, one line of code at a time.
24
24
 
25
25
  @contact hello@lesli.tech
26
- @website https://lesli.tech
26
+ @website https://www.lesli.tech
27
27
  @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
28
 
29
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
- // ·
31
-
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
32
31
  */
33
32
 
34
- @import "pages/users/registrations.scss.erb";
33
+ @import "lesli/pages/devise";
@@ -17,22 +17,17 @@ GNU General Public License for more details.
17
17
  You should have received a copy of the GNU General Public License
18
18
  along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
- Lesli · Your Smart Business Assistant.
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
22
  Made with ♥ by https://www.lesli.tech
23
23
  Building a better future, one line of code at a time.
24
24
 
25
25
  @contact hello@lesli.tech
26
- @website https://lesli.tech
26
+ @website https://www.lesli.tech
27
27
  @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
28
 
29
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
- // ·
31
-
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
32
31
  */
33
32
 
34
-
35
-
36
- // · First look for custom stylesheet from builder engine,
37
- // · if not found use the auth template from lesli pages
38
- @import "lesli/devise/sessions";
33
+ @import "lesli/pages/devise";
@@ -56,6 +56,5 @@ module Lesli
56
56
  rescue_from ActionController::ParameterMissing do |_e|
57
57
  respond_with_error("Missing params")
58
58
  end
59
-
60
59
  end
61
60
  end
@@ -140,17 +140,17 @@ module Lesli
140
140
  # Track specific account activity
141
141
  # this is disabled by default in the settings file
142
142
  def log_account_activity(system_module, system_process, title = nil, payload = nil, description = nil)
143
- return unless Rails.application.config.lesli.dig(:security, :enable_analytics)
143
+ # return unless Rails.application.config.lesli.dig(:security, :enable_analytics)
144
144
 
145
- account = Account.first
145
+ # account = Account.first
146
146
 
147
- account.activities.create({
148
- system_module:,
149
- system_process:,
150
- description:,
151
- payload:,
152
- title:
153
- })
147
+ # account.activities.create({
148
+ # system_module:,
149
+ # system_process:,
150
+ # description:,
151
+ # payload:,
152
+ # title:
153
+ # })
154
154
  end
155
155
  end
156
156
  end
@@ -0,0 +1,43 @@
1
+ =begin
2
+
3
+ Lesli
4
+
5
+ Copyright (c) 2023, Lesli Technologies, S. A.
6
+
7
+ This program is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU General Public License as published by
9
+ the Free Software Foundation, either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ This program is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with this program. If not, see http://www.gnu.org/licenses/.
19
+
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
+
22
+ Made with ♥ by https://www.lesli.tech
23
+ Building a better future, one line of code at a time.
24
+
25
+ @contact hello@lesli.tech
26
+ @website https://www.lesli.tech
27
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
+
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
31
+ =end
32
+
33
+ module Lesli
34
+ class RolesController < ApplicationLesliController
35
+ before_action :set_role, only: [:show, :update, :destroy]
36
+
37
+ def list
38
+ respond_to do |format|
39
+ format.json { respond_with_successful(RoleService.new(current_user, query).list(params)) }
40
+ end
41
+ end
42
+ end
43
+ end
@@ -1,4 +1,4 @@
1
- /*
1
+ =begin
2
2
 
3
3
  Lesli
4
4
 
@@ -17,7 +17,7 @@ GNU General Public License for more details.
17
17
  You should have received a copy of the GNU General Public License
18
18
  along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
- Lesli · Ruby on Rails SaaS development platform.
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
22
  Made with ♥ by https://www.lesli.tech
23
23
  Building a better future, one line of code at a time.
@@ -27,24 +27,19 @@ Building a better future, one line of code at a time.
27
27
  @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
28
 
29
29
  // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
- // ·
31
-
32
- */
33
-
34
-
35
- // ·
36
- @import "../base.scss";
37
-
38
- body.users-registrations.new {
39
-
40
- form {
41
- .password-requirements {
42
- font-size: 12px;
43
- .has-text-danger,
44
- .has-text-success {
45
- font-family: "Exo";
46
- font-weight: 700;
47
- }
48
- }
49
- }
50
- }
30
+ // ·
31
+ =end
32
+
33
+ module Lesli
34
+ class UsersController < ApplicationLesliController
35
+
36
+ # GET /users/list
37
+ def list
38
+ respond_to do |format|
39
+ format.json {
40
+ respond_with_successful(UserService.new(current_user, query).list(params))
41
+ }
42
+ end
43
+ end
44
+ end
45
+ end
@@ -1,62 +1,141 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ =begin
4
+
5
+ Lesli
6
+
7
+ Copyright (c) 2023, Lesli Technologies, S. A.
8
+
9
+ This program is free software: you can redistribute it and/or modify
10
+ it under the terms of the GNU General Public License as published by
11
+ the Free Software Foundation, either version 3 of the License, or
12
+ (at your option) any later version.
13
+
14
+ This program is distributed in the hope that it will be useful,
15
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ GNU General Public License for more details.
18
+
19
+ You should have received a copy of the GNU General Public License
20
+ along with this program. If not, see http://www.gnu.org/licenses/.
21
+
22
+ Lesli · Ruby on Rails SaaS Development Framework.
23
+
24
+ Made with ♥ by https://www.lesli.tech
25
+ Building a better future, one line of code at a time.
26
+
27
+ @contact hello@lesli.tech
28
+ @website https://www.lesli.tech
29
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
30
+
31
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
32
+ // ·
33
+ =end
34
+
3
35
  class Users::RegistrationsController < Devise::RegistrationsController
4
- # before_action :configure_sign_up_params, only: [:create]
5
- # before_action :configure_account_update_params, only: [:update]
6
-
7
- # GET /resource/sign_up
8
- # def new
9
- # super
10
- # end
11
-
12
- # POST /resource
13
- # def create
14
- # super
15
- # end
16
-
17
- # GET /resource/edit
18
- # def edit
19
- # super
20
- # end
21
-
22
- # PUT /resource
23
- # def update
24
- # super
25
- # end
26
-
27
- # DELETE /resource
28
- # def destroy
29
- # super
30
- # end
31
-
32
- # GET /resource/cancel
33
- # Forces the session data which is usually expired after sign
34
- # in to be expired now. This is useful if the user wants to
35
- # cancel oauth signing in/up in the middle of the process,
36
- # removing all OAuth session data.
37
- # def cancel
38
- # super
39
- # end
40
-
41
- # protected
42
-
43
- # If you have extra params to permit, append them to the sanitizer.
44
- # def configure_sign_up_params
45
- # devise_parameter_sanitizer.permit(:sign_up, keys: [:attribute])
46
- # end
47
-
48
- # If you have extra params to permit, append them to the sanitizer.
49
- # def configure_account_update_params
50
- # devise_parameter_sanitizer.permit(:account_update, keys: [:attribute])
51
- # end
52
-
53
- # The path used after sign up.
54
- # def after_sign_up_path_for(resource)
55
- # super(resource)
56
- # end
57
-
58
- # The path used after sign up for inactive accounts.
59
- # def after_inactive_sign_up_path_for(resource)
60
- # super(resource)
61
- # end
36
+ before_action :configure_sign_up_params, only: [:create]
37
+ # before_action :configure_account_update_params, only: [:update]
38
+
39
+ # GET /resource/sign_up
40
+ # def new
41
+ # super
42
+ # end
43
+
44
+ def create
45
+
46
+ # # Check if instance allow multi-account
47
+ # if !Rails.application.config.lesli.dig(:security, :allow_registration)
48
+ # respond_with_error(I18n.t("core.users/registrations.messages_error_registration_not_allowed"))
49
+ # return
50
+ # end
51
+
52
+ # # Validate user is unique
53
+ # if ::User.with_deleted.find_by(email: sign_up_params["email"])
54
+ # return respond_with_error(I18n.t("core.users/registrations.messages_info_user_already_exists"))
55
+ # end
56
+
57
+ # build new user
58
+ user = build_resource(sign_up_params)
59
+
60
+ # run password complexity validations
61
+ #user_validator = UsersValidator.new(user).password_complexity(sign_up_params[:password])
62
+
63
+ # return if there are errors with the complexity validations
64
+ # unless user_validator.valid?
65
+ # return respond_with_error("password_complexity_error", password_complexity.failures)
66
+ # end
67
+
68
+ # persist new user
69
+ if user.save
70
+ respond_with_successful()
71
+ else
72
+ respond_with_error(user.errors.full_messages.to_sentence)
73
+ end
74
+ end
75
+
76
+ # GET /resource/edit
77
+ # def edit
78
+ # super
79
+ # end
80
+
81
+ # PUT /resource
82
+ # def update
83
+ # super
84
+ # end
85
+
86
+ # DELETE /resource
87
+ # def destroy
88
+ # super
89
+ # end
90
+
91
+ # GET /resource/cancel
92
+ # Forces the session data which is usually expired after sign
93
+ # in to be expired now. This is useful if the user wants to
94
+ # cancel oauth signing in/up in the middle of the process,
95
+ # removing all OAuth session data.
96
+ # def cancel
97
+ # super
98
+ # end
99
+
100
+ protected
101
+
102
+ # If you have extra params to permit, append them to the sanitizer.
103
+ # def configure_account_update_params
104
+ # devise_parameter_sanitizer.permit(:account_update, keys: [:attribute])
105
+ # end
106
+
107
+ # If you have extra params to permit, append them to the sanitizer.
108
+ def configure_sign_up_params
109
+ devise_parameter_sanitizer.permit(:sign_up, keys: [
110
+ :email,
111
+ :password,
112
+ :password_confirmation
113
+ ])
114
+ end
115
+
116
+ # The path used after sign up.
117
+ # def after_sign_up_path_for(resource)
118
+ # super(resource)
119
+ # end
120
+
121
+ # The path used after sign up for inactive accounts.
122
+ # def after_inactive_sign_up_path_for(resource)
123
+ # super(resource)
124
+ # end
125
+
126
+ # def sign_up_params
127
+ # params.permit(:sign_up, keys: [
128
+ # :email,
129
+ # :password,
130
+ # :password_confirmation
131
+ # ])
132
+ # end
133
+
134
+ def sign_up_params
135
+ params.permit(:sign_up,
136
+ :email,
137
+ :password,
138
+ :password_confirmation
139
+ )
140
+ end
62
141
  end
@@ -23,11 +23,11 @@ Made with ♥ by https://www.lesli.tech
23
23
  Building a better future, one line of code at a time.
24
24
 
25
25
  @contact hello@lesli.tech
26
- @website https://www.lesli.dev
26
+ @website https://www.lesli.tech
27
27
  @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
28
 
29
29
  // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
- // ·
30
+ // ·
31
31
  =end
32
32
 
33
33
  module Lesli
@@ -46,7 +46,7 @@ module Lesli
46
46
 
47
47
  # return the name of the language
48
48
  def language_name(locale)
49
- Rails.application.config.lesli.dig(:configuration, :locales_available, locale.to_sym) || "undefined"
49
+ Lesli.config.locales.dig(locale) || "undefined"
50
50
  end
51
51
 
52
52
  # print a custom icon for lesli
@@ -17,18 +17,17 @@ GNU General Public License for more details.
17
17
  You should have received a copy of the GNU General Public License
18
18
  along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
- Lesli · Your Smart Business Assistant.
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
22
  Made with ♥ by https://www.lesli.tech
23
23
  Building a better future, one line of code at a time.
24
24
 
25
25
  @contact hello@lesli.tech
26
- @website https://lesli.tech
26
+ @website https://www.lesli.tech
27
27
  @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
28
 
29
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
- // ·
31
-
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
32
31
  =end
33
32
 
34
33
  module Lesli
@@ -118,11 +117,9 @@ module Lesli
118
117
  # PRODUCTIVITY & TEAMWORK
119
118
 
120
119
  # 03.01 Driver engine
121
- def navigation_engine_driver(title: "Driver", subtitle: "Calendar")
122
- return unless defined? CloudDriver
123
-
124
- navigation_engine_item(title, subtitle, "driver", cloud_driver.root_path,
125
- controller_path.include?("cloud_driver"))
120
+ def navigation_engine_driver(title: "Driver", subtitle: "Unified calendar app")
121
+ return unless defined? LesliDriver
122
+ navigation_engine_item(title, subtitle, "driver", lesli_driver.root_path, controller_path.include?("lesli_driver"))
126
123
  end
127
124
 
128
125
  # 03.02 Work engine
@@ -46,7 +46,7 @@ module Lesli
46
46
 
47
47
  # return the information about the current engine
48
48
  def lesli_engine(property = nil)
49
- Lesli::System.engine(lesli_controller.camelize, property)
49
+ Lesli::System.engine(lesli_controller, property)
50
50
  end
51
51
 
52
52
  # return true if the controller requested belongs to the administration area
@@ -28,7 +28,6 @@ Building a better future, one line of code at a time.
28
28
 
29
29
  // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
30
  // ·
31
-
32
31
  =end
33
32
 
34
33
  module Lesli
@@ -39,6 +38,8 @@ module Lesli
39
38
  # engine("LesliAdmin", "name")
40
39
  def self.engine(engine, property=nil)
41
40
 
41
+ engine = engine.camelize
42
+
42
43
  engines() if ENGINES.empty?
43
44
 
44
45
  # return specific property if requested
@@ -57,10 +58,13 @@ module Lesli
57
58
  # we use this in the url plugin
58
59
  LESLI_ENGINES.each do |engine|
59
60
  next unless Object.const_defined?(engine)
61
+ engine_instance = "#{engine}".constantize
60
62
  ENGINES[engine]= {
61
63
  :code => engine.underscore,
62
64
  :name => lesli_engine_name(engine),
63
- :path => "#{engine}::Engine".constantize.routes.find_script_name({}),
65
+ :path => engine_instance::Engine.routes.find_script_name({}),
66
+ :version => engine_instance::VERSION,
67
+ :build => engine_instance::BUILD,
64
68
  :dir => Gem::Specification.find_by_name(engine.underscore).gem_dir
65
69
  }
66
70
  end
@@ -77,6 +81,6 @@ module Lesli
77
81
  name.sub("Lesli", "")
78
82
  end
79
83
 
80
- LESLI_ENGINES = ["Lesli", "LesliAdmin", "LesliBabel", "LesliAudit", "LesliBell"]
84
+ LESLI_ENGINES = ["Lesli", "LesliAdmin", "LesliBabel", "LesliAudit", "LesliBell", "LesliDriver"]
81
85
  end
82
86
  end