burghers 0.0.3 → 0.0.4

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: fdddc6ea3144da369f0d582b627d4a89eb41f4d6
4
- data.tar.gz: 8d4c4738d11b5a052903459f48e52bdedd3880a5
3
+ metadata.gz: 862e24f5d817af00e31f9adad2822b8b6f0b4828
4
+ data.tar.gz: 356409398684bfad4d9539c43c8deda7260b0b02
5
5
  SHA512:
6
- metadata.gz: 5ccaecba85327b4001bba513adf212bfe947e78ea7a7addf3a185a4c27bf3eca199983984bc25d8a23ae50446a275f6e9d72a235e80b536695c845f73a05826a
7
- data.tar.gz: 4fb9f954fc70d484c0942029ebcaf66f54a58bafc610e477ff3c99a3a622dcb7913851badc83e1ee962d438c69ffcceb024ef2ee0ee5482ac6dfe827b23dd6e6
6
+ metadata.gz: 76641df0f36095049a7048a1b131a0b61ff0fab684b4da06e56d575f561e70380a34b6c168364f73d77307b10d49cf2a08cbc6b5b3547196bf78c1ead52bcbca
7
+ data.tar.gz: 46dbe1930261ba594ae4500b4e0e0eeef6e43e82808997c7ddcd480bfb8de6c5c8ed15348b69c12b5072b131e6f9a91e87e6d1e97730f4d6b315d923a6aeab33
@@ -29,7 +29,9 @@ module Burghers
29
29
  }.merge(headers || {})
30
30
 
31
31
  response = HTTParty.post(URI, :body => content, :headers => headers)
32
- if response.code != 200
32
+ if response.code == 500 and response.to_s.include? "supported languages"
33
+ raise UnsupportedLanguageError, response.to_s
34
+ elsif response.code != 200
33
35
  raise CalaisResponseError, "Got response code of #{response.code}: #{response}"
34
36
  end
35
37
 
@@ -2,6 +2,9 @@ module Burghers
2
2
  class DocumentTooSmallError < RuntimeError
3
3
  end
4
4
 
5
+ class UnsupportedLanguageError < RuntimeError
6
+ end
7
+
5
8
  class CalaisResponseError < RuntimeError
6
9
  end
7
10
  end
@@ -1,3 +1,3 @@
1
1
  module Burghers
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: burghers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Muller
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-01 00:00:00.000000000 Z
11
+ date: 2014-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty