lato 0.1.57 → 0.1.58
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/lato/application.scss +17 -0
- data/app/controllers/lato/authentication_controller.rb +1 -1
- data/app/jobs/lato/application_job.rb +6 -4
- data/app/models/lato/log/user_signup.rb +15 -0
- data/app/models/lato/log.rb +1 -1
- data/app/models/lato/operation.rb +5 -0
- data/app/models/lato/user.rb +16 -0
- data/db/migrate/20230823165716_create_lato_log_user_signups.rb +10 -0
- data/lib/lato/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b79cd0a33c8c91953c951e6f4dea60bf2beef77f331c17b739968ee9e39f9a5
|
4
|
+
data.tar.gz: bebe365be7fff9fb9b387c47dbfede50d65d3beb05a54a9c966237404057fa19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7af7ef22e2495eaf79a71bfc56846f62c6d2af6bcafe9d2ea51a17a688cdff63ab3d5fc208b1ee593d92e311c973af71df3a5e2a77c81657a44837fe2d148796
|
7
|
+
data.tar.gz: a653ffc2be2309c20747bb5356e79e3c4defa3fe2899c3cbeb505abcbde2fcc40e57ef9c2818c3640469df2587aedd82f5b8eea15ba37da055683d14756d19f2
|
@@ -1,5 +1,22 @@
|
|
1
1
|
/** Import dependencies */
|
2
2
|
|
3
|
+
$primary: #03256c !default;
|
4
|
+
$secondary: #1768ac !default;
|
5
|
+
$success: #007a34 !default;
|
6
|
+
$danger: #f50032 !default;
|
7
|
+
$warning: #ffcc00 !default;
|
8
|
+
$info: #0017ed !default;
|
9
|
+
|
10
|
+
$gray-100: #ebeff4 !default;
|
11
|
+
$gray-200: #dde3e9 !default;
|
12
|
+
$gray-300: #d3dae1 !default;
|
13
|
+
$gray-400: #c3ccd5 !default;
|
14
|
+
$gray-500: #a4afba !default;
|
15
|
+
$gray-600: #66727d !default;
|
16
|
+
$gray-700: #454f58 !default;
|
17
|
+
$gray-800: #313a42 !default;
|
18
|
+
$gray-900: #1f262c !default;
|
19
|
+
|
3
20
|
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.9.1/font/bootstrap-icons.css");
|
4
21
|
@import "bootstrap";
|
5
22
|
|
@@ -48,7 +48,7 @@ module Lato
|
|
48
48
|
@user = Lato::User.new(registration_params)
|
49
49
|
|
50
50
|
respond_to do |format|
|
51
|
-
if @user.
|
51
|
+
if @user.signup(ip_address: request.remote_ip, user_agent: request.user_agent)
|
52
52
|
session_create(@user.id)
|
53
53
|
|
54
54
|
format.html { redirect_to lato.root_path }
|
@@ -5,24 +5,26 @@ module Lato
|
|
5
5
|
|
6
6
|
protected
|
7
7
|
|
8
|
+
# This method is used to check if the job is running inside an operation.
|
8
9
|
def operation?
|
9
10
|
!!@operation
|
10
11
|
end
|
11
12
|
|
13
|
+
# This method returns the input file attached to the operation if exists.
|
12
14
|
def operation_input_file_attachment
|
13
15
|
@operation.input_file.attached? ? @operation.input_file : nil
|
14
16
|
end
|
15
17
|
|
18
|
+
# This method can be used to update the percentage of the operation.
|
16
19
|
def update_operation_percentage(percentage)
|
17
20
|
return false unless operation?
|
18
21
|
|
19
22
|
@operation.update(
|
20
23
|
percentage: percentage
|
21
24
|
)
|
22
|
-
|
23
|
-
true
|
24
25
|
end
|
25
26
|
|
27
|
+
# This method can be used to save a file as output of the operation.
|
26
28
|
def save_operation_output_file(file_path)
|
27
29
|
return false unless operation?
|
28
30
|
|
@@ -32,10 +34,9 @@ module Lato
|
|
32
34
|
io: file,
|
33
35
|
filename: file_name
|
34
36
|
)
|
35
|
-
|
36
|
-
true
|
37
37
|
end
|
38
38
|
|
39
|
+
# This method can be used to save a text message as output of the operation.
|
39
40
|
def save_operation_output_message(message)
|
40
41
|
return false unless operation?
|
41
42
|
|
@@ -48,6 +49,7 @@ module Lato
|
|
48
49
|
|
49
50
|
private
|
50
51
|
|
52
|
+
# This function is used to manage the operation and manage custom errors.
|
51
53
|
def manage_operation
|
52
54
|
@operation = Lato::Operation.find(arguments.first[:_operation_id]) if arguments.first && arguments.first.is_a?(Hash) && !arguments.first[:_operation_id].blank?
|
53
55
|
@operation&.running
|
data/app/models/lato/log.rb
CHANGED
data/app/models/lato/user.rb
CHANGED
@@ -28,6 +28,7 @@ module Lato
|
|
28
28
|
has_many :lato_invitations_as_inviter, class_name: 'Lato::Invitation', foreign_key: :inviter_lato_user_id, dependent: :nullify
|
29
29
|
|
30
30
|
has_many :lato_log_user_signins, class_name: 'Lato::Log::UserSignin', foreign_key: :lato_user_id, dependent: :nullify
|
31
|
+
has_many :lato_log_user_signups, class_name: 'Lato::Log::UserSignup', foreign_key: :lato_user_id, dependent: :nullify
|
31
32
|
|
32
33
|
# Hooks
|
33
34
|
##
|
@@ -67,6 +68,21 @@ module Lato
|
|
67
68
|
# Operations
|
68
69
|
##
|
69
70
|
|
71
|
+
def signup(params = {})
|
72
|
+
return unless save
|
73
|
+
|
74
|
+
begin
|
75
|
+
lato_log_user_signups.create(
|
76
|
+
ip_address: params[:ip_address],
|
77
|
+
user_agent: params[:user_agent]
|
78
|
+
)
|
79
|
+
rescue StandardError => e
|
80
|
+
Rails.logger.error(e)
|
81
|
+
end
|
82
|
+
|
83
|
+
true
|
84
|
+
end
|
85
|
+
|
70
86
|
def signin(params)
|
71
87
|
self.email = params[:email]
|
72
88
|
|
data/lib/lato/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lato
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.58
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregorio Galante
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -140,6 +140,7 @@ files:
|
|
140
140
|
- app/models/lato/invitation.rb
|
141
141
|
- app/models/lato/log.rb
|
142
142
|
- app/models/lato/log/user_signin.rb
|
143
|
+
- app/models/lato/log/user_signup.rb
|
143
144
|
- app/models/lato/operation.rb
|
144
145
|
- app/models/lato/session.rb
|
145
146
|
- app/models/lato/user.rb
|
@@ -199,6 +200,7 @@ files:
|
|
199
200
|
- db/migrate/20230109054412_create_lato_log_user_signins.rb
|
200
201
|
- db/migrate/20230109061533_create_lato_invitations.rb
|
201
202
|
- db/migrate/20230212211748_add_inviter_lato_user_id_to_invitations.rb
|
203
|
+
- db/migrate/20230823165716_create_lato_log_user_signups.rb
|
202
204
|
- lib/lato.rb
|
203
205
|
- lib/lato/btstrap.rb
|
204
206
|
- lib/lato/config.rb
|