mirror of
https://github.com/samsonjs/grape-active_model_serializers.git
synced 2026-03-25 08:45:55 +00:00
Upgraded RuboCop to 0.53.0.
This commit is contained in:
parent
1995ba4676
commit
7670d9aed7
7 changed files with 43 additions and 26 deletions
|
|
@ -1,33 +1,47 @@
|
|||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config`
|
||||
# on 2017-10-09 10:22:52 -0500 using RuboCop version 0.41.2.
|
||||
# on 2018-03-14 14:57:44 -0400 using RuboCop version 0.53.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: 1
|
||||
# Configuration parameters: Include.
|
||||
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
|
||||
Bundler/DuplicatedGem:
|
||||
Exclude:
|
||||
- 'Gemfile'
|
||||
|
||||
# Offense count: 1
|
||||
Metrics/AbcSize:
|
||||
Max: 18
|
||||
Max: 17
|
||||
|
||||
# Offense count: 23
|
||||
# Configuration parameters: CountComments, ExcludedMethods.
|
||||
Metrics/BlockLength:
|
||||
Max: 133
|
||||
|
||||
# Offense count: 1
|
||||
Metrics/CyclomaticComplexity:
|
||||
Max: 9
|
||||
|
||||
# Offense count: 1
|
||||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
|
||||
# URISchemes: http, https
|
||||
Metrics/LineLength:
|
||||
Max: 87
|
||||
|
||||
# Offense count: 1
|
||||
# Configuration parameters: CountComments.
|
||||
Metrics/MethodLength:
|
||||
Max: 18
|
||||
Max: 15
|
||||
|
||||
# Offense count: 1
|
||||
Metrics/PerceivedComplexity:
|
||||
Max: 11
|
||||
Max: 10
|
||||
|
||||
# Offense count: 2
|
||||
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
|
||||
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
|
||||
Naming/FileName:
|
||||
Exclude:
|
||||
- 'lib/grape-active_model_serializers.rb'
|
||||
- 'spec/grape-active_model_serializers_spec.rb'
|
||||
|
||||
# Offense count: 5
|
||||
Style/Documentation:
|
||||
|
|
@ -40,9 +54,14 @@ Style/Documentation:
|
|||
- 'lib/grape-active_model_serializers/options_builder.rb'
|
||||
- 'lib/grape-active_model_serializers/serializer_resolver.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts.
|
||||
Style/FileName:
|
||||
# Offense count: 1
|
||||
# Configuration parameters: MinBodyLength.
|
||||
Style/GuardClause:
|
||||
Exclude:
|
||||
- 'lib/grape-active_model_serializers.rb'
|
||||
- 'spec/grape-active_model_serializers_spec.rb'
|
||||
- 'lib/grape-active_model_serializers/serializer_resolver.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
||||
# URISchemes: http, https
|
||||
Metrics/LineLength:
|
||||
Max: 87
|
||||
|
|
|
|||
4
Gemfile
4
Gemfile
|
|
@ -10,7 +10,7 @@ else
|
|||
end
|
||||
|
||||
group :test do
|
||||
gem 'sqlite3'
|
||||
gem 'sequel', '~> 4.37', require: false
|
||||
gem 'ruby-grape-danger', '~> 0.1.0', require: false
|
||||
gem 'sequel', '~> 4.37', require: false
|
||||
gem 'sqlite3'
|
||||
end
|
||||
|
|
|
|||
2
Rakefile
Normal file → Executable file
2
Rakefile
Normal file → Executable file
|
|
@ -11,4 +11,4 @@ end
|
|||
require 'rubocop/rake_task'
|
||||
RuboCop::RakeTask.new(:rubocop)
|
||||
|
||||
task default: [:rubocop, :spec]
|
||||
task default: %i[rubocop spec]
|
||||
|
|
|
|||
|
|
@ -24,5 +24,5 @@ Gem::Specification.new do |gem|
|
|||
gem.add_development_dependency 'rack-test'
|
||||
gem.add_development_dependency 'rake'
|
||||
gem.add_development_dependency 'guard-rspec'
|
||||
gem.add_development_dependency 'rubocop', '0.41.2'
|
||||
gem.add_development_dependency 'rubocop', '0.53.0'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -50,11 +50,9 @@ module Grape
|
|||
resources
|
||||
end
|
||||
|
||||
def default_serializer_options
|
||||
end
|
||||
def default_serializer_options; end
|
||||
|
||||
def url_options
|
||||
end
|
||||
def url_options; end
|
||||
end
|
||||
|
||||
Endpoint.send(:include, EndpointExtension)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ module Grape
|
|||
end
|
||||
|
||||
def options
|
||||
@options ||= (
|
||||
@options ||= begin
|
||||
options = endpoint_options
|
||||
options[:scope] = endpoint unless options.key?(:scope)
|
||||
options.merge!(default_root_options) unless options.key?(:root)
|
||||
|
|
@ -15,7 +15,7 @@ module Grape
|
|||
options.merge!(adapter_options)
|
||||
options.merge!(extra_options)
|
||||
options
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ require 'grape-active_model_serializers/error_formatter'
|
|||
describe Grape::ErrorFormatter::ActiveModelSerializers do
|
||||
subject { Grape::ErrorFormatter::ActiveModelSerializers }
|
||||
let(:backtrace) { ['Line:1'] }
|
||||
let(:options) { Hash.new }
|
||||
let(:options) { {} }
|
||||
let(:env) { { 'api.endpoint' => app.endpoints.first } }
|
||||
let(:original_exception) { StandardError.new('oh noes!') }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue