interpol 0.3.5 → 0.3.6

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/Rakefile CHANGED
@@ -18,6 +18,7 @@ if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ruby' # MRI only
18
18
 
19
19
  cane.abc_exclude = %w[
20
20
  Interpol::Configuration#register_default_callbacks
21
+ Interpol::StubApp::Builder#initialize
21
22
  ]
22
23
 
23
24
  cane.style_exclude = %w[
@@ -142,11 +142,18 @@ module Interpol
142
142
  end
143
143
 
144
144
  def with_parsed_params
145
- @_parsed_params = request_params_parser.validate_and_parse_params(self)
145
+ unless @_skip_param_parsing
146
+ @_parsed_params = request_params_parser.validate_and_parse_params(self)
147
+ end
148
+
146
149
  yield
147
150
  ensure
148
151
  @_parsed_params = nil
149
152
  end
153
+
154
+ def skip_param_parsing!
155
+ @_skip_param_parsing = true
156
+ end
150
157
  end
151
158
  end
152
159
  end
@@ -23,10 +23,11 @@ module Interpol
23
23
  @config = config
24
24
 
25
25
  @app = ::Sinatra.new do
26
- set :stub_app_builder, builder
27
- not_found { JSON.dump(:error => "The requested resource could not be found") }
28
- before { content_type "application/json;charset=utf-8" }
29
- get('/__ping') { JSON.dump(:message => "Interpol stub app running.") }
26
+ set :stub_app_builder, builder
27
+ not_found { JSON.dump(:error => "The requested resource could not be found") }
28
+ before { content_type "application/json;charset=utf-8" }
29
+ before('/__ping') { skip_param_parsing! if respond_to?(:skip_param_parsing!) }
30
+ get('/__ping') { JSON.dump(:message => "Interpol stub app running.") }
30
31
 
31
32
  def self.name
32
33
  "Interpol::StubApp (anonymous)"
@@ -1,3 +1,3 @@
1
1
  module Interpol
2
- VERSION = "0.3.5"
2
+ VERSION = "0.3.6"
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.3.5
4
+ version: 0.3.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -223,7 +223,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
223
223
  version: '0'
224
224
  segments:
225
225
  - 0
226
- hash: 1026263882758876933
226
+ hash: 4001494580876368258
227
227
  required_rubygems_version: !ruby/object:Gem::Requirement
228
228
  none: false
229
229
  requirements:
@@ -232,7 +232,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
232
232
  version: '0'
233
233
  segments:
234
234
  - 0
235
- hash: 1026263882758876933
235
+ hash: 4001494580876368258
236
236
  requirements: []
237
237
  rubyforge_project:
238
238
  rubygems_version: 1.8.24