lib/interpol/stub_app.rb in interpol-0.1.0 vs lib/interpol/stub_app.rb in interpol-0.2.0

- old
+ new

@@ -17,12 +17,14 @@ def interpol_config self.class.interpol_config end def example_for(endpoint, version, message_type) - endpoint.find_example_for!(version, message_type) + example = endpoint.find_example_for!(version, message_type) rescue ArgumentError interpol_config.request_version_unavailable(self, version, endpoint.available_versions) + else + example.apply_filters(interpol_config.filter_example_data_blocks, request.env) end end # Private: Builds a stub sinatra app for the given interpol # configuration.