waitutil 0.2.0 → 0.2.1
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 +13 -5
- data/README.md +8 -2
- data/VERSION +1 -1
- data/lib/waitutil.rb +1 -1
- metadata +30 -28
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NjVmNzgxMTljZTVmMzQ2NGNkMWI1ZWMxOTg1MDA0MzU3MjZjZTFmMQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YjRmMDg4NDE4MjkwMjQ5YWE2NTI1OTJlYzZhZDE1OWQyNmY5ZjgxNA==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
OTMzZjFkODBjNmMzNjQ1Y2NlMGNlOTk0MGJkZjQwZWU2ZTRiMmY5OTQ3NmU5
|
10
|
+
YzdiY2ZmODlmNDQ5NGQ4ZGE2OWQ1M2E1YmZmY2NjNzllOTVkNzcxZGFkZTc2
|
11
|
+
MDI0ZDcxM2I2OWZmNGY4MTNkZWZlYmYwZjFjYzlmMDcyZDUwMDE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
OTZjMzNmNzljOWQ4ZjBjNGJjNWUxN2I2ZjkxMDQxNjRlOWU0MmRiODIxMjRj
|
14
|
+
ZGNkY2ExNTJlNjk3YTg0YTM2ZWIwNTNhNWNlMTM3YzlkZDAzMWFjZGVhM2M4
|
15
|
+
Mzk3YTA1YjRmZjE2NzcwYjA0OWNiOGFlMDRkYzc0MTgyZDIyM2I=
|
data/README.md
CHANGED
@@ -17,7 +17,13 @@ Wait methods take a block that returns `true` or `false`.
|
|
17
17
|
|
18
18
|
#### Waiting for conditions
|
19
19
|
|
20
|
-
|
20
|
+
[`wait_for_condition`](http://rubytools.github.io/waitutil/WaitUtil.html#wait_for_condition-instance_method)
|
21
|
+
waits for a condition computed by the given function. It takes two optional
|
22
|
+
parameters, `:timeout_sec` and `:delay_sec`, that control how long the function
|
23
|
+
waits before raising a timeout exception, and how frequently it checks for the
|
24
|
+
condition. The time the condition block takes to evaluate is subtracted from
|
25
|
+
the sleep time between successive checks. The timeout is one minute by
|
26
|
+
default, and the delay time is one second.
|
21
27
|
|
22
28
|
```ruby
|
23
29
|
WaitUtil.wait_for_condition("my_event to happen") do
|
@@ -69,7 +75,7 @@ WaitUtil::TimeoutError: Timed out waiting for my event (3 seconds elapsed): atte
|
|
69
75
|
|
70
76
|
#### Waiting for service availability
|
71
77
|
|
72
|
-
Wait for a TCP server to be available using [wait_for_service](http://rubytools.github.io/waitutil/WaitUtil.html#wait_for_service-instance_method):
|
78
|
+
Wait for a TCP server to be available using [`wait_for_service`](http://rubytools.github.io/waitutil/WaitUtil.html#wait_for_service-instance_method):
|
73
79
|
|
74
80
|
```ruby
|
75
81
|
WaitUtil.wait_for_service('my service', 'example.com', 80)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/lib/waitutil.rb
CHANGED
metadata
CHANGED
@@ -1,71 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: waitutil
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikhail Bautin
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
15
|
-
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '10.1'
|
20
|
-
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
21
23
|
requirements:
|
22
24
|
- - ~>
|
23
25
|
- !ruby/object:Gem::Version
|
24
26
|
version: '10.1'
|
25
|
-
prerelease: false
|
26
|
-
type: :development
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
|
-
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '2.14'
|
34
|
-
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
35
37
|
requirements:
|
36
38
|
- - ~>
|
37
39
|
- !ruby/object:Gem::Version
|
38
40
|
version: '2.14'
|
39
|
-
prerelease: false
|
40
|
-
type: :development
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rubygems-tasks
|
43
|
-
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0.2'
|
48
|
-
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
49
51
|
requirements:
|
50
52
|
- - ~>
|
51
53
|
- !ruby/object:Gem::Version
|
52
54
|
version: '0.2'
|
53
|
-
prerelease: false
|
54
|
-
type: :development
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: webrick
|
57
|
-
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - '>='
|
59
|
+
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
|
-
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
63
65
|
requirements:
|
64
|
-
- - '>='
|
66
|
+
- - ! '>='
|
65
67
|
- !ruby/object:Gem::Version
|
66
68
|
version: '0'
|
67
|
-
prerelease: false
|
68
|
-
type: :development
|
69
69
|
description: Utilities for waiting for various conditions
|
70
70
|
email:
|
71
71
|
- mbautin@gmail.com
|
@@ -88,24 +88,26 @@ files:
|
|
88
88
|
homepage: http://github.com/rubytools/waitutil
|
89
89
|
licenses: []
|
90
90
|
metadata: {}
|
91
|
-
post_install_message:
|
91
|
+
post_install_message:
|
92
92
|
rdoc_options: []
|
93
93
|
require_paths:
|
94
94
|
- lib
|
95
95
|
required_ruby_version: !ruby/object:Gem::Requirement
|
96
96
|
requirements:
|
97
|
-
- - '>='
|
97
|
+
- - ! '>='
|
98
98
|
- !ruby/object:Gem::Version
|
99
99
|
version: '0'
|
100
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- - '>='
|
102
|
+
- - ! '>='
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
|
-
rubyforge_project:
|
107
|
-
rubygems_version: 2.
|
108
|
-
signing_key:
|
106
|
+
rubyforge_project:
|
107
|
+
rubygems_version: 2.1.11
|
108
|
+
signing_key:
|
109
109
|
specification_version: 4
|
110
110
|
summary: Utilities for waiting for various conditions
|
111
|
-
test_files:
|
111
|
+
test_files:
|
112
|
+
- spec/Rakefile
|
113
|
+
- spec/waitutil_spec.rb
|