Skip to content

Commit 224c5f2

Browse files
dblockLeFnord
authored andcommitted
Upgraded and locked Rubocop at 0.60.0. (#719)
1 parent 95d5e35 commit 224c5f2

File tree

7 files changed

+20
-19
lines changed

7 files changed

+20
-19
lines changed

.rubocop_todo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2018-09-28 22:03:50 -0400 using RuboCop version 0.59.2.
3+
# on 2018-10-29 10:54:24 -0400 using RuboCop version 0.60.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

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ matrix:
3737
- rvm: 2.3.7
3838
- rvm: ruby-head
3939
- rvm: jruby-head
40+
- env: GRAPE_VERSION=HEAD

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ group :development, :test do
2626
gem 'rake'
2727
gem 'rdoc'
2828
gem 'rspec', '~> 3.0'
29-
gem 'rubocop', '~> 0.59', require: false
29+
gem 'rubocop', '~> 0.60.0', require: false
3030
end
3131

3232
group :test do

lib/grape-swagger/doc_methods/parse_params.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def call(param, settings, path, route, definitions)
1414

1515
# required properties
1616
@parsed_param = {
17-
in: param_type(value_type),
17+
in: param_type(value_type),
1818
name: settings[:full_name] || param
1919
}
2020

lib/grape-swagger/endpoint.rb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ def content_types_for(target_class)
2525
# required keys for SwaggerObject
2626
def swagger_object(target_class, request, options)
2727
object = {
28-
info: info_object(options[:info].merge(version: options[:doc_version])),
29-
swagger: '2.0',
30-
produces: content_types_for(target_class),
31-
authorizations: options[:authorizations],
28+
info: info_object(options[:info].merge(version: options[:doc_version])),
29+
swagger: '2.0',
30+
produces: content_types_for(target_class),
31+
authorizations: options[:authorizations],
3232
securityDefinitions: options[:security_definitions],
33-
security: options[:security],
34-
host: GrapeSwagger::DocMethods::OptionalObject.build(:host, options, request),
35-
basePath: GrapeSwagger::DocMethods::OptionalObject.build(:base_path, options, request),
36-
schemes: options[:schemes].is_a?(String) ? [options[:schemes]] : options[:schemes]
33+
security: options[:security],
34+
host: GrapeSwagger::DocMethods::OptionalObject.build(:host, options, request),
35+
basePath: GrapeSwagger::DocMethods::OptionalObject.build(:base_path, options, request),
36+
schemes: options[:schemes].is_a?(String) ? [options[:schemes]] : options[:schemes]
3737
}
3838

3939
GrapeSwagger::DocMethods::Extensions.add_extensions_to_root(options, object)
@@ -43,12 +43,12 @@ def swagger_object(target_class, request, options)
4343
# building info object
4444
def info_object(infos)
4545
result = {
46-
title: infos[:title] || 'API title',
47-
description: infos[:description],
46+
title: infos[:title] || 'API title',
47+
description: infos[:description],
4848
termsOfServiceUrl: infos[:terms_of_service_url],
49-
contact: contact_object(infos),
50-
license: license_object(infos),
51-
version: infos[:version]
49+
contact: contact_object(infos),
50+
license: license_object(infos),
51+
version: infos[:version]
5252
}
5353

5454
GrapeSwagger::DocMethods::Extensions.add_extensions_to_info(infos, result)
@@ -61,7 +61,7 @@ def info_object(infos)
6161
def license_object(infos)
6262
{
6363
name: infos.delete(:license),
64-
url: infos.delete(:license_url)
64+
url: infos.delete(:license_url)
6565
}.delete_if { |_, value| value.blank? }
6666
end
6767

spec/lib/move_params_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@
597597
let(:definition) do
598598
{
599599
type: 'array',
600-
items: {
600+
items: {
601601
type: 'object',
602602
properties: {
603603
description: 'Test description'

spec/swagger_v2/api_swagger_v2_headers_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class HeadersApi < Grape::API
1212

1313
desc 'This returns something',
1414
failure: [{ code: 400, model: Entities::ApiError }],
15-
headers: {
15+
headers: {
1616
'X-Rate-Limit-Limit' => {
1717
'description' => 'The number of allowed requests in the current period',
1818
'type' => 'integer'

0 commit comments

Comments
 (0)