fakettp 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -33,12 +33,16 @@ You can install FakeTTP anywhere that your web server user can see it:
33
33
 
34
34
  fakettp install <directory> <hostname>
35
35
 
36
- Set _hostname_ to the host you want to use for FakeTTP control requests (the
37
- examples below use <tt>fakettp.local</tt>). You can install multiple copies
36
+ Set _hostname_ to the host you want to use for FakeTTP control requests
37
+
38
+ You can install multiple copies
38
39
  and run them independently by using different directories and hostnames (for
39
40
  example on a CI server to prevent clashes when building multiple projects
40
41
  in parallel).
41
42
 
43
+ The examples below assume that all fakettp hostnames end with
44
+ <tt>fakettp.local</tt>.
45
+
42
46
  === Point your web server at the directory
43
47
 
44
48
  FakeTTP should work with any Rack-compatible server: just point the server to
@@ -47,6 +51,8 @@ the correct directory. For example, using Passenger[http://www.modrails.com/]
47
51
 
48
52
  <VirtualHost *:80>
49
53
  ServerName fakettp.local
54
+ ServerAlias *.fakettp.local
55
+ ServerAlias *.fake.local
50
56
  DocumentRoot "/path/to/fakettp/public"
51
57
  <directory "/path/to/fakettp/public">
52
58
  Order deny,allow
@@ -55,11 +61,16 @@ the correct directory. For example, using Passenger[http://www.modrails.com/]
55
61
  </directory>
56
62
  </VirtualHost>
57
63
 
58
- Then make sure <tt>fakettp.local</tt> resolves to 127.0.0.1 (assuming you're
64
+ This will make FakeTTP handle requests to any hosts ending with
65
+ <tt>.fake.local</tt>. If you want to simulate other hosts, add more aliases.
66
+
67
+ Now make sure <tt>fakettp.local</tt> and any simulated hosts resolve to
68
+ 127.0.0.1 (assuming you're
59
69
  running the simulator on the same machine as the application under test), eg
60
70
  by adding the following line to <tt>/etc/hosts</tt>:
61
71
 
62
72
  127.0.0.1 fakettp.local
73
+ 127.0.0.1 some-app.fake.local
63
74
 
64
75
  === IMPORTANT: security note
65
76
 
@@ -131,14 +142,6 @@ Point your browser at http://fakettp.local/
131
142
 
132
143
  Currently this is very basic, just showing the expectations from the last run.
133
144
 
134
- === Multiple faked hosts
135
-
136
- To have FakeTTP respond to multiple hostnames, create the appropriate hosts
137
- entries. If you're using name-based virtual hosts in Apache, add a
138
- _ServerAlias_ entry to the virtual host config, under the _ServerName_ line, eg:
139
-
140
- ServerAlias foo.com bar.com
141
-
142
145
  == Change log
143
146
 
144
147
  0.3.0 (18 May 2009)
@@ -199,3 +202,4 @@ expectation, and just put the return value on the last line of the _expect_ bloc
199
202
  * Provide Ruby API to set expectations etc
200
203
  * Return the expected content type even if expectation fails
201
204
  * Highlight failed lines in console
205
+ * Remove require of rubygems from db.rb
data/Rakefile CHANGED
@@ -15,8 +15,9 @@ begin
15
15
  gem.email = "kerryjbuckley@gmail.com"
16
16
  gem.homepage = "http://github.com/kerryb/fakettp"
17
17
  gem.authors = ["Kerry Buckley"]
18
- gem.add_dependency 'sinatra-sinatra'
18
+ gem.add_dependency 'sinatra-sinatra', '>=0.10.1'
19
19
  gem.add_dependency 'sqlite3-ruby'
20
+ gem.add_dependency 'activerecord'
20
21
  gem.add_development_dependency 'jeweler'
21
22
  gem.add_development_dependency 'rcov'
22
23
  gem.add_development_dependency "rspec"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
data/bin/fakettp CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  require 'fakettp/commands/fakettp_command'
4
4
 
5
- exit Fakettp::Commands::FakettpCommand.new(ARGV).run
5
+ Fakettp::Commands::FakettpCommand.new(ARGV).run
data/lib/fakettp/db.rb CHANGED
@@ -1,3 +1,6 @@
1
+ # TODO: this is evil, but I can't get it to work without.
2
+ # http://gist.github.com/54177
3
+ require 'rubygems'
1
4
  require 'activerecord'
2
5
 
3
6
  RAILS_ROOT = FAKETTP_BASE
data/lib/fakettp.rb CHANGED
@@ -1,3 +1,2 @@
1
- $LOAD_PATH << File.dirname(__FILE__)
2
1
  require 'fakettp/controller'
3
- require 'fakettp/commands/fakettp_command'
2
+ require 'fakettp/commands/fakettp_command'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fakettp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kerry Buckley
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: "0"
23
+ version: 0.10.1
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sqlite3-ruby
@@ -32,6 +32,16 @@ dependencies:
32
32
  - !ruby/object:Gem::Version
33
33
  version: "0"
34
34
  version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: activerecord
37
+ type: :runtime
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "0"
44
+ version:
35
45
  - !ruby/object:Gem::Dependency
36
46
  name: jeweler
37
47
  type: :development