interpol 0.4.1 → 0.4.2
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.
- data/lib/interpol/configuration.rb +1 -1
- data/lib/interpol/stub_app.rb +2 -1
- data/lib/interpol/version.rb +1 -1
- metadata +2 -2
@@ -203,7 +203,7 @@ module Interpol
|
|
203
203
|
|
204
204
|
validate_request_if do |env|
|
205
205
|
env['CONTENT_TYPE'].to_s.include?('json') &&
|
206
|
-
%w[ POST PUT ].include?(env.fetch('REQUEST_METHOD'))
|
206
|
+
%w[ POST PUT PATCH ].include?(env.fetch('REQUEST_METHOD'))
|
207
207
|
end
|
208
208
|
|
209
209
|
on_unavailable_request_version do |env, requested, available|
|
data/lib/interpol/stub_app.rb
CHANGED
@@ -28,6 +28,7 @@ module Interpol
|
|
28
28
|
before { content_type "application/json;charset=utf-8" }
|
29
29
|
before('/__ping') { skip_param_parsing! if respond_to?(:skip_param_parsing!) }
|
30
30
|
get('/__ping') { JSON.dump(:message => "Interpol stub app running.") }
|
31
|
+
enable :perform_validations
|
31
32
|
|
32
33
|
def self.name
|
33
34
|
"Interpol::StubApp (anonymous)"
|
@@ -46,7 +47,7 @@ module Interpol
|
|
46
47
|
example, version = settings.
|
47
48
|
stub_app_builder.
|
48
49
|
example_and_version_for(endpoint, self)
|
49
|
-
example.validate!
|
50
|
+
example.validate! if settings.perform_validations?
|
50
51
|
status endpoint.find_example_status_code_for!(version)
|
51
52
|
JSON.dump(example.data)
|
52
53
|
end
|
data/lib/interpol/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: interpol
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|