lesli 5.0.10 → 5.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,6 +36,9 @@ Building a better future, one line of code at a time.
36
36
 
37
37
  <%# Log in form %>
38
38
  <form @submit="postLogin" method="post">
39
+ <% if Lesli.config.demo %>
40
+ <%= render("devise/shared/demo") %>
41
+ <% end %>
39
42
  <div class="field mb-4">
40
43
  <label for="user_email" class="label">E-mail address</label>
41
44
  <div class="control has-icons-left has-icons-right">
@@ -0,0 +1,7 @@
1
+ <div class="field mb-5 demo">
2
+ <fieldset>
3
+ <legend>demo account</legend>
4
+ <p><small><b>Username:</b> hello@lesli.tech</small></label>
5
+ <p><small><b>Password:</b> Tardis2024$</small></p>
6
+ </fieldset>
7
+ </div>
@@ -32,6 +32,11 @@ Building a better future, one line of code at a time.
32
32
 
33
33
  Lesli.configure do |config|
34
34
 
35
+
36
+ # Start Lesli as demo
37
+ config.demo = false
38
+
39
+
35
40
  # Installation identifier
36
41
  config.instance = "Lesli"
37
42
 
@@ -79,7 +84,7 @@ Lesli.configure do |config|
79
84
 
80
85
  # Instance security settings
81
86
  config.security = {
82
- password: "tardis",
87
+ password: "Tardis2024$",
83
88
  enable_debug: false,
84
89
  enable_becoming: false,
85
90
  enable_analytics: true,
@@ -54,6 +54,13 @@ passadmin = Devise.friendly_token(40)
54
54
  passguest = Devise.friendly_token(40)
55
55
 
56
56
 
57
+ if Lesli.config.demo
58
+ passowner = Lesli.config.security.dig(:password)
59
+ passadmin = passowner
60
+ passguest = passowner
61
+ end
62
+
63
+
57
64
  # create the owner user for the account,
58
65
  userowner = create_development_user(emailowner, "owner", "Owner", account[:company_name], password:passowner)
59
66
  useradmin = create_development_user(emailadmin, "admin", "Admin", account[:company_name], password:passadmin)
data/db/seed/tools.rb CHANGED
@@ -35,7 +35,6 @@ def create_development_user email, rolename, firstname, lastname, password:nil
35
35
  # get password
36
36
  if password.blank?
37
37
  password = Lesli.config.security.dig(:password)
38
- password = password + Time.now.year.to_s + "$"
39
38
  end
40
39
 
41
40
  account = Lesli::Account.find_by(email: Lesli.config.company.dig(:email))
data/lib/lesli/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Lesli
2
- VERSION = "5.0.10"
3
- BUILD = "1709688682"
2
+ VERSION = "5.0.11"
3
+ BUILD = "1710042648"
4
4
  end
@@ -85,6 +85,14 @@ body {
85
85
 
86
86
  form {
87
87
 
88
+ .demo {
89
+ fieldset {
90
+ padding: 4px 8px;
91
+ border-radius: 4px;
92
+ border: 1px solid silver;
93
+ }
94
+ }
95
+
88
96
  label {
89
97
  font-weight: 400;
90
98
  font-size: 15px;
@@ -61,13 +61,9 @@ namespace :lesli do
61
61
  prepare()
62
62
  end
63
63
 
64
- desc "Prepare the Lesli database"
65
- task :prepare => :environment do |task, args|
66
- prepare()
67
- end
68
-
69
64
  desc "Migrate, prepare && user the Lesli database"
70
65
  task :deploy => :environment do |task, args|
66
+ create()
71
67
  migrate()
72
68
  prepare()
73
69
  Lesli::Engine.load_seed
@@ -89,20 +85,23 @@ namespace :lesli do
89
85
  # Create the Lesli database (development only)
90
86
  def create
91
87
 
92
- # do not execute this task if we are at production level
93
- return if Rails.env.production?
94
-
95
88
  # print a message to let the users show the action running
96
89
  L2.m("Create the Lesli database (development only)")
97
90
 
98
91
  Rake::Task['db:create'].invoke
99
92
  end
100
93
 
101
- desc "Seed the Lesli database (development only)"
102
- def seed
94
+ # Migrate the Lesli database
95
+ def migrate
103
96
 
104
- # do not execute this task if we are at production level
105
- return if Rails.env.production?
97
+ # print a message to let the users show the action running
98
+ L2.m("Migrate the Lesli database")
99
+
100
+ Rake::Task['db:migrate'].invoke
101
+ end
102
+
103
+ desc "Seed the Lesli database"
104
+ def seed
106
105
 
107
106
  # print a message to let the users show the action running
108
107
  L2.msg("Seed the Lesli database (development only)")
@@ -118,15 +117,6 @@ namespace :lesli do
118
117
  LesliLetter::Engine.load_seed if defined?(LesliLetter)
119
118
  end
120
119
 
121
- # Migrate the Lesli database
122
- def migrate
123
-
124
- # print a message to let the users show the action running
125
- L2.m("Migrate the Lesli database")
126
-
127
- Rake::Task['db:migrate'].invoke
128
- end
129
-
130
120
  desc "Prepare the Lesli database"
131
121
  def prepare
132
122
 
@@ -57,7 +57,7 @@ application({
57
57
 
58
58
  if (lesli_application_development) {
59
59
  this.sign_in.email = "hello@lesli.tech"
60
- this.sign_in.password = "tardis2024$"
60
+ this.sign_in.password = "Tardis2024$"
61
61
  }
62
62
  },
63
63
  methods: {
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.10
4
+ version: 5.0.11
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-06 00:00:00.000000000 Z
11
+ date: 2024-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -291,6 +291,7 @@ files:
291
291
  - app/views/devise/registrations/edit.html.erb
292
292
  - app/views/devise/registrations/new.html.erb
293
293
  - app/views/devise/sessions/new.html.erb
294
+ - app/views/devise/shared/_demo.html.erb
294
295
  - app/views/devise/shared/_error_messages.html.erb
295
296
  - app/views/devise/shared/_links.html.erb
296
297
  - app/views/devise/unlocks/new.html.erb