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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c18ef6485c81c5391cedf8c73bd98cc28642879f
4
- data.tar.gz: c2dd380877ac9bc145cdda90cae8f4675f7f8348
3
+ metadata.gz: 1881b160c7513d8fc424b591edc4400a4a87d205
4
+ data.tar.gz: 85423c0774a281b64d6b157d101304c12c9af0d4
5
5
  SHA512:
6
- metadata.gz: 9ae8f94ff4999b672dd23dffbb8d8509bfcc349749a77f20b78157b05dd32969e7a3b5db605f2584dd8a27406d21956cf07f8629f06cb5e6272cdb4810c82400
7
- data.tar.gz: df0be1a885b6edda4c47cab7c6980550477f1cf3a54fa3aa6a133be5890107479fa35e5b28bfc278c277ed2f723ad09cada844f829702beab24bbc7620e0de49
6
+ metadata.gz: 2a134759e03ba670e4a1031d8b0c4c846ea7cbc88d81150327d4aca4aede26f5140e31781cf9c2f4a80dc814b8f7b7d2b8a2ff0bc86416c1a6f04274bcd0d56a
7
+ data.tar.gz: 13c45c9c96eafcdd7a6316451026f4c5d43799348f94cbb108b2d0744d4590f9235600032d29cc70987af2b52d44820b52ba41fd6ef7e338ccfdb289e321a740
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Presto
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
@@ -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(Veto::InvalidEntity)
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.0
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-16 00:00:00.000000000 Z
11
+ date: 2013-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: veto