coruro-ruby 0.4.0 → 0.5.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71a5d3e1787f47c033936119a26d2c6527396ea5e746094629c0c5a5c5a99a6f
4
- data.tar.gz: 33dcd558ba6801a828c529c4d2225c1d10019ab9400e5150a72aebb4e604f3a5
3
+ metadata.gz: 71d204be90e212c0d424b02666b5ce2d36210a6f201c3c435057daa0a2ca111e
4
+ data.tar.gz: c0363f1f25d724503bd0bbf645f8b9d657e8f8b9570652616aacbee92cf05c93
5
5
  SHA512:
6
- metadata.gz: 2545fdeb45d13a95cf5d55a1066fdbe7202e28b23a09e11eddc5cb438997dce3cbe33444ad3607a04ad5bfb670d843e1ddfa84e3e7e4f469da523dd93e9e7f20
7
- data.tar.gz: 7b65f398522715dfeba93789a47b1c268e4c48aa6e228c114679bfb24f0702718e996387049821dce43b5f1446eb255b7339f87172ca388306ed01789b26d677
6
+ metadata.gz: 4d02e9549d3336f1f37bf8a369b93eedae6cedc6f66ed0752944a2e162213d6b4c795d510b42198b275176d09757e266faa6995afe950aeeb881195ca9a111ab
7
+ data.tar.gz: 12ad3ace46fad696d1b7993d60235550e65dea1f82bda27638908b5393f1e766815968589a66840cbdfb724030718e1837ff4b3fa5228f55dd3fffb9fb1a287b
@@ -41,7 +41,7 @@ class Coruro
41
41
 
42
42
  def where(to: nil, from: nil, subject: nil)
43
43
  result = []; start_time = Time.now.to_f
44
- while (result.empty? || (Time.now.to_f - start_time) <= timeout)
44
+ while (result.empty? && (Time.now.to_f - start_time) <= timeout)
45
45
  result = messages.select do |message|
46
46
  match?(to, message[:recipients]) ||
47
47
  match?(from, message[:sender]) ||
@@ -1,3 +1,3 @@
1
1
  class Coruro
2
- VERSION="0.4.0"
2
+ VERSION="0.5.0"
3
3
  end
data/lib/coruro.rb CHANGED
@@ -11,7 +11,7 @@ class Coruro
11
11
  extend Forwardable
12
12
  def_delegators :adapter, :all, :where, :stop
13
13
 
14
- def initialize(adapter:, on_wait_tick: -> (count) { }, timeout: 0.1, adapter_config: {})
14
+ def initialize(adapter:, on_wait_tick: -> (count) { }, timeout: 1.0, adapter_config: {})
15
15
  case adapter
16
16
  when :mailcatcher
17
17
  self.adapter = MailcatcherAdapter.new(timeout: timeout, config: adapter_config)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coruro-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zee Spencer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-15 00:00:00.000000000 Z
11
+ date: 2018-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mail