lesli 5.0.18 → 5.0.19

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51038011f00c8b51bb7b7911a9cfb0b38a383638c3a70d18dd8dd89cb47004eb
4
- data.tar.gz: f71306386f4c825b39ae2067a7e04addcb487146630f261e4882ffd75901e4d7
3
+ metadata.gz: 21f07e22ae016cc4db12b194daef6db2502a475c076e06f72cc27435412595e5
4
+ data.tar.gz: c302aae46f34a045d07fc498b90f7c4edbc71f6f5d562091a75379231e83ff1c
5
5
  SHA512:
6
- metadata.gz: 1c299b8760b120a196e4ddd82b1af9069dfa2e7a478dab8f0efa3c27ec63ce2f54eb9e14d85ef16b0b74976f005b7f206c713aea04f57f9153115c0504c67f48
7
- data.tar.gz: 2902ba64403c0b7e2769bd7aa214d6c5f4931003ab40f2113b620ef3e445ff4f0b97bd5ec5ab5f5dec573206505502004818dacab8df706a7530631179d9b6fd
6
+ metadata.gz: 9024ac084f83df2ebb86cc65b2633dd81e3d93d6993760d9439b622b947f11a4cb72551514306e808f40b0ce7c39e709a10fb0aefbcd22449bdf7d4df20a027c
7
+ data.tar.gz: 299e0707fd1998f384e698b053a6f98f46d97222ff95e97e0a8c9f024e1fce607bb5f9d50684dce10e9c1c9cc27bc6e0af6307589d1480df99ce078e513afbc2
@@ -34,6 +34,9 @@ module Lesli
34
34
  class AboutsController < ApplicationLesliController
35
35
  layout "lesli/layouts/application-public", only: [:welcome]
36
36
 
37
+ skip_before_action :authenticate_request, only: [:welcome] if defined?(LesliShield)
38
+ skip_before_action :authorize_request, only: [:welcome] if defined?(LesliShield)
39
+
37
40
  # def status
38
41
  # respond_with_successful({ :Lesli => "Ruby on Rails SaaS Development Framework." })
39
42
  # end
@@ -41,7 +41,9 @@ module Lesli
41
41
 
42
42
  def initialize
43
43
  super
44
- @lesli = {}
44
+ @lesli = {
45
+ engine_name: self.class.module_parent.name
46
+ }
45
47
  end
46
48
 
47
49
  # Meta-programming to define flash setter methods dynamically
@@ -33,8 +33,8 @@ Building a better future, one line of code at a time.
33
33
  module Lesli
34
34
  class ApplicationLesliController < ApplicationController
35
35
 
36
- include Lesli::ResponderInterface
37
36
  include Lesli::RequesterInterface
37
+ include Lesli::ResponderInterface
38
38
  include Lesli::CustomizationInterface
39
39
  include LesliAudit::LoggerInterface if defined?(LesliAudit)
40
40
  include LesliShield::AuthenticationInterface if defined?(LesliShield)
@@ -5,14 +5,15 @@ document.addEventListener('turbo:load', () => {
5
5
 
6
6
  data.engines.forEach(id => {
7
7
  const el = document.getElementById(id.replace("lesli"))
8
- console.log(id.replace("lesli",""))
9
- console.log(el)
10
8
  if (el) el.style.display = 'none'
11
9
  })
12
10
  })
13
11
  </script>
14
12
 
15
13
  <%= render(LesliView::Layout::Container.new("lesli-apps", dashboard: true)) do %>
14
+
15
+ <%= render("lesli_dashboard/dashboards/shared/header") if defined?(LesliDashboard) %>
16
+
16
17
  <section
17
18
  class="lesli-application-engines">
18
19
  <div class="engines-container">
@@ -42,12 +43,6 @@ document.addEventListener('turbo:load', () => {
42
43
  <%# 09. Integrations %>
43
44
  <%= navigation_engine_babel %>
44
45
  </div>
45
- <button class="button is-hidden-tablet">
46
- <span class="icon">
47
- <i class="ri-close-line"></i>
48
- </span>
49
- <span>close</span>
50
- </button>
51
46
  </div>
52
47
  </section>
53
48
  <% end %>
@@ -43,19 +43,27 @@ Building a better future, one line of code at a time.
43
43
 
44
44
  <% else %>
45
45
  <header class="lesli-application-header">
46
- <nav class="lesli-navbar navbar unresponsive" role="navigation" aria-label="main navigation">
47
- <div class="container">
46
+ <nav class="lesli-navbar navbar" role="navigation" aria-label="main navigation">
47
+ <div class="container" x-data="{ navActive: false }">
48
48
  <div class="navbar-brand">
49
49
  <a href="<%= defined?(LesliDashboard) ? '/dashboard' : '/' %>" class="application-navbar-brand">
50
50
  <%= customization_instance_logo_tag(logo: "app-logo", options: { alt: "Lesli app logo" }) %>
51
51
  </a>
52
- <a class="navbar-burger" role="button" aria-label="menu" aria-expanded="false">
52
+ <a
53
+ class="navbar-burger"
54
+ role="button"
55
+ aria-label="menu"
56
+ aria-expanded="false"
57
+ @click="navActive = !navActive"
58
+ :class="{ 'is-active': navActive }">
59
+ <span aria-hidden="true"></span>
53
60
  <span aria-hidden="true"></span>
54
61
  <span aria-hidden="true"></span>
55
62
  <span aria-hidden="true"></span>
56
63
  </a>
57
64
  </div>
58
- <div class="navbar-menu">
65
+ <div class="navbar-menu"
66
+ :class="{ 'is-active': navActive }">
59
67
  <div class="navbar-start">
60
68
  </div>
61
69
  <div class="navbar-end">
@@ -49,13 +49,11 @@ Building a better future, one line of code at a time.
49
49
  <%# render navigation partial %>
50
50
  <% if custom_sidebar_exists %>
51
51
  <nav class="lesli-navbar navbar lesli-application-navigation" role="navigation" aria-label="main navigation">
52
- <div class="container">
53
52
  <div class="navbar-menu">
54
53
  <div class="navbar-end">
55
54
  <%= render partial: custom_sidebar_path %>
56
55
  </div>
57
56
  </div>
58
- </div>
59
57
  </nav>
60
58
  <% else %>
61
59
  <!-- no navigation found -->
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ Devise.setup do |config|
4
+
5
+ # config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
6
+
7
+ require 'devise/orm/active_record'
8
+
9
+ # config.case_insensitive_keys = [:email]
10
+
11
+ # config.strip_whitespace_keys = [:email]
12
+
13
+ # config.skip_session_storage = [:http_auth]
14
+
15
+ # config.stretches = Rails.env.test? ? 1 : 12
16
+
17
+ # config.reconfirmable = true
18
+
19
+ # config.expire_all_remember_me_on_sign_out = true
20
+
21
+ # config.password_length = 6..128
22
+
23
+ # config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
24
+
25
+ # config.reset_password_within = 6.hours
26
+
27
+ # config.sign_out_via = :delete
28
+ end
data/db/seed/users.rb CHANGED
@@ -46,16 +46,18 @@ emailadmin = "admin@#{email_domain}"
46
46
  emailguest = "guest@#{email_domain}"
47
47
 
48
48
 
49
- # build a random password for the owner, admin and guest users
50
- passowner = Devise.friendly_token(40)
51
- passadmin = Devise.friendly_token(40)
52
- passguest = Devise.friendly_token(40)
49
+ # Use the default password for development
50
+ passowner = Lesli.config.security.dig(:password)
51
+ passadmin = passowner
52
+ passguest = passowner
53
53
 
54
54
 
55
- if Rails.env.development? || Rails.env.test? || Lesli.config.demo
56
- passowner = Lesli.config.security.dig(:password)
57
- passadmin = passowner
58
- passguest = passowner
55
+ # build a random password for the owner, admin and guest users
56
+ # only for production and only when LesliShield is installed
57
+ if Rails.env.production? && defined?(LesliShield)
58
+ passowner = LesliShield::Tokens.friendly_token
59
+ passadmin = LesliShield::Tokens.friendly_token
60
+ passguest = LesliShield::Tokens.friendly_token
59
61
  end
60
62
 
61
63
 
@@ -0,0 +1,5 @@
1
+ Description:
2
+ Adds Lesli route to routes.rb and creates a default initializer.
3
+
4
+ Example:
5
+ rails generate lesli:install
@@ -0,0 +1,49 @@
1
+ =begin
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
+ =end
32
+
33
+ module Lesli
34
+ module Generators
35
+ class InstallGenerator < Rails::Generators::Base
36
+ source_root File.expand_path("templates", __dir__)
37
+
38
+ desc "Adds Lesli route and initializer"
39
+
40
+ def add_route_to_routes_file
41
+ route "Lesli::Routing.mount"
42
+ end
43
+
44
+ def create_initializer_file
45
+ template "lesli.rb", "config/initializers/lesli.rb"
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Configuration for Lesli Framework
4
+ Lesli.configure do |config|
5
+ config.demo = false
6
+ end
data/lib/lesli/engine.rb CHANGED
@@ -39,6 +39,8 @@ require "L2"
39
39
  require "useragent"
40
40
  require "acts_as_paranoid"
41
41
 
42
+ require "devise"
43
+
42
44
  require "lesli_date"
43
45
  require "lesli_view"
44
46
  require "lesli_assets"
data/lib/lesli/routing.rb CHANGED
@@ -66,8 +66,7 @@ module Lesli
66
66
  end
67
67
  end
68
68
 
69
- def self.mount_dashboard_for lesli_engine
70
-
69
+ def self.mount_routes_for lesli_engine
71
70
  lesli_engine::Engine.routes.draw do
72
71
 
73
72
  # Dashboard alias
@@ -76,18 +75,13 @@ module Lesli
76
75
  # Dashboard management
77
76
  resource :dashboard, only: [:show, :edit]
78
77
 
79
- # uncomment this to enable multiple dashboards
80
- #resources :dashboards, only: [:show, :edit]
81
- # resources :dashboards do
82
- # collection do
83
- # post "list" => :index
84
- # get :options
85
- # end
86
- # scope module: :dashboard do
87
- # resources :components
88
- # end
89
- # end
78
+ #
79
+ get "up" => "/rails/health#show"
90
80
  end
91
81
  end
82
+
83
+ def self.mount_dashboard_for lesli_engine
84
+ self.mount_routes_for(lesli_engine)
85
+ end
92
86
  end
93
87
  end
data/lib/lesli/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Lesli
2
- VERSION = "5.0.18"
3
- BUILD = "1752157715"
2
+ VERSION = "5.0.19"
3
+ BUILD = "1752589521"
4
4
  end
@@ -44,12 +44,6 @@ namespace :lesli do
44
44
  status()
45
45
  end
46
46
 
47
- desc "Seed & prepare Lesli database (development only)"
48
- task :seed => :environment do |task, args|
49
- seed()
50
- status()
51
- end
52
-
53
47
  desc "Migrate, seed & prepare the Lesli database (development only)"
54
48
  task :dev => :environment do |task, args|
55
49
  migrate()
@@ -72,6 +66,12 @@ namespace :lesli do
72
66
  prepare()
73
67
  status()
74
68
  end
69
+
70
+ desc "Seed & prepare Lesli database (development only)"
71
+ task :seed => :environment do |task, args|
72
+ seed()
73
+ status()
74
+ end
75
75
  end
76
76
 
77
77
  # Drop the Lesli database (development only)
data/readme.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <div align="center" class="documentation-header">
2
- <img width="100" alt="Lesli logo" src="./app/assets/images/lesli/lesli-logo.svg" />
2
+ <img width="150" alt="Lesli logo" src="./app/assets/images/lesli/lesli-logo.svg" />
3
3
  <h3 align="center">Ruby on Rails SaaS Development Framework.</h3>
4
4
  </div>
5
5
 
@@ -58,22 +58,13 @@ Lesli is officially released and will be supported as of version 5.1
58
58
 
59
59
  ### Demo
60
60
 
61
- * online demo (soon)
61
+ * [online demo](https://demo.lesli.dev/)
62
62
  * [docker demo](https://github.com/LesliTech/lesli-docker-demo)
63
63
 
64
64
  <br />
65
65
 
66
66
 
67
67
 
68
- ### Documentation
69
- * [Website](https://www.lesli.dev/)
70
- * [Database](./docs/database.md)
71
- * [Documentation](https://www.lesli.dev/docs.html)
72
-
73
- <br />
74
-
75
-
76
-
77
68
  ### Quick start
78
69
 
79
70
  ```shell
@@ -90,9 +81,9 @@ rake lesli:db:dev
90
81
  ```
91
82
 
92
83
  ```ruby
93
- # Load Lesli
84
+ # mount lesli platform
94
85
  Rails.application.routes.draw do
95
- mount Lesli::Engine => "/lesli"
86
+ Lesli::Routing.mount
96
87
  end
97
88
  ```
98
89
 
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.18
4
+ version: 5.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Lesli Development Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-07-10 00:00:00.000000000 Z
11
+ date: 2025-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n-js
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.2.2
83
+ - !ruby/object:Gem::Dependency
84
+ name: devise
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '4.9'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '4.9'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: lesli_date
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -261,6 +275,7 @@ files:
261
275
  - app/views/lesli/wrappers/_application-devise-simple.erb
262
276
  - app/views/lesli/wrappers/_application-devise.html.erb
263
277
  - config/importmap.rb
278
+ - config/initializers/devise.rb
264
279
  - config/initializers/lesli.rb
265
280
  - config/initializers/lesli_migration_helpers.rb
266
281
  - config/locales/devise.en.yml
@@ -303,6 +318,9 @@ files:
303
318
  - db/structure/00000403_custom_validation_fields.json
304
319
  - lib/assets/javascripts/lesli/i18n_js
305
320
  - lib/generators/application_lesli_generator_base.rb
321
+ - lib/generators/lesli/install/USAGE
322
+ - lib/generators/lesli/install/install_generator.rb
323
+ - lib/generators/lesli/install/templates/lesli.rb
306
324
  - lib/generators/lesli/spec/USAGE
307
325
  - lib/generators/lesli/spec/spec_generator.rb
308
326
  - lib/generators/lesli/spec/templates/spec-factory.template
@@ -361,6 +379,8 @@ metadata:
361
379
  homepage_uri: https://www.lesli.dev/
362
380
  changelog_uri: https://github.com/LesliTech/Lesli
363
381
  source_code_uri: https://github.com/LesliTech/Lesli
382
+ bug_tracker_uri: https://github.com/LesliTech/Lesli/issues
383
+ documentation_uri: https://www.lesli.dev/lesli/
364
384
  post_install_message: Greetings from LesliTech ❤️ Docs are available at https://www.lesli.dev/
365
385
  rdoc_options: []
366
386
  require_paths: