lesli 5.1.12 → 5.1.14
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 +3 -0
- data/app/assets/stylesheets/lesli/application.css +43 -3
- data/app/controllers/lesli/application_devise_controller.rb +9 -5
- data/app/controllers/lesli/application_lesli_controller.rb +31 -0
- data/app/controllers/lesli/items/attachments_controller.rb +200 -0
- data/app/controllers/lesli/items/discussions_controller.rb +94 -67
- data/app/controllers/lesli/items/tasks_controller.rb +132 -62
- data/app/controllers/lesli/roles_controller.rb +1 -6
- data/app/controllers/lesli/users_controller.rb +1 -5
- data/app/helpers/lesli/announcements_helper.rb +14 -0
- data/app/helpers/lesli/navigation_helper.rb +1 -1
- data/app/helpers/lesli/turbo_helper.rb +0 -18
- data/app/interfaces/lesli/responder_interface.rb +65 -38
- data/app/mailers/lesli/application_lesli_mailer.rb +34 -8
- data/app/models/concerns/lesli/account_initializer.rb +5 -37
- data/app/models/concerns/lesli/account_logs.rb +5 -16
- data/app/models/concerns/lesli/items/activities.rb +29 -33
- data/app/models/concerns/lesli/items/attachments.rb +88 -0
- data/app/models/concerns/lesli/items/discussions.rb +25 -11
- data/app/models/concerns/lesli/items/ownership.rb +27 -0
- data/app/models/concerns/lesli/items/tasks.rb +26 -6
- data/app/models/concerns/lesli/user_extensions.rb +8 -10
- data/app/models/lesli/account.rb +10 -14
- data/app/models/lesli/items/activity.rb +25 -2
- data/app/models/lesli/items/attachment.rb +117 -0
- data/app/models/lesli/items/discussion.rb +6 -2
- data/app/models/lesli/items/task.rb +3 -1
- data/app/models/lesli/role.rb +14 -2
- data/app/models/lesli/user.rb +19 -21
- data/app/operators/lesli/account_operator.rb +84 -0
- data/app/operators/lesli/resource_operator.rb +123 -0
- data/app/services/lesli/application_lesli_service.rb +33 -116
- data/app/services/lesli/resource_service.rb +12 -159
- data/app/services/lesli/role_service.rb +11 -229
- data/app/services/lesli/user_service.rb +37 -117
- data/app/views/lesli/abouts/welcome.html.erb +2 -5
- data/app/views/lesli/errors/not_found.html.erb +7 -21
- data/app/views/lesli/errors/unauthorized.html.erb +11 -27
- data/app/views/lesli/layouts/application-devise.html.erb +10 -9
- data/app/views/lesli/layouts/application-lesli.html.erb +2 -2
- data/app/views/lesli/partials/_application-lesli-announcements.html.erb +28 -0
- data/app/views/lesli/partials/_application-lesli-assets.html.erb +3 -3
- data/app/views/lesli/partials/_application-lesli-header.html.erb +8 -11
- data/app/views/lesli/partials/_application-lesli-turbo.html.erb +5 -0
- data/config/initializers/lesli.rb +10 -2
- data/config/locales/translations.en.yml +57 -14
- data/config/locales/translations.es.yml +55 -11
- data/db/migrate/v1/0000000210_create_lesli_users.rb +1 -0
- data/db/seed/accounts.rb +5 -5
- data/db/seed/users.rb +8 -16
- data/db/seed/xyz.rb +36 -17
- data/lib/generators/lesli/base_generator.rb +41 -3
- data/lib/generators/lesli/controller/controller_generator.rb +1 -1
- data/lib/generators/lesli/controller/templates/controller.rb.tt +12 -7
- data/lib/generators/lesli/model/model_generator.rb +1 -1
- data/lib/generators/lesli/resource/resource_generator.rb +290 -0
- data/lib/generators/lesli/resource/templates/controller.rb.tt +99 -0
- data/lib/generators/lesli/resource/templates/locale.en.yml.tt +13 -0
- data/lib/generators/lesli/resource/templates/migration.rb.tt +28 -0
- data/lib/generators/lesli/resource/templates/model.rb.tt +38 -0
- data/lib/generators/lesli/resource/templates/operator.rb.tt +15 -0
- data/lib/generators/lesli/resource/templates/service.rb.tt +52 -0
- data/lib/generators/lesli/resource/templates/tests/controller_test.rb.tt +14 -0
- data/lib/generators/lesli/resource/templates/tests/model_test.rb.tt +24 -0
- data/lib/generators/lesli/resource/templates/tests/operator_test.rb.tt +15 -0
- data/lib/generators/lesli/resource/templates/tests/service_test.rb.tt +17 -0
- data/lib/generators/lesli/resource/templates/views/_form.html.erb.tt +17 -0
- data/lib/generators/lesli/resource/templates/views/edit.html.erb.tt +4 -0
- data/lib/generators/lesli/resource/templates/views/index.html.erb.tt +22 -0
- data/lib/generators/lesli/resource/templates/views/new.html.erb.tt +4 -0
- data/lib/generators/lesli/resource/templates/views/show.html.erb.tt +17 -0
- data/lib/generators/lesli/scaffold/scaffold_generator.rb +4 -39
- data/lib/generators/lesli/service/service_generator.rb +1 -1
- data/lib/generators/lesli/service/templates/service.rb.tt +15 -7
- data/lib/generators/lesli/views/views_generator.rb +1 -1
- data/lib/generators/lesli_generator.rb +11 -0
- data/lib/lesli/courier.rb +66 -34
- data/lib/lesli/database_tasks.rb +145 -0
- data/lib/lesli/engine.rb +0 -4
- data/lib/lesli/router.rb +5 -2
- data/lib/lesli/version.rb +2 -2
- data/lib/migrate/items/activity_structure.rb +8 -8
- data/lib/migrate/items/attachment_structure.rb +9 -14
- data/lib/migrate/items/discussion_structure.rb +5 -5
- data/lib/migrate/items/task_structure.rb +2 -3
- data/lib/migrate/shared/account_structure.rb +1 -1
- data/lib/tasks/lesli/db.rake +16 -93
- data/lib/tasks/lesli/resources.rake +1 -1
- data/lib/tasks/lesli_tasks.rake +2 -3
- data/readme.md +6 -4
- data/test/fixtures/lesli_accounts.yml +18 -0
- data/test/fixtures/lesli_users.yml +23 -0
- metadata +39 -26
- data/app/assets/stylesheets/lesli/application.tailwind.css +0 -33
- data/app/views/lesli/partials/_application-lesli-sidebar.html.erb +0 -50
- data/config/brakeman.yml +0 -44
- data/config/initializers/devise.rb +0 -27
data/lib/tasks/lesli/db.rake
CHANGED
|
@@ -30,107 +30,30 @@ Building a better future, one line of code at a time.
|
|
|
30
30
|
// ·
|
|
31
31
|
=end
|
|
32
32
|
|
|
33
|
-
# ·
|
|
34
|
-
|
|
33
|
+
# ·
|
|
34
|
+
require "lesli/database_tasks"
|
|
35
|
+
|
|
36
|
+
namespace :lesli do
|
|
35
37
|
namespace :db do
|
|
36
38
|
|
|
37
|
-
desc "Drop, create, migrate, seed & configure the Lesli database (development only)"
|
|
38
|
-
task :
|
|
39
|
-
|
|
40
|
-
prepare()
|
|
41
|
-
seed()
|
|
42
|
-
configure()
|
|
43
|
-
status()
|
|
39
|
+
desc "Drop, create, migrate, seed & configure the Lesli database (development and test only)"
|
|
40
|
+
task rebuild: :environment do
|
|
41
|
+
Lesli::DatabaseTasks.new.rebuild
|
|
44
42
|
end
|
|
45
43
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
prepare()
|
|
50
|
-
configure()
|
|
51
|
-
status()
|
|
44
|
+
desc "Create, migrate, seed & configure the Lesli database"
|
|
45
|
+
task build: :environment do
|
|
46
|
+
Lesli::DatabaseTasks.new.build
|
|
52
47
|
end
|
|
53
48
|
|
|
54
|
-
desc "
|
|
55
|
-
task :
|
|
56
|
-
|
|
57
|
-
status()
|
|
49
|
+
desc "Migrate and configure the Lesli database"
|
|
50
|
+
task prepare: :environment do
|
|
51
|
+
Lesli::DatabaseTasks.new.prepare
|
|
58
52
|
end
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
# Drop the Lesli database (development only)
|
|
62
|
-
def drop
|
|
63
53
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
# print a message to let the users show the action running
|
|
68
|
-
Termline.m("Drop the Lesli database (development only)")
|
|
69
|
-
|
|
70
|
-
Rake::Task['db:drop'].invoke
|
|
71
|
-
Termline.info("Databases deleted")
|
|
72
|
-
|
|
73
|
-
schema_file = Rails.root.join('db', 'schema.rb')
|
|
74
|
-
if File.exist?(schema_file)
|
|
75
|
-
File.delete(schema_file)
|
|
76
|
-
Termline.info("Schema.rb file deleted")
|
|
54
|
+
desc "Seed and configure the Lesli database"
|
|
55
|
+
task seed: :environment do
|
|
56
|
+
Lesli::DatabaseTasks.new.seed
|
|
77
57
|
end
|
|
78
58
|
end
|
|
79
|
-
|
|
80
|
-
# Create the Lesli database (development only)
|
|
81
|
-
def prepare
|
|
82
|
-
|
|
83
|
-
# print a message to let the users show the action running
|
|
84
|
-
Termline.info("Prepare the Lesli database")
|
|
85
|
-
|
|
86
|
-
Rake::Task['db:prepare'].invoke
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
def seed
|
|
90
|
-
|
|
91
|
-
# print a message to let the users show the action running
|
|
92
|
-
Termline.info("Seed the Lesli database")
|
|
93
|
-
|
|
94
|
-
# load Lesli* gems seeders
|
|
95
|
-
LesliSystem.engines.each do |engine, data|
|
|
96
|
-
next if engine == "Root"
|
|
97
|
-
engine.constantize::Engine.load_seed
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
# load main app seeders
|
|
101
|
-
Rake::Task['db:seed'].invoke
|
|
102
|
-
Termline.info("Loading seeds for: Main app")
|
|
103
|
-
Termline.br(2)
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
def configure
|
|
107
|
-
|
|
108
|
-
# print a message to let the users show the action running
|
|
109
|
-
Termline.info("Setup the Lesli database")
|
|
110
|
-
|
|
111
|
-
# scan rails routes to build the controllers index
|
|
112
|
-
Rake::Task['lesli:resources:build'].invoke
|
|
113
|
-
|
|
114
|
-
Lesli::Account.find_each do |account|
|
|
115
|
-
account.initialize_account
|
|
116
|
-
account.initialize_engines
|
|
117
|
-
end
|
|
118
|
-
|
|
119
|
-
# scan rails routes to build the controllers index
|
|
120
|
-
Rake::Task['lesli_shield:privileges'].invoke if defined?(LesliShield)
|
|
121
|
-
|
|
122
|
-
if defined?(LesliBabel)
|
|
123
|
-
|
|
124
|
-
# scan rails routes to build the base of translations
|
|
125
|
-
Rake::Task['lesli_babel:scan'].invoke
|
|
126
|
-
|
|
127
|
-
# import local translations into LesliBabel
|
|
128
|
-
Rake::Task['lesli_babel:import'].invoke
|
|
129
|
-
end
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
def status
|
|
133
|
-
# print the lesli status
|
|
134
|
-
Rake::Task['lesli:status'].invoke
|
|
135
|
-
end
|
|
136
59
|
end
|
|
@@ -36,7 +36,7 @@ namespace :lesli do
|
|
|
36
36
|
|
|
37
37
|
desc "Scan new routes added and create role privileges"
|
|
38
38
|
task build: :environment do
|
|
39
|
-
Lesli::
|
|
39
|
+
Lesli::ResourceOperator.new.register!
|
|
40
40
|
Termline.success("Lesli: Registering engines, controllers and actions")
|
|
41
41
|
end
|
|
42
42
|
end
|
data/lib/tasks/lesli_tasks.rake
CHANGED
|
@@ -66,9 +66,8 @@ namespace :lesli do
|
|
|
66
66
|
Termline.br(2)
|
|
67
67
|
|
|
68
68
|
# core information
|
|
69
|
-
Termline.
|
|
70
|
-
Termline.
|
|
71
|
-
Termline.br()
|
|
69
|
+
Termline.details(Instance: instance, Environment: Rails.env, icon: :info)
|
|
70
|
+
Termline.br(2)
|
|
72
71
|
|
|
73
72
|
# print list of engines
|
|
74
73
|
Termline.table(engines)
|
data/readme.md
CHANGED
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
<br />
|
|
12
12
|
|
|
13
13
|
<div align="center">
|
|
14
|
-
<a target="_blank" href="https://github.com/LesliTech/Lesli/actions/workflows/lesli-ci-
|
|
14
|
+
<a target="_blank" href="https://github.com/LesliTech/Lesli/actions/workflows/lesli-ci-engine.yaml">
|
|
15
15
|
<img
|
|
16
16
|
alt="Lesli test status"
|
|
17
|
-
src="https://img.shields.io/github/actions/workflow/status/LesliTech/Lesli/lesli-ci-
|
|
17
|
+
src="https://img.shields.io/github/actions/workflow/status/LesliTech/Lesli/lesli-ci-engine.yaml?branch=master&style=for-the-badge&logo=github&label=tests">
|
|
18
18
|
</a>
|
|
19
19
|
<a target="_blank" href="https://rubygems.org/gems/lesli">
|
|
20
20
|
<img alt="Gem Version" src="https://img.shields.io/gem/v/lesli?style=for-the-badge&logo=ruby">
|
|
@@ -75,7 +75,7 @@ Lesli core and its official engines provide:
|
|
|
75
75
|
|
|
76
76
|
### Requirements
|
|
77
77
|
|
|
78
|
-
- Ruby 3.
|
|
78
|
+
- Ruby 3.3 or newer (the release workflow uses Ruby 3.3.5)
|
|
79
79
|
- Rails 8.1
|
|
80
80
|
- SQLite, included in the default Rails application
|
|
81
81
|
|
|
@@ -113,8 +113,10 @@ bin/rails lesli:db:prepare
|
|
|
113
113
|
bin/rails lesli:status
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
+
Use `bin/rails lesli:db:build` when the environment also needs the engine and host application seed data. It prepares, seeds, and configures the database without dropping existing data.
|
|
117
|
+
|
|
116
118
|
> [!WARNING]
|
|
117
|
-
> `bin/rails lesli:db:rebuild` drops the database,
|
|
119
|
+
> `bin/rails lesli:db:rebuild` drops the database, rebuilds it from the migrations currently provided by the host and installed engines, regenerates the schema, loads seeds, configures Lesli accounts, and prints the system status. It runs only in the Rails development and test environments; use it only when you intentionally want to replace disposable data.
|
|
118
120
|
|
|
119
121
|
### Start the server
|
|
120
122
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
# test/fixtures/lesli_accounts.yml
|
|
3
|
+
|
|
4
|
+
one:
|
|
5
|
+
status: "active"
|
|
6
|
+
name: "Lesli Demo Account"
|
|
7
|
+
email: "account-one@example.com"
|
|
8
|
+
region: "america"
|
|
9
|
+
created_at: <%= Time.current %>
|
|
10
|
+
updated_at: <%= Time.current %>
|
|
11
|
+
|
|
12
|
+
two:
|
|
13
|
+
status: "active"
|
|
14
|
+
name: "Second Account"
|
|
15
|
+
email: "account-two@example.com"
|
|
16
|
+
region: "america"
|
|
17
|
+
created_at: <%= Time.current %>
|
|
18
|
+
updated_at: <%= Time.current %>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# test/fixtures/lesli_users.yml
|
|
2
|
+
|
|
3
|
+
one:
|
|
4
|
+
uid: "USR-0001"
|
|
5
|
+
active: true
|
|
6
|
+
email: "one@example.com"
|
|
7
|
+
encrypted_password: "provided-by-authentication-engine"
|
|
8
|
+
first_name: "Luis"
|
|
9
|
+
last_name: "Donis"
|
|
10
|
+
sign_in_count: 0
|
|
11
|
+
account: one
|
|
12
|
+
created_at: <%= Time.current %>
|
|
13
|
+
updated_at: <%= Time.current %>
|
|
14
|
+
|
|
15
|
+
two:
|
|
16
|
+
uid: "USR-0002"
|
|
17
|
+
active: true
|
|
18
|
+
email: "two@example.com"
|
|
19
|
+
encrypted_password: "provided-by-authentication-engine"
|
|
20
|
+
sign_in_count: 0
|
|
21
|
+
account: two
|
|
22
|
+
created_at: <%= Time.current %>
|
|
23
|
+
updated_at: <%= Time.current %>
|
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lesli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.1.
|
|
4
|
+
version: 5.1.14
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- The Lesli Development Team
|
|
8
|
+
autorequire:
|
|
8
9
|
bindir: bin
|
|
9
10
|
cert_chain: []
|
|
10
|
-
date:
|
|
11
|
+
date: 2026-11-16 00:00:00.000000000 Z
|
|
11
12
|
dependencies:
|
|
12
13
|
- !ruby/object:Gem::Dependency
|
|
13
14
|
name: rails
|
|
@@ -15,28 +16,28 @@ dependencies:
|
|
|
15
16
|
requirements:
|
|
16
17
|
- - "~>"
|
|
17
18
|
- !ruby/object:Gem::Version
|
|
18
|
-
version:
|
|
19
|
+
version: 8.1.0
|
|
19
20
|
type: :runtime
|
|
20
21
|
prerelease: false
|
|
21
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
23
|
requirements:
|
|
23
24
|
- - "~>"
|
|
24
25
|
- !ruby/object:Gem::Version
|
|
25
|
-
version:
|
|
26
|
+
version: 8.1.0
|
|
26
27
|
- !ruby/object:Gem::Dependency
|
|
27
28
|
name: rails-i18n
|
|
28
29
|
requirement: !ruby/object:Gem::Requirement
|
|
29
30
|
requirements:
|
|
30
31
|
- - "~>"
|
|
31
32
|
- !ruby/object:Gem::Version
|
|
32
|
-
version:
|
|
33
|
+
version: 8.1.0
|
|
33
34
|
type: :runtime
|
|
34
35
|
prerelease: false
|
|
35
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
37
|
requirements:
|
|
37
38
|
- - "~>"
|
|
38
39
|
- !ruby/object:Gem::Version
|
|
39
|
-
version:
|
|
40
|
+
version: 8.1.0
|
|
40
41
|
- !ruby/object:Gem::Dependency
|
|
41
42
|
name: turbo-rails
|
|
42
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -79,20 +80,6 @@ dependencies:
|
|
|
79
80
|
- - "~>"
|
|
80
81
|
- !ruby/object:Gem::Version
|
|
81
82
|
version: 1.2.2
|
|
82
|
-
- !ruby/object:Gem::Dependency
|
|
83
|
-
name: devise
|
|
84
|
-
requirement: !ruby/object:Gem::Requirement
|
|
85
|
-
requirements:
|
|
86
|
-
- - "~>"
|
|
87
|
-
- !ruby/object:Gem::Version
|
|
88
|
-
version: 5.0.0
|
|
89
|
-
type: :runtime
|
|
90
|
-
prerelease: false
|
|
91
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
92
|
-
requirements:
|
|
93
|
-
- - "~>"
|
|
94
|
-
- !ruby/object:Gem::Version
|
|
95
|
-
version: 5.0.0
|
|
96
83
|
- !ruby/object:Gem::Dependency
|
|
97
84
|
name: lesli_date
|
|
98
85
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -175,19 +162,20 @@ files:
|
|
|
175
162
|
- Rakefile
|
|
176
163
|
- app/assets/images/lesli/lesli-logo.svg
|
|
177
164
|
- app/assets/stylesheets/lesli/application.css
|
|
178
|
-
- app/assets/stylesheets/lesli/application.tailwind.css
|
|
179
165
|
- app/controllers/lesli/abouts_controller.rb
|
|
180
166
|
- app/controllers/lesli/application_controller.rb
|
|
181
167
|
- app/controllers/lesli/application_devise_controller.rb
|
|
182
168
|
- app/controllers/lesli/application_lesli_controller.rb
|
|
183
169
|
- app/controllers/lesli/apps_controller.rb
|
|
184
170
|
- app/controllers/lesli/items/activities_controller.rb
|
|
171
|
+
- app/controllers/lesli/items/attachments_controller.rb
|
|
185
172
|
- app/controllers/lesli/items/discussions_controller.rb
|
|
186
173
|
- app/controllers/lesli/items/tasks_controller.rb
|
|
187
174
|
- app/controllers/lesli/resources_controller.rb
|
|
188
175
|
- app/controllers/lesli/roles_controller.rb
|
|
189
176
|
- app/controllers/lesli/shared/dashboards_controller.rb
|
|
190
177
|
- app/controllers/lesli/users_controller.rb
|
|
178
|
+
- app/helpers/lesli/announcements_helper.rb
|
|
191
179
|
- app/helpers/lesli/customization_helper.rb
|
|
192
180
|
- app/helpers/lesli/html_helper.rb
|
|
193
181
|
- app/helpers/lesli/navigation_helper.rb
|
|
@@ -202,13 +190,16 @@ files:
|
|
|
202
190
|
- app/models/concerns/lesli/account_initializer.rb
|
|
203
191
|
- app/models/concerns/lesli/account_logs.rb
|
|
204
192
|
- app/models/concerns/lesli/items/activities.rb
|
|
193
|
+
- app/models/concerns/lesli/items/attachments.rb
|
|
205
194
|
- app/models/concerns/lesli/items/discussions.rb
|
|
195
|
+
- app/models/concerns/lesli/items/ownership.rb
|
|
206
196
|
- app/models/concerns/lesli/items/tasks.rb
|
|
207
197
|
- app/models/concerns/lesli/user_extensions.rb
|
|
208
198
|
- app/models/lesli/account.rb
|
|
209
199
|
- app/models/lesli/application_lesli_record.rb
|
|
210
200
|
- app/models/lesli/application_record.rb
|
|
211
201
|
- app/models/lesli/items/activity.rb
|
|
202
|
+
- app/models/lesli/items/attachment.rb
|
|
212
203
|
- app/models/lesli/items/discussion.rb
|
|
213
204
|
- app/models/lesli/items/task.rb
|
|
214
205
|
- app/models/lesli/resource.rb
|
|
@@ -216,6 +207,8 @@ files:
|
|
|
216
207
|
- app/models/lesli/shared/catalog.rb
|
|
217
208
|
- app/models/lesli/shared/dashboard.rb
|
|
218
209
|
- app/models/lesli/user.rb
|
|
210
|
+
- app/operators/lesli/account_operator.rb
|
|
211
|
+
- app/operators/lesli/resource_operator.rb
|
|
219
212
|
- app/services/lesli/application_lesli_service.rb
|
|
220
213
|
- app/services/lesli/resource_service.rb
|
|
221
214
|
- app/services/lesli/role_service.rb
|
|
@@ -230,6 +223,7 @@ files:
|
|
|
230
223
|
- app/views/lesli/layouts/mailer.html.erb
|
|
231
224
|
- app/views/lesli/layouts/mailer.text.erb
|
|
232
225
|
- app/views/lesli/partials/_application-lesli-analytics.html.erb
|
|
226
|
+
- app/views/lesli/partials/_application-lesli-announcements.html.erb
|
|
233
227
|
- app/views/lesli/partials/_application-lesli-assets.html.erb
|
|
234
228
|
- app/views/lesli/partials/_application-lesli-content.html.erb
|
|
235
229
|
- app/views/lesli/partials/_application-lesli-data.html.erb
|
|
@@ -238,13 +232,10 @@ files:
|
|
|
238
232
|
- app/views/lesli/partials/_application-lesli-header.html.erb
|
|
239
233
|
- app/views/lesli/partials/_application-lesli-navigation.html.erb
|
|
240
234
|
- app/views/lesli/partials/_application-lesli-notifications.html.erb
|
|
241
|
-
- app/views/lesli/partials/_application-lesli-sidebar.html.erb
|
|
242
235
|
- app/views/lesli/partials/_application-lesli-turbo.html.erb
|
|
243
236
|
- app/views/lesli/partials/turbo/_redirection.html.erb
|
|
244
237
|
- app/views/lesli/shared/dashboards/edit.html.erb
|
|
245
238
|
- app/views/lesli/shared/dashboards/show.html.erb
|
|
246
|
-
- config/brakeman.yml
|
|
247
|
-
- config/initializers/devise.rb
|
|
248
239
|
- config/initializers/lesli.rb
|
|
249
240
|
- config/initializers/lesli_migration_helpers.rb
|
|
250
241
|
- config/locales/devise.en.yml
|
|
@@ -267,6 +258,22 @@ files:
|
|
|
267
258
|
- lib/generators/lesli/install/templates/lesli.rb
|
|
268
259
|
- lib/generators/lesli/model/model_generator.rb
|
|
269
260
|
- lib/generators/lesli/model/templates/model.rb.tt
|
|
261
|
+
- lib/generators/lesli/resource/resource_generator.rb
|
|
262
|
+
- lib/generators/lesli/resource/templates/controller.rb.tt
|
|
263
|
+
- lib/generators/lesli/resource/templates/locale.en.yml.tt
|
|
264
|
+
- lib/generators/lesli/resource/templates/migration.rb.tt
|
|
265
|
+
- lib/generators/lesli/resource/templates/model.rb.tt
|
|
266
|
+
- lib/generators/lesli/resource/templates/operator.rb.tt
|
|
267
|
+
- lib/generators/lesli/resource/templates/service.rb.tt
|
|
268
|
+
- lib/generators/lesli/resource/templates/tests/controller_test.rb.tt
|
|
269
|
+
- lib/generators/lesli/resource/templates/tests/model_test.rb.tt
|
|
270
|
+
- lib/generators/lesli/resource/templates/tests/operator_test.rb.tt
|
|
271
|
+
- lib/generators/lesli/resource/templates/tests/service_test.rb.tt
|
|
272
|
+
- lib/generators/lesli/resource/templates/views/_form.html.erb.tt
|
|
273
|
+
- lib/generators/lesli/resource/templates/views/edit.html.erb.tt
|
|
274
|
+
- lib/generators/lesli/resource/templates/views/index.html.erb.tt
|
|
275
|
+
- lib/generators/lesli/resource/templates/views/new.html.erb.tt
|
|
276
|
+
- lib/generators/lesli/resource/templates/views/show.html.erb.tt
|
|
270
277
|
- lib/generators/lesli/scaffold/scaffold_generator.rb
|
|
271
278
|
- lib/generators/lesli/service/service_generator.rb
|
|
272
279
|
- lib/generators/lesli/service/templates/service.rb.tt
|
|
@@ -275,9 +282,11 @@ files:
|
|
|
275
282
|
- lib/generators/lesli/views/templates/new.html.erb.tt
|
|
276
283
|
- lib/generators/lesli/views/templates/show.html.erb.tt
|
|
277
284
|
- lib/generators/lesli/views/views_generator.rb
|
|
285
|
+
- lib/generators/lesli_generator.rb
|
|
278
286
|
- lib/lesli.rb
|
|
279
287
|
- lib/lesli/configuration.rb
|
|
280
288
|
- lib/lesli/courier.rb
|
|
289
|
+
- lib/lesli/database_tasks.rb
|
|
281
290
|
- lib/lesli/engine.rb
|
|
282
291
|
- lib/lesli/router.rb
|
|
283
292
|
- lib/lesli/version.rb
|
|
@@ -297,6 +306,8 @@ files:
|
|
|
297
306
|
- lib/tasks/lesli_tasks.rake
|
|
298
307
|
- license
|
|
299
308
|
- readme.md
|
|
309
|
+
- test/fixtures/lesli_accounts.yml
|
|
310
|
+
- test/fixtures/lesli_users.yml
|
|
300
311
|
homepage: https://www.lesli.dev/
|
|
301
312
|
licenses:
|
|
302
313
|
- GPL-3.0-or-later
|
|
@@ -306,6 +317,7 @@ metadata:
|
|
|
306
317
|
source_code_uri: https://github.com/LesliTech/Lesli
|
|
307
318
|
bug_tracker_uri: https://github.com/LesliTech/Lesli/issues
|
|
308
319
|
documentation_uri: https://www.lesli.dev/lesli/
|
|
320
|
+
rubygems_mfa_required: 'true'
|
|
309
321
|
post_install_message: "\nWelcome to Lesli! \U0001F499 \nDocumentation: https://www.lesli.dev/\n\n"
|
|
310
322
|
rdoc_options: []
|
|
311
323
|
require_paths:
|
|
@@ -314,7 +326,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
314
326
|
requirements:
|
|
315
327
|
- - ">="
|
|
316
328
|
- !ruby/object:Gem::Version
|
|
317
|
-
version: '3.
|
|
329
|
+
version: '3.3'
|
|
318
330
|
- - "<"
|
|
319
331
|
- !ruby/object:Gem::Version
|
|
320
332
|
version: '4.0'
|
|
@@ -324,7 +336,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
324
336
|
- !ruby/object:Gem::Version
|
|
325
337
|
version: '0'
|
|
326
338
|
requirements: []
|
|
327
|
-
rubygems_version: 3.
|
|
339
|
+
rubygems_version: 3.5.16
|
|
340
|
+
signing_key:
|
|
328
341
|
specification_version: 4
|
|
329
342
|
summary: A modular framework for building business software with Ruby on Rails.
|
|
330
343
|
test_files: []
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
2
|
-
/*!
|
|
3
|
-
|
|
4
|
-
Lesli
|
|
5
|
-
|
|
6
|
-
Copyright (c) 2026, Lesli Technologies, S. A.
|
|
7
|
-
|
|
8
|
-
This program is free software: you can redistribute it and/or modify
|
|
9
|
-
it under the terms of the GNU General Public License as published by
|
|
10
|
-
the Free Software Foundation, either version 3 of the License, or
|
|
11
|
-
(at your option) any later version.
|
|
12
|
-
|
|
13
|
-
This program is distributed in the hope that it will be useful,
|
|
14
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
GNU General Public License for more details.
|
|
17
|
-
|
|
18
|
-
You should have received a copy of the GNU General Public License
|
|
19
|
-
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
20
|
-
|
|
21
|
-
Lesli · Ruby on Rails SaaS Development Framework.
|
|
22
|
-
|
|
23
|
-
Made with ♥ by LesliTech
|
|
24
|
-
Building a better future, one line of code at a time.
|
|
25
|
-
|
|
26
|
-
@contact hello@lesli.tech
|
|
27
|
-
@website https://www.lesli.tech
|
|
28
|
-
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
29
|
-
|
|
30
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
31
|
-
// ·
|
|
32
|
-
*/
|
|
33
|
-
@layer theme{:root,:host{--spacing:.25rem}}@layer utilities{.grid{display:grid}.hidden{display:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.gap-5{gap:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}@media (min-width:40rem){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:gap-6{gap:calc(var(--spacing) * 6)}.sm\:py-8{padding-block:calc(var(--spacing) * 8)}}@media (min-width:64rem){.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
=begin
|
|
3
|
-
|
|
4
|
-
Lesli
|
|
5
|
-
|
|
6
|
-
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
7
|
-
|
|
8
|
-
This program is free software: you can redistribute it and/or modify
|
|
9
|
-
it under the terms of the GNU General Public License as published by
|
|
10
|
-
the Free Software Foundation, either version 3 of the License, or
|
|
11
|
-
(at your option) any later version.
|
|
12
|
-
|
|
13
|
-
This program is distributed in the hope that it will be useful,
|
|
14
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
GNU General Public License for more details.
|
|
17
|
-
|
|
18
|
-
You should have received a copy of the GNU General Public License
|
|
19
|
-
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
20
|
-
|
|
21
|
-
Lesli · Ruby on Rails SaaS development platform.
|
|
22
|
-
|
|
23
|
-
Made with ♥ by https://www.lesli.tech
|
|
24
|
-
Building a better future, one line of code at a time.
|
|
25
|
-
|
|
26
|
-
@contact hello@lesli.tech
|
|
27
|
-
@website https://www.lesli.tech
|
|
28
|
-
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
29
|
-
|
|
30
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
31
|
-
// ·
|
|
32
|
-
=end
|
|
33
|
-
%>
|
|
34
|
-
|
|
35
|
-
<%# check if custom navigation partial exists, getting the path from application helper %>
|
|
36
|
-
<% custom_sidebar_path = "#{lesli_engine.dig(:code)}/partials/sidebar" %>
|
|
37
|
-
|
|
38
|
-
<%# validate the path to be sure the partial exists when trying to render it %>
|
|
39
|
-
<% custom_sidebar_exists = lookup_context.exists?(custom_sidebar_path, nil, true) %>
|
|
40
|
-
|
|
41
|
-
<%# render navigation partial %>
|
|
42
|
-
<% if custom_sidebar_exists %>
|
|
43
|
-
<aside class="flex w-[50px] shrink-0 flex-col pt-12 pl-12 transition-all duration-200 ease-linear min-[769px]:w-[100px] min-[1024px]:w-[200px] min-[1216px]:w-[225px] min-[1408px]:w-[328px]">
|
|
44
|
-
<nav class="overflow-y-scroll rounded-lg bg-white pt-[.8rem] pb-4 pl-4 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden" aria-label="Module navigation">
|
|
45
|
-
<ul>
|
|
46
|
-
<%= render partial: custom_sidebar_path %>
|
|
47
|
-
</ul>
|
|
48
|
-
</nav>
|
|
49
|
-
</aside>
|
|
50
|
-
<% end %>
|
data/config/brakeman.yml
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# Brakeman Configuration File
|
|
3
|
-
# Documentation: https://brakemanscanner.org/docs/options/
|
|
4
|
-
|
|
5
|
-
# Files and Directories to Skip
|
|
6
|
-
skip_files:
|
|
7
|
-
|
|
8
|
-
# Warnings to Ignore (List Warning Codes)
|
|
9
|
-
ignore_warnings:
|
|
10
|
-
# - "SQLi" # Example: Ignore false-positive SQL injection warnings
|
|
11
|
-
# - "WeakHash" # Ignore warnings about weak hashing if you're using MD5 intentionally
|
|
12
|
-
|
|
13
|
-
# Additional Checks
|
|
14
|
-
checks_to_run:
|
|
15
|
-
- "DefaultRoutes"
|
|
16
|
-
- "MassAssignment"
|
|
17
|
-
- "CrossSiteScripting"
|
|
18
|
-
- "SQLInjection"
|
|
19
|
-
- "FileAccess"
|
|
20
|
-
- "UnmaintainedDependency"
|
|
21
|
-
|
|
22
|
-
# Confidence Levels to Report
|
|
23
|
-
min_confidence: 2 # 0 (all warnings), 1 (medium), 2 (high)
|
|
24
|
-
|
|
25
|
-
# Output Format
|
|
26
|
-
output_formats:
|
|
27
|
-
- "html"
|
|
28
|
-
- "json"
|
|
29
|
-
- "plain"
|
|
30
|
-
|
|
31
|
-
# Output Files
|
|
32
|
-
output_files:
|
|
33
|
-
- "brakeman/brakeman_report.html"
|
|
34
|
-
- "brakeman/brakeman_report.json"
|
|
35
|
-
|
|
36
|
-
# Optional Settings
|
|
37
|
-
run_all_checks: true # Run all checks even if specific ones are set
|
|
38
|
-
report_routes: true # Include unused routes in the report
|
|
39
|
-
exit_on_warn: true # Exit with a non-zero code if warnings are found
|
|
40
|
-
|
|
41
|
-
# Skipping Specific Models or Files (Advanced)
|
|
42
|
-
skip_files_containing:
|
|
43
|
-
- "DO NOT SCAN" # Add comment markers in files you want skipped
|
|
44
|
-
- "IGNORE ME"
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
require 'devise/orm/active_record'
|
|
3
|
-
|
|
4
|
-
Devise.setup do |config|
|
|
5
|
-
|
|
6
|
-
# config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
|
|
7
|
-
|
|
8
|
-
# config.case_insensitive_keys = [:email]
|
|
9
|
-
|
|
10
|
-
# config.strip_whitespace_keys = [:email]
|
|
11
|
-
|
|
12
|
-
# config.skip_session_storage = [:http_auth]
|
|
13
|
-
|
|
14
|
-
# config.stretches = Rails.env.test? ? 1 : 12
|
|
15
|
-
|
|
16
|
-
# config.reconfirmable = true
|
|
17
|
-
|
|
18
|
-
# config.expire_all_remember_me_on_sign_out = true
|
|
19
|
-
|
|
20
|
-
# config.password_length = 6..128
|
|
21
|
-
|
|
22
|
-
# config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
|
|
23
|
-
|
|
24
|
-
# config.reset_password_within = 6.hours
|
|
25
|
-
|
|
26
|
-
# config.sign_out_via = :delete
|
|
27
|
-
end
|