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 +5 -5
- data/lib/paperclip-mozjpeg.rb +3 -2
- data/lib/paperclip-mozjpeg/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 626bf5ba1c5dff24d1addf9848433d4901be7247b2b52047a80c561c9cbf97f9
|
4
|
+
data.tar.gz: cd8ee5b8a0da7d06a81a60f2cf1d7628f3255041661e775b8509348bbfa96130
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c610fcf29ca3a550deba23e6460a7104b88a2ff4a512bd68875d4c9fd02307c1f6615bc1b8f695b5428cd36713c29e546f1e99f260488a3b90cdc97a640b7a46
|
7
|
+
data.tar.gz: 7a31e454166582028a6a4399bba8cdffeb7fe1a5d7cfc21ee61ddcf202301412411c2da6ea957078f35e25b63bc24f0764cfd21f02062123be664c09615c5d2f
|
data/lib/paperclip-mozjpeg.rb
CHANGED
@@ -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
|
-
|
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
|
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
|
|
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.
|
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:
|
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.
|
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.
|