lib/grape/middleware/base.rb in grape-1.2.5 vs lib/grape/middleware/base.rb in grape-1.3.0
- old
+ new
@@ -1,14 +1,16 @@
+# frozen_string_literal: true
+
require 'grape/dsl/headers'
module Grape
module Middleware
class Base
include Helpers
attr_reader :app, :env, :options
- TEXT_HTML = 'text/html'.freeze
+ TEXT_HTML = 'text/html'
include Grape::DSL::Headers
# @param [Rack Application] app The standard argument for a Rack middleware.
# @param [Hash] options A hash of options, simply stored for use by subclasses.
@@ -21,10 +23,10 @@
def default_options
{}
end
def call(env)
- dup.call!(env)
+ dup.call!(env).to_a
end
def call!(env)
@env = env
before