lib/grape/dsl/configuration.rb in grape-0.13.0 vs lib/grape/dsl/configuration.rb in grape-0.14.0

- old
+ new

@@ -62,10 +62,13 @@ config_class.configure do description description end config_class.configure(&config_block) + unless options.empty? + warn '[DEPRECATION] Passing a options hash and a block to `desc` is deprecated. Move all hash options to block.' + end options = config_class.settings else options = options.merge(description: description) end @@ -92,11 +95,11 @@ module_function # Merge multiple layers of settings into one hash. def stacked_hash_to_hash(settings) - return nil if settings.nil? || settings.blank? - settings.each_with_object(ActiveSupport::OrderedHash.new) { |value, result| result.deep_merge!(value) } + return if settings.blank? + settings.each_with_object({}) { |value, result| result.deep_merge!(value) } end # Returns an object which configures itself via an instance-context DSL. def desc_container Module.new do