gaah 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NDczNGU5ZjE4YTFkMWIzMWMwMDczM2ZkNjg3OTQ0ZmI3ZGNhMTQ3Yg==
4
+ YzU0MmE2NmJmMWY4YWNkYjdkMmQ5MGZjZjg5ZTAyOGZhM2Q0YWY4YQ==
5
5
  data.tar.gz: !binary |-
6
- MDEwMmM5NWY1MGQ1NWU0YWVlMzRhMDY0Y2E3Nzc5MGRlMWU5MWYxNw==
6
+ MDU2MTM3OTE4OThiZWNhOGRiOGEwNTI2Zjc0NzRkODI2NzdiODcxNg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NDAwM2ZhMTE5ZDU5MmRmMmRjMjgyMTgzNzMyOTNlYjlkZmM4ZWJmNWZiZmE0
10
- NjUyNjI5ZWE2NzdlOTdmYWFlOGIyY2EwOTlhYjdmYTRmODQ0ZDljMDYwYThi
11
- YmUxZWY5NjdiNzQ2NjA3NGQ4MjJhNTlhODIzMWY5NmRiOWYyNTU=
9
+ OTY5NjY0ZWI3ZTdiYjc0MjJkZWVhYzczYTM4ZjdjNjk5Nzc4MjYyM2IyNDBi
10
+ ZDQ2MGVlYmZmYzFiNjA2MDFmMzU5OGNlMTkxYWQ1YWEwNWJhZjQ0M2QyZjNh
11
+ ZGM3YzRiZTE1YjI3ZjI1MzVmZDVjYWFhZTNhYzNmNzk4NDVlODA=
12
12
  data.tar.gz: !binary |-
13
- NjFiZjVmMjhmNjlkMDc4YzkzYzM4NjE0NTA1NWYzNGEwYzZlYzkwNDM1ODk0
14
- MzZhMWYyMzVlZmNmZjIzYWVlMzg2MjdhNWExYjIyMjFhMWJhOWZiZWYyYzI1
15
- Njc0Mzk5NDRiNTA4MzUxMDE1OGRlM2YxZTNjYTYxMGQ2YTI0ZmI=
13
+ NWRkNWQ2MmNiYjUwN2QzNmMzZTM2OGJjMGMxNTQ5NzE5NTExOGY4ODgzMmU1
14
+ NmIyYjIyODg1YjdlYzAxZGJiMDI2OTRiMGMzNzA4ZjIwNWRiOGE0ZTAyZGU3
15
+ NTQwMDI1OWM5ODdlNjM0YmIwNzAyNzgzOGY5ZTE4NDJkNWIwNjk=
@@ -54,9 +54,12 @@ module Gaah
54
54
  raise Gaah::HTTPForbidden
55
55
  elsif response.is_a? Net::HTTPUnauthorized
56
56
  raise Gaah::HTTPUnauthorized
57
- else
58
- # TODO: error handling
57
+ elsif response.is_a? Net::HTTPBadRequest
58
+ raise Gaah::HTTPBadRequest
59
+ elsif response.code.start_with?('2')
59
60
  response
61
+ else
62
+ raise Gaah::UnknownHTTPException.new(response.code)
60
63
  end
61
64
  end
62
65
  end
@@ -1,4 +1,6 @@
1
1
  module Gaah
2
2
  class HTTPForbidden < Exception;end
3
3
  class HTTPUnauthorized < Exception;end
4
+ class HTTPBadRequest < Exception;end
5
+ class UnknownHTTPException < Exception;end
4
6
  end
data/lib/gaah/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Gaah
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gaah
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hwan-Joon Choi