active_storage-cloud_transformations 0.2.3 → 0.2.5

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: 875d31f23516e04da36ffc34ffe5d7f798917cf92e14c4403b371101b9593924
4
- data.tar.gz: e82e61c84c1ac11245c3ee5198db2ce2baa23082ae945ed194da12a2f04c083e
3
+ metadata.gz: c56a1a41f5c7b3da1cfb6a288b3cc1ea2f8da13700df65401f9b6d90ca706c2f
4
+ data.tar.gz: '069f48bd03f818fcbab6cd8839013c045f4a3f34e8146ab15b55863caa562647'
5
5
  SHA512:
6
- metadata.gz: e29e26161868b6ed0eacbc3c280a1f5e6a9fe60a51646a707340d2b0ca30b0346f81c5c01394347aab2537037c67a8678ec7079464638df49f08b8b60922350f
7
- data.tar.gz: 3ace46e3730b810fa278de0729ce934d4ca0b74f613ee930997ffa4cae608bc9580cefc6fd883f4e985c560efc8124b646f1a4949b82a35a9ef0bdd67f7cd624
6
+ metadata.gz: f72a1d55d57627bb772ea34c303dcc26f558907d0aebd790b6a8323a472e4af21919f798f506ddf24c876ab9413371c314ffdb71e1c7066aada401fe807020c5
7
+ data.tar.gz: 272063e142c02003bc0733157c691246f484759d45f0fd6b088c709211c1a1dc3574b7e90c94e369e86065641ea43b1d89235175ec82e020234fd5eae4111918
@@ -29,6 +29,9 @@ module ActiveStorage
29
29
  byte_size: 0, # we don"t know this yet, can we get it from the results?
30
30
  checksum: 0, # we don"t know this yet, can we get it from the results?
31
31
  })
32
+
33
+ # fool attachment to suppress analyze job
34
+ preview_image_blob.metadata[:analyzed] = true
32
35
  blob.preview_image.attach(preview_image_blob)
33
36
 
34
37
  variant_variation = variation.default_to(preview_image_blob.send(:default_variant_transformations))
@@ -40,6 +43,9 @@ module ActiveStorage
40
43
  byte_size: 0, # we don"t know this yet, can we get it from the results?
41
44
  checksum: 0, # we don"t know this yet, can we get it from the results?
42
45
  })
46
+
47
+ # fool attachment to suppress analyze job
48
+ variant_blob.metadata[:analyzed] = true
43
49
  variant_record.image.attach(variant_blob)
44
50
 
45
51
  width, height = variation.transformations.fetch(:resize_to_limit)
@@ -51,6 +57,9 @@ module ActiveStorage
51
57
  preview_image_url: preview_image_blob.url.split("?").first,
52
58
  preview_image_variant_url: variant_blob.url.split("?").first,
53
59
  }
60
+
61
+ ActiveStorage::AnalyzeJob.perform_later(preview_image_blob)
62
+ ActiveStorage::AnalyzeJob.perform_later(variant_blob)
54
63
  end
55
64
 
56
65
  def post! url, body
@@ -17,8 +17,10 @@ module ActiveStorage
17
17
  byte_size: 0, # we don"t know this yet, can we get it from the results?
18
18
  checksum: 0, # we don"t know this yet, can we get it from the results?
19
19
  })
20
+ output_blob.metadata[:analyzed] = true
20
21
  record.image.attach(output_blob)
21
22
  run_crucible_job(blob, output_blob, ignore_timeouts: true)
23
+ ActiveStorage::AnalyzeJob.perform_later(output_blob)
22
24
  end
23
25
  end
24
26
  rescue ActiveRecord::RecordNotUnique
@@ -1,5 +1,5 @@
1
1
  module ActiveStorage
2
2
  module CloudTransformations
3
- VERSION = "0.2.3"
3
+ VERSION = "0.2.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_storage-cloud_transformations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-03 00:00:00.000000000 Z
11
+ date: 2024-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activestorage
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  requirements: []
76
- rubygems_version: 3.5.6
76
+ rubygems_version: 3.5.11
77
77
  signing_key:
78
78
  specification_version: 4
79
79
  summary: Generate ActiveStorage Variants and Previews via external cloud services,