lesli 5.0.19 → 5.0.21
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/images/lesli/brand/register-background.jpg +0 -0
- data/app/assets/stylesheets/lesli/application.css +1 -0
- data/app/helpers/lesli/navigation_helper.rb +6 -0
- data/app/interfaces/lesli/responder_interface.rb +35 -19
- data/app/models/concerns/lesli/account_initializer.rb +79 -0
- data/app/models/concerns/lesli/user_extensions.rb +133 -0
- data/app/models/concerns/lesli/user_security.rb +220 -0
- data/app/models/lesli/role/action.rb +3 -2
- data/app/models/lesli/shared/dashboard.rb +2 -2
- data/app/models/lesli/user/session.rb +1 -1
- data/app/models/lesli/user.rb +15 -15
- data/app/operators/lesli/role_operator.rb +9 -4
- data/app/services/lesli/role/action_service.rb +2 -3
- data/app/services/lesli/role_service.rb +3 -3
- data/app/views/lesli/abouts/welcome.html.erb +8 -5
- data/app/views/lesli/apps/show.html.erb +21 -33
- data/app/views/lesli/errors/not_found.html.erb +32 -0
- data/app/views/lesli/errors/unauthorized.html.erb +48 -0
- data/app/views/lesli/layouts/application-devise.html.erb +2 -2
- data/app/views/lesli/layouts/application-lesli.html.erb +1 -2
- data/app/views/lesli/partials/_application-analytics.html.erb +2 -2
- data/app/views/lesli/partials/_application-data.html.erb +0 -1
- data/app/views/lesli/partials/_application-head.html.erb +4 -4
- data/app/views/lesli/partials/_application-lesli-header.html.erb +47 -67
- data/app/views/lesli/partials/_application-lesli-navigation.html.erb +23 -5
- data/config/importmap.rb +0 -10
- data/config/initializers/devise_rails_8_patch.rb +8 -0
- data/config/initializers/lesli.rb +27 -23
- data/db/migrate/v1/0000120310_create_lesli_role_privileges.rb +2 -2
- data/db/seed/accounts.rb +1 -1
- data/db/seed/users.rb +6 -4
- data/db/seeds.rb +6 -6
- data/lib/lesli/engine.rb +0 -14
- data/lib/lesli/routing.rb +1 -1
- data/lib/lesli/version.rb +2 -2
- data/lib/rspec/testers/request.rb +15 -6
- data/lib/scss/_apps.scss +93 -0
- data/lib/scss/application.scss +34 -0
- data/lib/tasks/lesli/controllers.rake +1 -1
- data/lib/tasks/lesli/db.rake +27 -27
- data/lib/tasks/lesli_tasks.rake +3 -0
- data/readme.md +9 -10
- metadata +33 -13
- data/app/models/concerns/account_initializer.rb +0 -83
- data/app/models/concerns/user_extensions.rb +0 -152
- data/app/models/concerns/user_security.rb +0 -276
- data/app/operators/lesli/user_registration_operator.rb +0 -122
- /data/app/models/concerns/{user_activities.rb → lesli/user_activities.rb} +0 -0
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Lesli
|
4
4
|
|
5
|
-
Copyright (c)
|
5
|
+
Copyright (c) 2025, Lesli Technologies, S. A.
|
6
6
|
|
7
7
|
This program is free software: you can redistribute it and/or modify
|
8
8
|
it under the terms of the GNU General Public License as published by
|
@@ -19,7 +19,7 @@ along with this program. If not, see http://www.gnu.org/licenses/.
|
|
19
19
|
|
20
20
|
Lesli · Ruby on Rails SaaS Development Framework.
|
21
21
|
|
22
|
-
Made with ♥ by
|
22
|
+
Made with ♥ by LesliTech
|
23
23
|
Building a better future, one line of code at a time.
|
24
24
|
|
25
25
|
@contact hello@lesli.tech
|
@@ -33,7 +33,7 @@ Building a better future, one line of code at a time.
|
|
33
33
|
Lesli.configure do |config|
|
34
34
|
|
35
35
|
|
36
|
-
#
|
36
|
+
# Enable or disable demo mode.
|
37
37
|
config.demo = false
|
38
38
|
|
39
39
|
|
@@ -41,7 +41,7 @@ Lesli.configure do |config|
|
|
41
41
|
config.instance = "Lesli"
|
42
42
|
|
43
43
|
|
44
|
-
#
|
44
|
+
# Provides organization details displayed throughout the system.
|
45
45
|
config.company = {
|
46
46
|
name: "Lesli",
|
47
47
|
email: "hello@lesli.tech",
|
@@ -49,26 +49,26 @@ Lesli.configure do |config|
|
|
49
49
|
}
|
50
50
|
|
51
51
|
|
52
|
-
#
|
52
|
+
# List of supported languages (requires `LesliBabel`).
|
53
53
|
config.locales = {
|
54
54
|
:en => "English", # English
|
55
|
-
:de => "Deutsch",
|
56
|
-
|
57
|
-
|
55
|
+
:de => "Deutsch", # Deutsch/German
|
56
|
+
:pl => "Polski", # Polski/Polish/Poland
|
57
|
+
:nl => "Dutch", # Dutch/Nederlands/Netherlands
|
58
58
|
:es => "Español", # Español/Spanish
|
59
|
-
|
60
|
-
|
61
|
-
:it => "Italiano",
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
59
|
+
:uk => "украї́нська", # украї́нська/Ukrainian
|
60
|
+
:sr => "Српски", # Српски/Srpski/Serbian
|
61
|
+
:it => "Italiano", # Italiano/Italian
|
62
|
+
:hr => "Hrvatski", # Hrvatski/Croatian
|
63
|
+
:fr => "Français", # French
|
64
|
+
:pt => "Português", # Portuguese
|
65
|
+
:tr => "Türkçe", # Turkish
|
66
|
+
:ro => "Română", # Romanian
|
67
|
+
:bg => "български" # Bulgarian
|
68
68
|
}
|
69
69
|
|
70
70
|
|
71
|
-
#
|
71
|
+
# Define time zone, week start day, and custom date/time formats.
|
72
72
|
config.datetime = {
|
73
73
|
:time_zone => "America/Guatemala",
|
74
74
|
:start_week_on => "monday",
|
@@ -84,9 +84,9 @@ Lesli.configure do |config|
|
|
84
84
|
}
|
85
85
|
|
86
86
|
|
87
|
-
#
|
87
|
+
# Customize system-wide security behavior.
|
88
88
|
config.security = {
|
89
|
-
password: "Test123!",
|
89
|
+
password: "Test123!", # Default password for development, test & demo environments
|
90
90
|
enable_debug: false,
|
91
91
|
enable_becoming: false,
|
92
92
|
enable_analytics: true,
|
@@ -97,7 +97,7 @@ Lesli.configure do |config|
|
|
97
97
|
}
|
98
98
|
|
99
99
|
|
100
|
-
#
|
100
|
+
# Customize the color palette and layout.
|
101
101
|
config.theme = {
|
102
102
|
color_primary: "#193d8d",
|
103
103
|
color_sidebar: "#ffffff",
|
@@ -110,15 +110,19 @@ Lesli.configure do |config|
|
|
110
110
|
|
111
111
|
#
|
112
112
|
config.layout = {
|
113
|
-
|
113
|
+
tasks: true,
|
114
|
+
babel: false,
|
115
|
+
profile: true,
|
116
|
+
notifications: true
|
114
117
|
}
|
115
118
|
|
116
119
|
|
117
|
-
#
|
120
|
+
# Specify default paths for email templates.
|
118
121
|
config.mailer = {
|
119
122
|
templates: "lesli_mailer/emails/lesli"
|
120
123
|
}
|
121
124
|
|
125
|
+
# Control redirection paths after login.
|
122
126
|
config.path_after_login = "/"
|
123
127
|
config.path_after_login = "/dashboard" if defined?(LesliDashboard)
|
124
128
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Lesli
|
4
4
|
|
5
|
-
Copyright (c)
|
5
|
+
Copyright (c) 2025, Lesli Technologies, S. A.
|
6
6
|
|
7
7
|
This program is free software: you can redistribute it and/or modify
|
8
8
|
it under the terms of the GNU General Public License as published by
|
@@ -19,7 +19,7 @@ along with this program. If not, see http://www.gnu.org/licenses/.
|
|
19
19
|
|
20
20
|
Lesli · Ruby on Rails SaaS Development Framework.
|
21
21
|
|
22
|
-
Made with ♥ by
|
22
|
+
Made with ♥ by LesliTech
|
23
23
|
Building a better future, one line of code at a time.
|
24
24
|
|
25
25
|
@contact hello@lesli.tech
|
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
|
-
L2.br(
|
53
|
+
L2.br(3);
|
54
54
|
L2.success("Account #{ account.name } <#{ account.email }> successfully created!")
|
data/db/seed/users.rb
CHANGED
@@ -53,12 +53,14 @@ passguest = passowner
|
|
53
53
|
|
54
54
|
|
55
55
|
# build a random password for the owner, admin and guest users
|
56
|
-
# only for production and only when LesliShield is installed
|
57
|
-
if
|
56
|
+
# only for production and only when LesliShield is installed and
|
57
|
+
# only if the "demo mode" is not active in the
|
58
|
+
# config/initializers/lesli.rb file
|
59
|
+
if Rails.env.production? && defined?(LesliShield) && !Lesli.config.demo
|
58
60
|
passowner = LesliShield::Tokens.friendly_token
|
59
61
|
passadmin = LesliShield::Tokens.friendly_token
|
60
62
|
passguest = LesliShield::Tokens.friendly_token
|
61
|
-
end
|
63
|
+
end
|
62
64
|
|
63
65
|
|
64
66
|
# create the owner user for the account,
|
@@ -76,4 +78,4 @@ L2.success(
|
|
76
78
|
|
77
79
|
|
78
80
|
# print some separators so will be easy to find these messages later
|
79
|
-
L2.
|
81
|
+
L2.br(2);
|
data/db/seeds.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Lesli
|
4
4
|
|
5
|
-
Copyright (c)
|
5
|
+
Copyright (c) 2025, Lesli Technologies, S. A.
|
6
6
|
|
7
7
|
This program is free software: you can redistribute it and/or modify
|
8
8
|
it under the terms of the GNU General Public License as published by
|
@@ -17,21 +17,21 @@ 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 ·
|
20
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
21
21
|
|
22
|
-
Made with ♥ by
|
22
|
+
Made with ♥ by LesliTech
|
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
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
29
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
30
30
|
// ·
|
31
31
|
=end
|
32
32
|
|
33
33
|
|
34
|
-
L2.
|
34
|
+
L2.info("Loading seeds for: Lesli #{Lesli::VERSION}")
|
35
35
|
|
36
36
|
|
37
37
|
# including tools for seeders
|
data/lib/lesli/engine.rb
CHANGED
@@ -93,23 +93,9 @@ module Lesli
|
|
93
93
|
# Lesli Framework Mailer configuration
|
94
94
|
|
95
95
|
|
96
|
-
# Development mailer by default
|
97
|
-
config.action_mailer.delivery_method ||= :letter_opener
|
98
|
-
|
99
96
|
# Add the Lesli root folder for email development tempaltes
|
100
97
|
config.action_mailer.preview_paths << root.join("lib", "mailer_previews")
|
101
98
|
|
102
|
-
#
|
103
|
-
config.action_mailer.default_options ||= {
|
104
|
-
|
105
|
-
# Use the main email in the lesli settings as email sender
|
106
|
-
from: Lesli.config.company.dig(:email)
|
107
|
-
}
|
108
|
-
|
109
|
-
# Mailer url options for development
|
110
|
-
config.action_mailer.default_url_options ||= {
|
111
|
-
host: "http://0.0.0.0:3000"
|
112
|
-
}
|
113
99
|
|
114
100
|
# Does not work too well
|
115
101
|
# if Lesli.config.security.dig(:enable_debug)
|
data/lib/lesli/routing.rb
CHANGED
data/lib/lesli/version.rb
CHANGED
@@ -36,12 +36,21 @@ require Lesli::Engine.root.join("lib/rspec/helpers/rails_helper")
|
|
36
36
|
require Lesli::Engine.root.join("lib/rspec/helpers/lesli_helper")
|
37
37
|
require Lesli::Engine.root.join("lib/rspec/helpers/response_request_helper")
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
39
|
+
|
40
|
+
# · Dynamically build a path where the engine is mounted
|
41
|
+
def build_engine_path(engine_name, path)
|
42
|
+
|
43
|
+
# get the engine information
|
44
|
+
engine = LesliSystem.engine(engine_name)
|
45
|
+
|
46
|
+
# return the path if no engine found
|
47
|
+
return path unless engine
|
48
|
+
|
49
|
+
engine_constant = engine[:name].constantize
|
50
|
+
|
51
|
+
# build the path inside the engine mounted path
|
52
|
+
"#{engine_constant::Engine.routes.find_script_name({})}/#{path}"
|
53
|
+
end
|
45
54
|
|
46
55
|
|
47
56
|
# · Authentication context
|
data/lib/scss/_apps.scss
ADDED
@@ -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";
|
@@ -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
|
-
L2.
|
39
|
+
L2.info("Lesli: Registering engines, controllers and actions")
|
40
40
|
Lesli::ControllerOperator.new.build
|
41
41
|
end
|
42
42
|
end
|
data/lib/tasks/lesli/db.rake
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Lesli
|
4
4
|
|
5
|
-
Copyright (c)
|
5
|
+
Copyright (c) 2025, Lesli Technologies, S. A.
|
6
6
|
|
7
7
|
This program is free software: you can redistribute it and/or modify
|
8
8
|
it under the terms of the GNU General Public License as published by
|
@@ -39,16 +39,8 @@ namespace :lesli do
|
|
39
39
|
drop()
|
40
40
|
create()
|
41
41
|
migrate()
|
42
|
-
prepare()
|
43
42
|
seed()
|
44
|
-
status()
|
45
|
-
end
|
46
|
-
|
47
|
-
desc "Migrate, seed & prepare the Lesli database (development only)"
|
48
|
-
task :dev => :environment do |task, args|
|
49
|
-
migrate()
|
50
43
|
prepare()
|
51
|
-
seed()
|
52
44
|
status()
|
53
45
|
end
|
54
46
|
|
@@ -67,7 +59,7 @@ namespace :lesli do
|
|
67
59
|
status()
|
68
60
|
end
|
69
61
|
|
70
|
-
desc "Seed & prepare Lesli database
|
62
|
+
desc "Seed & prepare Lesli database"
|
71
63
|
task :seed => :environment do |task, args|
|
72
64
|
seed()
|
73
65
|
status()
|
@@ -84,13 +76,20 @@ namespace :lesli do
|
|
84
76
|
L2.m("Drop the Lesli database (development only)")
|
85
77
|
|
86
78
|
Rake::Task['db:drop'].invoke
|
79
|
+
L2.info("Databases deleted")
|
80
|
+
|
81
|
+
schema_file = Rails.root.join('db', 'schema.rb')
|
82
|
+
if File.exist?(schema_file)
|
83
|
+
File.delete(schema_file)
|
84
|
+
L2.info("Schema.rb file deleted")
|
85
|
+
end
|
87
86
|
end
|
88
87
|
|
89
88
|
# Create the Lesli database (development only)
|
90
89
|
def create
|
91
90
|
|
92
91
|
# print a message to let the users show the action running
|
93
|
-
L2.m("Create the Lesli database
|
92
|
+
L2.m("Create the Lesli database")
|
94
93
|
|
95
94
|
Rake::Task['db:create'].invoke
|
96
95
|
end
|
@@ -99,7 +98,7 @@ namespace :lesli do
|
|
99
98
|
def migrate
|
100
99
|
|
101
100
|
# print a message to let the users show the action running
|
102
|
-
L2.
|
101
|
+
L2.msg("Migrate the Lesli database")
|
103
102
|
|
104
103
|
Rake::Task['db:migrate'].invoke
|
105
104
|
end
|
@@ -111,15 +110,13 @@ namespace :lesli do
|
|
111
110
|
|
112
111
|
# load main app seeders
|
113
112
|
Rake::Task['db:seed'].invoke
|
113
|
+
L2.info("Root: Seeds executed")
|
114
114
|
|
115
115
|
# load Lesli* gems seeders
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
LesliLetter::Engine.load_seed if defined?(LesliLetter)
|
121
|
-
LesliSupport::Engine.load_seed if defined?(LesliSupport)
|
122
|
-
LesliCalendar::Engine.load_seed if defined?(LesliCalendar)
|
116
|
+
LesliSystem.engines.each do |engine, data|
|
117
|
+
next if engine == "Root"
|
118
|
+
engine.constantize::Engine.load_seed
|
119
|
+
end
|
123
120
|
end
|
124
121
|
|
125
122
|
def prepare
|
@@ -127,26 +124,29 @@ namespace :lesli do
|
|
127
124
|
# print a message to let the users show the action running
|
128
125
|
L2.msg("Prepare the Lesli database")
|
129
126
|
|
127
|
+
# scan rails routes to build the controllers index
|
128
|
+
Rake::Task['lesli:controllers:build'].invoke
|
129
|
+
|
130
130
|
Lesli::Account.all.each do |account|
|
131
131
|
account.initialize_account
|
132
132
|
account.initialize_engines
|
133
133
|
end
|
134
134
|
|
135
|
-
# scan rails routes to build the controllers index
|
136
|
-
Rake::Task['lesli:controllers:build'].invoke
|
137
|
-
|
138
135
|
# scan rails routes to build the controllers index
|
139
136
|
Rake::Task['lesli:shield:privileges'].invoke if defined?(LesliShield)
|
140
137
|
|
141
|
-
|
142
|
-
Rake::Task['lesli:babel:scan'].invoke if defined?(LesliBabel)
|
138
|
+
if defined?(LesliBabel)
|
143
139
|
|
144
|
-
|
145
|
-
|
140
|
+
# scan rails routes to build the base of translations
|
141
|
+
Rake::Task['lesli:babel:scan'].invoke
|
142
|
+
|
143
|
+
# import local translations into LesliBabel
|
144
|
+
Rake::Task['lesli:babel:import'].invoke
|
145
|
+
end
|
146
146
|
end
|
147
147
|
|
148
148
|
def status
|
149
|
-
# print the lesli
|
149
|
+
# print the lesli status
|
150
150
|
Rake::Task['lesli:status'].invoke
|
151
151
|
end
|
152
152
|
end
|
data/lib/tasks/lesli_tasks.rake
CHANGED
data/readme.md
CHANGED
@@ -73,20 +73,19 @@ bundle add lesli
|
|
73
73
|
```
|
74
74
|
|
75
75
|
```shell
|
76
|
-
#
|
77
|
-
|
78
|
-
|
76
|
+
# Add Lesli to your app
|
77
|
+
rails generate lesli:install
|
78
|
+
```
|
79
|
+
```shell
|
79
80
|
# Setup database for development
|
80
81
|
rake lesli:db:dev
|
81
82
|
```
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
Rails.application.routes.draw do
|
86
|
-
Lesli::Routing.mount
|
87
|
-
end
|
83
|
+
```shell
|
84
|
+
# Start your app
|
85
|
+
rails server
|
88
86
|
```
|
89
87
|
|
88
|
+
|
90
89
|
<br />
|
91
90
|
|
92
91
|
|
@@ -107,7 +106,7 @@ bundle install
|
|
107
106
|
```
|
108
107
|
```shell
|
109
108
|
# Generate Lesli initializer
|
110
|
-
rails
|
109
|
+
rails generate lesli:install
|
111
110
|
```
|
112
111
|
```shell
|
113
112
|
# Hard reset Database for development:
|