waitforit 0.0.1.pre2 → 0.0.1.pre3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/waitforit.rb +1 -1
- data/spec/waitforit_spec.rb +1 -1
- data/waitforit.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.1.
|
1
|
+
0.0.1.pre3
|
data/lib/waitforit.rb
CHANGED
@@ -12,7 +12,7 @@ class Fixnum
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def wait_until opts={}
|
15
|
-
opts = {:timeout_after =>
|
15
|
+
opts = {:timeout_after => 5.seconds,:retry_every => 0.1.seconds}.merge(opts)
|
16
16
|
start_time = Time.now
|
17
17
|
until Time.now > start_time + opts[:timeout_after]
|
18
18
|
return if yield == true
|
data/spec/waitforit_spec.rb
CHANGED
@@ -11,7 +11,7 @@ describe 'waitforit' do
|
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should throw an exception if when the prescribed action does not happen in time' do
|
14
|
-
expect { wait_until { false } }.to raise_error RuntimeError
|
14
|
+
expect { wait_until(:timeout_after => 1.second) { false } }.to raise_error RuntimeError
|
15
15
|
end
|
16
16
|
|
17
17
|
it 'should keep trying for a specified period' do
|
data/waitforit.gemspec
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: waitforit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease: 6
|
5
|
-
version: 0.0.1.
|
5
|
+
version: 0.0.1.pre3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- lashd
|
@@ -78,7 +78,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
78
78
|
requirements:
|
79
79
|
- - ">="
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
hash:
|
81
|
+
hash: -2510664357160944603
|
82
82
|
segments:
|
83
83
|
- 0
|
84
84
|
version: "0"
|