ihealth 2.2.4 → 2.2.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ihealth.rb +21 -15
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ca77433431a9bc2943e28ac02e55ad3fe2815b5
4
- data.tar.gz: 72f01402ff7e004ee66533a43ebe377caaa937ea
3
+ metadata.gz: d05e56577099cf9c6811b942ff4190bd65c27e5e
4
+ data.tar.gz: 27915cb8f5168c0d3bd9fb8cf72b0003259b0bf7
5
5
  SHA512:
6
- metadata.gz: 414aa9c5d395f6178b1c0cf02c70869703fafd0760201d466dd0bb4f1856f9ea5b9477433af500c4d594c13741d235c954f66c2bcfd00bf01c3ed22cc527d72e
7
- data.tar.gz: 986743bc746d92162579d911619703ef147ff3f834d11b7f94a398cb98aebabdb80826c1055d85a5285d8b8410d7bfafae38edc49bce8dcd5e9764fd9d29cbcb
6
+ metadata.gz: 543e59971ce53cf396424f2d6c87a49a4d877aa29f22c95430dff86be19ef73e41d806fe70e52a95c7db88eabbee15d93f5aa818ce3d75afc62d714d36eac455
7
+ data.tar.gz: 2274a02b37f5eb94b991e377f883429531a12aa110fedb39962aa1d2752e9fdf93e5150d9b8df2c73dc9110422ee0d9a45dc155407b552d654828b7b49fac8fe
@@ -173,21 +173,27 @@ class Ihealth
173
173
  end
174
174
 
175
175
 
176
- # def get_commands_output qid, commands, format = "json"
177
- # authenticate if !@authenticated
178
- # url = URI("#{@IHEALTHBASE}qkviews/#{qid}/command.#{format}")
179
- # respone = make_request url
180
- # # headers = {'User Agent' => USER_AGENT, 'Cookie' => @cookies }
181
- # # @proxyserver.nil? ? (ihealthclient = Net::HTTP::new(url.host, url.port)) : (ihealthclient = Net::HTTP::new(url.host, url.port,@proxyserver, @proxyport, @proxyuser, @proxypass))
182
- # # ihealthclient.use_ssl = true
183
- # # ihealthclient.verify_mode = OpenSSL::SSL::VERIFY_NONE
184
- # # httprequest = Net::HTTP::Get.new(url.path + "?" + url.query, headers)
185
- # # httprequest.content_type = 'application/xml'
186
- # # response = ihealthclient.start do |http|
187
- # # http.request(httprequest)
188
- # # end
189
- # response.code != "200" ? (return nil) : (return response.body)
190
- # end
176
+ def get_commands_output qid, commands, format = "json"
177
+ authenticate if !@authenticated
178
+ commandstring = ""
179
+ if commands.count > 1
180
+ commands.each { |x| commandstring += x + ","}
181
+ else
182
+ commandstring = commands[0]
183
+ end
184
+ url = URI("#{@IHEALTHBASE}qkviews/#{qid}/commands.#{format}?#{commandstring}")
185
+ respone = make_request url
186
+ headers = {'User Agent' => USER_AGENT, 'Cookie' => @cookies }
187
+ @proxyserver.nil? ? (ihealthclient = Net::HTTP::new(url.host, url.port)) : (ihealthclient = Net::HTTP::new(url.host, url.port,@proxyserver, @proxyport, @proxyuser, @proxypass))
188
+ ihealthclient.use_ssl = true
189
+ ihealthclient.verify_mode = OpenSSL::SSL::VERIFY_NONE
190
+ httprequest = Net::HTTP::Get.new(url.path + "?" + url.query, headers)
191
+ httprequest.content_type = 'application/xml'
192
+ response = ihealthclient.start do |http|
193
+ http.request(httprequest)
194
+ end
195
+ response.code != "200" ? (return nil) : (return response.body)
196
+ end
191
197
 
192
198
  def get_file_list qid, format = "json"
193
199
  authenticate if !@authenticated
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ihealth
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.4
4
+ version: 2.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave B. Greene
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-14 00:00:00.000000000 Z
11
+ date: 2014-03-19 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  This library provides an interface to F5's iHealth API system.