Skip to content

Commit 6aa1204

Browse files
committed
Upgraded RuboCop to 0.35.1.
1 parent 99ec700 commit 6aa1204

File tree

7 files changed

+45
-43
lines changed

7 files changed

+45
-43
lines changed

.rubocop.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ AllCops:
22
Exclude:
33
- vendor/**/*
44
- bin/**/*
5-
- gemfiles/**/*
65

76
inherit_from: .rubocop_todo.yml

.rubocop_todo.yml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2015-08-19 13:28:59 -0400 using RuboCop version 0.33.0.
3+
# on 2015-11-23 14:55:46 -0500 using RuboCop version 0.35.1.
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+
Lint/DuplicatedKey:
11+
Exclude:
12+
- 'spec/grape/validations_spec.rb'
13+
914
# Offense count: 1
1015
Lint/NestedMethodDefinition:
1116
Exclude:
@@ -22,18 +27,18 @@ Metrics/BlockNesting:
2227
# Offense count: 5
2328
# Configuration parameters: CountComments.
2429
Metrics/ClassLength:
25-
Max: 300
30+
Max: 277
2631

27-
# Offense count: 23
32+
# Offense count: 22
2833
Metrics/CyclomaticComplexity:
29-
Max: 16
34+
Max: 14
3035

31-
# Offense count: 717
36+
# Offense count: 751
3237
# Configuration parameters: AllowURI, URISchemes.
3338
Metrics/LineLength:
3439
Max: 215
3540

36-
# Offense count: 42
41+
# Offense count: 44
3742
# Configuration parameters: CountComments.
3843
Metrics/MethodLength:
3944
Max: 36
@@ -43,17 +48,22 @@ Metrics/MethodLength:
4348
Metrics/ModuleLength:
4449
Max: 272
4550

46-
# Offense count: 17
51+
# Offense count: 15
4752
Metrics/PerceivedComplexity:
48-
Max: 18
53+
Max: 16
4954

50-
# Offense count: 30
55+
# Offense count: 44
5156
# Cop supports --auto-correct.
5257
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
5358
Style/BlockDelimiters:
54-
Enabled: false
59+
Exclude:
60+
- 'spec/grape/api_spec.rb'
61+
- 'spec/grape/exceptions/validation_errors_spec.rb'
62+
- 'spec/grape/middleware/versioner/header_spec.rb'
63+
- 'spec/grape/request_spec.rb'
5564

56-
# Offense count: 167
65+
# Offense count: 105
66+
# Configuration parameters: Exclude.
5767
Style/Documentation:
5868
Enabled: false
5969

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

68-
# Offense count: 3
69-
Style/EachWithObject:
70-
Exclude:
71-
- 'lib/grape/dsl/inside_route.rb'
72-
- 'lib/grape/exceptions/base.rb'
73-
- 'lib/grape/formatter/serializable_hash.rb'
74-
7578
# Offense count: 14
7679
# Configuration parameters: EnforcedStyle, SupportedStyles.
7780
Style/RaiseArgs:

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ source 'https://rubygems.org'
33
gemspec
44

55
group :development, :test do
6-
gem 'rubocop', '0.33.0'
6+
gem 'rubocop', '0.35.1'
77
gem 'guard'
88
gem 'guard-rspec'
99
gem 'guard-rubocop'

gemfiles/rack_1.5.2.gemfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# This file was generated by Appraisal
22

3-
source "https://rubygems.org"
3+
source 'https://rubygems.org'
44

5-
gem "rack", "1.5.2"
5+
gem 'rack', '1.5.2'
66

77
group :development, :test do
8-
gem "rubocop", "0.33.0"
9-
gem "guard"
10-
gem "guard-rspec"
11-
gem "guard-rubocop"
8+
gem 'rubocop', '0.35.1'
9+
gem 'guard'
10+
gem 'guard-rspec'
11+
gem 'guard-rubocop'
1212
end
1313

14-
gemspec :path => "../"
14+
gemspec path: '../'

gemfiles/rails_3.gemfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# This file was generated by Appraisal
22

3-
source "https://rubygems.org"
3+
source 'https://rubygems.org'
44

5-
gem "rails", "3.2.19"
6-
gem "rack-cache", "<= 1.2"
5+
gem 'rails', '3.2.19'
6+
gem 'rack-cache', '<= 1.2'
77

88
group :development, :test do
9-
gem "rubocop", "0.33.0"
10-
gem "guard"
11-
gem "guard-rspec"
12-
gem "guard-rubocop"
9+
gem 'rubocop', '0.35.1'
10+
gem 'guard'
11+
gem 'guard-rspec'
12+
gem 'guard-rubocop'
1313
end
1414

15-
gemspec :path => "../"
15+
gemspec path: '../'

gemfiles/rails_4.gemfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# This file was generated by Appraisal
22

3-
source "https://rubygems.org"
3+
source 'https://rubygems.org'
44

5-
gem "rails", "4.1.6"
5+
gem 'rails', '4.1.6'
66

77
group :development, :test do
8-
gem "rubocop", "0.33.0"
9-
gem "guard"
10-
gem "guard-rspec"
11-
gem "guard-rubocop"
8+
gem 'rubocop', '0.35.1'
9+
gem 'guard'
10+
gem 'guard-rspec'
11+
gem 'guard-rubocop'
1212
end
1313

14-
gemspec :path => "../"
14+
gemspec path: '../'

spec/grape/api_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ def subject.enable_root_route!
809809

810810
it 'returns raw data when content type binary' do
811811
image_filename = 'grape.png'
812-
file = File.open(image_filename, 'rb') { |io| io.read }
812+
file = File.open(image_filename, 'rb', &:read)
813813
subject.format :binary
814814
subject.get('/binary_file') { File.binread(image_filename) }
815815
get '/binary_file'

0 commit comments

Comments
 (0)