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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b13c60b6bb291cff68bbc82a3b5732ef01c4d5eb
4
- data.tar.gz: e7f26befca1a1a3495d3007415d225482c840df9
3
+ metadata.gz: 2c1c07596cec503a5d2db0421d0a8630dbdb50f8
4
+ data.tar.gz: 074467290034146de3d24cbf31060456119fc853
5
5
  SHA512:
6
- metadata.gz: 394c095214155d902d9efa4f20e74022285e1573c5e4337b35934c28da2c52ae5f9543eea0b30684cb4dcbbb5d6f5102a005cbb707cdcd68799f5a93b39b4de8
7
- data.tar.gz: b7e400222be3412194d82ac62f515323473019002d5c585bf1d16b4bf5feaf03b66c1d7b67bd8e8be231de20331854ff4deeb83567fb69a21ac90f556b3642f2
6
+ metadata.gz: 3f644198cd3e11f439c0d06c7910540eff86673faf3b3aa1e5da204631daf37f87f47d999e6d748d29c1e83045df8f34d99886e1585bedd833805facfb843e16
7
+ data.tar.gz: cc642c0fc8869f31a6c2a018c4562f52653d042ddeb71cb52d2c83c555a1fbec906a2436e727b3cf60df12546e8e46350cab00c6f349af874ecf2dd5882cbc78
@@ -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 server_class
25
+ run app_class
21
26
  end
22
27
 
23
28
  end
@@ -1,3 +1,3 @@
1
1
  module HttpDouble
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
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.6
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-13 00:00:00.000000000 Z
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: