mimic 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +4 -0
- data/Rakefile +1 -1
- data/lib/mimic/api.rb +2 -1
- data/lib/mimic/fake_host.rb +10 -8
- metadata +3 -3
data/CHANGES
CHANGED
data/Rakefile
CHANGED
@@ -27,7 +27,7 @@ spec = Gem::Specification.new do |s|
|
|
27
27
|
|
28
28
|
# Change these as appropriate
|
29
29
|
s.name = "mimic"
|
30
|
-
s.version = "0.4.
|
30
|
+
s.version = "0.4.1"
|
31
31
|
s.summary = "A Ruby gem for faking external web services for testing"
|
32
32
|
s.authors = "Luke Redpath"
|
33
33
|
s.email = "luke@lukeredpath.co.uk"
|
data/lib/mimic/api.rb
CHANGED
data/lib/mimic/fake_host.rb
CHANGED
@@ -7,14 +7,8 @@ module Mimic
|
|
7
7
|
|
8
8
|
def initialize(hostname, remote_configuration_path = nil)
|
9
9
|
@hostname = hostname
|
10
|
-
@stubs = []
|
11
|
-
@app = Class.new(Sinatra::Base)
|
12
10
|
@remote_configuration_path = remote_configuration_path
|
13
|
-
|
14
|
-
@app.not_found do
|
15
|
-
[404, {}, ""]
|
16
|
-
end
|
17
|
-
|
11
|
+
clear
|
18
12
|
build_url_map!
|
19
13
|
end
|
20
14
|
|
@@ -50,7 +44,15 @@ module Mimic
|
|
50
44
|
end
|
51
45
|
|
52
46
|
def clear
|
53
|
-
@stubs
|
47
|
+
@stubs = []
|
48
|
+
@app = Class.new(Sinatra::Base)
|
49
|
+
@app.not_found do
|
50
|
+
[404, {}, ""]
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def inspect
|
55
|
+
@stubs.inspect
|
54
56
|
end
|
55
57
|
|
56
58
|
private
|
metadata
CHANGED