holdon 0.1.1 → 0.1.2

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.
Files changed (3) hide show
  1. checksums.yaml +5 -13
  2. data/lib/holdon.rb +7 -0
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZWEzMDI2NDMzN2MwYjU4ZDYxZmRmNTEzNDg0NDFmMThkM2Y4ZGY3Ng==
5
- data.tar.gz: !binary |-
6
- OTljMDY0ODAzZTg5YjVlYmMwYzI0ZjQzZWQwNjMzZTMzMTZjODQxMw==
2
+ SHA1:
3
+ metadata.gz: f5f83fe4bbab6dee13e541d24541794117099e9d
4
+ data.tar.gz: 7027f5cdb73faab93ef436e141ed698c8393c6c7
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- ZGQ1MmVjNTllZTk2NzA2ODZkYjcxNWYyZTZhMTVhZDZiNTZlYWQzZjViN2Yy
10
- MWIyMjlmZTAzMmJjYzQ3NzhhNmJlZDY3MzEzNjYwOTdmMGY0NmVkZTliYTli
11
- YTYwZDQzZDRiZTAyM2Q4YjM4OGZkMzkzMzMwOGVhNWJlNjkwYzg=
12
- data.tar.gz: !binary |-
13
- NDhkYzE2NGQyZGZmNjA3ZDI4ZjJiODY4NDIwZWI2ZGE3MzJkY2VkOGQ0Zjk4
14
- ODE4YzdmYmI4ODk2Mjg4YmZkMTQ4ODY4MjY3ZTM0YjQ5MmFjYWY2YTA2YjEx
15
- OTIwYWFjMmU2OWIxNTRlNDM5MDczY2Q3M2ZkZDMxN2M0NGZmZmQ=
6
+ metadata.gz: dfff215ed5c62cdf7c91c9d8f94152b9f633f4c1d625aa7444ebf9abc617f436757e4e03efb619711c360ba3a16dddffd235ff88511f392d0520197e7477fd4e
7
+ data.tar.gz: eb646f533dc57347bbf32c87915ad73493bfee3e2852c12909024a55fb1ed74cc77abf07eb6aab32e85cc4b58912c729393651f0af42e05d9f1c91d3095031a0
@@ -13,6 +13,13 @@ module HoldOn
13
13
  end
14
14
 
15
15
 
16
+ def self.while(options = {}, &block)
17
+ self.breaker(options) do
18
+ result = yield
19
+ break result unless result
20
+ end
21
+ end
22
+
16
23
 
17
24
  def self.breaker(options = {})
18
25
  timeout = options.fetch(:timeout, 30)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: holdon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Lauber
@@ -27,17 +27,17 @@ require_paths:
27
27
  - lib
28
28
  required_ruby_version: !ruby/object:Gem::Requirement
29
29
  requirements:
30
- - - ! '>='
30
+ - - '>='
31
31
  - !ruby/object:Gem::Version
32
32
  version: '0'
33
33
  required_rubygems_version: !ruby/object:Gem::Requirement
34
34
  requirements:
35
- - - ! '>='
35
+ - - '>='
36
36
  - !ruby/object:Gem::Version
37
37
  version: '0'
38
38
  requirements: []
39
39
  rubyforge_project:
40
- rubygems_version: 2.1.10
40
+ rubygems_version: 2.0.3
41
41
  signing_key:
42
42
  specification_version: 4
43
43
  summary: HoldOn until a condition is true