paperclip-mozjpeg 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 3ce4f0104d68fc4f70193335fa25e9f6befdef8b
4
- data.tar.gz: 10b353401582c591bb8de5544c18f6736c138d19
2
+ SHA256:
3
+ metadata.gz: 626bf5ba1c5dff24d1addf9848433d4901be7247b2b52047a80c561c9cbf97f9
4
+ data.tar.gz: cd8ee5b8a0da7d06a81a60f2cf1d7628f3255041661e775b8509348bbfa96130
5
5
  SHA512:
6
- metadata.gz: 38b3f418e9a3f037fdc62d78074dd217a979b36c943c9626c3e1e8c59cced3b571124cf03d1e56676039f1927ff534f750478300c14f767be38baf2bd5823856
7
- data.tar.gz: 22631c0733fe9a257cc931c40c661a9fc1b4c242fd38030f85aa16acffa0d9c2de34d9d56cd111932f15611dc3a81fd3a250ed4dbb803064a8e14841adb7e2a6
6
+ metadata.gz: c610fcf29ca3a550deba23e6460a7104b88a2ff4a512bd68875d4c9fd02307c1f6615bc1b8f695b5428cd36713c29e546f1e99f260488a3b90cdc97a640b7a46
7
+ data.tar.gz: 7a31e454166582028a6a4399bba8cdffeb7fe1a5d7cfc21ee61ddcf202301412411c2da6ea957078f35e25b63bc24f0764cfd21f02062123be664c09615c5d2f
@@ -43,9 +43,10 @@ module Paperclip
43
43
  parameters = parameters.flatten.compact.join(" ").strip.squeeze(" ")
44
44
 
45
45
  success = cjpeg(parameters, :source => "#{File.expand_path(src.path)}", :dest => File.expand_path(dst.path))
46
- rescue Cocaine::ExitStatusError => e
46
+ # dynamic exception handling to support paperclip using Cocaine or Terrapin gem
47
+ rescue Class.new { def self.===(ex); ex.class.name.end_with?("::ExitStatusError"); end }
47
48
  raise Paperclip::Error, "There was an error processing the file for #{@basename}" if @whiny
48
- rescue Cocaine::CommandNotFoundError => e
49
+ rescue Class.new { def self.===(ex); ex.class.name.end_with?("::CommandNotFoundError"); end }
49
50
  raise Paperclip::Errors::CommandNotFoundError.new("Could not run the `cjpeg` command. Please install MozJPEG.")
50
51
  end
51
52
 
@@ -1,3 +1,3 @@
1
1
  module PaperclipMozjpeg
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paperclip-mozjpeg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Svoboda
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-05-11 00:00:00.000000000 Z
11
+ date: 2018-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  version: '0'
103
103
  requirements: []
104
104
  rubyforge_project:
105
- rubygems_version: 2.4.6
105
+ rubygems_version: 2.7.6
106
106
  signing_key:
107
107
  specification_version: 4
108
108
  summary: JPEG and PNG compression processor for paperclip using MozJPEG.