lato 3.13.0 → 3.13.1

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: f8746303f02bdbfbec09b41de82ff16a8b946ad67d760abd9b0638973944d260
4
+ data.tar.gz: e45f9374b5f00313250cdf8b8c325b0f79c6126c0d7bdfcfa4251949b3215cbb
5
5
  SHA512:
6
- metadata.gz: 8629876c8baa8092aa4ba662ddb5e492b68b11a75c985684e10d4fb04b24c9f13db65d542a47bda39cb454638a665a41e3df4764ec17c71d1ed3d5eddd367e07
7
- data.tar.gz: 2920b2de9e327a6bcc2e6ff24ccf9cf9e2a5dbd4ee7d4cecdac1e8d9fa5e2db2ea3a1719de37cdaa102190a67849e93af3d6335a96116c4abd9bd5ed756d9f02
6
+ metadata.gz: '096b30341931394fd8b0d09617c1484c475440bcc415f76db3fbc389df99574791c77c2913dce9832c0be9de9947f21581e5250d6ef8b48fed1677c43e8d9740'
7
+ data.tar.gz: 2b759b959aa4dc841987e2e05807f1e841e1887a4057f8d7f1c1abf51d2737964968b54553c4d19d1a92cc93ce9147e8ca4f911e64d4bd9bedaa57fa097bd9aa
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)
data/lib/lato/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lato
2
- VERSION = "3.13.0"
2
+ VERSION = "3.13.1"
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.1
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