api_sim 7.0.0 → 8.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 33ae9a739bbdc45eb8993364f722ccfea5c87804
4
- data.tar.gz: d727a1055689f9f901f5f99462158822335e024d
2
+ SHA256:
3
+ metadata.gz: 327685bacf8a6f9deecaa212e828fb2357c733f56ff84b34e55d883014c54d01
4
+ data.tar.gz: bf1feab48cb25aadbbca0f5a6602c1ed47c4781b40833033857f1c0a40dfac62
5
5
  SHA512:
6
- metadata.gz: b2861183246f952a21ed526d5b4de6d980bd34225bc656e1eef26109c54136c9a6aa59e25e73011505307e27bd74cebb6b213a63b60454b0705c76d6853cd509
7
- data.tar.gz: 87ad7f7ab2387625233e075d2eb90cba7dba7244d75846d71fdf65869d96fd4135eae2bad3bd3c98b9ea5b87554da5331b279e5d5e5dc9aa8882b7af7fb35518
6
+ metadata.gz: fdd5e1c789269cd0bd2e87e5a9616987f4ff726406e43f9070e668120e2fc548de0dd5d5434c77273bb55cb850b7e357976b27cdc12f2c51c00277af698782b5
7
+ data.tar.gz: 887ab0200e2597021038c29f2f518b0f8c3d48f68160c54cecd738325ee59fd137ab758f6b05d3ed3f4d52fff241f656fdd3c22cad21f31ca5fbc51633b004a0
@@ -1,3 +1,3 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.4.1
3
+ - 2.7.0
data/README.md CHANGED
@@ -54,12 +54,62 @@ After which the simulators should be running on port 9292.
54
54
 
55
55
  ## API
56
56
 
57
+ API Sim has an HTTP API that allows you, the developer, to manage responses and verify
58
+ requests.
59
+
60
+ ### The "Request/Response" API
61
+
62
+
63
+ #### Modify the response from an endpoint
64
+
65
+ The star in the path should match the request path that you want to update.
66
+ The "method" in the PUT request should match the HTTP method for the request.
67
+ ```HTTP
68
+ HTTP/1.1 PUT /response/*
69
+ {
70
+ "method": "post",
71
+ "status": 999,
72
+ "body": "{\"id\": 99}",
73
+ "headers": {"NEW-HEADER": "output"}
74
+ }
75
+ ```
76
+
77
+
78
+
79
+ #### Read requests made to an endpoint
80
+
81
+ The star in the path should match the path that you want to retrieve requests for.
82
+ ```HTTP
83
+ GET /requests/:method/*
84
+ ```
85
+
86
+ ```HTTP
87
+ HTTP/1.1 200 OK
88
+
89
+ [
90
+ {}
91
+ ]
92
+ ```
93
+
94
+ ### 498
95
+
57
96
  The API that these simulators generate can get pretty smart. To help you, the user,
58
97
  distinguish between failures and "smarts", we've made up an HTTP status code: 498.
59
98
  This code means "we received a request that did not match an expected schema". If you
60
99
  provide the simulators with a request schema for an endpoint, all requests must match
61
100
  that schema. If they do not, they'll receive our fictional status code.
62
101
 
102
+ ## UI
103
+
104
+ The simulator application has a UI for manipulating and monitoring requests and responses.
105
+ You can view this UI by visiting `/ui` at the URL of the simulator.
106
+
107
+ Additionally, you can configure the endpoint for viewing the UI by adding to your config.ru.
108
+
109
+ ```ruby
110
+ ui_root '/path/to/ui'
111
+ ```
112
+
63
113
  ## Development
64
114
 
65
115
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -19,11 +19,11 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_dependency "sinatra", '~> 1.0'
22
+ spec.add_dependency "sinatra", '~> 2.0'
23
23
  spec.add_dependency "nokogiri", '~> 1.6'
24
24
  spec.add_dependency "json-schema", '>= 2.5'
25
25
  spec.add_dependency "mustermann", '~> 1.0.0.beta2'
26
- spec.add_development_dependency "bundler", "~> 1.11"
26
+ spec.add_development_dependency "bundler", "~> 2.1"
27
27
  spec.add_development_dependency "rake", "~> 10.0"
28
28
  spec.add_development_dependency "rspec", "~> 3.0"
29
29
  spec.add_development_dependency "capybara", "~> 2.7"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- api_sim (6.1.1)
4
+ api_sim (7.0.0)
5
5
  json-schema (>= 2.5)
6
6
  mustermann (~> 1.0.0.beta2)
7
7
  nokogiri (~> 1.6)
@@ -10,23 +10,23 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- addressable (2.5.2)
14
- public_suffix (>= 2.0.2, < 4.0)
15
- json-schema (2.8.0)
13
+ addressable (2.7.0)
14
+ public_suffix (>= 2.0.2, < 5.0)
15
+ json-schema (2.8.1)
16
16
  addressable (>= 2.4)
17
- mini_portile2 (2.3.0)
18
- mustermann (1.0.1)
19
- nokogiri (1.8.1)
20
- mini_portile2 (~> 2.3.0)
21
- public_suffix (3.0.1)
22
- rack (1.6.8)
23
- rack-protection (1.5.3)
17
+ mini_portile2 (2.4.0)
18
+ mustermann (1.0.3)
19
+ nokogiri (1.10.7)
20
+ mini_portile2 (~> 2.4.0)
21
+ public_suffix (4.0.1)
22
+ rack (1.6.11)
23
+ rack-protection (1.5.5)
24
24
  rack
25
25
  sinatra (1.4.8)
26
26
  rack (~> 1.5)
27
27
  rack-protection (~> 1.4)
28
28
  tilt (>= 1.3, < 3)
29
- tilt (2.0.8)
29
+ tilt (2.0.10)
30
30
 
31
31
  PLATFORMS
32
32
  ruby
@@ -35,4 +35,4 @@ DEPENDENCIES
35
35
  api_sim!
36
36
 
37
37
  BUNDLED WITH
38
- 1.14.6
38
+ 1.17.2
@@ -1,31 +1,34 @@
1
1
  PATH
2
- remote: ../../
2
+ remote: ../..
3
3
  specs:
4
- api_sim (2.2.0)
4
+ api_sim (7.0.0)
5
5
  json-schema (>= 2.5)
6
- nokogiri (~> 1.6.7)
7
- sinatra (~> 1.0)
6
+ mustermann (~> 1.0.0.beta2)
7
+ nokogiri (~> 1.6)
8
+ sinatra (~> 1.4)
8
9
 
9
10
  GEM
10
11
  remote: https://rubygems.org/
11
12
  specs:
12
- addressable (2.3.8)
13
- json-schema (2.6.2)
14
- addressable (~> 2.3.8)
15
- mini_portile2 (2.1.0)
16
- nokogiri (1.6.8)
17
- mini_portile2 (~> 2.1.0)
18
- pkg-config (~> 1.1.7)
19
- pkg-config (1.1.7)
20
- rack (1.6.4)
21
- rack-cors (0.4.0)
22
- rack-protection (1.5.3)
13
+ addressable (2.7.0)
14
+ public_suffix (>= 2.0.2, < 5.0)
15
+ json-schema (2.8.1)
16
+ addressable (>= 2.4)
17
+ mini_portile2 (2.4.0)
18
+ mustermann (1.0.3)
19
+ nokogiri (1.10.7)
20
+ mini_portile2 (~> 2.4.0)
21
+ public_suffix (4.0.1)
22
+ rack (1.6.11)
23
+ rack-cors (1.0.6)
24
+ rack (>= 1.6.0)
25
+ rack-protection (1.5.5)
23
26
  rack
24
- sinatra (1.4.7)
27
+ sinatra (1.4.8)
25
28
  rack (~> 1.5)
26
29
  rack-protection (~> 1.4)
27
30
  tilt (>= 1.3, < 3)
28
- tilt (2.0.5)
31
+ tilt (2.0.10)
29
32
 
30
33
  PLATFORMS
31
34
  ruby
@@ -35,4 +38,4 @@ DEPENDENCIES
35
38
  rack-cors
36
39
 
37
40
  BUNDLED WITH
38
- 1.12.5
41
+ 1.17.2
@@ -1,30 +1,32 @@
1
1
  PATH
2
- remote: ../../
2
+ remote: ../..
3
3
  specs:
4
- api_sim (2.2.0)
4
+ api_sim (7.0.0)
5
5
  json-schema (>= 2.5)
6
- nokogiri (~> 1.6.7)
7
- sinatra (~> 1.0)
6
+ mustermann (~> 1.0.0.beta2)
7
+ nokogiri (~> 1.6)
8
+ sinatra (~> 1.4)
8
9
 
9
10
  GEM
10
11
  remote: https://rubygems.org/
11
12
  specs:
12
- addressable (2.3.8)
13
- json-schema (2.6.2)
14
- addressable (~> 2.3.8)
15
- mini_portile2 (2.1.0)
16
- nokogiri (1.6.8)
17
- mini_portile2 (~> 2.1.0)
18
- pkg-config (~> 1.1.7)
19
- pkg-config (1.1.7)
20
- rack (1.6.4)
21
- rack-protection (1.5.3)
13
+ addressable (2.7.0)
14
+ public_suffix (>= 2.0.2, < 5.0)
15
+ json-schema (2.8.1)
16
+ addressable (>= 2.4)
17
+ mini_portile2 (2.4.0)
18
+ mustermann (1.0.3)
19
+ nokogiri (1.10.7)
20
+ mini_portile2 (~> 2.4.0)
21
+ public_suffix (4.0.1)
22
+ rack (1.6.11)
23
+ rack-protection (1.5.5)
22
24
  rack
23
- sinatra (1.4.7)
25
+ sinatra (1.4.8)
24
26
  rack (~> 1.5)
25
27
  rack-protection (~> 1.4)
26
28
  tilt (>= 1.3, < 3)
27
- tilt (2.0.5)
29
+ tilt (2.0.10)
28
30
 
29
31
  PLATFORMS
30
32
  ruby
@@ -33,4 +35,4 @@ DEPENDENCIES
33
35
  api_sim!
34
36
 
35
37
  BUNDLED WITH
36
- 1.12.5
38
+ 1.17.2
@@ -1,3 +1,3 @@
1
1
  module ApiSim
2
- VERSION = "7.0.0"
2
+ VERSION = "8.0.0"
3
3
  end
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: 7.0.0
4
+ version: 8.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - TJ Taylor
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-14 00:00:00.000000000 Z
11
+ date: 2020-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.0'
19
+ version: '2.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.0'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.11'
75
+ version: '2.1'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.11'
82
+ version: '2.1'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -189,8 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  - !ruby/object:Gem::Version
190
190
  version: '0'
191
191
  requirements: []
192
- rubyforge_project:
193
- rubygems_version: 2.6.11
192
+ rubygems_version: 3.1.2
194
193
  signing_key:
195
194
  specification_version: 4
196
195
  summary: A DSL on top of sinatra for building application simulators