paperclip-compression 1.0.1 → 1.0.2
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 +5 -5
- data/lib/paperclip-compression/base.rb +4 -0
- data/lib/paperclip-compression/jpeg.rb +2 -2
- data/lib/paperclip-compression/png.rb +2 -2
- 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: dacc657349179f650885694deae7f7179881340b7bebb842877477397dd82687
|
|
4
|
+
data.tar.gz: 896e1e50581d8347e755f7510d3108574fd6fd51a08fab28573ca97d0f707687
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a708bd3fe03e1476d1a6dbbcab252af4b57053fb273f232d43e0d194054e538c42ce64473ff427bee2e419d9f86fa8a053041b210b97882b3b73642efd2e4125
|
|
7
|
+
data.tar.gz: 8fa0116b5949dfe223e3f715dba221b18f390009aa5b36ea7c3207a6735cb32568f34afdbaff3e6cb993317684b124abaf1dce6da9d50f9aa29b2b02a1a6088f
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
module PaperclipCompression
|
|
2
|
+
|
|
3
|
+
ExitStatusError = defined?(Cocaine) ? Cocaine::ExitStatusError : Terrapin::ExitStatusError
|
|
4
|
+
CommandNotFoundError = defined?(Cocaine) ? Cocaine::CommandNotFoundError : Terrapin::CommandNotFoundError
|
|
5
|
+
|
|
2
6
|
class Base
|
|
3
7
|
|
|
4
8
|
def initialize(file, first_processor)
|
|
@@ -12,9 +12,9 @@ module PaperclipCompression
|
|
|
12
12
|
def make
|
|
13
13
|
begin
|
|
14
14
|
@config.process_file? ? process_file : unprocessed_tempfile
|
|
15
|
-
rescue
|
|
15
|
+
rescue ExitStatusError
|
|
16
16
|
raise Paperclip::Error, "JPEGTRAN : There was an error processing #{@basename}" if @config.whiny
|
|
17
|
-
rescue
|
|
17
|
+
rescue CommandNotFoundError
|
|
18
18
|
raise Paperclip::Errors::CommandNotFoundError.new("Could not run 'jpegtran'. Please install jpegtran.")
|
|
19
19
|
end
|
|
20
20
|
end
|
|
@@ -12,9 +12,9 @@ module PaperclipCompression
|
|
|
12
12
|
def make
|
|
13
13
|
begin
|
|
14
14
|
@config.process_file? ? process_file : unprocessed_tempfile
|
|
15
|
-
rescue
|
|
15
|
+
rescue ExitStatusError
|
|
16
16
|
raise Paperclip::Error, "OPTIPNG : There was an error processing #{@basename}" if @config.whiny
|
|
17
|
-
rescue
|
|
17
|
+
rescue CommandNotFoundError
|
|
18
18
|
raise Paperclip::Errors::CommandNotFoundError.new("Could not run 'optipng'. Please install optipng.")
|
|
19
19
|
end
|
|
20
20
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: paperclip-compression
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- İ. Emre Kutlu
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-10-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: paperclip
|
|
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
137
137
|
version: '0'
|
|
138
138
|
requirements: []
|
|
139
139
|
rubyforge_project:
|
|
140
|
-
rubygems_version: 2.
|
|
140
|
+
rubygems_version: 2.7.8
|
|
141
141
|
signing_key:
|
|
142
142
|
specification_version: 4
|
|
143
143
|
summary: Image compression for Paperclip
|