numerousapp 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/numerousapp.rb +12 -4
- 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: b5d1de99d002e38617461074b068f12e9ea25951
|
4
|
+
data.tar.gz: faefd87f5da4d43832e227fd2552cd8611f0daf9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c13d42b013d15a26e0590ec9f032ebae570c978ccbf7babd0a28179349045c00accba926f851e7020da745741c92f13a123d2e030c2ffa692fb1d0fb0641c8a4
|
7
|
+
data.tar.gz: 6680ae04cfe5dfe28577e529d2071d7989d45937cc6578c28bb5de8903d3cff5da26f008577803bd87cde792b9aef34c273ba0ba8211d72ecca3cdbe4fdb20eb
|
data/lib/numerousapp.rb
CHANGED
@@ -173,6 +173,7 @@ class NumerousClientInternals
|
|
173
173
|
attr_reader :serverName, :debugLevel
|
174
174
|
attr_reader :statistics
|
175
175
|
|
176
|
+
|
176
177
|
# String representation of Numerous
|
177
178
|
#
|
178
179
|
# @return [String] Human-appropriate string representation.
|
@@ -189,10 +190,19 @@ class NumerousClientInternals
|
|
189
190
|
def debug(lvl=1)
|
190
191
|
prev = @debugLevel
|
191
192
|
@debugLevel = lvl
|
193
|
+
# need to make sure we have started an http session
|
194
|
+
# (normally deferred until first API call)
|
195
|
+
|
192
196
|
if @debugLevel > 0
|
197
|
+
# this is hokey, but it is what it is... it's for debug anyway
|
198
|
+
# we have to restart the session with debug on
|
199
|
+
@http = Net::HTTP.new(@serverName, @serverPort)
|
200
|
+
@http.use_ssl = true # always required by NumerousApp
|
193
201
|
@http.set_debug_output $stderr
|
202
|
+
@http = @http.start()
|
203
|
+
@need_restart = false
|
194
204
|
else
|
195
|
-
@http
|
205
|
+
@need_restart = true # will force a new http session
|
196
206
|
end
|
197
207
|
return prev
|
198
208
|
end
|
@@ -212,7 +222,7 @@ class NumerousClientInternals
|
|
212
222
|
|
213
223
|
protected
|
214
224
|
|
215
|
-
VersionString = '
|
225
|
+
VersionString = '20150618-1.2.2'
|
216
226
|
|
217
227
|
MethMap = {
|
218
228
|
GET: Net::HTTP::Get,
|
@@ -379,8 +389,6 @@ class NumerousClientInternals
|
|
379
389
|
# also where subsequent starts might be re-done after errors
|
380
390
|
|
381
391
|
if @need_restart or not @http.started?()
|
382
|
-
|
383
|
-
# starting a session turns on keep-alive...
|
384
392
|
@http = Net::HTTP.new(@serverName, @serverPort)
|
385
393
|
@http.use_ssl = true # always required by NumerousApp
|
386
394
|
@http = @http.start()
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: numerousapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neil Webber
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Classes implementing the NumerousApp REST APIs for metrics. Requires
|
14
14
|
Ruby 2.x
|