http-double 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/http_double/base.rb +6 -1
- data/lib/http_double/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c1c07596cec503a5d2db0421d0a8630dbdb50f8
|
4
|
+
data.tar.gz: 074467290034146de3d24cbf31060456119fc853
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f644198cd3e11f439c0d06c7910540eff86673faf3b3aa1e5da204631daf37f87f47d999e6d748d29c1e83045df8f34d99886e1585bedd833805facfb843e16
|
7
|
+
data.tar.gz: cc642c0fc8869f31a6c2a018c4562f52653d042ddeb71cb52d2c83c555a1fbec906a2436e727b3cf60df12546e8e46350cab00c6f349af874ecf2dd5882cbc78
|
data/lib/http_double/base.rb
CHANGED
@@ -7,8 +7,13 @@ module HttpDouble
|
|
7
7
|
|
8
8
|
class << self
|
9
9
|
|
10
|
+
def use_app(klass)
|
11
|
+
@app_class = klass
|
12
|
+
end
|
13
|
+
|
10
14
|
def foreground(addr, port, log_path: '/dev/null', logger: nil)
|
11
15
|
server_class = self
|
16
|
+
app_class = @app_class || server_class
|
12
17
|
|
13
18
|
# Even if we use /dev/null, we need a logger to suppress warnings
|
14
19
|
# generated by Thin::Logging#trace_logger being undefined
|
@@ -17,7 +22,7 @@ module HttpDouble
|
|
17
22
|
|
18
23
|
Thin::Server.start(addr, port) do
|
19
24
|
use RequestLogger, server_class.log
|
20
|
-
run
|
25
|
+
run app_class
|
21
26
|
end
|
22
27
|
|
23
28
|
end
|
data/lib/http_double/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http-double
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neil E. Pearson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
@@ -161,3 +161,4 @@ signing_key:
|
|
161
161
|
specification_version: 4
|
162
162
|
summary: Sinatra-based HTTP test doubling
|
163
163
|
test_files: []
|
164
|
+
has_rdoc:
|