api_sim 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f99417ce6d0d07679847a4fb57b773fc12bbd5fb
|
4
|
+
data.tar.gz: f60a112212248f77d3f8008ae46ad729d50b7d67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6500c40ebe3656365a91d316f587331da42b33a1b9a76aae4aaf026e6279be56a762013a8d3919440c927a14f24b6713bf525cb6cd16261e693c1cd3c6d01f94
|
7
|
+
data.tar.gz: f6654077caf4b6493722a355d5fb228ef012a03e03243bbcddf49c19f9acfd119be52a5ca11713d42db6f1ad1ce86f9f1eaa332a699d62a5db607f60d900752d
|
data/lib/api_sim/version.rb
CHANGED
data/lib/api_sim/view_helpers.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
<% require_relative '../helpers/view_helpers' %>
|
2
1
|
<h2>Simulators</h2>
|
3
2
|
<table>
|
4
3
|
<thead>
|
@@ -14,7 +13,7 @@
|
|
14
13
|
<% endpoints.each do |endpoint| %>
|
15
14
|
<tr>
|
16
15
|
<td><%= endpoint.http_method %> <%= endpoint.route %> <%= custom_matcher?(endpoint) %></td>
|
17
|
-
<td><%=
|
16
|
+
<td><%= endpoint_match endpoint %></td>
|
18
17
|
<td>
|
19
18
|
<% if endpoint.readonly? %>
|
20
19
|
Cannot edit dynamic endpoints
|
@@ -28,7 +27,7 @@
|
|
28
27
|
<td>
|
29
28
|
<form action="/ui/response/<%= endpoint.http_method %><%= endpoint.route %>" method="post">
|
30
29
|
<input type="hidden" value="delete" name="_method">
|
31
|
-
<input type="hidden" value="<%=
|
30
|
+
<input type="hidden" value="<%= endpoint_match endpoint %>" name="match">
|
32
31
|
<button class='btn-link' type="submit">Reset</button>
|
33
32
|
</form>
|
34
33
|
</td>
|
@@ -25,21 +25,21 @@
|
|
25
25
|
<% if config.match_on_body? %>
|
26
26
|
<div class="form-group">
|
27
27
|
<label for="match">Match body on</label>
|
28
|
-
<input type="text" class="form-control" id="match" name="match" disabled="disabled" value="<%= params[:match] || config.matcher.source %>"/>
|
28
|
+
<input type="text" class="form-control" id="match" name="match" disabled="disabled" value="<%= h (params[:match] || config.matcher.source) %>"/>
|
29
29
|
<input type="hidden" id="match" name="match" value="<%= params[:match] || config.matcher.source %>"/>
|
30
30
|
</div>
|
31
31
|
<% end %>
|
32
32
|
|
33
33
|
<div class="form-group">
|
34
34
|
<label for="schema">Response schema</label>
|
35
|
-
<textarea type="text" class="form-control" id="schema" name="schema" data-prettify rows="25"><%= params['schema'] || config.schema %></textarea>
|
35
|
+
<textarea type="text" class="form-control" id="schema" name="schema" data-prettify rows="25"><%= h (params['schema'] || config.schema) %></textarea>
|
36
36
|
</div>
|
37
37
|
</div>
|
38
38
|
|
39
39
|
<div class="col-md-6">
|
40
40
|
<div class="form-group">
|
41
41
|
<label for="body">Response body</label>
|
42
|
-
<textarea class="form-control" id="body" name="body" data-prettify rows="25"><%= params['body'] || config.response_body %></textarea>
|
42
|
+
<textarea class="form-control" id="body" name="body" data-prettify rows="25"><%= h (params['body'] || config.response_body) %></textarea>
|
43
43
|
</div>
|
44
44
|
</div>
|
45
45
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: api_sim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TJ Taylor
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
@@ -130,7 +130,6 @@ files:
|
|
130
130
|
- lib/api_sim.rb
|
131
131
|
- lib/api_sim/app_builder.rb
|
132
132
|
- lib/api_sim/built_app.rb
|
133
|
-
- lib/api_sim/helpers/view_helpers.rb
|
134
133
|
- lib/api_sim/matchers.rb
|
135
134
|
- lib/api_sim/matchers/base_matcher.rb
|
136
135
|
- lib/api_sim/matchers/dynamic_request_matcher.rb
|