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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +14 -0
  3. data/lib/http-mock-server.rb +2 -2
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 110e2a7871cb0e74b6f8fec9fb8e485624eb2352
4
- data.tar.gz: 135d9cb6d537ef0e24b48ad7a3340ea653563925
3
+ metadata.gz: dae1ac5e29006cabd735aefbbaf243d6b20c84e3
4
+ data.tar.gz: e0ca780edfcdf556f3515670127c631273584af2
5
5
  SHA512:
6
- metadata.gz: e5ca95bb3fadc757e69c814e1be01d5d01fcc543d84073bd7f01cc64446c45b43ced75e32742ea2c7b86b7e5532604694c7d30bd575e5bb1c6a17cccb726ac5e
7
- data.tar.gz: c9adf8da5670b10d9de7dee73f7559590f917bd76b0aeb9094a6ca1360a312a73045b0caa7b7c6d0bad98cd723327c2a644a0dffaa1c32681410f5a7176462da
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:
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http-mock-server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mattia Roccoberton