Skip to content

Commit 31f1516

Browse files
committed
Fix dependencies, test against Rails 6.
1 parent f789a21 commit 31f1516

File tree

7 files changed

+170
-57
lines changed

7 files changed

+170
-57
lines changed

.rubocop_todo.yml

Lines changed: 135 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,54 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2015-08-19 12:23:54 -0400 using RuboCop version 0.38.0.
3+
# on 2019-12-08 10:39:57 -0500 using RuboCop version 0.77.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
77
# versions of RuboCop, may require this file to be generated again.
88

9+
# Offense count: 8
10+
# Configuration parameters: Include.
11+
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
12+
Bundler/DuplicatedGem:
13+
Exclude:
14+
- 'Gemfile'
15+
16+
# Offense count: 8
17+
# Cop supports --auto-correct.
18+
# Configuration parameters: TreatCommentsAsGroupSeparators, Include.
19+
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
20+
Bundler/OrderedGems:
21+
Exclude:
22+
- 'Gemfile'
23+
24+
# Offense count: 1
25+
# Cop supports --auto-correct.
26+
Layout/EmptyLineAfterGuardClause:
27+
Exclude:
28+
- 'app/controllers/grape_swagger_rails/application_controller.rb'
29+
30+
# Offense count: 1
31+
# Cop supports --auto-correct.
32+
Layout/EmptyLineAfterMagicComment:
33+
Exclude:
34+
- 'grape-swagger-rails.gemspec'
35+
36+
# Offense count: 1
37+
# Cop supports --auto-correct.
38+
Layout/EmptyLinesAroundArguments:
39+
Exclude:
40+
- 'lib/grape-swagger-rails.rb'
41+
42+
# Offense count: 12
43+
# Cop supports --auto-correct.
44+
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
45+
# SupportedHashRocketStyles: key, separator, table
46+
# SupportedColonStyles: key, separator, table
47+
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
48+
Layout/HashAlignment:
49+
Exclude:
50+
- 'lib/grape-swagger-rails.rb'
51+
952
# Offense count: 1
1053
Lint/AmbiguousRegexpLiteral:
1154
Exclude:
@@ -18,44 +61,119 @@ Lint/AssignmentInCondition:
1861
- 'spec/dummy/bin/spring'
1962

2063
# Offense count: 2
21-
Lint/HandleExceptions:
64+
# Cop supports --auto-correct.
65+
Lint/ScriptPermission:
66+
Exclude:
67+
- 'Rakefile'
68+
- 'spec/dummy/Rakefile'
69+
70+
# Offense count: 2
71+
# Configuration parameters: AllowComments.
72+
Lint/SuppressedException:
2273
Exclude:
2374
- 'spec/dummy/bin/rails'
2475
- 'spec/dummy/bin/rake'
2576

26-
# Offense count: 31
27-
# Configuration parameters: AllowURI, URISchemes.
28-
Metrics/LineLength:
29-
Max: 129
77+
# Offense count: 9
78+
# Configuration parameters: CountComments, ExcludedMethods.
79+
# ExcludedMethods: refine
80+
Metrics/BlockLength:
81+
Max: 282
82+
83+
# Offense count: 2
84+
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
85+
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
86+
Naming/FileName:
87+
Exclude:
88+
- 'lib/grape-swagger-rails.rb'
89+
- 'spec/features/grape-swagger-rails_spec.rb'
3090

3191
# Offense count: 2
3292
# Cop supports --auto-correct.
33-
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
93+
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners.
94+
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
95+
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
96+
# FunctionalMethods: let, let!, subject, watch
97+
# IgnoredMethods: lambda, proc, it
3498
Style/BlockDelimiters:
35-
Enabled: false
99+
Exclude:
100+
- 'lib/tasks/swagger_ui.rake'
36101

37-
# Offense count: 9
102+
# Offense count: 4
38103
Style/Documentation:
39104
Exclude:
105+
- 'spec/**/*'
106+
- 'test/**/*'
40107
- 'app/controllers/grape_swagger_rails/application_controller.rb'
41108
- 'lib/grape-swagger-rails.rb'
42109
- 'lib/grape-swagger-rails/engine.rb'
43-
- 'lib/grape-swagger-rails/version.rb'
44-
- 'spec/dummy/app/api/api.rb'
45-
- 'spec/dummy/app/controllers/application_controller.rb'
110+
111+
# Offense count: 2
112+
# Cop supports --auto-correct.
113+
# Configuration parameters: EnforcedStyle.
114+
# SupportedStyles: compact, expanded
115+
Style/EmptyMethod:
116+
Exclude:
117+
- 'app/controllers/grape_swagger_rails/application_controller.rb'
46118
- 'spec/dummy/app/controllers/welcome_controller.rb'
119+
120+
# Offense count: 1
121+
# Cop supports --auto-correct.
122+
Style/Encoding:
123+
Exclude:
124+
- 'grape-swagger-rails.gemspec'
125+
126+
# Offense count: 14
127+
# Cop supports --auto-correct.
128+
Style/ExpandPathArguments:
129+
Exclude:
130+
- 'Rakefile'
131+
- 'grape-swagger-rails.gemspec'
132+
- 'lib/script/rails'
133+
- 'lib/tasks/swagger_ui.rake'
134+
- 'spec/dummy/Rakefile'
135+
- 'spec/dummy/bin/bundle'
136+
- 'spec/dummy/bin/rails'
137+
- 'spec/dummy/bin/rake'
47138
- 'spec/dummy/config/application.rb'
139+
- 'spec/dummy/config/boot.rb'
140+
- 'spec/dummy/config/environment.rb'
141+
- 'spec/spec_helper.rb'
48142

49-
# Offense count: 2
50-
# Configuration parameters: Exclude.
51-
Style/FileName:
143+
# Offense count: 37
144+
# Cop supports --auto-correct.
145+
# Configuration parameters: EnforcedStyle.
146+
# SupportedStyles: always, never
147+
Style/FrozenStringLiteralComment:
148+
Enabled: false
149+
150+
# Offense count: 3
151+
# Cop supports --auto-correct.
152+
# Configuration parameters: PreferredDelimiters.
153+
Style/PercentLiteralDelimiters:
52154
Exclude:
155+
- 'grape-swagger-rails.gemspec'
53156
- 'lib/grape-swagger-rails.rb'
54-
- 'spec/features/grape-swagger-rails_spec.rb'
157+
- 'spec/features/swagger_spec.rb'
55158

56159
# Offense count: 1
57160
# Cop supports --auto-correct.
58-
# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
161+
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
162+
# SupportedStyles: slashes, percent_r, mixed
59163
Style/RegexpLiteral:
60164
Exclude:
61165
- 'lib/tasks/swagger_ui.rake'
166+
167+
# Offense count: 2
168+
# Cop supports --auto-correct.
169+
# Configuration parameters: MinSize.
170+
# SupportedStyles: percent, brackets
171+
Style/SymbolArray:
172+
EnforcedStyle: brackets
173+
174+
# Offense count: 48
175+
# Cop supports --auto-correct.
176+
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
177+
# URISchemes: http, https
178+
Metrics/LineLength:
179+
Max: 129

.travis.yml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,45 +9,37 @@ before_install:
99
- mkdir geckodriver
1010
- tar -xzf geckodriver-v0.18.0-linux64.tar.gz -C geckodriver
1111
- export PATH=$PATH:$PWD/geckodriver
12-
- gem install bundler -v'< 2'
13-
14-
before_script:
15-
- "export DISPLAY=:99.0"
16-
- "sh -e /etc/init.d/xvfb start"
17-
- sleep 3 # give xvfb some time to start
1812

1913
language: ruby
2014

2115
cache: bundler
2216

2317
matrix:
2418
include:
25-
- rvm: 2.3.1
19+
- rvm: 2.5.6
2620
script:
2721
- bundle exec danger
28-
- rvm: 2.3.1
22+
- rvm: 2.5.6
2923
env:
3024
- GRAPE_SWAGGER_VERSION=0.8.0
31-
- rvm: 2.3.1
25+
- rvm: 2.5.6
3226
env:
3327
- GRAPE_SWAGGER_VERSION=0.9.0
34-
- rvm: 2.3.1
28+
- rvm: 2.5.6
3529
env:
3630
- GRAPE_SWAGGER_VERSION=0.11.0
37-
- rvm: 2.3.1
31+
- rvm: 2.5.6
3832
env:
3933
- GRAPE_SWAGGER_VERSION=0.20.2
40-
- rvm: 2.3.1
34+
- rvm: 2.5.6
35+
env:
36+
- GRAPE_SWAGGER_VERSION=0.33.0
37+
- rvm: 2.5.6
4138
env:
4239
- GRAPE_SWAGGER_VERSION=HEAD
43-
- rvm: 2.3.0
44-
- rvm: 2.2.5
45-
- rvm: 2.0.0
46-
- rvm: rbx-2
4740
- rvm: ruby-head
4841
- rvm: jruby-head
4942
allow_failures:
5043
- env: GRAPE_SWAGGER_VERSION=HEAD
5144
- rvm: ruby-head
5245
- rvm: jruby-head
53-
- rvm: rbx-2

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
### Next Release
22

3+
* [#98](https://github.com/ruby-grape/grape-swagger-rails/pull/98): Fix: test against Rails 6 - [@dblock](https://github.com/dblock).
4+
35
* Your contribution here.
46

57
### 0.3.1 (February 16, 2019)

Gemfile

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ gemspec
44

55
case version = ENV['GRAPE_SWAGGER_VERSION'] || '~> 0.9.0'
66
when 'HEAD'
7-
gem 'grape-swagger', github: 'tim-vandecasteele/grape-swagger'
7+
gem 'grape-swagger', github: 'ruby-grape/grape-swagger'
88
when '0.8.0'
99
gem 'grape', '0.9.0'
1010
gem 'grape-swagger', '0.8.0'
@@ -21,6 +21,23 @@ else
2121
gem 'grape-swagger', version
2222
end
2323

24-
group :test do
24+
group :development, :test do
2525
gem 'ruby-grape-danger', '~> 0.1.0', require: false
26+
gem 'rake'
27+
gem 'rspec-rails'
28+
gem 'capybara'
29+
gem 'selenium-webdriver'
30+
gem 'sass'
31+
gem 'sass-rails'
32+
gem 'uglifier'
33+
gem 'coffee-rails'
34+
gem 'jquery-rails'
35+
gem 'grape-swagger-ui'
36+
gem 'sprockets'
37+
gem 'rack', '~> 1.6'
38+
gem 'rack-cors'
39+
gem 'rubocop', '0.77.0'
40+
gem 'mime-types', '< 3.0'
41+
gem 'rack-no_animations'
42+
gem 'nokogiri'
2643
end

grape-swagger-rails.gemspec

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,4 @@ Gem::Specification.new do |spec|
1717
spec.require_paths = %w(lib)
1818

1919
spec.add_dependency 'railties', '>= 3.2.12'
20-
21-
spec.add_development_dependency 'bundler', '~> 1.15'
22-
spec.add_development_dependency 'rake'
23-
spec.add_development_dependency 'git'
24-
spec.add_development_dependency 'rspec-rails'
25-
spec.add_development_dependency 'capybara'
26-
spec.add_development_dependency 'grape'
27-
spec.add_development_dependency 'grape-swagger', '>= 0.7.2'
28-
spec.add_development_dependency 'selenium-webdriver'
29-
spec.add_development_dependency 'sass-rails'
30-
spec.add_development_dependency 'uglifier'
31-
spec.add_development_dependency 'coffee-rails'
32-
spec.add_development_dependency 'jquery-rails'
33-
spec.add_development_dependency 'grape-swagger-ui'
34-
spec.add_development_dependency 'sprockets'
35-
spec.add_development_dependency 'rack', '~> 1.6'
36-
spec.add_development_dependency 'rack-cors'
37-
spec.add_development_dependency 'rubocop', '0.38.0'
38-
spec.add_development_dependency 'mime-types', '< 3.0'
39-
spec.add_development_dependency 'rack-no_animations'
40-
spec.add_development_dependency 'nokogiri', '< 1.7.0'
4120
end
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
//= link application.js
2+
//= link application.css
3+
//= link grape_swagger_rails/application.css
4+
//= link grape_swagger_rails/application.js

spec/support/capybara.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33

44
Capybara.default_driver = :selenium
55
Capybara.server_port = 3000
6+
Capybara.server = :webrick

0 commit comments

Comments
 (0)