Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Renamed SurpressResponse to the less alarming ResponseFilter

  • Loading branch information...
commit 1a33f6a051d410b36affe68682228b6e0341974e 1 parent f515611
@arsduo authored
View
4 lib/batch_api/internal_middleware.rb
@@ -2,7 +2,7 @@
require 'batch_api/processor/sequential'
require 'batch_api/processor/executor'
require 'batch_api/internal_middleware/decode_json_body'
-require 'batch_api/internal_middleware/surpress_response'
+require 'batch_api/internal_middleware/response_filter'
module BatchApi
# Public: the internal middleware system used to process batch requests.
@@ -58,7 +58,7 @@ module InternalMiddleware
# operation.
DEFAULT_OPERATION_MIDDLEWARE = Proc.new do
# Decode JSON response bodies, so they're not double-encoded.
- use InternalMiddleware::SurpressResponse
+ use InternalMiddleware::ResponseFilter
use InternalMiddleware::DecodeJsonBody
end
View
2  ...atch_api/internal_middleware/surpress_response.rb → lib/batch_api/internal_middleware/response_filter.rb
@@ -5,7 +5,7 @@ module InternalMiddleware
# add silent: true (or any truthy value, like 1) to your operation to
# surpress all output for successful requests. Failed requests (status !=
# 2xx) will still return information.
- class SurpressResponse
+ class ResponseFilter
# Public: init the middleware.
def initialize(app)
@app = app
View
4 ...lib/internal_middleware/surpress_response_spec.rb → spec/lib/internal_middleware/response_filter_spec.rb
@@ -1,8 +1,8 @@
require 'spec_helper'
-describe BatchApi::InternalMiddleware::SurpressResponse do
+describe BatchApi::InternalMiddleware::ResponseFilter do
let(:app) { stub("app", call: result) }
- let(:surpressor) { BatchApi::InternalMiddleware::SurpressResponse.new(app) }
+ let(:surpressor) { BatchApi::InternalMiddleware::ResponseFilter.new(app) }
let(:env) { {
op: stub("operation", options: {"silent" => true})
} }
View
2  spec/lib/internal_middleware_spec.rb
@@ -32,7 +32,7 @@ def use(middleware, *args)
it "builds a per-op middleware with the response silencer" do
builder.middlewares[0].should ==
- [BatchApi::InternalMiddleware::SurpressResponse, []]
+ [BatchApi::InternalMiddleware::ResponseFilter, []]
end
it "builds a per-op middleware with the JSON decoder" do
Please sign in to comment.
Something went wrong with that request. Please try again.