presto 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/presto/mini_magick.rb +3 -0
- data/lib/presto/version.rb +1 -1
- data/spec/mini_magick/processor_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1881b160c7513d8fc424b591edc4400a4a87d205
|
4
|
+
data.tar.gz: 85423c0774a281b64d6b157d101304c12c9af0d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a134759e03ba670e4a1031d8b0c4c846ea7cbc88d81150327d4aca4aede26f5140e31781cf9c2f4a80dc814b8f7b7d2b8a2ff0bc86416c1a6f04274bcd0d56a
|
7
|
+
data.tar.gz: 13c45c9c96eafcdd7a6316451026f4c5d43799348f94cbb108b2d0744d4590f9235600032d29cc70987af2b52d44820b52ba41fd6ef7e338ccfdb289e321a740
|
data/lib/presto/mini_magick.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'mini_magick'
|
2
2
|
require 'presto/transformation'
|
3
3
|
require 'presto/dimensions'
|
4
|
+
require 'presto/exceptions'
|
4
5
|
|
5
6
|
module Presto
|
6
7
|
module MiniMagick
|
@@ -22,6 +23,8 @@ module Presto
|
|
22
23
|
process_format(image) if trans[:fm]
|
23
24
|
process_quality(image) if trans[:q]
|
24
25
|
image
|
26
|
+
rescue ::Veto::InvalidEntity => e
|
27
|
+
raise(::Presto::InvalidTransformation, e.message)
|
25
28
|
end
|
26
29
|
|
27
30
|
private
|
data/lib/presto/version.rb
CHANGED
@@ -8,7 +8,7 @@ describe Presto::MiniMagick::Processor do
|
|
8
8
|
describe "#process" do
|
9
9
|
describe "when transformation is not valid" do
|
10
10
|
it "raises error" do
|
11
|
-
e = proc{ Presto::MiniMagick::Processor.new(:fm => 'xml').process(image) }.must_raise(
|
11
|
+
e = proc{ Presto::MiniMagick::Processor.new(:fm => 'xml').process(image) }.must_raise(Presto::InvalidTransformation)
|
12
12
|
e.message.must_include "fm is not in set: [\\\"jpg\\\", \\\"png\\\"]\""
|
13
13
|
end
|
14
14
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: presto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erik Lott
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: veto
|