activestorage-hotcell-server 0.2.0 → 0.3.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: 42399adf3e7993d0df16dd7a13010053ff389ddad17b3c90a6f7705052b3c2e7
4
- data.tar.gz: 324c2a21f2e55e7747355f2155542d5ef572164ac53938a1077db3156fbc1c87
3
+ metadata.gz: 89dcb6743b4bb87dacc1351b9dec256ef7dd1c887caf13c9242c4c4abc05c1de
4
+ data.tar.gz: 93b579fc94d6670fd6008b58e98c10fba06d50c3b63b8bf691ea6f35ae1526bf
5
5
  SHA512:
6
- metadata.gz: f596b308fbdf479792bdb2de90d1fb626ed9207c6194d60a618a1342cca51ae13a7f47a456c15c1ca764f807477070b6d7697f00bc6d4f1dfa7b31788fa37b94
7
- data.tar.gz: a6b15cc763f189ce7249bb473f1cd11c24f4d112f8ecad66f97c2e4ad1afb63f845c201dd704e17147a690866dc79b1c49795b61f915719e1c28c91f952236b7
6
+ metadata.gz: 999c462832530390ac5cc300a69b2673246e1a99759bdb9a92625af721523ec72ab16988107a1b4049e4a8e41cdb8f7d6612a87b7e33d647e5947a98325d2b78
7
+ data.tar.gz: c076edca15955f2cd668a43ac54a3c23011f6f8ca935ab4d08a7db7a1623fc2b1d2906d719070a4a09f4ea99a9d75c2356abac236bdc5cb4df746eec1d438b06
@@ -22,8 +22,14 @@ require "image_processing/mini_magick"
22
22
  # is covered too. Note what this is: mini_magick filters the environment it was given, where `run_tool`
23
23
  # writes a fresh one. Driving `magick` directly would make it ours, and that is the separate enhancement
24
24
  # this class already names.
25
+ #
26
+ # The OpenMP variables come from the cell's environment rather than being named here: the number belongs
27
+ # to the image, which is configured to match the container's CPU quota. Without them the restriction would
28
+ # hand `magick` the pool the image's bound was meant to take away. `run_tool` carries the same pair.
25
29
  MiniMagick.restricted_env = true
26
- MiniMagick.cli_env = { "LANG" => "C.UTF-8", "LC_ALL" => "C.UTF-8" }
30
+ MiniMagick.cli_env = { "LANG" => "C.UTF-8", "LC_ALL" => "C.UTF-8",
31
+ "OMP_NUM_THREADS" => ENV["OMP_NUM_THREADS"],
32
+ "OMP_THREAD_LIMIT" => ENV["OMP_THREAD_LIMIT"] }.compact
27
33
 
28
34
  module ActiveStorage
29
35
  module HotCell
@@ -44,9 +50,12 @@ module ActiveStorage
44
50
  abstract_operation
45
51
 
46
52
  # MiniMagick::Error is how mini_magick reports a `magick` that exited non-zero — the common shape of an
47
- # input it cannot decode. MiniMagick::Invalid is an input `identify` rejects outright. Both are the
48
- # input's fault rather than the operation's.
49
- unreadable MiniMagick::Error, MiniMagick::Invalid
53
+ # input it cannot decode. MiniMagick::Invalid is an input `identify` rejects outright.
54
+ # ImageProcessing::Error is the pipeline's own verdict on the input against the requested
55
+ # transform — a multi-layer source into a single-layer destination, for example. All three are
56
+ # the input's fault rather than the operation's; unclassified, each was a transient `failed`
57
+ # that never marked the blob, so the same file spent a full conversion on every request.
58
+ unreadable MiniMagick::Error, MiniMagick::Invalid, ImageProcessing::Error
50
59
 
51
60
  # **Accepted risk.** A tool's output is not bounded on this path. `Operation#run_tool` caps what it
52
61
  # reads at 64KB and drops the rest as it arrives, because an input that makes a tool print gigabytes
@@ -3,7 +3,7 @@
3
3
  module ActiveStorage
4
4
  module HotCell
5
5
  module Server
6
- VERSION = "0.2.0"
6
+ VERSION = "0.3.1"
7
7
  end
8
8
  end
9
9
  end
@@ -22,8 +22,10 @@ module ActiveStorage
22
22
 
23
23
  # Vips::Error is how libvips reports a file it cannot decode, which is common rather than exceptional: it
24
24
  # covers truncated uploads, formats this build was not compiled with, and formats deliberately refused by
25
- # block_untrusted. All of those are the input's fault and none is the operation's.
26
- unreadable Vips::Error
25
+ # block_untrusted. ImageProcessing::Error is the pipeline's own verdict on the input against the
26
+ # requested transform, classified the same way. All of those are the input's fault and none is
27
+ # the operation's.
28
+ unreadable Vips::Error, ImageProcessing::Error
27
29
 
28
30
  # Requires and configures. It must never evaluate an image, and the reason is mechanical: libvips starts
29
31
  # its thread pool on the first evaluation, that pool does not survive fork, and the child then waits on a
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activestorage-hotcell-server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Dalessio
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 0.2.0
18
+ version: 0.3.1
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - '='
24
24
  - !ruby/object:Gem::Version
25
- version: 0.2.0
25
+ version: 0.3.1
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: image_processing
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -43,28 +43,28 @@ dependencies:
43
43
  requirements:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: '4.0'
46
+ version: 5.2.0
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: '4.0'
53
+ version: 5.2.0
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: ruby-vips
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: '2.2'
60
+ version: 2.2.1
61
61
  type: :runtime
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
- version: '2.2'
67
+ version: 2.2.1
68
68
  description: |
69
69
  The HotCell operations behind activestorage-hotcell-client: image transformation with libvips or
70
70
  ImageMagick, image and media analysis, PDF previews with mutool or poppler, and video previews with
@@ -99,8 +99,8 @@ licenses:
99
99
  - MIT
100
100
  metadata:
101
101
  homepage_uri: https://github.com/basecamp/hotcell
102
- source_code_uri: https://github.com/basecamp/hotcell/tree/v0.2.0/activestorage-hotcell-server
103
- changelog_uri: https://github.com/basecamp/hotcell/blob/v0.2.0/CHANGELOG.md
102
+ source_code_uri: https://github.com/basecamp/hotcell/tree/v0.3.1/activestorage-hotcell-server
103
+ changelog_uri: https://github.com/basecamp/hotcell/blob/v0.3.1/CHANGELOG.md
104
104
  bug_tracker_uri: https://github.com/basecamp/hotcell/issues
105
105
  rubygems_mfa_required: 'true'
106
106
  rdoc_options: []