interpol 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -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|
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Interpol
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
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.1
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-17 00:00:00.000000000 Z
12
+ date: 2012-10-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack