Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,30 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2017-02-19 15:40:46 -0500 using RuboCop version 0.47.1.
# on 2017-06-12 13:25:24 -0600 using RuboCop version 0.47.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 43
# Offense count: 44
Metrics/AbcSize:
Max: 44

# Offense count: 265
# Offense count: 277
# Configuration parameters: CountComments, ExcludedMethods.
Metrics/BlockLength:
Max: 3104

# Offense count: 1
# Configuration parameters: CountBlocks.
Metrics/BlockNesting:
Max: 4

# Offense count: 8
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 283
Max: 287

# Offense count: 26
# Offense count: 28
Metrics/CyclomaticComplexity:
Max: 14

# Offense count: 993
# Offense count: 1098
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Expand All @@ -40,12 +35,12 @@ Metrics/LineLength:
Metrics/MethodLength:
Max: 33

# Offense count: 9
# Offense count: 10
# Configuration parameters: CountComments.
Metrics/ModuleLength:
Max: 212

# Offense count: 16
# Offense count: 17
Metrics/PerceivedComplexity:
Max: 14

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#### Fixes

* [#1632](https://github.com/ruby-grape/grape/pull/1632): Silence warnings - [@thogg4](https://github.com/thogg4).
* [#1615](https://github.com/ruby-grape/grape/pull/1615): Fix default and type validator when values is a Hash with no value attribute - [@jlfaber](https://github.com/jlfaber).
* [#1625](https://github.com/ruby-grape/grape/pull/1625): Handle `given` correctly when nested in Array params - [@rnubel](https://github.com/rnubel), [@avellable](https://github.com/avellable).
* Your contribution here.
Expand Down
5 changes: 5 additions & 0 deletions lib/grape/endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ def initialize(new_settings, options = {}, &block)
@lazy_initialized = nil
@block = nil

@status = nil
@file = nil
@body = nil
@proc = nil

return unless block_given?

@source = block
Expand Down
1 change: 0 additions & 1 deletion lib/grape/extensions/hashie/mash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module Hashie
module Mash
module ParamBuilder
extend ::ActiveSupport::Concern

included do
namespace_inheritable(:build_params_with, Grape::Extensions::Hashie::Mash::ParamBuilder)
end
Expand Down
3 changes: 3 additions & 0 deletions lib/grape/validations/validators/values.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ def initialize(attrs, options, required, scope, opts = {})
warn '[DEPRECATION] The values validator proc option is deprecated. ' \
'The lambda expression can now be assigned directly to values.' if @proc
else
@excepts = nil
@values = nil
@proc = nil
@values = options
end
super
Expand Down