ihealth 2.2.4 → 2.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ihealth.rb +21 -15
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d05e56577099cf9c6811b942ff4190bd65c27e5e
|
4
|
+
data.tar.gz: 27915cb8f5168c0d3bd9fb8cf72b0003259b0bf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 543e59971ce53cf396424f2d6c87a49a4d877aa29f22c95430dff86be19ef73e41d806fe70e52a95c7db88eabbee15d93f5aa818ce3d75afc62d714d36eac455
|
7
|
+
data.tar.gz: 2274a02b37f5eb94b991e377f883429531a12aa110fedb39962aa1d2752e9fdf93e5150d9b8df2c73dc9110422ee0d9a45dc155407b552d654828b7b49fac8fe
|
data/lib/ihealth.rb
CHANGED
@@ -173,21 +173,27 @@ class Ihealth
|
|
173
173
|
end
|
174
174
|
|
175
175
|
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
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
|
+
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-
|
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.
|