lato 0.1.31 → 0.1.33
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/README.md +0 -3
- data/app/controllers/lato/authentication_controller.rb +1 -1
- data/app/controllers/lato/operations_controller.rb +6 -0
- data/app/models/lato/invitation.rb +1 -0
- data/app/models/lato/user.rb +2 -1
- data/app/views/lato/components/_operation.html.erb +1 -1
- data/app/views/layouts/lato/application.html.erb +1 -1
- data/config/routes.rb +10 -3
- data/db/migrate/20230212211748_add_inviter_lato_user_id_to_invitations.rb +5 -0
- data/lib/lato/version.rb +1 -1
- data/lib/tasks/lato_tasks.rake +0 -22
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d80f200ab351b66a3fb875550a75df337fe39484dd97e64089fb69e71ad24380
|
4
|
+
data.tar.gz: bac614240a6d9147177c0a84ed56ccb173a8628de46d8e6212a1bc29c8d9b4c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7c2e3bd766ad2e48197d889d75debb425077bfdfde9b7e70153c22fbc37b6e0eaec9c27f1c3776d2417d90625e8778ab6d7e4115f36bc1e142c242510e5b933
|
7
|
+
data.tar.gz: f6ae26961ccbca3f0b83747f4527d2995722b3e700cecc2c228df8cb5a344301bffc840cb65423f1f4b030c0ff9818b21474859fd84ab004fe9e57be233d98f9
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@ module Lato
|
|
2
2
|
class AuthenticationController < ApplicationController
|
3
3
|
before_action :not_authenticate_session, only: %i[signin signin_action signup signup_action accept_invitation accept_invitation_action]
|
4
4
|
before_action :authenticate_session, only: %i[signout signout_action]
|
5
|
-
|
5
|
+
|
6
6
|
before_action :find_user, only: %i[verify_email verify_email_action update_password update_password_action]
|
7
7
|
before_action :find_invitation, only: %i[accept_invitation accept_invitation_action]
|
8
8
|
|
@@ -7,6 +7,12 @@ module Lato
|
|
7
7
|
return unless validate_user_access_to_operation
|
8
8
|
end
|
9
9
|
|
10
|
+
def show_legacy
|
11
|
+
Rails.logger.warn('🚨 Legacy route used: operations/show/:id. Please replace operation_show_path with operation_path.')
|
12
|
+
|
13
|
+
redirect_to lato.operation_path(params[:id])
|
14
|
+
end
|
15
|
+
|
10
16
|
private
|
11
17
|
|
12
18
|
def validate_user_access_to_operation
|
data/app/models/lato/user.rb
CHANGED
@@ -25,6 +25,7 @@ module Lato
|
|
25
25
|
|
26
26
|
has_many :lato_operations, class_name: 'Lato::Operation', foreign_key: :lato_user_id, dependent: :nullify
|
27
27
|
has_many :lato_invitations, class_name: 'Lato::Invitation', foreign_key: :lato_user_id, dependent: :nullify
|
28
|
+
has_many :lato_invitations_as_inviter, class_name: 'Lato::Invitation', foreign_key: :inviter_lato_user_id, dependent: :nullify
|
28
29
|
|
29
30
|
has_many :lato_log_user_signins, class_name: 'Lato::Log::UserSignin', foreign_key: :lato_user_id, dependent: :nullify
|
30
31
|
|
@@ -208,7 +209,7 @@ module Lato
|
|
208
209
|
raise ActiveRecord::Rollback unless save && invitation.update(
|
209
210
|
accepted_at: Time.now,
|
210
211
|
lato_user_id: id
|
211
|
-
)
|
212
|
+
)
|
212
213
|
|
213
214
|
true
|
214
215
|
end
|
@@ -62,7 +62,7 @@
|
|
62
62
|
<% end %>
|
63
63
|
|
64
64
|
<% unless operation.finished? %>
|
65
|
-
<%= link_to '', lato.
|
65
|
+
<%= link_to '', lato.operation_path(operation), class: 'd-none', data: { lato_operation_target: 'update', turbo_frame: '_self' } %>
|
66
66
|
<% end %>
|
67
67
|
</div>
|
68
68
|
<% end %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8">
|
5
|
-
<meta name="viewport" content="width=device-width,
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no,shrink-to-fit=no">
|
6
6
|
<title><%= Lato.config.application_title %></title>
|
7
7
|
<%= csrf_meta_tags %>
|
8
8
|
<%= csp_meta_tag %>
|
data/config/routes.rb
CHANGED
@@ -23,6 +23,9 @@ Lato::Engine.routes.draw do
|
|
23
23
|
post 'accept_invitation_action', to: 'authentication#accept_invitation_action', as: :authentication_accept_invitation_action
|
24
24
|
end
|
25
25
|
|
26
|
+
# Account
|
27
|
+
##
|
28
|
+
|
26
29
|
scope :account do
|
27
30
|
get '', to: 'account#index', as: :account
|
28
31
|
patch 'update_user_action', to: 'account#update_user_action', as: :account_update_user_action
|
@@ -33,7 +36,11 @@ Lato::Engine.routes.draw do
|
|
33
36
|
patch 'update_accepted_terms_and_conditions_version_action', to: 'account#update_accepted_terms_and_conditions_version_action', as: :account_update_accepted_terms_and_conditions_version_action
|
34
37
|
end
|
35
38
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
+
# Operations
|
40
|
+
##
|
41
|
+
|
42
|
+
get 'operation/:id', to: 'operations#show', as: :operation
|
43
|
+
|
44
|
+
# NOTE: Legacy route
|
45
|
+
get 'operations/show/:id', to: 'operations#show_legacy', as: :operations_show
|
39
46
|
end
|
data/lib/lato/version.rb
CHANGED
data/lib/tasks/lato_tasks.rake
CHANGED
@@ -35,26 +35,4 @@ namespace :lato do
|
|
35
35
|
FileUtils.copy(gem_concern_path, app_concern_path) unless File.exist? app_concern_path
|
36
36
|
end
|
37
37
|
end
|
38
|
-
|
39
|
-
namespace :bootstrap do
|
40
|
-
desc 'Generate SCSS variables for grays starting from a light color'
|
41
|
-
# Usage: rails lato:bootstrap:grays light=ffffff
|
42
|
-
task :grays do
|
43
|
-
light = ENV['light']
|
44
|
-
raise 'Light color not set' if light.blank?
|
45
|
-
|
46
|
-
rgb = light.match(/(..)(..)(..)$/).captures.map(&:hex)
|
47
|
-
r_range = rgb[0] / 9
|
48
|
-
g_range = rgb[1] / 9
|
49
|
-
b_range = rgb[2] / 9
|
50
|
-
|
51
|
-
puts rgb
|
52
|
-
(1..9).each do |level|
|
53
|
-
r_value = rgb[0] - r_range * (level - 1)
|
54
|
-
g_value = rgb[1] - g_range * (level - 1)
|
55
|
-
b_value = rgb[2] - b_range * (level - 1)
|
56
|
-
puts "$gray-#{level}00: rgb(#{r_value}, #{g_value}, #{b_value});"
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
38
|
end
|
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.33
|
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-02-
|
11
|
+
date: 2023-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -193,6 +193,7 @@ files:
|
|
193
193
|
- db/migrate/20221229233844_add_locale_to_lato_user.rb
|
194
194
|
- db/migrate/20230109054412_create_lato_log_user_signins.rb
|
195
195
|
- db/migrate/20230109061533_create_lato_invitations.rb
|
196
|
+
- db/migrate/20230212211748_add_inviter_lato_user_id_to_invitations.rb
|
196
197
|
- lib/lato.rb
|
197
198
|
- lib/lato/btstrap.rb
|
198
199
|
- lib/lato/config.rb
|