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 CHANGED
@@ -54,6 +54,10 @@
54
54
  <p>To have FakeTTP respond to multiple hostnames, create the appropriate hosts entries. If you&#8217;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&#8217;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&#8217;t received</li>
@@ -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"
@@ -48,7 +48,7 @@ module Fakettp
48
48
  end
49
49
 
50
50
  def self.files
51
- Dir.entries(EXPECTATION_DIR) - ['.', '..']
51
+ (Dir.entries(EXPECTATION_DIR) - ['.', '..']).sort
52
52
  end
53
53
 
54
54
  private_class_method :next_file_to_create, :next_file_to_read, :files
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.1
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-17 00:00:00 -07:00
12
+ date: 2009-03-19 00:00:00 -07:00
13
13
  default_executable: fakettp
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency