fake_sns 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fake_sns/test_integration.rb +10 -5
- data/lib/fake_sns/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b861362c289a1a7af6b1dd8ed47872649f7ef1da
|
4
|
+
data.tar.gz: 7b6df23053532af553969b5361283bee879a1bd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 569e6d605977f0ffaf5fb17fc71a4ba1ad4eb36b27ffc3844a916fa075ee500ee0887f4bd9d3f02dbc7d0dde2d5960166cc9d3b2691db28c8e8d37c36fb56673
|
7
|
+
data.tar.gz: 9426de77b344c2553a915dcac25230bdd3234dd8670a813b48b6bf59e5952f9a42900cd0bc145289b0f4b0c56249f649a624bff10d3737208fce4483f0523d57
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require "faraday"
|
2
|
+
require "timeout"
|
2
3
|
|
3
4
|
module FakeSNS
|
4
5
|
class TestIntegration
|
@@ -9,6 +10,10 @@ module FakeSNS
|
|
9
10
|
@options = options
|
10
11
|
end
|
11
12
|
|
13
|
+
def startup_timeout
|
14
|
+
options.fetch(:startup_timeout) { 5 }
|
15
|
+
end
|
16
|
+
|
12
17
|
def host
|
13
18
|
option :sns_endpoint
|
14
19
|
end
|
@@ -82,12 +87,12 @@ module FakeSNS
|
|
82
87
|
end
|
83
88
|
|
84
89
|
|
85
|
-
def wait_until_up
|
86
|
-
|
87
|
-
|
88
|
-
sleep 0.1
|
89
|
-
wait_until_up(deadline)
|
90
|
+
def wait_until_up
|
91
|
+
Timeout.timeout startup_timeout do
|
92
|
+
sleep 0.1 until up?
|
90
93
|
end
|
94
|
+
rescue Timeout::Error
|
95
|
+
fail "FakeSNS didn't start in time (timeout is #{startup_timeout} seconds)"
|
91
96
|
end
|
92
97
|
|
93
98
|
def binfile
|
data/lib/fake_sns/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fake_sns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- iain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|