kerryb-fakettp 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.html +4 -1
- data/lib/fakettp/controller.rb +3 -3
- data/lib/fakettp/expectation.rb +1 -1
- metadata +2 -2
data/README.html
CHANGED
@@ -54,6 +54,10 @@
|
|
54
54
|
<p>To have FakeTTP respond to multiple hostnames, create the appropriate hosts entries. If you’re using name-based virtual hosts in Apache, add a <em>ServerAlias</em> entry to the virtual host config, under the <em>ServerName</em> line, eg:</p>
|
55
55
|
<p><code>ServerAlias foo.com bar.com</code></p>
|
56
56
|
<h2>Change log</h2>
|
57
|
+
<p>0.2.2 (18 Mar 2009)</p>
|
58
|
+
<ul>
|
59
|
+
<li>Only accept control requests (reset, expect, verify) on fakettp.local</li>
|
60
|
+
</ul>
|
57
61
|
<p>0.2.1 (17 Mar 2009)</p>
|
58
62
|
<ul>
|
59
63
|
<li>Fixed issue where rspec matchers weren’t available to expectations</li>
|
@@ -78,7 +82,6 @@
|
|
78
82
|
<h2>To Do</h2>
|
79
83
|
<ul>
|
80
84
|
<li>Add examples</li>
|
81
|
-
<li>Only respond to control requests (reset/expect/verify) on main hostname</li>
|
82
85
|
<li>Make control requests RESTful?</li>
|
83
86
|
<li>Make main hostname configurable?</li>
|
84
87
|
<li>Show label in verification error for expected requests that weren’t received</li>
|
data/lib/fakettp/controller.rb
CHANGED
@@ -9,19 +9,19 @@ require 'fakettp/expectation'
|
|
9
9
|
|
10
10
|
include Fakettp::ExpectationHelper
|
11
11
|
|
12
|
-
post '/expect' do
|
12
|
+
post '/expect', :host => 'fakettp.local' do
|
13
13
|
Fakettp::Simulator << request.body.read
|
14
14
|
content_type 'text/plain'
|
15
15
|
"Expect OK\n"
|
16
16
|
end
|
17
17
|
|
18
|
-
post '/reset' do
|
18
|
+
post '/reset', :host => 'fakettp.local' do
|
19
19
|
Fakettp::Simulator.reset
|
20
20
|
content_type 'text/plain'
|
21
21
|
"Reset OK\n"
|
22
22
|
end
|
23
23
|
|
24
|
-
get '/verify' do
|
24
|
+
get '/verify', :host => 'fakettp.local' do
|
25
25
|
content_type 'text/plain'
|
26
26
|
if Fakettp::Simulator.verify
|
27
27
|
"Verify OK\n"
|
data/lib/fakettp/expectation.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kerryb-fakettp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kerry Buckley
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-03-
|
12
|
+
date: 2009-03-19 00:00:00 -07:00
|
13
13
|
default_executable: fakettp
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|