oba-client 1.2.0 → 1.2.1

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/History.md CHANGED
@@ -1,36 +1,40 @@
1
- # 1.0.0 / 2010-07-07
1
+ ## 1.2.1 / 2010-07-08
2
2
 
3
- * Initial release.
4
- * Does not yet parse statistics.
3
+ * Link correctly (problem with using markdown-ed URL in README.md).
5
4
 
6
- ## 1.0.1 / 2010-07-07
5
+ ## 1.2.0 / 2010-07-08
7
6
 
8
- * Oops, fix a symbol bug.
7
+ * Parse statistics.
9
8
 
10
- ## 1.0.2 / 2010-07-07
9
+ ## 1.1.1 / 2010-07-08
11
10
 
12
- * Oops, no release notes.
13
-
14
- ## 1.0.3 / 2010-07-07
11
+ * Rake or Hoe bug workaround.
15
12
 
16
- * Add more tests.
13
+ ## 1.1.0 / 2010-07-08
14
+
15
+ * Fully parse MGREP mappings.
16
+
17
+ ## 1.0.5 / 2010-07-08
18
+
19
+ * Modify docs slightly.
17
20
 
18
21
  ## 1.0.4 / 2010-07-08
19
22
 
20
23
  * Add all possible parameter values for the Annotator.
21
24
 
22
- ## 1.0.5 / 2010-07-08
25
+ ## 1.0.3 / 2010-07-07
23
26
 
24
- * Modify docs slightly.
27
+ * Add more tests.
25
28
 
26
- ## 1.1.0 / 2010-07-08
29
+ ## 1.0.2 / 2010-07-07
27
30
 
28
- * Fully parse MGREP mappings.
31
+ * Oops, no release notes.
29
32
 
30
- ## 1.1.1 / 2010-07-08
33
+ ## 1.0.1 / 2010-07-07
31
34
 
32
- * Rake or Hoe bug workaround.
35
+ * Oops, fix a symbol bug.
33
36
 
34
- ## 1.2.0 / 2010-07-08
37
+ # 1.0.0 / 2010-07-07
35
38
 
36
- * Parse statistics.
39
+ * Initial release.
40
+ * Does not yet parse statistics.
data/README.md CHANGED
@@ -1,12 +1,11 @@
1
1
  # oba-client
2
2
 
3
- * http://rubyforge.org/projects/oba-client
4
3
  * [RubyForge project](http://rubyforge.org/projects/oba-client "RubyForge project")
5
4
 
6
5
  ## DESCRIPTION:
7
6
 
8
7
  A client for accessing the NCBO's Open Biomedical Annotator service.
9
- See [the Annotator documentation](http://www.bioontology.org/wiki/index.php/Annotator_User_Guide "Documentation") for much more information
8
+ See [the Annotator documentation](http://www.bioontology.org/wiki/index.php/Annotator_User_Guide "Documentation") for much more information.
10
9
 
11
10
  ## FEATURES:
12
11
 
@@ -23,8 +22,12 @@ See [the Annotator documentation](http://www.bioontology.org/wiki/index.php/Anno
23
22
 
24
23
  ## USAGE:
25
24
 
25
+ require "rubygems"
26
+ require "oba-client"
27
+
26
28
  client = OBAClient.new
27
- result = client.execute("some text string") # As XML.
29
+ # As XML.
30
+ result = client.execute("some text string")
28
31
 
29
32
  client2 = OBAClient.new({:parse_xml => true})
30
33
  # Returns {:statistics => {information about the annotation},
@@ -34,7 +37,7 @@ See [the Annotator documentation](http://www.bioontology.org/wiki/index.php/Anno
34
37
  client2.execute("this is the second query for this client!")
35
38
 
36
39
  # Or, parse some file you've already got lying about (pass as a string).
37
- parsed = OBAClient::parse("<?xml ... ")
40
+ parsed = OBAClient::parse("<?xml version='1.0'>...</xml>")
38
41
 
39
42
  ## LICENSE:
40
43
 
data/Rakefile CHANGED
@@ -5,6 +5,7 @@ Hoe.plugin :yard
5
5
 
6
6
  Hoe.spec "oba-client" do
7
7
  self.developer "Rob Tirrell", "rpt@stanford.edu"
8
+ self.url = "http://rubyforge.org/projects/oba-client"
8
9
 
9
10
  self.yard_title = "OBAClient Documentation"
10
11
  self.yard_options = ["--default-return", "void"]
data/lib/oba_client.rb CHANGED
@@ -5,7 +5,7 @@ require "net/http"
5
5
  require "uri"
6
6
 
7
7
  class OBAClient
8
- VERSION = "1.2.0"
8
+ VERSION = "1.2.1"
9
9
 
10
10
  # A high HTTP read timeout, as the service sometimes takes awhile to respond.
11
11
  DEFAULT_TIMEOUT = 30
@@ -153,11 +153,11 @@ class OBAClient
153
153
  end
154
154
 
155
155
  doc.xpath(ONTOLOGY_BEANS_XPATH).each do |ontology|
156
- parsed = {}
157
- parsed[:localOntologyId] = ontology.xpath("localOntologyId").text.to_i
158
- parsed[:virtualOntologyId] = ontology.xpath("virtualOntologyId").text.to_i
159
- parsed[:name] = ontology.xpath("name").text
160
- ontologies << parsed
156
+ ontologies << {
157
+ :localOntologyId => ontology.xpath("localOntologyId").text.to_i,
158
+ :virtualOntologyId => ontology.xpath("virtualOntologyId").text.to_i,
159
+ :name => ontology.xpath("name").text
160
+ }
161
161
  end
162
162
 
163
163
  {
@@ -69,4 +69,8 @@ class TestOBAClient < Test::Unit::TestCase
69
69
  assert parsed[:ontologies].is_a?(Array)
70
70
  end
71
71
  end
72
+
73
+ def test_parse
74
+ parsed = OBAClient::parse("<?xml version='1.0'></xml>")
75
+ end
72
76
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oba-client
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 0
10
- version: 1.2.0
9
+ - 1
10
+ version: 1.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Rob Tirrell
@@ -68,7 +68,7 @@ dependencies:
68
68
  version_requirements: *id003
69
69
  description: |-
70
70
  A client for accessing the NCBO's Open Biomedical Annotator service.
71
- See [the Annotator documentation](http://www.bioontology.org/wiki/index.php/Annotator_User_Guide "Documentation") for much more information
71
+ See [the Annotator documentation](http://www.bioontology.org/wiki/index.php/Annotator_User_Guide "Documentation") for much more information.
72
72
  email:
73
73
  - rpt@stanford.edu
74
74
  executables: []