lib/grape.rb in grape-1.7.1 vs lib/grape.rb in grape-1.8.0
- old
+ new
@@ -9,29 +9,35 @@
require 'set'
require 'bigdecimal'
require 'date'
require 'active_support'
require 'active_support/concern'
+require 'active_support/configurable'
require 'active_support/version'
require 'active_support/isolated_execution_state' if ActiveSupport::VERSION::MAJOR > 6
require 'active_support/core_ext/array/conversions'
require 'active_support/core_ext/array/extract_options'
require 'active_support/core_ext/array/wrap'
require 'active_support/core_ext/hash/conversions'
require 'active_support/core_ext/hash/deep_merge'
require 'active_support/core_ext/hash/except'
require 'active_support/core_ext/hash/indifferent_access'
+require 'active_support/core_ext/hash/keys'
require 'active_support/core_ext/hash/reverse_merge'
require 'active_support/core_ext/hash/slice'
require 'active_support/core_ext/object/blank'
+require 'active_support/core_ext/object/duplicable'
require 'active_support/dependencies/autoload'
+require 'active_support/deprecation'
+require 'active_support/inflector'
require 'active_support/notifications'
require 'i18n'
I18n.load_path << File.expand_path('grape/locale/en.yml', __dir__)
module Grape
+ include ActiveSupport::Configurable
extend ::ActiveSupport::Autoload
eager_autoload do
autoload :API
autoload :Endpoint
@@ -90,12 +96,10 @@
end
module Extensions
extend ::ActiveSupport::Autoload
eager_autoload do
- autoload :DeepMergeableHash
- autoload :DeepSymbolizeHash
autoload :Hash
end
module ActiveSupport
extend ::ActiveSupport::Autoload
eager_autoload do
@@ -283,12 +287,16 @@
eager_autoload do
autoload :InvalidValue
end
end
+
+ configure do |config|
+ config.param_builder = Grape::Extensions::ActiveSupport::HashWithIndifferentAccess::ParamBuilder
+ config.compile_methods!
+ end
end
-require 'grape/config'
require 'grape/content_types'
require 'grape/util/lazy_value'
require 'grape/util/lazy_block'
require 'grape/util/endpoint_configuration'