http-double 0.1.1 → 0.1.2
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 +2 -2
- data/lib/http_double/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49dbfe366330961123afa18c4dfd54b4577bb01a
|
4
|
+
data.tar.gz: ecc7902329f4ed52d782e6b313476d0b4dbd5d7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea3b5f77d465743946754159bfc6409239daee58869e87ab2dd31a387cf51dec1a4d22114321e78c32f8616a9143168ed9f601a31fa20ad4f54e4905ad530ba3
|
7
|
+
data.tar.gz: 016a6b3629465f0b33908115e4cae40c175871436295eb8845fdbfc7eed04740969b6a9ed2b86b7c46fcb836469aa406458d1d193d66af22bf374c873409138d
|
data/lib/http_double/base.rb
CHANGED
@@ -5,14 +5,14 @@ module HttpDouble
|
|
5
5
|
|
6
6
|
class << self
|
7
7
|
|
8
|
-
def background(addr, port, log_path: '/dev/null')
|
8
|
+
def background(addr, port, log_path: '/dev/null', logger: nil)
|
9
9
|
server_class = self
|
10
10
|
thread = Thread.new do
|
11
11
|
|
12
12
|
# Even if we use /dev/null, we need a logger to suppress warnings
|
13
13
|
# generated by Thin::Logging#trace_logger being undefined
|
14
14
|
log_stream = File.open(log_path, 'a')
|
15
|
-
Thin::Logging.trace_logger = Logger.new(log_stream)
|
15
|
+
Thin::Logging.trace_logger = logger || Logger.new(log_stream)
|
16
16
|
|
17
17
|
Thin::Server.start(addr, port) do
|
18
18
|
use RequestLogger, server_class.log
|
data/lib/http_double/version.rb
CHANGED