Skip to content

Commit

Permalink
Merge 42af0b1 into a4cb98f
Browse files Browse the repository at this point in the history
  • Loading branch information
LeFnord committed Feb 18, 2020
2 parents a4cb98f + 42af0b1 commit 5a53611
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 19 deletions.
12 changes: 6 additions & 6 deletions .rubocop.yml
Expand Up @@ -4,14 +4,19 @@ AllCops:
Exclude:
- vendor/**/*
- example/**/*
TargetRubyVersion: 2.4
TargetRubyVersion: 2.7

Layout/EmptyLinesAroundArguments:
Enabled: false

Layout/FirstHashElementIndentation:
EnforcedStyle: consistent

Layout/LineLength:
Max: 120
Exclude:
- spec/**/*

Metrics/AbcSize:
Max: 25

Expand All @@ -25,11 +30,6 @@ Metrics/CyclomaticComplexity:
Metrics/ClassLength:
Max: 300

Metrics/LineLength:
Max: 120
Exclude:
- spec/**/*

Metrics/MethodLength:
Max: 26
Exclude:
Expand Down
16 changes: 8 additions & 8 deletions .rubocop_todo.yml
@@ -1,23 +1,23 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2019-03-15 00:00:57 +0100 using RuboCop version 0.65.0.
# on 2020-02-18 16:38:42 +0100 using RuboCop version 0.79.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: **/*.gemspec
Gemspec/RequiredRubyVersion:
Exclude:
- 'grape-entity.gemspec'

# Offense count: 6
Lint/BooleanSymbol:
Exclude:
- 'spec/grape_entity/exposure_spec.rb'


# Offense count: 4
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Max: 146

# Offense count: 1
# Configuration parameters: EnforcedStyle.
# SupportedStyles: inline, group
Expand Down
4 changes: 3 additions & 1 deletion .travis.yml
Expand Up @@ -7,7 +7,6 @@ after_success:
- bundle exec danger

rvm:
- 2.4.9
- 2.5.7
- 2.6.5
- 2.7.0
Expand All @@ -17,6 +16,9 @@ rvm:
matrix:
fast_finish: true

include:
- rvm: 2.4.9

allow_failures:
- rvm: 2.4.9
- rvm: ruby-head
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -5,7 +5,7 @@ source 'http://rubygems.org'
gemspec

group :development, :test do
gem 'rubocop', '~> 0.74.0', require: false
gem 'rubocop', '~> 0.79.0', require: false
end

group :test do
Expand Down
2 changes: 1 addition & 1 deletion grape-entity.gemspec
Expand Up @@ -26,7 +26,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'pry-byebug' unless RUBY_PLATFORM.eql?('java') || RUBY_ENGINE.eql?('rbx')
s.add_development_dependency 'rack-test'
s.add_development_dependency 'rake'
s.add_development_dependency 'rspec', '~> 3.0'
s.add_development_dependency 'rspec', '~> 3.9'
s.add_development_dependency 'yard'

s.files = `git ls-files`.split("\n")
Expand Down
4 changes: 2 additions & 2 deletions lib/grape_entity/entity.rb
Expand Up @@ -185,7 +185,7 @@ def self.inherited(subclass)
# field, typically the value is a hash with two fields, type and desc.
# @option options :merge This option allows you to merge an exposed field to the root
#
# rubocop:disable Metrics/LineLength
# rubocop:disable Layout/LineLength
def self.expose(*args, &block)
options = merge_options(args.last.is_a?(Hash) ? args.pop : {})

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

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

0 comments on commit 5a53611

Please sign in to comment.