waitforit 0.0.1.pre10 → 0.0.1.pre11
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 +4 -0
- data/waitforit.gemspec +2 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.1.
|
1
|
+
0.0.1.pre11
|
data/lib/waitforit.rb
CHANGED
@@ -31,7 +31,7 @@ def wait_until opts={}
|
|
31
31
|
opts = {:timeout_after => 5.seconds,:retry_every => 0.1.seconds}.merge(opts)
|
32
32
|
start_time = Time.now
|
33
33
|
until Time.now > start_time + opts[:timeout_after]
|
34
|
-
return if yield == true
|
34
|
+
return true if yield == true
|
35
35
|
sleep opts[:retry_every]
|
36
36
|
end
|
37
37
|
raise RuntimeError, "Action took to long"
|
data/spec/waitforit_spec.rb
CHANGED
data/waitforit.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{waitforit}
|
8
|
-
s.version = "0.0.1.
|
8
|
+
s.version = "0.0.1.pre11"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["lashd"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-09-13}
|
13
13
|
s.description = %q{Tired of sleeping when something is supposed to happen? use this to waitforit instead :)}
|
14
14
|
s.email = %q{leon_a_d@yahoo.com}
|
15
15
|
s.extra_rdoc_files = [
|
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.pre11
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- lashd
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-09-13 00:00:00 +01:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -67,7 +67,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
67
67
|
requirements:
|
68
68
|
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
hash:
|
70
|
+
hash: -4590235768752154721
|
71
71
|
segments:
|
72
72
|
- 0
|
73
73
|
version: "0"
|