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 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
- req = Net::HTTP::Get.new(ddi_uri.path)
119
- res = Net::HTTP.start(ddi_uri.host, ddi_uri.port) {|http| http.request(req) }
120
- if res.code == "200"
121
- if res['content-encoding'] == "gzip"
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
@@ -1,5 +1,5 @@
1
1
  module Nesstar
2
2
  module Api
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
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: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
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-10-05 00:00:00 +01:00
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: 27
61
+ hash: 7
62
62
  segments:
63
- - 1
64
- - 1
65
- - 4
66
- version: 1.1.4
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: []