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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1658a9ed204156a7f61cd7799d5c12394bbb3d44
4
- data.tar.gz: 25a71de1ce9365e1a90440e89eedbb9798b7ec19
3
+ metadata.gz: 49dbfe366330961123afa18c4dfd54b4577bb01a
4
+ data.tar.gz: ecc7902329f4ed52d782e6b313476d0b4dbd5d7b
5
5
  SHA512:
6
- metadata.gz: 3ee2b0dac09422840ff6502cb61f723a132ce92d561ac272596a441fc900d1dd1448703cb6d758a4b07036610a2969a72b732386a06c9c7edb2592c2d1da4fec
7
- data.tar.gz: fdb056755c01ff438db6439c7c1587327a727295703c5d8120882113b23b9c4d9c35d99e613a29acd47356426a31f4c92b781698dc02b11914e32a83efa66744
6
+ metadata.gz: ea3b5f77d465743946754159bfc6409239daee58869e87ab2dd31a387cf51dec1a4d22114321e78c32f8616a9143168ed9f601a31fa20ad4f54e4905ad530ba3
7
+ data.tar.gz: 016a6b3629465f0b33908115e4cae40c175871436295eb8845fdbfc7eed04740969b6a9ed2b86b7c46fcb836469aa406458d1d193d66af22bf374c873409138d
@@ -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
@@ -1,3 +1,3 @@
1
1
  module HttpDouble
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http-double
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neil E. Pearson