wait_until 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/wait_until/operation.rb +5 -7
- data/lib/wait_until/version.rb +1 -1
- metadata +29 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 21295e355c94da1d98f116ab4b2fcbc8333aded4815baf0b306c4e3bc73bf812
|
4
|
+
data.tar.gz: ce5bdfb78017a0763a82773ef5a500eb4be08262c38da85aacd2dc712b37f2a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9be7291d9d3fb48a7d9ce72b64c0d96138cc4ba81b3c42f7392fd977d1a24fb8f581aa4597fe9e44ed0890bfafb171b54ad8e3d41331971a32e19a83bc431d04
|
7
|
+
data.tar.gz: bbfa71fb064e75178030e54a2e6c1dc181f0572d7334def55dabe601bdc831468cba9af760933abef407cda19ca9b9b70e02797cb559018d99914aed9d83b90c
|
data/lib/wait_until/operation.rb
CHANGED
@@ -28,18 +28,16 @@ module WaitUntil
|
|
28
28
|
private
|
29
29
|
|
30
30
|
def true?(&block)
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
false
|
36
|
-
end
|
31
|
+
!!block.call
|
32
|
+
rescue StandardError => error
|
33
|
+
@last_error = error
|
34
|
+
false
|
37
35
|
end
|
38
36
|
|
39
37
|
def timed_out?
|
40
38
|
elapsed_time = Time.now - @start_time
|
41
39
|
is_timed_out = elapsed_time >= @timeout_in_seconds
|
42
|
-
@on_failure.call if @on_failure
|
40
|
+
@on_failure.call if @on_failure && is_timed_out
|
43
41
|
is_timed_out
|
44
42
|
end
|
45
43
|
|
data/lib/wait_until/version.rb
CHANGED
metadata
CHANGED
@@ -1,71 +1,85 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wait_until
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Ueckerman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rubocop
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0.71'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0.71'
|
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
|
-
version: '3.
|
33
|
+
version: '3.8'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '3.
|
40
|
+
version: '3.8'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '12.3'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '12.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: simplecov
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
61
|
+
version: '0.16'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
68
|
+
version: '0.16'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: travis-lint
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2.0'
|
69
83
|
description: Suspends execution until state changes via ::Wait.until! methods, timing-out
|
70
84
|
after a configured period of time
|
71
85
|
email: matthew.ueckerman@myob.com
|
@@ -93,20 +107,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
93
107
|
requirements:
|
94
108
|
- - ">="
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
110
|
+
version: '2.3'
|
97
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
112
|
requirements:
|
99
113
|
- - ">="
|
100
114
|
- !ruby/object:Gem::Version
|
101
115
|
version: '0'
|
102
116
|
requirements: []
|
103
|
-
|
104
|
-
rubygems_version: 2.4.6
|
117
|
+
rubygems_version: 3.0.4
|
105
118
|
signing_key:
|
106
119
|
specification_version: 4
|
107
120
|
summary: Suspends execution until state changes via ::Wait.until! methods
|
108
121
|
test_files:
|
109
|
-
- "./spec/
|
122
|
+
- "./spec/spec_helper.rb"
|
110
123
|
- "./spec/lib/wait_until/wait_spec.rb"
|
111
124
|
- "./spec/lib/wait_until/wait_until_spec.rb"
|
112
|
-
- "./spec/
|
125
|
+
- "./spec/lib/wait_until/operation_spec.rb"
|