lesli 5.0.9 → 5.0.10

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.
@@ -53,10 +53,10 @@ Lesli.configure do |config|
53
53
  :es => "Español", # Español/Spanish
54
54
  # :uk => "украї́нська", # украї́нська/Ukrainian
55
55
  # :sr => "Српски", # Српски/Srpski/Serbian
56
- # :it => "Italiano", # Italiano/Italian
56
+ :it => "Italiano", # Italiano/Italian
57
57
  # :hr => "Hrvatski", # Hrvatski/Croatian
58
- # :fr => "Français", # French
59
- # :pt => "Português", # Portuguese
58
+ :fr => "Français", # French
59
+ :pt => "Português", # Portuguese
60
60
  # :tr => "Türkçe", # Turkish
61
61
  # :ro => "Română", # Romanian
62
62
  # :bg => "български" # Bulgarian
@@ -44,9 +44,9 @@ user.account.save!
44
44
  # core development users
45
45
  [
46
46
  ["ldonis@lesli.tech", "owner", "Luis", "Donis"],
47
- ["admin@lesli.tech", "sysadmin","Admin","Lesli"],
47
+ ["admin@lesli.tech", "admin","Admin","Lesli"],
48
48
  ["guest@lesli.tech", "limited", "Guest","Lesli"],
49
- ["test@lesli.tech", "sysadmin", "Test", "Lesli"],
49
+ ["test@lesli.tech", "admin", "Test", "Lesli"],
50
50
  ].each do |user|
51
51
  create_development_user(user[0], user[1], user[2], user[3])
52
52
  end
@@ -0,0 +1,47 @@
1
+ =begin
2
+
3
+ Lesli
4
+
5
+ Copyright (c) 2023, Lesli Technologies, S. A.
6
+
7
+ This program is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU General Public License as published by
9
+ the Free Software Foundation, either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ This program is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with this program. If not, see http://www.gnu.org/licenses/.
19
+
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
+
22
+ Made with ♥ by https://www.lesli.tech
23
+ Building a better future, one line of code at a time.
24
+
25
+ @contact hello@lesli.tech
26
+ @website https://www.lesli.tech
27
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
+
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
31
+ =end
32
+
33
+
34
+ # get settings
35
+ company = Lesli.config.company
36
+
37
+
38
+ # create account
39
+ Lesli::Account.find_or_create_by(company_name: company[:name]) do |account|
40
+ account.email = company[:email]
41
+ account.company_name = company[:name]
42
+ account.public_email = company[:email]
43
+ account.company_tagline = company[:tag_line] || ""
44
+ #account.registered!
45
+ account.save!
46
+ L2.msg("Account #{ account.company_name } <#{ account.email }> successfully created!")
47
+ end
@@ -0,0 +1,76 @@
1
+ =begin
2
+
3
+ Lesli
4
+
5
+ Copyright (c) 2023, Lesli Technologies, S. A.
6
+
7
+ This program is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU General Public License as published by
9
+ the Free Software Foundation, either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ This program is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with this program. If not, see http://www.gnu.org/licenses/.
19
+
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
+
22
+ Made with ♥ by https://www.lesli.tech
23
+ Building a better future, one line of code at a time.
24
+
25
+ @contact hello@lesli.tech
26
+ @website https://www.lesli.tech
27
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
+
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
31
+ =end
32
+
33
+
34
+ L2.msg "Loading production users:"
35
+
36
+
37
+ # get the account information
38
+ account = Lesli::Account.first
39
+
40
+
41
+ # try to extract the domain name from the main email address
42
+ email_domain = account[:email].scan(/.*@(\S+)/)&.first&.first
43
+
44
+
45
+ # get the emails for the initial accounts
46
+ emailowner = account[:email]
47
+ emailadmin = "admin@#{email_domain}"
48
+ emailguest = "guest@#{email_domain}"
49
+
50
+
51
+ # build a random password for the owner, admin and guest users
52
+ passowner = Devise.friendly_token(40)
53
+ passadmin = Devise.friendly_token(40)
54
+ passguest = Devise.friendly_token(40)
55
+
56
+
57
+ # create the owner user for the account,
58
+ userowner = create_development_user(emailowner, "owner", "Owner", account[:company_name], password:passowner)
59
+ useradmin = create_development_user(emailadmin, "admin", "Admin", account[:company_name], password:passadmin)
60
+ userguest = create_development_user(emailguest, "limited", "Guest", account[:company_name], password:passguest)
61
+
62
+
63
+ # print some separators so will be easy to find these messages later
64
+ L2.br(5); L2.br; L2.line; L2.line; L2.line; L2.line;
65
+
66
+
67
+ # print the owner user credentials, so we can save those credentials
68
+ L2.success(
69
+ "Owner user created successfully with email: #{emailowner} and password: #{passowner}",
70
+ "Admin user created successfully with email: #{emailadmin} and password: #{passadmin}",
71
+ "Admin user created successfully with email: #{emailguest} and password: #{passguest}"
72
+ )
73
+
74
+
75
+ # print some separators so will be easy to find these messages later
76
+ L2.line; L2.line; L2.line; L2.line; L2.br(5);L2.br(5);
@@ -1,4 +1,5 @@
1
1
  =begin
2
+
2
3
  Lesli
3
4
 
4
5
  Copyright (c) 2023, Lesli Technologies, S. A.
@@ -16,20 +17,18 @@ GNU General Public License for more details.
16
17
  You should have received a copy of the GNU General Public License
17
18
  along with this program. If not, see http://www.gnu.org/licenses/.
18
19
 
19
- Lesli · Your Smart Business Assistant.
20
+ Lesli · Ruby on Rails SaaS Development Framework.
20
21
 
21
22
  Made with ♥ by https://www.lesli.tech
22
23
  Building a better future, one line of code at a time.
23
24
 
24
25
  @contact hello@lesli.tech
25
- @website https://lesli.tech
26
+ @website https://www.lesli.tech
26
27
  @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
27
28
 
28
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
29
30
  // ·
30
-
31
31
  =end
32
32
 
33
- load "#{Rails.root}/db/seed/production/accounts.rb"
34
- load "#{Rails.root}/db/seed/production/users.rb"
35
- load "#{Rails.root}/db/seed/production/template.rb"
33
+ load "#{Lesli::Engine.root}/db/seed/production/accounts.rb"
34
+ load "#{Lesli::Engine.root}/db/seed/production/users.rb"
data/db/seeds.rb CHANGED
@@ -31,17 +31,12 @@ Building a better future, one line of code at a time.
31
31
  =end
32
32
 
33
33
 
34
- # IMPORTANT:
35
- # Seed files are only for development, if you need to create default resources
36
- # for production you must use the initializer method in the Engine account model
37
- if Rails.env.development?
34
+ L2.msg("Lesli", "Version: #{Lesli::VERSION}", "Build: #{Lesli::BUILD}")
38
35
 
39
- L2.msg("Lesli", "Version: #{Lesli::VERSION}", "Build: #{Lesli::BUILD}")
40
36
 
41
- # including tools for seeders
42
- load Lesli::Engine.root.join("db", "seed", "tools.rb")
37
+ # including tools for seeders
38
+ load Lesli::Engine.root.join("db", "seed", "tools.rb")
43
39
 
44
40
 
45
- # loading core seeders
46
- load Lesli::Engine.root.join("db", "seed", "#{Rails.env.downcase}.rb")
47
- end
41
+ # loading Lesli seeders
42
+ load Lesli::Engine.root.join("db", "seed", "#{Rails.env.downcase}.rb")
data/lib/lesli/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Lesli
2
- VERSION = "5.0.9"
3
- BUILD = "1709501990"
2
+ VERSION = "5.0.10"
3
+ BUILD = "1709688682"
4
4
  end
@@ -39,8 +39,8 @@ namespace :lesli do
39
39
  drop()
40
40
  create()
41
41
  migrate()
42
- seed()
43
42
  prepare()
43
+ seed()
44
44
  end
45
45
 
46
46
  desc "Seed & prepare Lesli database (development only)"
@@ -51,8 +51,8 @@ namespace :lesli do
51
51
  desc "Migrate, seed & prepare the Lesli database (development only)"
52
52
  task :dev => :environment do |task, args|
53
53
  migrate()
54
- seed()
55
54
  prepare()
55
+ seed()
56
56
  end
57
57
 
58
58
  desc "Migrate & prepare the Lesli database"
@@ -65,6 +65,13 @@ namespace :lesli do
65
65
  task :prepare => :environment do |task, args|
66
66
  prepare()
67
67
  end
68
+
69
+ desc "Migrate, prepare && user the Lesli database"
70
+ task :deploy => :environment do |task, args|
71
+ migrate()
72
+ prepare()
73
+ Lesli::Engine.load_seed
74
+ end
68
75
  end
69
76
 
70
77
  # Drop the Lesli database (development only)
@@ -114,9 +121,6 @@ namespace :lesli do
114
121
  # Migrate the Lesli database
115
122
  def migrate
116
123
 
117
- # do not execute this task if we are at production level
118
- return if Rails.env.production?
119
-
120
124
  # print a message to let the users show the action running
121
125
  L2.m("Migrate the Lesli database")
122
126
 
@@ -126,9 +130,6 @@ namespace :lesli do
126
130
  desc "Prepare the Lesli database"
127
131
  def prepare
128
132
 
129
- # do not execute this task if we are at production level
130
- return if Rails.env.production?
131
-
132
133
  # print a message to let the users show the action running
133
134
  L2.msg("Prepare the Lesli database")
134
135
 
@@ -125,7 +125,7 @@ function safeEngineUrl() {
125
125
  <div class="lesli-application-header-container container">
126
126
  <a :href="safeEngineUrl()">
127
127
  <figure class="image lesli-brand">
128
- <img alt="App logo" class="is-hidden-touch" src="/assets/lesli/brand/app-logo.svg">
128
+ <slot name="brand"></slot>
129
129
  </figure>
130
130
  </a>
131
131
  <div class="lesli-application-header-left">
data/lib/vue/public.js CHANGED
@@ -74,7 +74,7 @@ export default (appbuilder) => {
74
74
  // · console production message
75
75
  if (lesli_application_production) {
76
76
  console.clear()
77
- debug.lesli_message_warning(lesli?.company?.name)
77
+ debug.lesli_message_warning(Lesli?.company?.name)
78
78
  debug.info("Lesli application", lesli_application_version)
79
79
  }
80
80
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lesli
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.9
4
+ version: 5.0.10
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: 2024-03-03 00:00:00.000000000 Z
11
+ date: 2024-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -106,14 +106,14 @@ dependencies:
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: 0.5.2
109
+ version: 0.5.3
110
110
  type: :runtime
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: 0.5.2
116
+ version: 0.5.3
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: devise
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -203,6 +203,9 @@ files:
203
203
  - app/assets/icons/lesli/engine-time.svg
204
204
  - app/assets/icons/lesli/locale-en.svg
205
205
  - app/assets/icons/lesli/locale-es.svg
206
+ - app/assets/icons/lesli/locale-fr.svg
207
+ - app/assets/icons/lesli/locale-it.svg
208
+ - app/assets/icons/lesli/locale-pt.svg
206
209
  - app/assets/icons/readme.md
207
210
  - app/assets/images/lesli/brand/app-auth.svg
208
211
  - app/assets/images/lesli/brand/app-icon.svg
@@ -347,6 +350,8 @@ files:
347
350
  - db/seed/development/accounts.rb
348
351
  - db/seed/development/users.rb
349
352
  - db/seed/production.rb
353
+ - db/seed/production/accounts.rb
354
+ - db/seed/production/users.rb
350
355
  - db/seed/test.rb
351
356
  - db/seed/tools.rb
352
357
  - db/seeds.rb