calais 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.markdown +33 -0
- data/README.markdown +49 -0
- data/Rakefile +84 -24
- data/VERSION.yml +4 -0
- data/lib/calais.rb +2 -5
- data/lib/calais/error.rb +3 -0
- data/lib/calais/response.rb +12 -7
- data/spec/calais/response_spec.rb +27 -26
- data/spec/helper.rb +2 -0
- metadata +38 -51
- data.tar.gz.sig +0 -0
- data/History.txt +0 -32
- data/Manifest.txt +0 -20
- data/README.txt +0 -43
- data/init.rb +0 -1
- data/spec/calais_spec.rb +0 -7
- data/spec/fixtures/.gitignore +0 -1
- data/spec/fixtures/bicycles_australia.response.json +0 -483
- data/spec/fixtures/bicycles_australia.response.rdf +0 -122
- data/spec/fixtures/bicycles_australia.xml +0 -18
- data/spec/fixtures/calais.yml.sample +0 -1
- data/spec/fixtures/slovenia_euro.xml +0 -14
- data/spec/spec.opts +0 -4
- metadata.gz.sig +0 -0
data/CHANGELOG.markdown
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# Changes
|
2
|
+
|
3
|
+
## 0.0.7
|
4
|
+
* verified 4.0 API
|
5
|
+
* moved gem packaging to `jeweler` and documentation to `yard`
|
6
|
+
|
7
|
+
## 0.0.6
|
8
|
+
* fully implemented 3.1 API
|
9
|
+
|
10
|
+
## 0.0.5
|
11
|
+
* fixed error where classes weren't being required in the proper order on Ubuntu (reported by Jon Moses)
|
12
|
+
* New things coming back from the API. Fixing in tests.
|
13
|
+
|
14
|
+
## 0.0.4
|
15
|
+
* changed dependency from `hpricot` to `libxml`
|
16
|
+
* unicode fun
|
17
|
+
* cleanup all around
|
18
|
+
|
19
|
+
## 0.0.3
|
20
|
+
* pluginized the library for Rails (thanks [pius](http://gitorious.org/projects/calais-au-rails))
|
21
|
+
* added helper methods name entity types from a response
|
22
|
+
|
23
|
+
## 0.0.2
|
24
|
+
* cleanup in the specs
|
25
|
+
* cleaner parsing
|
26
|
+
* location of named entities
|
27
|
+
* more data in relationships
|
28
|
+
* moved Names and Relationships
|
29
|
+
|
30
|
+
## 0.0.1
|
31
|
+
* Access to OpenCalais's Enlighten action
|
32
|
+
* Single method to process a document
|
33
|
+
* Get relationships and names from a document
|
data/README.markdown
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Calais #
|
2
|
+
A Ruby interface to the [Open Calais Web Service](http://opencalais.com)
|
3
|
+
|
4
|
+
## Features ##
|
5
|
+
* Accepts documents in text/plain, text/xml and text/html format.
|
6
|
+
* Basic access to the Open Calais API's Enlighten action.
|
7
|
+
* Output is RDF representation of input document.
|
8
|
+
* Single function ability to extract names, entities and geographies from given text.
|
9
|
+
|
10
|
+
## Synopsis ##
|
11
|
+
|
12
|
+
This is a very basic wrapper to the Open Calais API. It uses the POST endpoint and currently supports the Enlighten action. Here's a simple call:
|
13
|
+
|
14
|
+
Calais.enlighten(
|
15
|
+
:content => "The government of the United Kingdom has given corporations like fast food chain McDonald's the right to award high school qualifications to employees who complete a company training program."
|
16
|
+
:content_type => :text,
|
17
|
+
:license_id => 'your license id'
|
18
|
+
)
|
19
|
+
|
20
|
+
This is the easiest way to get the RDF-formated response from the OpenCalais service.
|
21
|
+
|
22
|
+
If you want to do something more fun like getting all sorts of fun information about a document, you can try this:
|
23
|
+
|
24
|
+
Calais.process_document(
|
25
|
+
:content => "The government of the United Kingdom has given corporations like fast food chain McDonald's the right to award high school qualifications to employees who complete a company training program.",
|
26
|
+
:content_type => :text,
|
27
|
+
:license_id => 'your license id'
|
28
|
+
)
|
29
|
+
|
30
|
+
This will return an object containing information extracted from the RDF response.
|
31
|
+
|
32
|
+
## Requirements ##
|
33
|
+
|
34
|
+
* [Ruby 1.8.5 or better](http://ruby-lang.org)
|
35
|
+
* [libxml-ruby](http://libxml.rubyforge.org/), [libxml2](http://xmlsoft.org/)
|
36
|
+
* [curb](http://curb.rubyforge.org/), [libcurl](http://curl.haxx.se/)
|
37
|
+
* [json](http://json.rubyforge.org/)
|
38
|
+
|
39
|
+
## Install ##
|
40
|
+
|
41
|
+
You can install the Calais gem via Rubygems (`gem install calais`) or by building from source.
|
42
|
+
|
43
|
+
## Authors ##
|
44
|
+
|
45
|
+
* [Abhay Kumar](http://opensynapse.net)
|
46
|
+
|
47
|
+
## Acknowledgements ##
|
48
|
+
|
49
|
+
* [Paul Legato](http://www.economaton.com/): Help all around with the new response processor and implementation of the 3.1 API.
|
data/Rakefile
CHANGED
@@ -1,37 +1,97 @@
|
|
1
1
|
# -*- ruby -*-
|
2
2
|
|
3
|
-
require '
|
4
|
-
require '
|
5
|
-
require 'spec/rake/spectask'
|
3
|
+
require 'rake'
|
4
|
+
require 'rake/clean'
|
6
5
|
|
7
6
|
require './lib/calais.rb'
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
8
|
+
begin
|
9
|
+
gem 'jeweler', '>= 1.0.1'
|
10
|
+
require 'jeweler'
|
11
|
+
|
12
|
+
Jeweler::Tasks.new do |s|
|
13
|
+
s.name = 'calais'
|
14
|
+
s.summary = 'A Ruby interface to the Calais Web Service'
|
15
|
+
s.email = 'info@opensynapse.net'
|
16
|
+
s.homepage = 'http://github.com/abhay/calais'
|
17
|
+
s.description = 'A Ruby interface to the Calais Web Service'
|
18
|
+
s.authors = ['Abhay Kumar']
|
19
|
+
s.files = FileList["[A-Z]*", "{bin,generators,lib,test}/**/*"]
|
20
|
+
s.rubyforge_project = 'calais'
|
21
|
+
s.add_dependency 'libxml-ruby', '>= 0.5.4'
|
22
|
+
s.add_dependency 'json', '>= 1.1.3'
|
23
|
+
s.add_dependency 'curb', '>= 0.1.4'
|
24
|
+
end
|
25
|
+
rescue LoadError
|
26
|
+
puts "Jeweler, or one of its dependencies, is not available. Please install it."
|
27
|
+
exit(1)
|
18
28
|
end
|
19
29
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
30
|
+
begin
|
31
|
+
require 'spec/rake/spectask'
|
32
|
+
|
33
|
+
desc "Run all specs"
|
34
|
+
Spec::Rake::SpecTask.new do |t|
|
35
|
+
t.spec_files = FileList["spec/**/*_spec.rb"].sort
|
36
|
+
t.spec_opts = ["--options", "spec/spec.opts"]
|
37
|
+
end
|
38
|
+
|
39
|
+
desc "Run all specs and get coverage statistics"
|
40
|
+
Spec::Rake::SpecTask.new('coverage') do |t|
|
41
|
+
t.spec_opts = ["--options", "spec/spec.opts"]
|
42
|
+
t.spec_files = FileList["spec/*_spec.rb"].sort
|
43
|
+
t.rcov_opts = ["--exclude", "spec", "--exclude", "gems"]
|
44
|
+
t.rcov = true
|
45
|
+
end
|
46
|
+
|
47
|
+
task :default => :spec
|
48
|
+
rescue LoadError
|
49
|
+
puts "RSpec, or one of its dependencies, is not available. Please install it."
|
50
|
+
exit(1)
|
24
51
|
end
|
25
52
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
53
|
+
begin
|
54
|
+
require 'yard'
|
55
|
+
require 'yard/rake/yardoc_task'
|
56
|
+
|
57
|
+
YARD::Rake::YardocTask.new do |t|
|
58
|
+
t.options = ["--verbose", "--markup=markdown", "--files=CHANGELOG.markdown,MIT-LICENSE"]
|
59
|
+
end
|
60
|
+
|
61
|
+
task :rdoc => :yardoc
|
62
|
+
|
63
|
+
CLOBBER.include 'doc'
|
64
|
+
CLOBBER.include '.yardoc'
|
65
|
+
rescue LoadError
|
66
|
+
puts "Yard, or one of its dependencies is not available. Please install it."
|
67
|
+
exit(1)
|
32
68
|
end
|
33
69
|
|
34
|
-
|
35
|
-
|
70
|
+
begin
|
71
|
+
require 'rake/contrib/sshpublisher'
|
72
|
+
namespace :rubyforge do
|
73
|
+
|
74
|
+
desc "Release gem and RDoc documentation to RubyForge"
|
75
|
+
task :release => ["rubyforge:release:gem", "rubyforge:release:docs"]
|
76
|
+
|
77
|
+
namespace :release do
|
78
|
+
desc "Publish RDoc to RubyForge."
|
79
|
+
task :docs => [:yardoc] do
|
80
|
+
config = YAML.load(
|
81
|
+
File.read(File.expand_path('~/.rubyforge/user-config.yml'))
|
82
|
+
)
|
83
|
+
|
84
|
+
host = "#{config['username']}@rubyforge.org"
|
85
|
+
remote_dir = "/var/www/gforge-projects/calais/"
|
86
|
+
local_dir = 'doc'
|
87
|
+
|
88
|
+
Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
rescue LoadError
|
93
|
+
puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
|
94
|
+
exit(1)
|
95
|
+
end
|
36
96
|
|
37
97
|
# vim: syntax=Ruby
|
data/VERSION.yml
ADDED
data/lib/calais.rb
CHANGED
@@ -16,6 +16,7 @@ $:.unshift File.expand_path(File.dirname(__FILE__)) + '/calais'
|
|
16
16
|
|
17
17
|
require 'client'
|
18
18
|
require 'response'
|
19
|
+
require 'error'
|
19
20
|
|
20
21
|
module Calais
|
21
22
|
REST_ENDPOINT = "http://api.opencalais.com/enlighten/rest/"
|
@@ -40,7 +41,7 @@ module Calais
|
|
40
41
|
|
41
42
|
MAX_RETRIES = 5
|
42
43
|
HTTP_TIMEOUT = 60
|
43
|
-
MIN_CONTENT_SIZE =
|
44
|
+
MIN_CONTENT_SIZE = 1
|
44
45
|
MAX_CONTENT_SIZE = 100_000
|
45
46
|
|
46
47
|
class << self
|
@@ -53,7 +54,3 @@ module Calais
|
|
53
54
|
end
|
54
55
|
end
|
55
56
|
end
|
56
|
-
|
57
|
-
module Calais
|
58
|
-
VERSION = '0.0.6'
|
59
|
-
end
|
data/lib/calais/error.rb
ADDED
data/lib/calais/response.rb
CHANGED
@@ -29,15 +29,15 @@ module Calais
|
|
29
29
|
end
|
30
30
|
|
31
31
|
class Entity
|
32
|
-
attr_accessor :
|
32
|
+
attr_accessor :calais_hash, :type, :attributes, :relevance, :instances
|
33
33
|
end
|
34
34
|
|
35
35
|
class Relation
|
36
|
-
attr_accessor :
|
36
|
+
attr_accessor :calais_hash, :type, :attributes, :instances
|
37
37
|
end
|
38
38
|
|
39
39
|
class Geography
|
40
|
-
attr_accessor :name, :
|
40
|
+
attr_accessor :name, :calais_hash, :attributes
|
41
41
|
end
|
42
42
|
|
43
43
|
class Category
|
@@ -78,6 +78,10 @@ module Calais
|
|
78
78
|
def extract_data
|
79
79
|
doc = XML::Parser.string(@raw_response).parse
|
80
80
|
|
81
|
+
if doc.root.find("/Error").first
|
82
|
+
raise Calais::Error, doc.root.find("/Error/Exception").first.content
|
83
|
+
end
|
84
|
+
|
81
85
|
doc.root.find("rdf:Description/rdf:type[contains(@rdf:resource, '#{MATCHERS[:docinfometa]}')]/..").each do |node|
|
82
86
|
@language = node['language']
|
83
87
|
@submission_date = DateTime.parse node['submissionDate']
|
@@ -104,7 +108,8 @@ module Calais
|
|
104
108
|
@categories = doc.root.find("rdf:Description/rdf:type[contains(@rdf:resource, '#{MATCHERS[:doccat]}')]/..").map do |node|
|
105
109
|
category = Category.new
|
106
110
|
category.name = node.find_first("c:categoryName").content
|
107
|
-
|
111
|
+
score = node.find_first("c:score")
|
112
|
+
category.score = score.content.to_f unless score.nil?
|
108
113
|
|
109
114
|
node.remove!
|
110
115
|
category
|
@@ -122,7 +127,7 @@ module Calais
|
|
122
127
|
extracted_hash = node['about'].split('/')[-1] rescue nil
|
123
128
|
|
124
129
|
entity = Entity.new
|
125
|
-
entity.
|
130
|
+
entity.calais_hash = CalaisHash.find_or_create(extracted_hash, @hashes)
|
126
131
|
entity.type = extract_type(node)
|
127
132
|
entity.attributes = extract_attributes(node.find("*[contains(name(), 'c:')]"))
|
128
133
|
|
@@ -137,7 +142,7 @@ module Calais
|
|
137
142
|
extracted_hash = node['about'].split('/')[-1] rescue nil
|
138
143
|
|
139
144
|
relation = Relation.new
|
140
|
-
relation.
|
145
|
+
relation.calais_hash = CalaisHash.find_or_create(extracted_hash, @hashes)
|
141
146
|
relation.type = extract_type(node)
|
142
147
|
relation.attributes = extract_attributes(node.find("*[contains(name(), 'c:')]"))
|
143
148
|
relation.instances = extract_instances(doc, extracted_hash)
|
@@ -151,7 +156,7 @@ module Calais
|
|
151
156
|
|
152
157
|
geography = Geography.new
|
153
158
|
geography.name = attributes.delete('name')
|
154
|
-
geography.
|
159
|
+
geography.calais_hash = attributes.delete('subject')
|
155
160
|
geography.attributes = attributes
|
156
161
|
|
157
162
|
node.remove!
|
@@ -6,6 +6,14 @@ describe Calais::Response, :new do
|
|
6
6
|
end
|
7
7
|
end
|
8
8
|
|
9
|
+
describe Calais::Response, :new do
|
10
|
+
it "should return error message in runtime error" do
|
11
|
+
lambda {
|
12
|
+
@response = Calais::Response.new(RESPONSE_WITH_EXCEPTION)
|
13
|
+
}.should raise_error(Calais::Error, "My Error Message")
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
9
17
|
describe Calais::Response, :new do
|
10
18
|
before :all do
|
11
19
|
@response = Calais::Response.new(SAMPLE_RESPONSE)
|
@@ -14,21 +22,21 @@ describe Calais::Response, :new do
|
|
14
22
|
it 'should extract document information' do
|
15
23
|
@response.language.should == 'English'
|
16
24
|
@response.submission_date.should be_a_kind_of(DateTime)
|
17
|
-
@response.signature.should
|
18
|
-
@response.submitter_code.should
|
19
|
-
@response.request_id.should
|
25
|
+
@response.signature.should be_a_kind_of(String)
|
26
|
+
@response.submitter_code.should be_a_kind_of(String)
|
27
|
+
@response.request_id.should be_a_kind_of(String)
|
20
28
|
@response.doc_title.should == 'Record number of bicycles sold in Australia in 2006'
|
21
29
|
@response.doc_date.should be_a_kind_of(Date)
|
22
30
|
end
|
23
31
|
|
24
32
|
it 'should extract entities' do
|
25
33
|
entities = @response.entities
|
26
|
-
entities.map { |e| e.type }.sort.uniq.should == %w[City Continent Country IndustryTerm Organization Person ProvinceOrState]
|
34
|
+
entities.map { |e| e.type }.sort.uniq.should == %w[City Continent Country IndustryTerm Organization Person Position ProvinceOrState]
|
27
35
|
end
|
28
36
|
|
29
37
|
it 'should extract relations' do
|
30
38
|
relations = @response.relations
|
31
|
-
relations.map { |e| e.type }.sort.uniq.should == %w[GenericRelations PersonAttributes
|
39
|
+
relations.map { |e| e.type }.sort.uniq.should == %w[GenericRelations PersonAttributes PersonCareer Quotation]
|
32
40
|
end
|
33
41
|
|
34
42
|
it 'should extract geographies' do
|
@@ -37,27 +45,11 @@ describe Calais::Response, :new do
|
|
37
45
|
end
|
38
46
|
|
39
47
|
it 'should extract relevances' do
|
40
|
-
@response.instance_variable_get(
|
48
|
+
@response.instance_variable_get(:@relevances).should be_a_kind_of(Hash)
|
41
49
|
end
|
42
50
|
|
43
51
|
it 'should assign a floating-point relevance to each entity' do
|
44
|
-
@response.entities.each {|e| e.relevance.
|
45
|
-
end
|
46
|
-
|
47
|
-
it 'should assign the correct relevance to each entity' do
|
48
|
-
correct_relevances = {
|
49
|
-
"84a34c48-25ac-327f-a805-7b81fd570f7d" => 0.725,
|
50
|
-
"9853f11e-5efa-3efc-90b9-0d0450f7d673" => 0.396,
|
51
|
-
"9fa3fb8a-f517-32c7-8a46-3c1506ea3a70" => 0.156,
|
52
|
-
"ed0e83f9-87e8-3da6-ab46-cd6be116357c" => 0.291,
|
53
|
-
"e05f3d33-1622-3172-836c-b48637a156d3" => 0.316,
|
54
|
-
"d0ca04b6-9cf5-3595-ad4b-7758a0b57997" => 0.156,
|
55
|
-
"0bb9cdb4-3cb7-342a-9901-6d1f12b32f6a" => 0.31,
|
56
|
-
"3979e581-0823-3e84-9257-1ca36db4665e" => 0.228,
|
57
|
-
"0c3d5340-106f-390e-92d3-a4aa18004fb8" => 0.158,
|
58
|
-
"3bcf2655-ff2a-3a80-8de4-558b9626ad21" => 0.644
|
59
|
-
}
|
60
|
-
@response.entities.each {|e| correct_relevances[e.hash.value].should == e.relevance }
|
52
|
+
@response.entities.each {|e| e.relevance.should be_a_kind_of(Float) }
|
61
53
|
end
|
62
54
|
|
63
55
|
it 'should find the correct document categories returned by OpenCalais' do
|
@@ -65,9 +57,18 @@ describe Calais::Response, :new do
|
|
65
57
|
end
|
66
58
|
|
67
59
|
it 'should find the correct document category scores returned by OpenCalais' do
|
68
|
-
@response.categories.map {|c| c.score
|
60
|
+
@response.categories.map {|c| c.score.should be_a_kind_of(Float) }
|
69
61
|
end
|
70
|
-
|
62
|
+
|
63
|
+
it "should not raise an error if no score is given by OpenCalais" do
|
64
|
+
lambda {Calais::Response.new(SAMPLE_RESPONSE_WITH_NO_SCORE)}.should_not raise_error
|
65
|
+
end
|
66
|
+
|
67
|
+
it "should not raise an error if no score is given by OpenCalais" do
|
68
|
+
response = Calais::Response.new(SAMPLE_RESPONSE_WITH_NO_SCORE)
|
69
|
+
response.categories.map {|c| c.score }.should == [nil]
|
70
|
+
end
|
71
|
+
|
71
72
|
it 'should find instances for each entity' do
|
72
73
|
@response.entities.each {|e|
|
73
74
|
e.instances.size.should > 0
|
@@ -115,7 +116,7 @@ describe Calais::Response, :new do
|
|
115
116
|
## thorough test that tests for the instances of each of the many other
|
116
117
|
## relations in the sample doc is desirable in the future.
|
117
118
|
|
118
|
-
rel = @response.relations.select {|e| e.
|
119
|
+
rel = @response.relations.select {|e| e.calais_hash.value == "8f3936d9-cf6b-37fc-ae0d-a145959ae3b5" }.first
|
119
120
|
rel.instances.size.should == 1
|
120
121
|
|
121
122
|
rel.instances.first.prefix.should == " manufacturers.\n\nThe Cycling Promotion Fund (CPF) "
|
data/spec/helper.rb
CHANGED
@@ -7,4 +7,6 @@ require File.dirname(__FILE__) + '/../lib/calais'
|
|
7
7
|
FIXTURES_DIR = File.join File.dirname(__FILE__), %[fixtures]
|
8
8
|
SAMPLE_DOCUMENT = File.read(File.join(FIXTURES_DIR, %[bicycles_australia.xml]))
|
9
9
|
SAMPLE_RESPONSE = File.read(File.join(FIXTURES_DIR, %[bicycles_australia.response.rdf]))
|
10
|
+
SAMPLE_RESPONSE_WITH_NO_SCORE = File.read(File.join(FIXTURES_DIR, %[twitter_tweet_without_score.response.rdf]))
|
11
|
+
RESPONSE_WITH_EXCEPTION = File.read(File.join(FIXTURES_DIR, %[error.response.xml]))
|
10
12
|
LICENSE_ID = YAML.load(File.read(File.join(FIXTURES_DIR, %[calais.yml])))['key']
|
metadata
CHANGED
@@ -1,85 +1,70 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calais
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Abhay Kumar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
- |
|
12
|
-
-----BEGIN CERTIFICATE-----
|
13
|
-
MIIDNjCCAh6gAwIBAgIBADANBgkqhkiG9w0BAQUFADBBMQ0wCwYDVQQDDARpbmZv
|
14
|
-
MRswGQYKCZImiZPyLGQBGRYLb3BlbnN5bmFwc2UxEzARBgoJkiaJk/IsZAEZFgNu
|
15
|
-
ZXQwHhcNMDgwMjAzMDUwODQzWhcNMDkwMjAyMDUwODQzWjBBMQ0wCwYDVQQDDARp
|
16
|
-
bmZvMRswGQYKCZImiZPyLGQBGRYLb3BlbnN5bmFwc2UxEzARBgoJkiaJk/IsZAEZ
|
17
|
-
FgNuZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCmaA3Od1p42luz
|
18
|
-
zDJepXD3VBFEmmeCUCOjs8rkGIlhRibBvAU8GB0hhkTUykeF6JvAp68FYtIqyTqM
|
19
|
-
EY7bnyYTWsvX7HrX/wGRshSKZPnxn2b0AnZ9T3QQZyUut1YQ5G+kBQrI76hz9ynA
|
20
|
-
l0mPCiGxrh+yUNTKt7KzOAzQbtPlqGiIzj+aYvzmdEsj24Ekm/11A/ntPnz+N/Wj
|
21
|
-
yS5c2tbfZdU8NfwfHCZQUBE4PROYCCjoly0QChvBQzKSZPrEpJB3EedMUyBc5m5E
|
22
|
-
TQ0u5aItr3isQchwo410x7ixzVveVzn4mchaGCZ3ZuPwaQkuI/7KSSWWH1LCouct
|
23
|
-
N7LsWR7jAgMBAAGjOTA3MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQW
|
24
|
-
BBRsRhkAWj4iWaut121ZcaOAKXG27DANBgkqhkiG9w0BAQUFAAOCAQEAFuqEVgKC
|
25
|
-
U6f237SZ/hzevOwRkaErF1EcaCEVzuNj+KNdbQOK9oOo+hHyos3jUo17TiUNDi+3
|
26
|
-
VJhw3cOkA/PEpa0ou0Vm8VIfXdp6dh62NhTKHBVwQ/qXHnn3aVuV/zIfOmi9WQ+t
|
27
|
-
mr7ehGTw7URly95GOESW4NKQ95p+iquAh/NGhtHGFt+nxjJGUkkYlnGVaxmmgof3
|
28
|
-
sP2hOrejIrD9jAoejiRhiA+IyEoaYJvlh+D+3MngvnyDFqHiFZgngM0fvTnMTsgT
|
29
|
-
avOOKhLsesocjiElkLMv8mwuY+L8P4tSvDTDKXxM9Bx/YagwgzYCqPoGtFdWI/GI
|
30
|
-
+keKvrmaTOJ7CQ==
|
31
|
-
-----END CERTIFICATE-----
|
10
|
+
cert_chain: []
|
32
11
|
|
33
|
-
date:
|
12
|
+
date: 2009-06-08 00:00:00 -05:00
|
34
13
|
default_executable:
|
35
14
|
dependencies:
|
36
15
|
- !ruby/object:Gem::Dependency
|
37
|
-
name:
|
38
|
-
type: :
|
16
|
+
name: libxml-ruby
|
17
|
+
type: :runtime
|
39
18
|
version_requirement:
|
40
19
|
version_requirements: !ruby/object:Gem::Requirement
|
41
20
|
requirements:
|
42
21
|
- - ">="
|
43
22
|
- !ruby/object:Gem::Version
|
44
|
-
version:
|
23
|
+
version: 0.5.4
|
45
24
|
version:
|
46
|
-
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: json
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.1.3
|
34
|
+
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: curb
|
37
|
+
type: :runtime
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 0.1.4
|
44
|
+
version:
|
45
|
+
description: A Ruby interface to the Calais Web Service
|
47
46
|
email: info@opensynapse.net
|
48
47
|
executables: []
|
49
48
|
|
50
49
|
extensions: []
|
51
50
|
|
52
51
|
extra_rdoc_files:
|
53
|
-
-
|
54
|
-
- Manifest.txt
|
55
|
-
- README.txt
|
52
|
+
- README.markdown
|
56
53
|
files:
|
57
|
-
-
|
54
|
+
- CHANGELOG.markdown
|
58
55
|
- MIT-LICENSE
|
59
|
-
-
|
60
|
-
- README.txt
|
56
|
+
- README.markdown
|
61
57
|
- Rakefile
|
62
|
-
-
|
58
|
+
- VERSION.yml
|
63
59
|
- lib/calais.rb
|
64
60
|
- lib/calais/client.rb
|
61
|
+
- lib/calais/error.rb
|
65
62
|
- lib/calais/response.rb
|
66
|
-
- spec/calais/client_spec.rb
|
67
|
-
- spec/calais/response_spec.rb
|
68
|
-
- spec/calais_spec.rb
|
69
|
-
- spec/fixtures/.gitignore
|
70
|
-
- spec/fixtures/bicycles_australia.response.json
|
71
|
-
- spec/fixtures/bicycles_australia.response.rdf
|
72
|
-
- spec/fixtures/bicycles_australia.xml
|
73
|
-
- spec/fixtures/calais.yml.sample
|
74
|
-
- spec/fixtures/slovenia_euro.xml
|
75
|
-
- spec/helper.rb
|
76
|
-
- spec/spec.opts
|
77
63
|
has_rdoc: true
|
78
|
-
homepage: http://calais
|
64
|
+
homepage: http://github.com/abhay/calais
|
79
65
|
post_install_message:
|
80
66
|
rdoc_options:
|
81
|
-
- --
|
82
|
-
- README.txt
|
67
|
+
- --charset=UTF-8
|
83
68
|
require_paths:
|
84
69
|
- lib
|
85
70
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -101,5 +86,7 @@ rubygems_version: 1.3.1
|
|
101
86
|
signing_key:
|
102
87
|
specification_version: 2
|
103
88
|
summary: A Ruby interface to the Calais Web Service
|
104
|
-
test_files:
|
105
|
-
|
89
|
+
test_files:
|
90
|
+
- spec/helper.rb
|
91
|
+
- spec/calais/response_spec.rb
|
92
|
+
- spec/calais/client_spec.rb
|