derfred-httpstub 0.1 → 0.1.0.0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/webrick_monkey_patch.rb +11 -0
  2. metadata +2 -1
@@ -0,0 +1,11 @@
1
+ module WEBrick
2
+ class HTTPServer
3
+
4
+ attr_reader :virtual_hosts
5
+
6
+ def server_for_port(port)
7
+ @virtual_hosts.find { |s| s[:Port] == port }
8
+ end
9
+
10
+ end
11
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: derfred-httpstub
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.1"
4
+ version: 0.1.0.0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frederik Fix
@@ -26,6 +26,7 @@ files:
26
26
  - lib/httpstub.rb
27
27
  - lib/httpstubservlet.rb
28
28
  - lib/httpstubserver.rb
29
+ - lib/webrick_monkey_patch.rb
29
30
  has_rdoc: true
30
31
  homepage: http://github.com/derfred/httpstub
31
32
  post_install_message: