Skip to content

Commit

Permalink
Upgraded RuboCop to 0.35.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
dblock committed Nov 23, 2015
1 parent 99ec700 commit 6aa1204
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 43 deletions.
1 change: 0 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ AllCops:
Exclude:
- vendor/**/*
- bin/**/*
- gemfiles/**/*

This comment has been minimized.

Copy link
@james2m

james2m Mar 13, 2017

Owner

@dblock the build for ruby-grape#1594 is failing rubocop as the gemfiles are no longer excluded. Ok to put this line back as it's all auto generated code from Appraisal?

This comment has been minimized.

Copy link
@dblock

dblock Mar 13, 2017

Author

Yes.


inherit_from: .rubocop_todo.yml
39 changes: 21 additions & 18 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2015-08-19 13:28:59 -0400 using RuboCop version 0.33.0.
# on 2015-11-23 14:55:46 -0500 using RuboCop version 0.35.1.
# 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
Lint/DuplicatedKey:
Exclude:
- 'spec/grape/validations_spec.rb'

# Offense count: 1
Lint/NestedMethodDefinition:
Exclude:
Expand All @@ -22,18 +27,18 @@ Metrics/BlockNesting:
# Offense count: 5
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 300
Max: 277

# Offense count: 23
# Offense count: 22
Metrics/CyclomaticComplexity:
Max: 16
Max: 14

# Offense count: 717
# Offense count: 751
# Configuration parameters: AllowURI, URISchemes.
Metrics/LineLength:
Max: 215

# Offense count: 42
# Offense count: 44
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 36
Expand All @@ -43,17 +48,22 @@ Metrics/MethodLength:
Metrics/ModuleLength:
Max: 272

# Offense count: 17
# Offense count: 15
Metrics/PerceivedComplexity:
Max: 18
Max: 16

# Offense count: 30
# Offense count: 44
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
Style/BlockDelimiters:
Enabled: false
Exclude:
- 'spec/grape/api_spec.rb'
- 'spec/grape/exceptions/validation_errors_spec.rb'
- 'spec/grape/middleware/versioner/header_spec.rb'
- 'spec/grape/request_spec.rb'

# Offense count: 167
# Offense count: 105
# Configuration parameters: Exclude.
Style/Documentation:
Enabled: false

Expand All @@ -65,13 +75,6 @@ Style/DoubleNegation:
- 'lib/grape/middleware/versioner/header.rb'
- 'lib/grape/path.rb'

# Offense count: 3
Style/EachWithObject:
Exclude:
- 'lib/grape/dsl/inside_route.rb'
- 'lib/grape/exceptions/base.rb'
- 'lib/grape/formatter/serializable_hash.rb'

# Offense count: 14
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/RaiseArgs:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source 'https://rubygems.org'
gemspec

group :development, :test do
gem 'rubocop', '0.33.0'
gem 'rubocop', '0.35.1'
gem 'guard'
gem 'guard-rspec'
gem 'guard-rubocop'
Expand Down
14 changes: 7 additions & 7 deletions gemfiles/rack_1.5.2.gemfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# This file was generated by Appraisal

source "https://rubygems.org"
source 'https://rubygems.org'

gem "rack", "1.5.2"
gem 'rack', '1.5.2'

group :development, :test do
gem "rubocop", "0.33.0"
gem "guard"
gem "guard-rspec"
gem "guard-rubocop"
gem 'rubocop', '0.35.1'
gem 'guard'
gem 'guard-rspec'
gem 'guard-rubocop'
end

gemspec :path => "../"
gemspec path: '../'
16 changes: 8 additions & 8 deletions gemfiles/rails_3.gemfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# This file was generated by Appraisal

source "https://rubygems.org"
source 'https://rubygems.org'

gem "rails", "3.2.19"
gem "rack-cache", "<= 1.2"
gem 'rails', '3.2.19'
gem 'rack-cache', '<= 1.2'

group :development, :test do
gem "rubocop", "0.33.0"
gem "guard"
gem "guard-rspec"
gem "guard-rubocop"
gem 'rubocop', '0.35.1'
gem 'guard'
gem 'guard-rspec'
gem 'guard-rubocop'
end

gemspec :path => "../"
gemspec path: '../'
14 changes: 7 additions & 7 deletions gemfiles/rails_4.gemfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# This file was generated by Appraisal

source "https://rubygems.org"
source 'https://rubygems.org'

gem "rails", "4.1.6"
gem 'rails', '4.1.6'

group :development, :test do
gem "rubocop", "0.33.0"
gem "guard"
gem "guard-rspec"
gem "guard-rubocop"
gem 'rubocop', '0.35.1'
gem 'guard'
gem 'guard-rspec'
gem 'guard-rubocop'
end

gemspec :path => "../"
gemspec path: '../'
2 changes: 1 addition & 1 deletion spec/grape/api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ def subject.enable_root_route!

it 'returns raw data when content type binary' do
image_filename = 'grape.png'
file = File.open(image_filename, 'rb') { |io| io.read }
file = File.open(image_filename, 'rb', &:read)
subject.format :binary
subject.get('/binary_file') { File.binread(image_filename) }
get '/binary_file'
Expand Down

0 comments on commit 6aa1204

Please sign in to comment.