lato 3.13.0 → 3.13.2

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: dd51e6200f38ef058645aae3e2684f967d2bcdd2965d7bdfd36b8f73ab6b5007
4
- data.tar.gz: 1cee6903435fac581f18be2c0e7c6fda2fc6a2d1f141cea02bacf4f6f58f315c
3
+ metadata.gz: bc8aaad0344f244ad56c9b5e5c71f5826538506a54661aca7ab6c6e6642a4b97
4
+ data.tar.gz: d834736ff93566c6026955e539bd9df0f7fa48919a568e170ec089774f06e87f
5
5
  SHA512:
6
- metadata.gz: 8629876c8baa8092aa4ba662ddb5e492b68b11a75c985684e10d4fb04b24c9f13db65d542a47bda39cb454638a665a41e3df4764ec17c71d1ed3d5eddd367e07
7
- data.tar.gz: 2920b2de9e327a6bcc2e6ff24ccf9cf9e2a5dbd4ee7d4cecdac1e8d9fa5e2db2ea3a1719de37cdaa102190a67849e93af3d6335a96116c4abd9bd5ed756d9f02
6
+ metadata.gz: f7de79c410dab2bc114f2a42c57f68ba5d704a008c79e49584429c5beca4f805d38f19b209c04d0e2d85d4b0d632d4484af0f4bf98a80715cae0530ce307b287
7
+ data.tar.gz: 3197c44ce5f830011c37911464e9603b1f4d213020d8b0dda20c73e5f19e405c1a99643e7fc3b4590397ad7a49cf23449f5ad584acbe63b48db4f0881ef0de7a
data/README.md CHANGED
@@ -19,7 +19,7 @@ The gem is ready to be used with the **latest Rails 7+** features like **[ESM im
19
19
 
20
20
  ## Full documentation
21
21
 
22
- The full documentation is available at: 👉 👉 [THIS LINK](http://lato.gregoriogalante.com/) 👈 👈
22
+ The full documentation is available at: 👉 👉 [THIS LINK](https://auuu.link/s/gh-lato) 👈 👈
23
23
 
24
24
  You can also use the [Lato AI Agent](http://lato.gregoriogalante.com/AI.html) directly on your browser to generate code and get helps with the gem.
25
25
 
@@ -1,9 +1,16 @@
1
1
  module Lato
2
2
  class ActiveStorageCleanerJob < Lato::ApplicationJob
3
- def perform
3
+ def perform(params = {})
4
+ update_operation_percentage(0)
5
+
4
6
  # delete all active storage blobs that are not attached to any record with more than 12 hours of life
5
- ActiveStorage::Blob.unattached.where('active_storage_blobs.created_at < ?', 12.hours.ago).find_in_batches do |blobs|
7
+ query = ActiveStorage::Blob.where('active_storage_blobs.created_at < ?', 12.hours.ago)
8
+ totals = query.count
9
+ runned = 0
10
+ query.find_in_batches do |blobs|
6
11
  blobs.each(&:purge_later)
12
+ runned += blobs.size
13
+ update_operation_percentage((runned.to_f / totals * 100).round)
7
14
  end
8
15
 
9
16
  # delete all empty folders in active storage local service (if exists)
@@ -94,7 +94,7 @@ collection_total = collection.respond_to?(:total_count) ? collection.total_count
94
94
  <div class="d-flex flex-column align-items-center">
95
95
  <span class="text-muted"><%= collection_total %> <%= I18n.t('lato.total_results').downcase %></span>
96
96
  <% if collection.respond_to?(:total_pages) %>
97
- <div class="mt-3"><%= paginate collection %></div>
97
+ <div class="mt-3"><%= paginate collection, param_name: "#{key}_page" %></div>
98
98
  <% end %>
99
99
  </div>
100
100
 
data/lib/lato/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lato
2
- VERSION = "3.13.0"
2
+ VERSION = "3.13.2"
3
3
  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: 3.13.0
4
+ version: 3.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregorio Galante
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-13 00:00:00.000000000 Z
11
+ date: 2025-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails