open_calais 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/open_calais/response.rb +1 -0
- data/lib/open_calais/version.rb +1 -1
- data/test/client_test.rb +14 -0
- metadata +4 -4
data/lib/open_calais/response.rb
CHANGED
data/lib/open_calais/version.rb
CHANGED
data/test/client_test.rb
CHANGED
@@ -23,4 +23,18 @@ describe OpenCalais::Client do
|
|
23
23
|
response.raw.wont_be_nil
|
24
24
|
end
|
25
25
|
|
26
|
+
it "passes in header options in client" do
|
27
|
+
oc = OpenCalais::Client.new(:api_key => ENV['OPEN_CALAIS_KEY'], :content_type => OpenCalais::CONTENT_TYPES[:html])
|
28
|
+
response = oc.enrich("Ruby on Rails is a fantastic web framework. It uses MVC, and the ruby programming language invented by Matz")
|
29
|
+
response.wont_be_nil
|
30
|
+
response.raw.wont_be_nil
|
31
|
+
end
|
32
|
+
|
33
|
+
it "passes in header optionsin enrich" do
|
34
|
+
oc = OpenCalais::Client.new(:api_key => ENV['OPEN_CALAIS_KEY'])
|
35
|
+
response = oc.enrich("Ruby on Rails is a fantastic web framework. It uses MVC, and the ruby programming language invented by Matz", :headers => {:content_type => OpenCalais::CONTENT_TYPES[:html]})
|
36
|
+
response.wont_be_nil
|
37
|
+
response.raw.wont_be_nil
|
38
|
+
end
|
39
|
+
|
26
40
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: open_calais
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-06-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -221,7 +221,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
221
221
|
version: '0'
|
222
222
|
segments:
|
223
223
|
- 0
|
224
|
-
hash:
|
224
|
+
hash: 644485484940200324
|
225
225
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
226
226
|
none: false
|
227
227
|
requirements:
|
@@ -230,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
230
230
|
version: '0'
|
231
231
|
segments:
|
232
232
|
- 0
|
233
|
-
hash:
|
233
|
+
hash: 644485484940200324
|
234
234
|
requirements: []
|
235
235
|
rubyforge_project:
|
236
236
|
rubygems_version: 1.8.23
|