burghers 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/burghers.rb +1 -0
- data/lib/burghers/client.rb +1 -1
- data/lib/burghers/exceptions.rb +7 -0
- data/lib/burghers/response.rb +1 -1
- data/lib/burghers/version.rb +1 -1
- data/test/burghers_test.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdddc6ea3144da369f0d582b627d4a89eb41f4d6
|
4
|
+
data.tar.gz: 8d4c4738d11b5a052903459f48e52bdedd3880a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ccaecba85327b4001bba513adf212bfe947e78ea7a7addf3a185a4c27bf3eca199983984bc25d8a23ae50446a275f6e9d72a235e80b536695c845f73a05826a
|
7
|
+
data.tar.gz: 4fb9f954fc70d484c0942029ebcaf66f54a58bafc610e477ff3c99a3a622dcb7913851badc83e1ee962d438c69ffcceb024ef2ee0ee5482ac6dfe827b23dd6e6
|
data/lib/burghers.rb
CHANGED
data/lib/burghers/client.rb
CHANGED
@@ -30,7 +30,7 @@ module Burghers
|
|
30
30
|
|
31
31
|
response = HTTParty.post(URI, :body => content, :headers => headers)
|
32
32
|
if response.code != 200
|
33
|
-
raise "Got response code of #{response.code}: #{response}"
|
33
|
+
raise CalaisResponseError, "Got response code of #{response.code}: #{response}"
|
34
34
|
end
|
35
35
|
|
36
36
|
Response.new response.parsed_response
|
data/lib/burghers/response.rb
CHANGED
data/lib/burghers/version.rb
CHANGED
data/test/burghers_test.rb
CHANGED
@@ -25,7 +25,7 @@ class BurghersTest < MiniTest::Test
|
|
25
25
|
|
26
26
|
def test_with_url
|
27
27
|
content = "http://www.washingtonpost.com/lifestyle/style/rep-vance-mcallister-kissed-now-can-he-make-up-with-voters-after-the-scandal/2014/04/16/9a898fde-c57c-11e3-9f37-7ce307c56815_story.html"
|
28
|
-
expected = [{:name=>"Politics", :score=>0.
|
28
|
+
expected = [{:name=>"Politics", :score=>0.66}]
|
29
29
|
assert_equal expected, @client.enrich(content).topics
|
30
30
|
end
|
31
31
|
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.
|
4
|
+
version: 0.0.3
|
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-
|
11
|
+
date: 2014-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -82,6 +82,7 @@ files:
|
|
82
82
|
- burghers.gemspec
|
83
83
|
- lib/burghers.rb
|
84
84
|
- lib/burghers/client.rb
|
85
|
+
- lib/burghers/exceptions.rb
|
85
86
|
- lib/burghers/response.rb
|
86
87
|
- lib/burghers/version.rb
|
87
88
|
- test/burghers_test.rb
|