active_storage-cloud_transformations 0.2.3 → 0.2.4

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: 55933914ed4a8573ef48bd00f6f8f151254ef0ff94e2fce62bd36acbdbbb4bf8
4
+ data.tar.gz: 9507ce45ba12c36e39846c6472b31e17c5804058b8c1c59fd1dbcede2c44cf79
5
5
  SHA512:
6
- metadata.gz: e29e26161868b6ed0eacbc3c280a1f5e6a9fe60a51646a707340d2b0ca30b0346f81c5c01394347aab2537037c67a8678ec7079464638df49f08b8b60922350f
7
- data.tar.gz: 3ace46e3730b810fa278de0729ce934d4ca0b74f613ee930997ffa4cae608bc9580cefc6fd883f4e985c560efc8124b646f1a4949b82a35a9ef0bdd67f7cd624
6
+ metadata.gz: d39ce0c06d2fccf952ce518281b4ab926266662d0c9eb4ba3ddbf109f8c4aaf1ba3eb4471d909e0590f5e6c7950dcd94b1664fbb6dc56204a40ce4ed156206fa
7
+ data.tar.gz: 9bf3ad4159fd06d75b50a0f7c9917a630aa3c03c7417a12bb9e86d4e94136cdafd1f83d9e86634c6a6e25b6899e5c2bcc19a71b6d285d88c8cfdc1c3ea6e11d2
@@ -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
@@ -1,5 +1,5 @@
1
1
  module ActiveStorage
2
2
  module CloudTransformations
3
- VERSION = "0.2.3"
3
+ VERSION = "0.2.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
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.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel
@@ -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,