nesstar-api 0.0.4 → 0.0.5
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/lib/nesstar-api.rb +4 -13
- data/lib/nesstar-api/version.rb +1 -1
- metadata +15 -15
data/lib/nesstar-api.rb
CHANGED
|
@@ -115,19 +115,10 @@ module Nesstar
|
|
|
115
115
|
ddi_uri = URI.parse(uri)
|
|
116
116
|
ddi_uri.merge!("/obj/fStudy/" + dataset)
|
|
117
117
|
ddi_uri.merge!('?http://www.nesstar.org/rdf/method=http://www.nesstar.org/rdf/Dataset/GetDDI')
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
gz = Zlib::GzipReader.new(StringIO.new(res.body))
|
|
123
|
-
xml = gz.read
|
|
124
|
-
return xml
|
|
125
|
-
else
|
|
126
|
-
return res.body
|
|
127
|
-
end
|
|
128
|
-
else
|
|
129
|
-
raise 'There was a problem retrieving the document'
|
|
130
|
-
end
|
|
118
|
+
res = Net::HTTP.get(ddi_uri)
|
|
119
|
+
gz = Zlib::GzipReader.new(StringIO.new(res))
|
|
120
|
+
xml = gz.read
|
|
121
|
+
return xml
|
|
131
122
|
end
|
|
132
123
|
|
|
133
124
|
#return a catalog object with information inside it
|
data/lib/nesstar-api/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nesstar-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 21
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 0.0.
|
|
9
|
+
- 5
|
|
10
|
+
version: 0.0.5
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Ian Dunlop
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-
|
|
18
|
+
date: 2011-11-22 00:00:00 +00:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|
|
@@ -56,14 +56,14 @@ dependencies:
|
|
|
56
56
|
requirement: &id003 !ruby/object:Gem::Requirement
|
|
57
57
|
none: false
|
|
58
58
|
requirements:
|
|
59
|
-
- - "
|
|
59
|
+
- - "="
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
hash:
|
|
61
|
+
hash: 7
|
|
62
62
|
segments:
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
version:
|
|
63
|
+
- 2
|
|
64
|
+
- 2
|
|
65
|
+
- 0
|
|
66
|
+
version: 2.2.0
|
|
67
67
|
type: :runtime
|
|
68
68
|
version_requirements: *id003
|
|
69
69
|
description: This gem provides access to NESSTAR API calls from a data provider
|
|
@@ -76,15 +76,15 @@ extensions: []
|
|
|
76
76
|
extra_rdoc_files: []
|
|
77
77
|
|
|
78
78
|
files:
|
|
79
|
+
- lib/nesstar-api.rb
|
|
80
|
+
- lib/nesstar-api/version.rb
|
|
81
|
+
- lib/nesstar-api/summary_stat.rb
|
|
82
|
+
- lib/nesstar-api/study.rb
|
|
79
83
|
- lib/nesstar-api/catalog.rb
|
|
80
84
|
- lib/nesstar-api/category.rb
|
|
85
|
+
- lib/nesstar-api/variable.rb
|
|
81
86
|
- lib/nesstar-api/category_statistic.rb
|
|
82
|
-
- lib/nesstar-api/study.rb
|
|
83
87
|
- lib/nesstar-api/study_date.rb
|
|
84
|
-
- lib/nesstar-api/summary_stat.rb
|
|
85
|
-
- lib/nesstar-api/variable.rb
|
|
86
|
-
- lib/nesstar-api/version.rb
|
|
87
|
-
- lib/nesstar-api.rb
|
|
88
88
|
has_rdoc: true
|
|
89
89
|
homepage: http://github.com/mygrid/nesstar-api
|
|
90
90
|
licenses: []
|