http-mock-server 0.1.2 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -0
- data/lib/http-mock-server.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dae1ac5e29006cabd735aefbbaf243d6b20c84e3
|
4
|
+
data.tar.gz: e0ca780edfcdf556f3515670127c631273584af2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8b8a5b7582a1adb5852200e42f14bff54405e440e5bf4f3406725032c3e6c2b94882e4f0523bdfe5ac30225c78aad3bbaa311649292aa40c4825bff3bba7620
|
7
|
+
data.tar.gz: 04dfc86943b1e959a4bdc9ae34b71169af423335f50f3eb75419280f516599dc1f875966235327900014ae1286b7591bb1579c2585d74957d3f093d866968cb9
|
data/README.md
CHANGED
@@ -44,6 +44,20 @@ routes:
|
|
44
44
|
request: Post id {params[:id]} - request path {request.path}
|
45
45
|
more:
|
46
46
|
is_first: "conditional check {params[:id] == '1' ? 'first' : 'other'}"
|
47
|
+
an_array:
|
48
|
+
- me
|
49
|
+
- myself
|
50
|
+
- I
|
51
|
+
an_array2:
|
52
|
+
-
|
53
|
+
name: me
|
54
|
+
age: 20
|
55
|
+
-
|
56
|
+
name: myself
|
57
|
+
age: 30
|
58
|
+
-
|
59
|
+
name: I
|
60
|
+
age: 40
|
47
61
|
-
|
48
62
|
get: '/pry'
|
49
63
|
body:
|
data/lib/http-mock-server.rb
CHANGED
@@ -105,10 +105,10 @@ class HttpMockServer < Sinatra::Base
|
|
105
105
|
|
106
106
|
def traverse!( hash )
|
107
107
|
hash.each do |k, v|
|
108
|
-
if v.is_a?(Hash)
|
108
|
+
if v.is_a?(Hash) || v.is_a?(Array)
|
109
109
|
traverse! v
|
110
110
|
else
|
111
|
-
hash[k] = interpolate v
|
111
|
+
hash[k] = interpolate v if v
|
112
112
|
end
|
113
113
|
end
|
114
114
|
end
|