Skip to content

Commit 8e3fafc

Browse files
committed
Merge pull request #1209 from dblock/rubocop-0.35.1
Rubocop 0.35.1, RBX 2.5.8
2 parents 99ec700 + 539133e commit 8e3fafc

File tree

11 files changed

+83
-86
lines changed

11 files changed

+83
-86
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 18:15:01 -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: 750
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:

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ rvm:
66
- 2.2
77
- 2.1
88
- 2.0.0
9-
- rbx-2.2.10
9+
- rbx-2.5.8
1010
- jruby-19mode
1111
- ruby-head
1212
- jruby-head
@@ -15,6 +15,7 @@ matrix:
1515
allow_failures:
1616
- rvm: ruby-head
1717
- rvm: jruby-head
18+
- rvm: rbx-2.5.8
1819

1920
gemfile:
2021
- Gemfile

Appraisals

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
appraise "rails-3" do
2-
gem "rails", "3.2.19"
3-
gem "rack-cache", "<= 1.2" # Pin as next rack-cache version (1.3) removes Ruby1.9 support
1+
appraise 'rails-3' do
2+
gem 'rails', '3.2.19'
3+
gem 'rack-cache', '<= 1.2' # Pin as next rack-cache version (1.3) removes Ruby1.9 support
44
end
55

6-
appraise "rails-4" do
7-
gem "rails", "4.1.6"
6+
appraise 'rails-4' do
7+
gem 'rails', '4.1.6'
88
end
99

10-
appraise "rack-1.5.2" do
11-
gem "rack", "1.5.2"
10+
appraise 'rack-1.5.2' do
11+
gem 'rack', '1.5.2'
1212
end

Gemfile

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

55
group :development, :test do
6-
gem 'rubocop', '0.33.0'
76
gem 'guard'
87
gem 'guard-rspec'
98
gem 'guard-rubocop'

Rakefile

Lines changed: 31 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,52 +17,49 @@ end
1717
task :spec
1818

1919
require 'rainbow/ext/string' unless String.respond_to?(:color)
20+
2021
require 'rubocop/rake_task'
2122
RuboCop::RakeTask.new
2223

2324
task default: [:rubocop, :spec]
2425

25-
begin
26-
require 'yard'
27-
DOC_FILES = ['lib/**/*.rb', 'README.md']
26+
require 'yard'
27+
DOC_FILES = ['lib/**/*.rb', 'README.md']
2828

29-
YARD::Rake::YardocTask.new(:doc) do |t|
30-
t.files = DOC_FILES
31-
end
29+
YARD::Rake::YardocTask.new(:doc) do |t|
30+
t.files = DOC_FILES
31+
end
3232

33-
namespace :doc do
34-
YARD::Rake::YardocTask.new(:pages) do |t|
35-
t.files = DOC_FILES
36-
t.options = ['-o', '../grape.doc/docs']
37-
end
33+
namespace :doc do
34+
YARD::Rake::YardocTask.new(:pages) do |t|
35+
t.files = DOC_FILES
36+
t.options = ['-o', '../grape.doc/docs']
37+
end
3838

39-
namespace :pages do
40-
desc 'Check out gh-pages.'
41-
task :checkout do
42-
dir = File.dirname(__FILE__) + '/../grape.doc'
43-
unless Dir.exist?(dir)
44-
Dir.mkdir(dir)
45-
Dir.chdir(dir) do
46-
system('git init')
47-
system('git remote add origin [email protected]:ruby-grape/grape.git')
48-
system('git pull')
49-
system('git checkout gh-pages')
50-
end
39+
namespace :pages do
40+
desc 'Check out gh-pages.'
41+
task :checkout do
42+
dir = File.dirname(__FILE__) + '/../grape.doc'
43+
unless Dir.exist?(dir)
44+
Dir.mkdir(dir)
45+
Dir.chdir(dir) do
46+
system('git init')
47+
system('git remote add origin [email protected]:ruby-grape/grape.git')
48+
system('git pull')
49+
system('git checkout gh-pages')
5150
end
5251
end
52+
end
5353

54-
desc 'Generate and publish YARD docs to GitHub pages.'
55-
task publish: ['doc:pages:checkout', 'doc:pages'] do
56-
Dir.chdir(File.dirname(__FILE__) + '/../grape.doc') do
57-
system('git checkout gh-pages')
58-
system('git add .')
59-
system('git add -u')
60-
system("git commit -m 'Generating docs for version #{Grape::VERSION}.'")
61-
system('git push origin gh-pages')
62-
end
54+
desc 'Generate and publish YARD docs to GitHub pages.'
55+
task publish: ['doc:pages:checkout', 'doc:pages'] do
56+
Dir.chdir(File.dirname(__FILE__) + '/../grape.doc') do
57+
system('git checkout gh-pages')
58+
system('git add .')
59+
system('git add -u')
60+
system("git commit -m 'Generating docs for version #{Grape::VERSION}.'")
61+
system('git push origin gh-pages')
6362
end
6463
end
6564
end
66-
rescue LoadError
67-
puts 'You need to install YARD.'
6865
end

gemfiles/rack_1.5.2.gemfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
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 'guard'
9+
gem 'guard-rspec'
10+
gem 'guard-rubocop'
1211
end
1312

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

gemfiles/rails_3.gemfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
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 'guard'
10+
gem 'guard-rspec'
11+
gem 'guard-rubocop'
1312
end
1413

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

gemfiles/rails_4.gemfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
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 'guard'
9+
gem 'guard-rspec'
10+
gem 'guard-rubocop'
1211
end
1312

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

grape.gemspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ Gem::Specification.new do |s|
3131
s.add_development_dependency 'bundler'
3232
s.add_development_dependency 'cookiejar'
3333
s.add_development_dependency 'rack-contrib'
34-
s.add_development_dependency 'mime-types'
34+
s.add_development_dependency 'mime-types', '< 3.0'
3535
s.add_development_dependency 'appraisal'
3636
s.add_development_dependency 'benchmark-ips'
37+
s.add_development_dependency 'rubocop', '0.35.1'
3738

3839
s.files = `git ls-files`.split("\n")
3940
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")

0 commit comments

Comments
 (0)