coruro-ruby 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/coruro/mailcatcher_adapter.rb +1 -1
- data/lib/coruro/version.rb +1 -1
- data/lib/coruro.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71d204be90e212c0d424b02666b5ce2d36210a6f201c3c435057daa0a2ca111e
|
4
|
+
data.tar.gz: c0363f1f25d724503bd0bbf645f8b9d657e8f8b9570652616aacbee92cf05c93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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?
|
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]) ||
|
data/lib/coruro/version.rb
CHANGED
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
|
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
|
+
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-
|
11
|
+
date: 2018-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mail
|