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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a5c68a76d714894ee9485a1b5ac4912796483a0f
4
- data.tar.gz: 0e2f8e3181b35e07be9db356b98fff21bc48cc1a
2
+ SHA256:
3
+ metadata.gz: 21295e355c94da1d98f116ab4b2fcbc8333aded4815baf0b306c4e3bc73bf812
4
+ data.tar.gz: ce5bdfb78017a0763a82773ef5a500eb4be08262c38da85aacd2dc712b37f2a2
5
5
  SHA512:
6
- metadata.gz: 206d00e29b59bda409e945970a93d7ba81b84337297c40f0e4adbd956830cf79615e1ff3dd00fdfeb4590b84e1120c3e3bdb3ea237e7263e5043045e843d68ac
7
- data.tar.gz: d49ed27c88ae9885dbfa8d0689d9696ce37a2647980dfe5ef6633422e64848bd6479764b06f2a81562711a18fe13f74dc8c2d1c1824e5e965c18ac0deaaf2082
6
+ metadata.gz: 9be7291d9d3fb48a7d9ce72b64c0d96138cc4ba81b3c42f7392fd977d1a24fb8f581aa4597fe9e44ed0890bfafb171b54ad8e3d41331971a32e19a83bc431d04
7
+ data.tar.gz: bbfa71fb064e75178030e54a2e6c1dc181f0572d7334def55dabe601bdc831468cba9af760933abef407cda19ca9b9b70e02797cb559018d99914aed9d83b90c
@@ -28,18 +28,16 @@ module WaitUntil
28
28
  private
29
29
 
30
30
  def true?(&block)
31
- begin
32
- !!block.call
33
- rescue => error
34
- @last_error = error
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 if is_timed_out
40
+ @on_failure.call if @on_failure && is_timed_out
43
41
  is_timed_out
44
42
  end
45
43
 
@@ -1,3 +1,3 @@
1
1
  module WaitUntil
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1".freeze
3
3
  end
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.0
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: 2016-04-18 00:00:00.000000000 Z
11
+ date: 2019-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: travis-lint
14
+ name: rubocop
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
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: '2.0'
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.4'
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.4'
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: '11.1'
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: '11.1'
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.11'
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.11'
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: 1.9.3
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
- rubyforge_project: wait_until
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/lib/wait_until/operation_spec.rb"
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/spec_helper.rb"
125
+ - "./spec/lib/wait_until/operation_spec.rb"