poller 0.4.2 → 0.5.0
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.
- checksums.yaml +8 -8
- data/lib/poller/http/http_probe.rb +1 -1
- data/lib/poller/poller.rb +2 -2
- data/lib/poller/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
YWNiZjdlZGM1YmE1MzA3YzkyMTBiZTA5YjM1MDQ4OGFlNzQ4ZDFiMw==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
ZjhmZWEzMWUwOWZmNTdkZDExMDBkZGMyYTM5OThiYmIwZTgxZDI1ZQ==
|
|
7
7
|
!binary "U0hBNTEy":
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
NGQ3YmIzNzY0OThmOTYyYTIxZmJhN2UyNTVlZjk5OWVmY2U3MDExZjc0NThj
|
|
10
|
+
MzE1Yjk3YThhYjhlMzA1NWNmMjUzODNlMGI3Y2U3NDNlOTNhZDBkZGFlYTI5
|
|
11
|
+
OWY5ZTNkMDgyMTNkMGE1NGU4Mjg5ZmRiYzMwMzcxMGNhMjY5Mjk=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
MDUwZTk3OWVkYzFiMDNjYzU3NGQxMTFhMTE1ZmNhMDE3ZjMyMjI4MDBjNDQz
|
|
14
|
+
MjU4MDhhODg3ZjFjNDI3MDA5YmU1ODNmZmNkM2JjOGM3ZTVkYzlmZjg2YWZh
|
|
15
|
+
YWM4YzRhNGVjNGQ5ZDMwNjg1YjJlNzMwZDYwMzVlNzBjMTNlNDU=
|
|
@@ -45,7 +45,7 @@ module Poller
|
|
|
45
45
|
request.basic_auth(@uri.user, @uri.password)
|
|
46
46
|
end
|
|
47
47
|
@http_response = @proxy.request(request)
|
|
48
|
-
return if @http_response.class == Net::HTTPOK
|
|
48
|
+
return @http_response if @http_response.class == Net::HTTPOK
|
|
49
49
|
rescue Exception => e
|
|
50
50
|
raise RuntimeError, "#sample caught an Exception of class #{e.class} with message: #{e.message}"
|
|
51
51
|
end
|
data/lib/poller/poller.rb
CHANGED
|
@@ -30,11 +30,11 @@ module Poller
|
|
|
30
30
|
while !@timeout.occured?
|
|
31
31
|
Kernel.sleep sleep_time(@period, last_sample_took)
|
|
32
32
|
sample_started_at = Time.now
|
|
33
|
-
@probe.sample
|
|
33
|
+
response = @probe.sample
|
|
34
34
|
satisfied = @probe.satisfied?
|
|
35
35
|
last_sample_took = Time.now - sample_started_at
|
|
36
36
|
tries += 1
|
|
37
|
-
return if satisfied
|
|
37
|
+
return [response, Time.now - sample_started_at] if satisfied
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
raise RuntimeError, "Timeout period has been exceeded for Poller (#{@name})." \
|
data/lib/poller/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: poller
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Markus Krogemann
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-08-
|
|
11
|
+
date: 2013-08-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|