Skip to content

Commit 9112a62

Browse files
authored
Updates rubocop to 0.79.0 (#332)
1 parent a4cb98f commit 9112a62

File tree

6 files changed

+21
-19
lines changed

6 files changed

+21
-19
lines changed

.rubocop.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,19 @@ AllCops:
44
Exclude:
55
- vendor/**/*
66
- example/**/*
7-
TargetRubyVersion: 2.4
7+
TargetRubyVersion: 2.7
88

99
Layout/EmptyLinesAroundArguments:
1010
Enabled: false
1111

1212
Layout/FirstHashElementIndentation:
1313
EnforcedStyle: consistent
1414

15+
Layout/LineLength:
16+
Max: 120
17+
Exclude:
18+
- spec/**/*
19+
1520
Metrics/AbcSize:
1621
Max: 25
1722

@@ -25,11 +30,6 @@ Metrics/CyclomaticComplexity:
2530
Metrics/ClassLength:
2631
Max: 300
2732

28-
Metrics/LineLength:
29-
Max: 120
30-
Exclude:
31-
- spec/**/*
32-
3333
Metrics/MethodLength:
3434
Max: 26
3535
Exclude:

.rubocop_todo.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2019-03-15 00:00:57 +0100 using RuboCop version 0.65.0.
3+
# on 2020-02-18 16:38:42 +0100 using RuboCop version 0.79.0.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
77
# versions of RuboCop, may require this file to be generated again.
88

9+
# Offense count: 1
10+
# Configuration parameters: Include.
11+
# Include: **/*.gemspec
12+
Gemspec/RequiredRubyVersion:
13+
Exclude:
14+
- 'grape-entity.gemspec'
15+
916
# Offense count: 6
1017
Lint/BooleanSymbol:
1118
Exclude:
1219
- 'spec/grape_entity/exposure_spec.rb'
1320

14-
15-
# Offense count: 4
16-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
17-
# URISchemes: http, https
18-
Metrics/LineLength:
19-
Max: 146
20-
2121
# Offense count: 1
2222
# Configuration parameters: EnforcedStyle.
2323
# SupportedStyles: inline, group

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ after_success:
77
- bundle exec danger
88

99
rvm:
10-
- 2.4.9
1110
- 2.5.7
1211
- 2.6.5
1312
- 2.7.0
@@ -17,6 +16,9 @@ rvm:
1716
matrix:
1817
fast_finish: true
1918

19+
include:
20+
- rvm: 2.4.9
21+
2022
allow_failures:
2123
- rvm: 2.4.9
2224
- rvm: ruby-head

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ source 'http://rubygems.org'
55
gemspec
66

77
group :development, :test do
8-
gem 'rubocop', '~> 0.74.0', require: false
8+
gem 'rubocop', '~> 0.79.0', require: false
99
end
1010

1111
group :test do

grape-entity.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
2626
s.add_development_dependency 'pry-byebug' unless RUBY_PLATFORM.eql?('java') || RUBY_ENGINE.eql?('rbx')
2727
s.add_development_dependency 'rack-test'
2828
s.add_development_dependency 'rake'
29-
s.add_development_dependency 'rspec', '~> 3.0'
29+
s.add_development_dependency 'rspec', '~> 3.9'
3030
s.add_development_dependency 'yard'
3131

3232
s.files = `git ls-files`.split("\n")

lib/grape_entity/entity.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def self.inherited(subclass)
185185
# field, typically the value is a hash with two fields, type and desc.
186186
# @option options :merge This option allows you to merge an exposed field to the root
187187
#
188-
# rubocop:disable Metrics/LineLength
188+
# rubocop:disable Layout/LineLength
189189
def self.expose(*args, &block)
190190
options = merge_options(args.last.is_a?(Hash) ? args.pop : {})
191191

@@ -212,7 +212,7 @@ def self.expose(*args, &block)
212212
@nesting_stack ||= []
213213
args.each { |attribute| build_exposure_for_attribute(attribute, @nesting_stack, options, block) }
214214
end
215-
# rubocop:enable Metrics/LineLength
215+
# rubocop:enable Layout/LineLength
216216

217217
def self.build_exposure_for_attribute(attribute, nesting_stack, options, block)
218218
exposure_list = nesting_stack.empty? ? root_exposures : nesting_stack.last.nested_exposures

0 commit comments

Comments
 (0)