lesli 5.1.0 → 5.1.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.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/lesli/application.css +192 -1
- data/app/controllers/lesli/{item → items}/activities_controller.rb +1 -1
- data/app/controllers/lesli/{item → items}/discussions_controller.rb +3 -3
- data/app/controllers/lesli/{item → items}/tasks_controller.rb +3 -3
- data/app/helpers/lesli/html_helper.rb +1 -1
- data/app/models/concerns/lesli/{item → items}/activities.rb +3 -3
- data/app/models/concerns/lesli/{item → items}/discussions.rb +2 -2
- data/app/models/concerns/lesli/{item → items}/tasks.rb +2 -2
- data/app/models/lesli/application_lesli_record.rb +1 -1
- data/app/models/lesli/{item → items}/activity.rb +1 -1
- data/app/models/lesli/{item → items}/discussion.rb +1 -1
- data/app/models/lesli/{item → items}/task.rb +1 -1
- data/app/views/lesli/partials/_application-lesli-assets.html.erb +4 -3
- data/config/brakeman.yml +2 -13
- data/db/seed/accounts.rb +2 -2
- data/db/seed/users.rb +2 -2
- data/db/seeds.rb +1 -1
- data/lib/lesli/engine.rb +0 -1
- data/lib/lesli/router.rb +1 -1
- data/lib/lesli/version.rb +2 -2
- data/lib/migrate/common.rb +2 -2
- data/lib/migrate/items/activity_structure.rb +1 -1
- data/lib/migrate/items/attachment_structure.rb +1 -1
- data/lib/migrate/items/discussion_structure.rb +1 -1
- data/lib/migrate/items/subscriber_structure.rb +1 -1
- data/lib/migrate/items/task_structure.rb +1 -1
- data/lib/migrate/items/version_structure.rb +1 -1
- data/lib/tasks/lesli/db.rake +11 -11
- data/lib/tasks/lesli/dev.rake +1 -1
- data/lib/tasks/lesli/engine.rake +1 -1
- data/lib/tasks/lesli/resources.rake +1 -1
- data/lib/tasks/lesli_tasks.rake +7 -32
- data/readme.md +3 -3
- metadata +10 -24
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9e374ad272b0036ff13e33e0066844fd483aae0c44d73509cd4613e2adad9cb2
|
|
4
|
+
data.tar.gz: fac622c0754e88e69b45cdf8c6ccbbbaf6fa5ce6a1eac0eba8ba52cf83fede2d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: da540c1be075e2bd7e0a0f69bd18f7a3ef7d08e1384cddafa12532102c8b954e7dc3c23717e5f7008a8c03865917b8227b2d001b2cd85c3345d7e36ed453f757
|
|
7
|
+
data.tar.gz: cf4bcd1007e82aaddb2eaab252e19fc0552e0fd258cc824b64cb2ec3bf8d430bf4883772c926eda26328e95c043c6a515c48239d0666fad3d6bee8e69bd4e6a9
|
|
@@ -1 +1,192 @@
|
|
|
1
|
-
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/*
|
|
3
|
+
Lesli
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2025, 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 LesliTech
|
|
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
|
+
*/
|
|
32
|
+
/*
|
|
33
|
+
Lesli
|
|
34
|
+
|
|
35
|
+
Copyright (c) 2025, Lesli Technologies, S. A.
|
|
36
|
+
|
|
37
|
+
This program is free software: you can redistribute it and/or modify
|
|
38
|
+
it under the terms of the GNU General Public License as published by
|
|
39
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
40
|
+
(at your option) any later version.
|
|
41
|
+
|
|
42
|
+
This program is distributed in the hope that it will be useful,
|
|
43
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
44
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
45
|
+
GNU General Public License for more details.
|
|
46
|
+
|
|
47
|
+
You should have received a copy of the GNU General Public License
|
|
48
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
49
|
+
|
|
50
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
|
51
|
+
|
|
52
|
+
Made with ♥ by LesliTech
|
|
53
|
+
Building a better future, one line of code at a time.
|
|
54
|
+
|
|
55
|
+
@contact hello@lesli.tech
|
|
56
|
+
@website https://www.lesli.tech
|
|
57
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
58
|
+
|
|
59
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
60
|
+
// ·
|
|
61
|
+
*/
|
|
62
|
+
/**
|
|
63
|
+
Lesli
|
|
64
|
+
|
|
65
|
+
Copyright (c) 2025, Lesli Technologies, S. A.
|
|
66
|
+
|
|
67
|
+
This program is free software: you can redistribute it and/or modify
|
|
68
|
+
it under the terms of the GNU General Public License as published by
|
|
69
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
70
|
+
(at your option) any later version.
|
|
71
|
+
|
|
72
|
+
This program is distributed in the hope that it will be useful,
|
|
73
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
74
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
75
|
+
GNU General Public License for more details.
|
|
76
|
+
|
|
77
|
+
You should have received a copy of the GNU General Public License
|
|
78
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
79
|
+
|
|
80
|
+
Lesli - SCSS Utilities for websites, apps and web applications
|
|
81
|
+
|
|
82
|
+
Made with ♥ by LesliTech
|
|
83
|
+
Building a better future, one line of code at a time.
|
|
84
|
+
|
|
85
|
+
@contact hello@lesli.tech
|
|
86
|
+
@website https://www.lesli.tech
|
|
87
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
88
|
+
|
|
89
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
90
|
+
// ·
|
|
91
|
+
*/
|
|
92
|
+
/*
|
|
93
|
+
Lesli
|
|
94
|
+
|
|
95
|
+
Copyright (c) 2025, Lesli Technologies, S. A.
|
|
96
|
+
|
|
97
|
+
This program is free software: you can redistribute it and/or modify
|
|
98
|
+
it under the terms of the GNU General Public License as published by
|
|
99
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
100
|
+
(at your option) any later version.
|
|
101
|
+
|
|
102
|
+
This program is distributed in the hope that it will be useful,
|
|
103
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
104
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
105
|
+
GNU General Public License for more details.
|
|
106
|
+
|
|
107
|
+
You should have received a copy of the GNU General Public License
|
|
108
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
109
|
+
|
|
110
|
+
Lesli - SCSS Utilities for websites, apps and web applications
|
|
111
|
+
|
|
112
|
+
Made with ♥ by LesliTech
|
|
113
|
+
Building a better future, one line of code at a time.
|
|
114
|
+
|
|
115
|
+
@contact hello@lesli.tech
|
|
116
|
+
@website https://www.lesli.tech
|
|
117
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
118
|
+
|
|
119
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
120
|
+
// ·
|
|
121
|
+
*/
|
|
122
|
+
/**
|
|
123
|
+
Lesli
|
|
124
|
+
|
|
125
|
+
Copyright (c) 2025, Lesli Technologies, S. A.
|
|
126
|
+
|
|
127
|
+
This program is free software: you can redistribute it and/or modify
|
|
128
|
+
it under the terms of the GNU General Public License as published by
|
|
129
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
130
|
+
(at your option) any later version.
|
|
131
|
+
|
|
132
|
+
This program is distributed in the hope that it will be useful,
|
|
133
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
134
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
135
|
+
GNU General Public License for more details.
|
|
136
|
+
|
|
137
|
+
You should have received a copy of the GNU General Public License
|
|
138
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
139
|
+
|
|
140
|
+
Lesli - SCSS Utilities for websites, apps and web applications
|
|
141
|
+
|
|
142
|
+
Made with ♥ by LesliTech
|
|
143
|
+
Building a better future, one line of code at a time.
|
|
144
|
+
|
|
145
|
+
@contact hello@lesli.tech
|
|
146
|
+
@website https://www.lesli.tech
|
|
147
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
148
|
+
|
|
149
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
150
|
+
// ·
|
|
151
|
+
*/
|
|
152
|
+
body.lesli.apps.show .lesli-element-header {
|
|
153
|
+
margin-bottom: 5rem !important;
|
|
154
|
+
}
|
|
155
|
+
body.lesli.apps.show .engines {
|
|
156
|
+
gap: 24px;
|
|
157
|
+
margin-inline-end: auto;
|
|
158
|
+
margin-inline-start: auto;
|
|
159
|
+
}
|
|
160
|
+
body.lesli.apps.show .engines a {
|
|
161
|
+
flex-basis: 318px;
|
|
162
|
+
text-align: center;
|
|
163
|
+
padding: 2rem 0.4rem 2.8rem;
|
|
164
|
+
border: white 1px solid;
|
|
165
|
+
border-radius: 6px;
|
|
166
|
+
background-color: white;
|
|
167
|
+
transition: all ease-in-out 0.2s;
|
|
168
|
+
box-shadow: rgba(9, 30, 66, 0.25) 0px 4px 8px -2px, rgba(9, 30, 66, 0.08) 0px 0px 0px 1px;
|
|
169
|
+
}
|
|
170
|
+
body.lesli.apps.show .engines a:hover {
|
|
171
|
+
border-color: var(--lesli-color-primary);
|
|
172
|
+
transform: translateY(-2px);
|
|
173
|
+
}
|
|
174
|
+
body.lesli.apps.show .engines a.is-active {
|
|
175
|
+
background-color: #F0F4FF;
|
|
176
|
+
border-color: var(--lesli-color-primary);
|
|
177
|
+
}
|
|
178
|
+
body.lesli.apps.show .engines a svg {
|
|
179
|
+
margin-right: 0.4rem;
|
|
180
|
+
fill: var(--lesli-color-primary);
|
|
181
|
+
}
|
|
182
|
+
body.lesli.apps.show .engines a p {
|
|
183
|
+
font-size: 14;
|
|
184
|
+
font-family: "OpenSans";
|
|
185
|
+
}
|
|
186
|
+
body.lesli.apps.show .engines a span {
|
|
187
|
+
font-weight: 600;
|
|
188
|
+
font-size: 20px;
|
|
189
|
+
}
|
|
190
|
+
body.lesli.apps.show .engines a span, body.lesli.apps.show .engines a p {
|
|
191
|
+
color: var(--lesli-color-primary);
|
|
192
|
+
}
|
|
@@ -31,7 +31,7 @@ Building a better future, one line of code at a time.
|
|
|
31
31
|
=end
|
|
32
32
|
|
|
33
33
|
module Lesli
|
|
34
|
-
module
|
|
34
|
+
module Items
|
|
35
35
|
class DiscussionsController < ApplicationLesliController
|
|
36
36
|
before_action :set_discussion, only: %i[show update]
|
|
37
37
|
before_action :set_discussable, only: %i[index create]
|
|
@@ -57,7 +57,7 @@ module Lesli
|
|
|
57
57
|
respond_with_lesli(:turbo => [
|
|
58
58
|
stream_notification_success("Discussion created"),
|
|
59
59
|
turbo_stream.prepend("#{scope_key}-lesli-items-discussions-list") do
|
|
60
|
-
LesliView::
|
|
60
|
+
LesliView::Items::Discussion.new(discussion).render_in(view_context)
|
|
61
61
|
end
|
|
62
62
|
])
|
|
63
63
|
else
|
|
@@ -73,7 +73,7 @@ module Lesli
|
|
|
73
73
|
respond_with_lesli(:turbo => [
|
|
74
74
|
stream_notification_success("Discussion updated #{@discussable}"),
|
|
75
75
|
turbo_stream.replace(helpers.dom_id(@discussion, scope_key)) do
|
|
76
|
-
LesliView::
|
|
76
|
+
LesliView::Items::Discussion.new(@discussion, scope_key).render_in(view_context)
|
|
77
77
|
end
|
|
78
78
|
])
|
|
79
79
|
end
|
|
@@ -31,7 +31,7 @@ Building a better future, one line of code at a time.
|
|
|
31
31
|
=end
|
|
32
32
|
|
|
33
33
|
module Lesli
|
|
34
|
-
module
|
|
34
|
+
module Items
|
|
35
35
|
class TasksController < ApplicationLesliController
|
|
36
36
|
before_action :set_task, only: %i[show update]
|
|
37
37
|
before_action :set_taskable, only: %i[index create]
|
|
@@ -57,7 +57,7 @@ module Lesli
|
|
|
57
57
|
respond_with_lesli(:turbo => [
|
|
58
58
|
stream_notification_success("Task created"),
|
|
59
59
|
turbo_stream.prepend("#{scope_key}-lesli-items-tasks-list") do
|
|
60
|
-
LesliView::
|
|
60
|
+
LesliView::Items::Task.new(task, scope_key).render_in(view_context)
|
|
61
61
|
end
|
|
62
62
|
])
|
|
63
63
|
else
|
|
@@ -73,7 +73,7 @@ module Lesli
|
|
|
73
73
|
respond_with_lesli(:turbo => [
|
|
74
74
|
stream_notification_success("Task updated #{@taskable}"),
|
|
75
75
|
turbo_stream.replace(helpers.dom_id(@task, scope_key)) do
|
|
76
|
-
LesliView::
|
|
76
|
+
LesliView::Items::Task.new(@task, scope_key).render_in(view_context)
|
|
77
77
|
end
|
|
78
78
|
])
|
|
79
79
|
end
|
|
@@ -86,7 +86,7 @@ module Lesli
|
|
|
86
86
|
# Specific stylesheet from gem
|
|
87
87
|
# lesli_stylesheet_path(:lesli_assets, 'templates/application')
|
|
88
88
|
# /assets/lesli_assets/templates/application.css
|
|
89
|
-
def
|
|
89
|
+
def lesli_asset_path(engine = nil, stylesheet = 'application')
|
|
90
90
|
|
|
91
91
|
# Stylesheets from specific engine
|
|
92
92
|
return "#{engine}/#{stylesheet}" if engine.present?
|
|
@@ -31,7 +31,7 @@ Building a better future, one line of code at a time.
|
|
|
31
31
|
=end
|
|
32
32
|
|
|
33
33
|
module Lesli
|
|
34
|
-
module
|
|
34
|
+
module Items
|
|
35
35
|
module Activities
|
|
36
36
|
extend ActiveSupport::Concern
|
|
37
37
|
|
|
@@ -48,7 +48,7 @@ module Lesli
|
|
|
48
48
|
klass = if use
|
|
49
49
|
use.to_s.constantize
|
|
50
50
|
else
|
|
51
|
-
"#{name.deconstantize}::
|
|
51
|
+
"#{name.deconstantize}::Items::Activity".constantize
|
|
52
52
|
end
|
|
53
53
|
|
|
54
54
|
self.lesli_activities_class = klass
|
|
@@ -89,7 +89,7 @@ module Lesli
|
|
|
89
89
|
end
|
|
90
90
|
|
|
91
91
|
def after_save_activities
|
|
92
|
-
|
|
92
|
+
Termline.warn "You need to define your activity methods in your model"
|
|
93
93
|
end
|
|
94
94
|
|
|
95
95
|
def activities_create **resource
|
|
@@ -31,7 +31,7 @@ Building a better future, one line of code at a time.
|
|
|
31
31
|
=end
|
|
32
32
|
|
|
33
33
|
module Lesli
|
|
34
|
-
module
|
|
34
|
+
module Items
|
|
35
35
|
module Discussions
|
|
36
36
|
extend ActiveSupport::Concern
|
|
37
37
|
|
|
@@ -53,7 +53,7 @@ module Lesli
|
|
|
53
53
|
klass = if use
|
|
54
54
|
use.to_s.constantize
|
|
55
55
|
else
|
|
56
|
-
"#{name.deconstantize}::
|
|
56
|
+
"#{name.deconstantize}::Items::Discussion".constantize
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
self.lesli_discussions_class = klass
|
|
@@ -31,7 +31,7 @@ Building a better future, one line of code at a time.
|
|
|
31
31
|
=end
|
|
32
32
|
|
|
33
33
|
module Lesli
|
|
34
|
-
module
|
|
34
|
+
module Items
|
|
35
35
|
module Tasks
|
|
36
36
|
extend ActiveSupport::Concern
|
|
37
37
|
|
|
@@ -53,7 +53,7 @@ module Lesli
|
|
|
53
53
|
klass = if use
|
|
54
54
|
use.to_s.constantize
|
|
55
55
|
else
|
|
56
|
-
"#{name.deconstantize}::
|
|
56
|
+
"#{name.deconstantize}::Items::Task".constantize
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
self.lesli_tasks_class = klass
|
|
@@ -50,9 +50,10 @@ Building a better future, one line of code at a time.
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
<%# Loading stylesheets from engines %>
|
|
53
|
-
<%= stylesheet_link_tag(
|
|
54
|
-
<%= stylesheet_link_tag(
|
|
53
|
+
<%= stylesheet_link_tag(lesli_asset_path(:lesli_assets), media: "all") %>
|
|
54
|
+
<%= stylesheet_link_tag(lesli_asset_path(), media: "all") %>
|
|
55
|
+
|
|
55
56
|
|
|
56
57
|
<%# Loading javascripts from engines %>
|
|
57
|
-
<%= javascript_include_tag(
|
|
58
|
+
<%= javascript_include_tag(lesli_asset_path(:lesli_assets, 'application'), :defer => "defer") %>
|
|
58
59
|
<%= yield(:application_lesli_javascript) %>
|
data/config/brakeman.yml
CHANGED
|
@@ -4,18 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
# Files and Directories to Skip
|
|
6
6
|
skip_files:
|
|
7
|
-
- "tmp/**/*" # Skip temporary files
|
|
8
|
-
- "vendor/**/*" # Skip vendor folder
|
|
9
|
-
- "node_modules/**/*" # Skip global node_modules
|
|
10
|
-
- "engines/Lesli/node_modules/"
|
|
11
|
-
- "engines/Lesli/app/items/*"
|
|
12
|
-
- "engines/Lesli/app/models/lesli/cloud_object/"
|
|
13
|
-
- "enginesdev/"
|
|
14
7
|
|
|
15
8
|
# Warnings to Ignore (List Warning Codes)
|
|
16
9
|
ignore_warnings:
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
# - "SQLi" # Example: Ignore false-positive SQL injection warnings
|
|
11
|
+
# - "WeakHash" # Ignore warnings about weak hashing if you're using MD5 intentionally
|
|
19
12
|
|
|
20
13
|
# Additional Checks
|
|
21
14
|
checks_to_run:
|
|
@@ -26,10 +19,6 @@ checks_to_run:
|
|
|
26
19
|
- "FileAccess"
|
|
27
20
|
- "UnmaintainedDependency"
|
|
28
21
|
|
|
29
|
-
# Additional Paths to Search for Code
|
|
30
|
-
additional_libs_path:
|
|
31
|
-
- "engines/Lesli/app/lib"
|
|
32
|
-
|
|
33
22
|
# Confidence Levels to Report
|
|
34
23
|
min_confidence: 2 # 0 (all warnings), 1 (medium), 2 (high)
|
|
35
24
|
|
data/db/seed/accounts.rb
CHANGED
|
@@ -50,5 +50,5 @@ account = Lesli::Account.find_or_create_by(email: company[:email]) do |account|
|
|
|
50
50
|
end
|
|
51
51
|
|
|
52
52
|
# print some separators so will be easy to find these messages later
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
Termline.br(3);
|
|
54
|
+
Termline.success("Account #{ account.name } <#{ account.email }> successfully created!")
|
data/db/seed/users.rb
CHANGED
|
@@ -70,7 +70,7 @@ userguest = create_account_user(emailguest, "guest", "Guest", account[:company_n
|
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
# print the owner user credentials, so we can save those credentials
|
|
73
|
-
|
|
73
|
+
Termline.success(
|
|
74
74
|
"Owner user created successfully with email: #{emailowner} and password: #{passowner}",
|
|
75
75
|
"Admin user created successfully with email: #{emailadmin} and password: #{passadmin}",
|
|
76
76
|
"Admin user created successfully with email: #{emailguest} and password: #{passguest}"
|
|
@@ -78,4 +78,4 @@ L2.success(
|
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
# print some separators so will be easy to find these messages later
|
|
81
|
-
|
|
81
|
+
Termline.br(2);
|
data/db/seeds.rb
CHANGED
data/lib/lesli/engine.rb
CHANGED
data/lib/lesli/router.rb
CHANGED
data/lib/lesli/version.rb
CHANGED
data/lib/migrate/common.rb
CHANGED
|
@@ -40,12 +40,12 @@ module MigrationHelpers
|
|
|
40
40
|
return [table_name, table_name_account]
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
-
def
|
|
43
|
+
def table_name_for_items(resources, item)
|
|
44
44
|
|
|
45
45
|
engine = infer_engine_from_namespace
|
|
46
46
|
|
|
47
47
|
resource = resources.to_s.singularize
|
|
48
|
-
table_name = "#{resource}
|
|
48
|
+
table_name = "#{resource}_items_#{item}".to_sym
|
|
49
49
|
foreign_key = resource.sub("#{engine}_","")
|
|
50
50
|
|
|
51
51
|
return [table_name, foreign_key]
|
|
@@ -35,7 +35,7 @@ module MigrationHelpers
|
|
|
35
35
|
module ActivityStructure
|
|
36
36
|
def create_table_lesli_item_activities_10(engine)
|
|
37
37
|
|
|
38
|
-
table_name, foreign_key =
|
|
38
|
+
table_name, foreign_key = table_name_for_items(engine, :activities)
|
|
39
39
|
|
|
40
40
|
create_table table_name do |t|
|
|
41
41
|
|
|
@@ -35,7 +35,7 @@ module MigrationHelpers
|
|
|
35
35
|
module AttachmentStructure
|
|
36
36
|
def create_table_lesli_item_attachments_10(resources)
|
|
37
37
|
|
|
38
|
-
table_name, foreign_key =
|
|
38
|
+
table_name, foreign_key = table_name_for_items(resources, :attachments)
|
|
39
39
|
|
|
40
40
|
create_table table_name do |t|
|
|
41
41
|
t.string :name
|
|
@@ -35,7 +35,7 @@ module MigrationHelpers
|
|
|
35
35
|
module DiscussionStructure
|
|
36
36
|
def create_table_lesli_item_discussions_10(engine)
|
|
37
37
|
|
|
38
|
-
table_name, foreign_key =
|
|
38
|
+
table_name, foreign_key = table_name_for_items(engine, :discussions)
|
|
39
39
|
|
|
40
40
|
create_table table_name do |t|
|
|
41
41
|
t.text :message
|
|
@@ -35,7 +35,7 @@ module MigrationHelpers
|
|
|
35
35
|
module SubscriberStructure
|
|
36
36
|
def create_table_lesli_item_subscribers_10(resources)
|
|
37
37
|
|
|
38
|
-
table_name, foreign_key =
|
|
38
|
+
table_name, foreign_key = table_name_for_items(resources, :subscribers)
|
|
39
39
|
|
|
40
40
|
create_table table_name do |t|
|
|
41
41
|
t.timestamps
|
|
@@ -35,7 +35,7 @@ module MigrationHelpers
|
|
|
35
35
|
module TaskStructure
|
|
36
36
|
def create_table_lesli_item_tasks_10(engine)
|
|
37
37
|
|
|
38
|
-
table_name, foreign_key =
|
|
38
|
+
table_name, foreign_key = table_name_for_items(engine, :tasks)
|
|
39
39
|
|
|
40
40
|
create_table table_name do |t|
|
|
41
41
|
t.string :title, null: false
|
|
@@ -35,7 +35,7 @@ module MigrationHelpers
|
|
|
35
35
|
module VersionStructure
|
|
36
36
|
def create_table_lesli_item_versions_10(resources)
|
|
37
37
|
|
|
38
|
-
table_name, foreign_key =
|
|
38
|
+
table_name, foreign_key = table_name_for_items(resources, :versions)
|
|
39
39
|
|
|
40
40
|
create_table table_name do |t|
|
|
41
41
|
t.string :column_name
|
data/lib/tasks/lesli/db.rake
CHANGED
|
@@ -82,15 +82,15 @@ namespace :lesli do
|
|
|
82
82
|
return if Rails.env.production?
|
|
83
83
|
|
|
84
84
|
# print a message to let the users show the action running
|
|
85
|
-
|
|
85
|
+
Termline.m("Drop the Lesli database (development only)")
|
|
86
86
|
|
|
87
87
|
Rake::Task['db:drop'].invoke
|
|
88
|
-
|
|
88
|
+
Termline.info("Databases deleted")
|
|
89
89
|
|
|
90
90
|
schema_file = Rails.root.join('db', 'schema.rb')
|
|
91
91
|
if File.exist?(schema_file)
|
|
92
92
|
File.delete(schema_file)
|
|
93
|
-
|
|
93
|
+
Termline.info("Schema.rb file deleted")
|
|
94
94
|
end
|
|
95
95
|
end
|
|
96
96
|
|
|
@@ -98,7 +98,7 @@ namespace :lesli do
|
|
|
98
98
|
def create
|
|
99
99
|
|
|
100
100
|
# print a message to let the users show the action running
|
|
101
|
-
|
|
101
|
+
Termline.info("Create the Lesli database")
|
|
102
102
|
|
|
103
103
|
Rake::Task['db:create'].invoke
|
|
104
104
|
end
|
|
@@ -107,7 +107,7 @@ namespace :lesli do
|
|
|
107
107
|
def migrate
|
|
108
108
|
|
|
109
109
|
# print a message to let the users show the action running
|
|
110
|
-
|
|
110
|
+
Termline.msg("Migrate the Lesli database")
|
|
111
111
|
|
|
112
112
|
Rake::Task['db:migrate'].invoke
|
|
113
113
|
end
|
|
@@ -115,7 +115,7 @@ namespace :lesli do
|
|
|
115
115
|
def seed
|
|
116
116
|
|
|
117
117
|
# print a message to let the users show the action running
|
|
118
|
-
|
|
118
|
+
Termline.msg("Seed the Lesli database")
|
|
119
119
|
|
|
120
120
|
# load Lesli* gems seeders
|
|
121
121
|
LesliSystem.engines.each do |engine, data|
|
|
@@ -125,13 +125,13 @@ namespace :lesli do
|
|
|
125
125
|
|
|
126
126
|
# load main app seeders
|
|
127
127
|
Rake::Task['db:seed'].invoke
|
|
128
|
-
|
|
128
|
+
Termline.info("Root: Seeds executed")
|
|
129
129
|
end
|
|
130
130
|
|
|
131
131
|
def prepare
|
|
132
132
|
|
|
133
133
|
# print a message to let the users show the action running
|
|
134
|
-
|
|
134
|
+
Termline.msg("Prepare the Lesli database")
|
|
135
135
|
|
|
136
136
|
# scan rails routes to build the controllers index
|
|
137
137
|
Rake::Task['lesli:resources:build'].invoke
|
|
@@ -142,15 +142,15 @@ namespace :lesli do
|
|
|
142
142
|
end
|
|
143
143
|
|
|
144
144
|
# scan rails routes to build the controllers index
|
|
145
|
-
Rake::Task['
|
|
145
|
+
Rake::Task['lesli_shield:privileges'].invoke if defined?(LesliShield)
|
|
146
146
|
|
|
147
147
|
if defined?(LesliBabel)
|
|
148
148
|
|
|
149
149
|
# scan rails routes to build the base of translations
|
|
150
|
-
Rake::Task['
|
|
150
|
+
Rake::Task['lesli_babel:scan'].invoke
|
|
151
151
|
|
|
152
152
|
# import local translations into LesliBabel
|
|
153
|
-
Rake::Task['
|
|
153
|
+
Rake::Task['lesli_babel:import'].invoke
|
|
154
154
|
end
|
|
155
155
|
end
|
|
156
156
|
|
data/lib/tasks/lesli/dev.rake
CHANGED
data/lib/tasks/lesli/engine.rake
CHANGED
|
@@ -43,7 +43,7 @@ namespace :lesli do
|
|
|
43
43
|
# Initialize model data for new installed engines
|
|
44
44
|
def engine_install
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
Termline.msg("Initialize model data for new installed engines")
|
|
47
47
|
|
|
48
48
|
# scan rails routes to build the controllers index
|
|
49
49
|
Rake::Task['lesli:controllers:build'].invoke
|
|
@@ -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
|
-
|
|
39
|
+
Termline.info("Lesli: Registering engines, controllers and actions")
|
|
40
40
|
Lesli::ResourceService.new.build
|
|
41
41
|
end
|
|
42
42
|
end
|
data/lib/tasks/lesli_tasks.rake
CHANGED
|
@@ -32,31 +32,6 @@ Building a better future, one line of code at a time.
|
|
|
32
32
|
|
|
33
33
|
# ·
|
|
34
34
|
namespace :lesli do
|
|
35
|
-
namespace :babel do
|
|
36
|
-
|
|
37
|
-
desc "Scan and register labels"
|
|
38
|
-
task :scan => :environment do |task, args|
|
|
39
|
-
Rake::Task['lesli_babel:scan'].invoke
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
desc "Import local translations into LesliBabel"
|
|
43
|
-
task :import => :environment do |task, args|
|
|
44
|
-
Rake::Task['lesli_babel:import'].invoke
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
desc "Export translations to json files"
|
|
48
|
-
task :export => :environment do |task, args|
|
|
49
|
-
Rake::Task['lesli_babel:export'].invoke
|
|
50
|
-
end
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
namespace :shield do
|
|
54
|
-
|
|
55
|
-
desc "Syncing privileges for all the available roles"
|
|
56
|
-
task :privileges => :environment do |task, args|
|
|
57
|
-
Rake::Task['lesli_shield:privileges'].invoke
|
|
58
|
-
end
|
|
59
|
-
end
|
|
60
35
|
|
|
61
36
|
desc "Lesli module status"
|
|
62
37
|
task :status => :environment do |task, args|
|
|
@@ -88,18 +63,18 @@ namespace :lesli do
|
|
|
88
63
|
end
|
|
89
64
|
|
|
90
65
|
# print pretty instance information
|
|
91
|
-
|
|
66
|
+
Termline.br(2)
|
|
92
67
|
|
|
93
68
|
# core information
|
|
94
|
-
|
|
95
|
-
|
|
69
|
+
Termline.m(instance)
|
|
70
|
+
Termline.br()
|
|
96
71
|
|
|
97
72
|
# print list of engines
|
|
98
|
-
|
|
99
|
-
|
|
73
|
+
Termline.table(engines)
|
|
74
|
+
Termline.br(2)
|
|
100
75
|
|
|
101
|
-
|
|
102
|
-
|
|
76
|
+
Termline.info "Environment: " + Rails.env
|
|
77
|
+
Termline.br(2)
|
|
103
78
|
|
|
104
79
|
end
|
|
105
80
|
end
|
data/readme.md
CHANGED
|
@@ -122,9 +122,9 @@ RAILS_SERVE_STATIC_FILES=true rails s --environment=production
|
|
|
122
122
|
|
|
123
123
|
### Connect with Lesli
|
|
124
124
|
|
|
125
|
-
* [
|
|
126
|
-
* [
|
|
127
|
-
* [
|
|
125
|
+
* [@LesliTech](https://x.com/LesliTech)
|
|
126
|
+
* [hello@lesli.tech](hello@lesli.tech)
|
|
127
|
+
* [https://www.lesli.tech](https://www.lesli.tech)
|
|
128
128
|
|
|
129
129
|
|
|
130
130
|
### License
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- The Lesli Development Team
|
|
@@ -149,20 +149,6 @@ dependencies:
|
|
|
149
149
|
- - "~>"
|
|
150
150
|
- !ruby/object:Gem::Version
|
|
151
151
|
version: 1.1.0
|
|
152
|
-
- !ruby/object:Gem::Dependency
|
|
153
|
-
name: L2
|
|
154
|
-
requirement: !ruby/object:Gem::Requirement
|
|
155
|
-
requirements:
|
|
156
|
-
- - "~>"
|
|
157
|
-
- !ruby/object:Gem::Version
|
|
158
|
-
version: '0.6'
|
|
159
|
-
type: :runtime
|
|
160
|
-
prerelease: false
|
|
161
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
162
|
-
requirements:
|
|
163
|
-
- - "~>"
|
|
164
|
-
- !ruby/object:Gem::Version
|
|
165
|
-
version: '0.6'
|
|
166
152
|
description: |
|
|
167
153
|
Lesli is a Ruby on Rails framework that provides modular architecture
|
|
168
154
|
and reusable engines for building scalable business software.
|
|
@@ -180,9 +166,9 @@ files:
|
|
|
180
166
|
- app/controllers/lesli/application_devise_controller.rb
|
|
181
167
|
- app/controllers/lesli/application_lesli_controller.rb
|
|
182
168
|
- app/controllers/lesli/apps_controller.rb
|
|
183
|
-
- app/controllers/lesli/
|
|
184
|
-
- app/controllers/lesli/
|
|
185
|
-
- app/controllers/lesli/
|
|
169
|
+
- app/controllers/lesli/items/activities_controller.rb
|
|
170
|
+
- app/controllers/lesli/items/discussions_controller.rb
|
|
171
|
+
- app/controllers/lesli/items/tasks_controller.rb
|
|
186
172
|
- app/controllers/lesli/resources_controller.rb
|
|
187
173
|
- app/controllers/lesli/roles_controller.rb
|
|
188
174
|
- app/controllers/lesli/shared/dashboards_controller.rb
|
|
@@ -200,15 +186,15 @@ files:
|
|
|
200
186
|
- app/mailers/lesli/application_mailer.rb
|
|
201
187
|
- app/models/concerns/lesli/account_initializer.rb
|
|
202
188
|
- app/models/concerns/lesli/account_logs.rb
|
|
203
|
-
- app/models/concerns/lesli/
|
|
204
|
-
- app/models/concerns/lesli/
|
|
205
|
-
- app/models/concerns/lesli/
|
|
189
|
+
- app/models/concerns/lesli/items/activities.rb
|
|
190
|
+
- app/models/concerns/lesli/items/discussions.rb
|
|
191
|
+
- app/models/concerns/lesli/items/tasks.rb
|
|
206
192
|
- app/models/concerns/lesli/user_extensions.rb
|
|
207
193
|
- app/models/lesli/account.rb
|
|
208
194
|
- app/models/lesli/application_lesli_record.rb
|
|
209
|
-
- app/models/lesli/
|
|
210
|
-
- app/models/lesli/
|
|
211
|
-
- app/models/lesli/
|
|
195
|
+
- app/models/lesli/items/activity.rb
|
|
196
|
+
- app/models/lesli/items/discussion.rb
|
|
197
|
+
- app/models/lesli/items/task.rb
|
|
212
198
|
- app/models/lesli/resource.rb
|
|
213
199
|
- app/models/lesli/role.rb
|
|
214
200
|
- app/models/lesli/shared/catalog.rb
|