http_sim 0.0.2 → 0.0.3

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: b40fc54a545f139236b562056d355c1f8898bbf6
4
- data.tar.gz: 13bbe767fa4ef669f50cc3b36e7762bc23e159f0
3
+ metadata.gz: d21ac256b9d856db653bb2db467b2554d6d2a5bd
4
+ data.tar.gz: 8b2bf8488b0b3ddf3e90c268554ac97ed727bfc0
5
5
  SHA512:
6
- metadata.gz: 4398472b9e3756812169137b48cdd84d54ac06e24981fe12bd8f1c747ad117bca73ac653a8f9535b24b0afbdca7b418887e72da57f56b3ba7ae4a9d1d70d51dd
7
- data.tar.gz: fd269b2b9e182435e3225599c447c83bbea1aed2a8ec8f03463c8036c8a1c3884d962b33b071714a94a1b8b72aff7fbce5ed2b33eee3d04bb0460032af7a55ed
6
+ metadata.gz: 0195b67a0723716a9f85b01f42451713a92b74b6858f663ae96f63464ce2be2c8d2dba67880e07d8cec8266af57181cb88696a17093debcec58d007c2dce4996
7
+ data.tar.gz: 950d7e79ff08ab5516990e63718a4c4a6cb8b798e7c6f33a0d6901f14d94ebd5f7316b63e7c7530b1c335284dead5f2cb7a564bc34f87544829cdaeda7a94f05
data/CHANGELOG.txt CHANGED
@@ -1,2 +1,3 @@
1
1
  Version 0.0.1 http_sim is released
2
2
  Version 0.0.2 Allow changing port
3
+ Version 0.0.3 Requests to endpoints are recorded and listed at endpoint's /request endpoint
data/http_sim.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'http_sim'
7
- spec.version = '0.0.2'
7
+ spec.version = '0.0.3'
8
8
  spec.authors = ['Jean de Klerk']
9
9
  spec.email = ['jadekler@gmail.com']
10
10
  spec.summary = 'Simulate your external HTTP integrations.'
data/lib/http_sim.rb CHANGED
@@ -98,6 +98,7 @@ module HttpSimulator
98
98
  end
99
99
 
100
100
  Sinatra::Base.get "#{endpoint.path}/requests" do
101
+ @endpoint = endpoint
101
102
  ERB.new(@@erb_files[:request]).result binding
102
103
  end
103
104
 
data/lib/request.html.erb CHANGED
@@ -9,11 +9,11 @@
9
9
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
10
10
  </head>
11
11
  <body>
12
- <h2>Requests for: <%= endpoint.method %> <%= endpoint.path %></h2>
12
+ <h2>Requests for: <%= @endpoint.method %> <%= @endpoint.path %></h2>
13
13
 
14
14
  <table>
15
15
  <tbody>
16
- <% endpoint.requests.each_with_index do |request, index| %>
16
+ <% @endpoint.requests.each_with_index do |request, index| %>
17
17
  <tr>
18
18
  <td><%= index %>:</td>
19
19
  <td>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http_sim
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean de Klerk