lesli 5.0.18 → 5.0.20

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 (41) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/lesli/application.css +1 -0
  3. data/app/controllers/lesli/abouts_controller.rb +3 -0
  4. data/app/controllers/lesli/application_controller.rb +3 -1
  5. data/app/controllers/lesli/application_lesli_controller.rb +1 -1
  6. data/app/helpers/lesli/navigation_helper.rb +6 -0
  7. data/app/interfaces/lesli/responder_interface.rb +35 -19
  8. data/app/models/concerns/account_initializer.rb +2 -3
  9. data/app/models/concerns/user_security.rb +5 -4
  10. data/app/models/lesli/role/action.rb +3 -2
  11. data/app/models/lesli/shared/dashboard.rb +2 -2
  12. data/app/models/lesli/user/session.rb +1 -1
  13. data/app/operators/lesli/role_operator.rb +9 -4
  14. data/app/services/lesli/role/action_service.rb +2 -3
  15. data/app/views/lesli/abouts/welcome.html.erb +8 -5
  16. data/app/views/lesli/apps/show.html.erb +23 -40
  17. data/app/views/lesli/errors/not_found.html.erb +32 -0
  18. data/app/views/lesli/errors/unauthorized.html.erb +48 -0
  19. data/app/views/lesli/layouts/application-lesli.html.erb +1 -2
  20. data/app/views/lesli/partials/_application-analytics.html.erb +2 -2
  21. data/app/views/lesli/partials/_application-lesli-header.html.erb +68 -65
  22. data/app/views/lesli/partials/_application-lesli-navigation.html.erb +22 -6
  23. data/config/importmap.rb +0 -10
  24. data/config/initializers/devise.rb +28 -0
  25. data/config/initializers/devise_rails_8_patch.rb +8 -0
  26. data/config/initializers/lesli.rb +27 -23
  27. data/db/migrate/v1/0000120310_create_lesli_role_privileges.rb +2 -2
  28. data/db/seed/users.rb +13 -9
  29. data/lib/generators/lesli/install/USAGE +5 -0
  30. data/lib/generators/lesli/install/install_generator.rb +49 -0
  31. data/lib/generators/lesli/install/templates/lesli.rb +6 -0
  32. data/lib/lesli/engine.rb +2 -14
  33. data/lib/lesli/routing.rb +8 -14
  34. data/lib/lesli/version.rb +2 -2
  35. data/lib/rspec/testers/request.rb +15 -6
  36. data/lib/scss/_apps.scss +93 -0
  37. data/lib/scss/application.scss +34 -0
  38. data/lib/tasks/lesli/db.rake +6 -6
  39. data/lib/tasks/lesli_tasks.rake +3 -0
  40. data/readme.md +11 -21
  41. metadata +48 -8
@@ -0,0 +1,93 @@
1
+ /*
2
+ Lesli
3
+
4
+ Copyright (c) 2025, Lesli Technologies, S. A.
5
+
6
+ This program is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ This program is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with this program. If not, see http://www.gnu.org/licenses/.
18
+
19
+ Lesli · Ruby on Rails SaaS Development Framework.
20
+
21
+ Made with ♥ by LesliTech
22
+ Building a better future, one line of code at a time.
23
+
24
+ @contact hello@lesli.tech
25
+ @website https://www.lesli.tech
26
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
27
+
28
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
29
+ // ·
30
+ */
31
+
32
+
33
+ // ·
34
+ @use "lesli-css/sass/helpers/shadow";
35
+ @use "lesli-css/sass/helpers/breakpoint";
36
+
37
+
38
+ // ·
39
+ body.lesli.apps.show {
40
+
41
+ .lesli-element-header {
42
+ margin-bottom: 5rem !important;
43
+ }
44
+
45
+ .engines {
46
+ gap: 24px;
47
+ margin-inline-end: auto;
48
+ margin-inline-start: auto;
49
+
50
+ a {
51
+ flex-basis: 318px;
52
+ text-align: center;
53
+ padding: 2rem .4rem 2.8rem;
54
+ border: white 1px solid;
55
+ border-radius: 6px;
56
+ background-color: white;
57
+ transition: all ease-in-out .2s;
58
+
59
+ @include shadow.lesli-shadow();
60
+
61
+ &:hover {
62
+ border-color: var(--lesli-color-primary);
63
+ transform: translateY(-2px);
64
+ }
65
+
66
+ &.is-active {
67
+ background-color: #F0F4FF;
68
+ border-color: var(--lesli-color-primary);
69
+ }
70
+
71
+ // engine logo
72
+ svg {
73
+ margin-right: .4rem;
74
+ fill: var(--lesli-color-primary);
75
+ }
76
+
77
+ // engine description
78
+ p {
79
+ font-size: 14;
80
+ }
81
+
82
+ // engine name
83
+ span {
84
+ font-weight: 600;
85
+ font-size: 20px;
86
+ }
87
+
88
+ span, p {
89
+ color: var(--lesli-color-primary);
90
+ }
91
+ }
92
+ }
93
+ }
@@ -0,0 +1,34 @@
1
+ /*
2
+ Lesli
3
+
4
+ Copyright (c) 2025, Lesli Technologies, S. A.
5
+
6
+ This program is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ This program is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with this program. If not, see http://www.gnu.org/licenses/.
18
+
19
+ Lesli · Ruby on Rails SaaS Development Framework.
20
+
21
+ Made with ♥ by LesliTech
22
+ Building a better future, one line of code at a time.
23
+
24
+ @contact hello@lesli.tech
25
+ @website https://www.lesli.tech
26
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
27
+
28
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
29
+ // ·
30
+ */
31
+
32
+
33
+ // ·
34
+ @use "apps";
@@ -44,12 +44,6 @@ namespace :lesli do
44
44
  status()
45
45
  end
46
46
 
47
- desc "Seed & prepare Lesli database (development only)"
48
- task :seed => :environment do |task, args|
49
- seed()
50
- status()
51
- end
52
-
53
47
  desc "Migrate, seed & prepare the Lesli database (development only)"
54
48
  task :dev => :environment do |task, args|
55
49
  migrate()
@@ -72,6 +66,12 @@ namespace :lesli do
72
66
  prepare()
73
67
  status()
74
68
  end
69
+
70
+ desc "Seed & prepare Lesli database"
71
+ task :seed => :environment do |task, args|
72
+ seed()
73
+ status()
74
+ end
75
75
  end
76
76
 
77
77
  # Drop the Lesli database (development only)
@@ -88,5 +88,8 @@ namespace :lesli do
88
88
  L2.table(engines)
89
89
  L2.br(2)
90
90
 
91
+ L2.m Rails.env
92
+ L2.br(2)
93
+
91
94
  end
92
95
  end
data/readme.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <div align="center" class="documentation-header">
2
- <img width="100" alt="Lesli logo" src="./app/assets/images/lesli/lesli-logo.svg" />
2
+ <img width="150" alt="Lesli logo" src="./app/assets/images/lesli/lesli-logo.svg" />
3
3
  <h3 align="center">Ruby on Rails SaaS Development Framework.</h3>
4
4
  </div>
5
5
 
@@ -58,22 +58,13 @@ Lesli is officially released and will be supported as of version 5.1
58
58
 
59
59
  ### Demo
60
60
 
61
- * online demo (soon)
61
+ * [online demo](https://demo.lesli.dev/)
62
62
  * [docker demo](https://github.com/LesliTech/lesli-docker-demo)
63
63
 
64
64
  <br />
65
65
 
66
66
 
67
67
 
68
- ### Documentation
69
- * [Website](https://www.lesli.dev/)
70
- * [Database](./docs/database.md)
71
- * [Documentation](https://www.lesli.dev/docs.html)
72
-
73
- <br />
74
-
75
-
76
-
77
68
  ### Quick start
78
69
 
79
70
  ```shell
@@ -82,20 +73,19 @@ bundle add lesli
82
73
  ```
83
74
 
84
75
  ```shell
85
- # Setup database for production
86
- rake lesli:db:setup
87
-
76
+ # Add Lesli to your app
77
+ rails generate lesli:install
78
+ ```
79
+ ```shell
88
80
  # Setup database for development
89
81
  rake lesli:db:dev
90
82
  ```
91
-
92
- ```ruby
93
- # Load Lesli
94
- Rails.application.routes.draw do
95
- mount Lesli::Engine => "/lesli"
96
- end
83
+ ```shell
84
+ # Start your app
85
+ rails server
97
86
  ```
98
87
 
88
+
99
89
  <br />
100
90
 
101
91
 
@@ -116,7 +106,7 @@ bundle install
116
106
  ```
117
107
  ```shell
118
108
  # Generate Lesli initializer
119
- rails g lesli:install
109
+ rails generate lesli:install
120
110
  ```
121
111
  ```shell
122
112
  # Hard reset Database for development:
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lesli
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.18
4
+ version: 5.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Lesli Development Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-07-10 00:00:00.000000000 Z
11
+ date: 2025-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '8.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '8.0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: i18n-js
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -28,16 +42,16 @@ dependencies:
28
42
  name: importmap-rails
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
- - - ">="
45
+ - - "~>"
32
46
  - !ruby/object:Gem::Version
33
- version: '0'
47
+ version: 2.2.0
34
48
  type: :runtime
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
- - - ">="
52
+ - - "~>"
39
53
  - !ruby/object:Gem::Version
40
- version: '0'
54
+ version: 2.2.0
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: turbo-rails
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +94,20 @@ dependencies:
80
94
  - - "~>"
81
95
  - !ruby/object:Gem::Version
82
96
  version: 1.2.2
97
+ - !ruby/object:Gem::Dependency
98
+ name: devise
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '4.9'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '4.9'
83
111
  - !ruby/object:Gem::Dependency
84
112
  name: lesli_date
85
113
  requirement: !ruby/object:Gem::Requirement
@@ -150,7 +178,8 @@ dependencies:
150
178
  - - "~>"
151
179
  - !ruby/object:Gem::Version
152
180
  version: '0.6'
153
- description: Ruby on Rails SaaS Development Framework.
181
+ description: Lesli is a SaaS development framework designed to build highly scalable,
182
+ secure and customizable software products.
154
183
  email:
155
184
  - hello@lesli.tech
156
185
  executables: []
@@ -234,6 +263,8 @@ files:
234
263
  - app/views/lesli/abouts/welcome.html.erb
235
264
  - app/views/lesli/apps/show.html.erb
236
265
  - app/views/lesli/emails/user_mailer/invitation.html.erb
266
+ - app/views/lesli/errors/not_found.html.erb
267
+ - app/views/lesli/errors/unauthorized.html.erb
237
268
  - app/views/lesli/layouts/application-devise.html.erb
238
269
  - app/views/lesli/layouts/application-lesli.html.erb
239
270
  - app/views/lesli/layouts/application-public.html.erb
@@ -261,6 +292,8 @@ files:
261
292
  - app/views/lesli/wrappers/_application-devise-simple.erb
262
293
  - app/views/lesli/wrappers/_application-devise.html.erb
263
294
  - config/importmap.rb
295
+ - config/initializers/devise.rb
296
+ - config/initializers/devise_rails_8_patch.rb
264
297
  - config/initializers/lesli.rb
265
298
  - config/initializers/lesli_migration_helpers.rb
266
299
  - config/locales/devise.en.yml
@@ -303,6 +336,9 @@ files:
303
336
  - db/structure/00000403_custom_validation_fields.json
304
337
  - lib/assets/javascripts/lesli/i18n_js
305
338
  - lib/generators/application_lesli_generator_base.rb
339
+ - lib/generators/lesli/install/USAGE
340
+ - lib/generators/lesli/install/install_generator.rb
341
+ - lib/generators/lesli/install/templates/lesli.rb
306
342
  - lib/generators/lesli/spec/USAGE
307
343
  - lib/generators/lesli/spec/spec_generator.rb
308
344
  - lib/generators/lesli/spec/templates/spec-factory.template
@@ -344,6 +380,8 @@ files:
344
380
  - lib/rspec/testers/controller.rb
345
381
  - lib/rspec/testers/model.rb
346
382
  - lib/rspec/testers/request.rb
383
+ - lib/scss/_apps.scss
384
+ - lib/scss/application.scss
347
385
  - lib/tasks/lesli/controllers.rake
348
386
  - lib/tasks/lesli/db.rake
349
387
  - lib/tasks/lesli/dev.rake
@@ -361,6 +399,8 @@ metadata:
361
399
  homepage_uri: https://www.lesli.dev/
362
400
  changelog_uri: https://github.com/LesliTech/Lesli
363
401
  source_code_uri: https://github.com/LesliTech/Lesli
402
+ bug_tracker_uri: https://github.com/LesliTech/Lesli/issues
403
+ documentation_uri: https://www.lesli.dev/lesli/
364
404
  post_install_message: Greetings from LesliTech ❤️ Docs are available at https://www.lesli.dev/
365
405
  rdoc_options: []
366
406
  require_paths:
@@ -369,7 +409,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
369
409
  requirements:
370
410
  - - ">="
371
411
  - !ruby/object:Gem::Version
372
- version: '2.7'
412
+ version: '3.2'
373
413
  required_rubygems_version: !ruby/object:Gem::Requirement
374
414
  requirements:
375
415
  - - ">="