tinplate 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tinplate/errors.rb +5 -5
- data/lib/tinplate/version.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: 1a614c00dcffdd96297cd2fbfa6982efb67ce878
|
4
|
+
data.tar.gz: af55c37e079bd5131f540b7790c065897c11c9fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 879760416e70f064d0affe912a0f36584fbaa4c1f75ff42aa9c068e5a980510af94cfb8ed8fa43ce6d1083a1d7a108e081a593fd3aac7038ed1fc12ccec63983
|
7
|
+
data.tar.gz: 0984d1d8b8eb99fce820388ea34513c826c15f6babcea769c501643c1a29cea17803e0e4137d92501fcc060bc524d78e87f515e028bfd349e2054fda94b2cb75
|
data/lib/tinplate/errors.rb
CHANGED
@@ -2,10 +2,10 @@ module Tinplate
|
|
2
2
|
class Error < StandardError
|
3
3
|
def self.from_response(code, type, message)
|
4
4
|
klass = case message
|
5
|
-
when /503 Service Unavailable/ then Tinplate::
|
6
|
-
when /service is busy due to high load/ then Tinplate::
|
5
|
+
when /503 Service Unavailable/ then Tinplate::ServiceUnavailableError
|
6
|
+
when /service is busy due to high load/ then Tinplate::ServiceUnavailableError
|
7
7
|
when /Image too simple/ then Tinplate::NoSignatureError
|
8
|
-
when /purchase another bundle/ then Tinplate::
|
8
|
+
when /purchase another bundle/ then Tinplate::NoCreditsRemainingError
|
9
9
|
else
|
10
10
|
Tinplate::Error
|
11
11
|
end
|
@@ -14,7 +14,7 @@ module Tinplate
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
class
|
17
|
+
class ServiceUnavailableError < Error; end
|
18
18
|
class NoSignatureError < Error; end
|
19
|
-
class
|
19
|
+
class NoCreditsRemainingError < Error; end
|
20
20
|
end
|
data/lib/tinplate/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tinplate
|
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
|
- Aaron Klaassen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|