Merge pull request #95 from turniere/ticket/TUR-6

Update to Rails 6
This commit is contained in:
Jonas Seydel 2020-06-06 12:08:51 +02:00 committed by GitHub
commit f6e3a95489
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 157 additions and 126 deletions

View File

@ -1 +1 @@
2.6.2 2.6.5

10
Gemfile
View File

@ -3,14 +3,14 @@
source 'https://rubygems.org' source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" } git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.6.2' ruby '2.6.5'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.1' gem 'rails', '~> 6.0.3'
# Use sqlite3 as the database for Active Record # Use sqlite3 as the database for Active Record
gem 'sqlite3' gem 'sqlite3'
# Use Puma as the app server # Use Puma as the app server
gem 'puma', '~> 3.11' gem 'puma', '~> 4.1'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# gem 'jbuilder', '~> 2.5' # gem 'jbuilder', '~> 2.5'
# Use ActiveModel has_secure_password # Use ActiveModel has_secure_password
@ -23,7 +23,7 @@ gem 'puma', '~> 3.11'
# gem 'capistrano-rails', group: :development # gem 'capistrano-rails', group: :development
# Reduces boot times through caching; required in config/boot.rb # Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false gem 'bootsnap', '>= 1.4.2', require: false
# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible # Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
# gem 'rack-cors' # gem 'rack-cors'
@ -56,7 +56,7 @@ group :development do
gem 'listen', '>= 3.0.5', '< 3.2' gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'railroady' gem 'railroady'
gem 'rubocop', '0.72.0' gem 'rubocop', '0.85.0'
gem 'rubocop-performance' gem 'rubocop-performance'
gem 'rubocop-rails' gem 'rubocop-rails'
gem 'solargraph' gem 'solargraph'

View File

@ -1,112 +1,127 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
actioncable (5.2.3) actioncable (6.0.3.1)
actionpack (= 5.2.3) actionpack (= 6.0.3.1)
nio4r (~> 2.0) nio4r (~> 2.0)
websocket-driver (>= 0.6.1) websocket-driver (>= 0.6.1)
actionmailer (5.2.3) actionmailbox (6.0.3.1)
actionpack (= 5.2.3) actionpack (= 6.0.3.1)
actionview (= 5.2.3) activejob (= 6.0.3.1)
activejob (= 5.2.3) activerecord (= 6.0.3.1)
activestorage (= 6.0.3.1)
activesupport (= 6.0.3.1)
mail (>= 2.7.1)
actionmailer (6.0.3.1)
actionpack (= 6.0.3.1)
actionview (= 6.0.3.1)
activejob (= 6.0.3.1)
mail (~> 2.5, >= 2.5.4) mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
actionpack (5.2.3) actionpack (6.0.3.1)
actionview (= 5.2.3) actionview (= 6.0.3.1)
activesupport (= 5.2.3) activesupport (= 6.0.3.1)
rack (~> 2.0) rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3) rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2) rails-html-sanitizer (~> 1.0, >= 1.2.0)
actionview (5.2.3) actiontext (6.0.3.1)
activesupport (= 5.2.3) actionpack (= 6.0.3.1)
activerecord (= 6.0.3.1)
activestorage (= 6.0.3.1)
activesupport (= 6.0.3.1)
nokogiri (>= 1.8.5)
actionview (6.0.3.1)
activesupport (= 6.0.3.1)
builder (~> 3.1) builder (~> 3.1)
erubi (~> 1.4) erubi (~> 1.4)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3) rails-html-sanitizer (~> 1.1, >= 1.2.0)
active_model_serializers (0.10.10) active_model_serializers (0.10.10)
actionpack (>= 4.1, < 6.1) actionpack (>= 4.1, < 6.1)
activemodel (>= 4.1, < 6.1) activemodel (>= 4.1, < 6.1)
case_transform (>= 0.2) case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3) jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
activejob (5.2.3) activejob (6.0.3.1)
activesupport (= 5.2.3) activesupport (= 6.0.3.1)
globalid (>= 0.3.6) globalid (>= 0.3.6)
activemodel (5.2.3) activemodel (6.0.3.1)
activesupport (= 5.2.3) activesupport (= 6.0.3.1)
activerecord (5.2.3) activerecord (6.0.3.1)
activemodel (= 5.2.3) activemodel (= 6.0.3.1)
activesupport (= 5.2.3) activesupport (= 6.0.3.1)
arel (>= 9.0) activestorage (6.0.3.1)
activestorage (5.2.3) actionpack (= 6.0.3.1)
actionpack (= 5.2.3) activejob (= 6.0.3.1)
activerecord (= 5.2.3) activerecord (= 6.0.3.1)
marcel (~> 0.3.1) marcel (~> 0.3.1)
activesupport (5.2.3) activesupport (6.0.3.1)
concurrent-ruby (~> 1.0, >= 1.0.2) concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2) i18n (>= 0.7, < 2)
minitest (~> 5.1) minitest (~> 5.1)
tzinfo (~> 1.1) tzinfo (~> 1.1)
arel (9.0.0) zeitwerk (~> 2.2, >= 2.2.2)
ast (2.4.0) ast (2.4.0)
backport (1.1.2) backport (1.1.2)
bcrypt (3.1.13) bcrypt (3.1.13)
bootsnap (1.4.5) benchmark (0.1.0)
bootsnap (1.4.6)
msgpack (~> 1.0) msgpack (~> 1.0)
builder (3.2.3) builder (3.2.4)
byebug (11.0.1) byebug (11.1.3)
case_transform (0.2) case_transform (0.2)
activesupport activesupport
concurrent-ruby (1.1.5) concurrent-ruby (1.1.6)
coveralls (0.8.23) coveralls (0.8.23)
json (>= 1.8, < 3) json (>= 1.8, < 3)
simplecov (~> 0.16.1) simplecov (~> 0.16.1)
term-ansicolor (~> 1.3) term-ansicolor (~> 1.3)
thor (>= 0.19.4, < 2.0) thor (>= 0.19.4, < 2.0)
tins (~> 1.6) tins (~> 1.6)
crass (1.0.5) crass (1.0.6)
devise (4.7.1) devise (4.7.1)
bcrypt (~> 3.0) bcrypt (~> 3.0)
orm_adapter (~> 0.1) orm_adapter (~> 0.1)
railties (>= 4.1.0) railties (>= 4.1.0)
responders responders
warden (~> 1.2.3) warden (~> 1.2.3)
devise_token_auth (1.1.3) devise_token_auth (1.1.4)
bcrypt (~> 3.0) bcrypt (~> 3.0)
devise (> 3.5.2, < 5) devise (> 3.5.2, < 5)
rails (>= 4.2.0, < 6.1) rails (>= 4.2.0, < 6.1)
sprockets (= 3.7.2)
diff-lcs (1.3) diff-lcs (1.3)
docile (1.3.2) docile (1.3.2)
domain_name (0.5.20190701) domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0) unf (>= 0.0.5, < 1.0.0)
e2mmap (0.1.0)
erubi (1.9.0) erubi (1.9.0)
factory_bot (5.1.1) factory_bot (5.2.0)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
factory_bot_rails (5.1.1) factory_bot_rails (5.2.0)
factory_bot (~> 5.1.0) factory_bot (~> 5.2.0)
railties (>= 4.2.0) railties (>= 4.2.0)
faker (2.7.0) faker (2.12.0)
i18n (>= 1.6, < 1.8) i18n (>= 1.6, < 2)
ffi (1.11.2) ffi (1.13.0)
globalid (0.4.2) globalid (0.4.2)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
htmlentities (4.3.4)
http-cookie (1.0.3) http-cookie (1.0.3)
domain_name (~> 0.5) domain_name (~> 0.5)
i18n (1.7.0) i18n (1.8.3)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
interactor (3.1.1) interactor (3.1.2)
interactor-rails (2.2.1) interactor-rails (2.2.1)
interactor (~> 3.0) interactor (~> 3.0)
rails (>= 4.2) rails (>= 4.2)
jaro_winkler (1.5.4) jaro_winkler (1.5.4)
json (2.2.0) json (2.3.0)
jsonapi-renderer (0.2.2) jsonapi-renderer (0.2.2)
listen (3.1.5) listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4) rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7) rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2) ruby_dep (~> 1.2)
loofah (2.3.1) loofah (2.5.0)
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.5.9) nokogiri (>= 1.5.9)
mail (2.7.1) mail (2.7.1)
@ -115,156 +130,172 @@ GEM
rest-client (~> 2.0.2) rest-client (~> 2.0.2)
marcel (0.3.3) marcel (0.3.3)
mimemagic (~> 0.3.2) mimemagic (~> 0.3.2)
method_source (0.9.2) maruku (0.7.3)
mime-types (3.3) method_source (1.0.0)
mime-types (3.3.1)
mime-types-data (~> 3.2015) mime-types-data (~> 3.2015)
mime-types-data (3.2019.1009) mime-types-data (3.2020.0512)
mimemagic (0.3.3) mimemagic (0.3.5)
mini_mime (1.0.2) mini_mime (1.0.2)
mini_portile2 (2.4.0) mini_portile2 (2.4.0)
minitest (5.13.0) minitest (5.14.1)
msgpack (1.3.1) msgpack (1.3.3)
netrc (0.11.0) netrc (0.11.0)
nio4r (2.5.2) nio4r (2.5.2)
nokogiri (1.10.5) nokogiri (1.10.9)
mini_portile2 (~> 2.4.0) mini_portile2 (~> 2.4.0)
orm_adapter (0.5.0) orm_adapter (0.5.0)
parallel (1.19.0) parallel (1.19.1)
parser (2.6.5.0) parser (2.7.1.3)
ast (~> 2.4.0) ast (~> 2.4.0)
pg (1.1.4) pg (1.2.3)
puma (3.12.1) puma (4.3.5)
rack (2.0.7) nio4r (~> 2.0)
rack-cors (1.1.0) rack (2.2.2)
rack-cors (1.1.1)
rack (>= 2.0.0) rack (>= 2.0.0)
rack-test (1.1.0) rack-test (1.1.0)
rack (>= 1.0, < 3) rack (>= 1.0, < 3)
railroady (1.5.3) railroady (1.5.3)
rails (5.2.3) rails (6.0.3.1)
actioncable (= 5.2.3) actioncable (= 6.0.3.1)
actionmailer (= 5.2.3) actionmailbox (= 6.0.3.1)
actionpack (= 5.2.3) actionmailer (= 6.0.3.1)
actionview (= 5.2.3) actionpack (= 6.0.3.1)
activejob (= 5.2.3) actiontext (= 6.0.3.1)
activemodel (= 5.2.3) actionview (= 6.0.3.1)
activerecord (= 5.2.3) activejob (= 6.0.3.1)
activestorage (= 5.2.3) activemodel (= 6.0.3.1)
activesupport (= 5.2.3) activerecord (= 6.0.3.1)
activestorage (= 6.0.3.1)
activesupport (= 6.0.3.1)
bundler (>= 1.3.0) bundler (>= 1.3.0)
railties (= 5.2.3) railties (= 6.0.3.1)
sprockets-rails (>= 2.0.0) sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3) rails-dom-testing (2.0.3)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
nokogiri (>= 1.6) nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0) rails-html-sanitizer (1.3.0)
loofah (~> 2.3) loofah (~> 2.3)
railties (5.2.3) railties (6.0.3.1)
actionpack (= 5.2.3) actionpack (= 6.0.3.1)
activesupport (= 5.2.3) activesupport (= 6.0.3.1)
method_source method_source
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0) thor (>= 0.20.3, < 2.0)
rainbow (3.0.0) rainbow (3.0.0)
rake (13.0.1) rake (13.0.1)
rb-fsevent (0.10.3) rb-fsevent (0.10.4)
rb-inotify (0.10.0) rb-inotify (0.10.1)
ffi (~> 1.0) ffi (~> 1.0)
responders (3.0.0) regexp_parser (1.7.0)
responders (3.0.1)
actionpack (>= 5.0) actionpack (>= 5.0)
railties (>= 5.0) railties (>= 5.0)
rest-client (2.0.2) rest-client (2.0.2)
http-cookie (>= 1.0.2, < 2.0) http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0) mime-types (>= 1.16, < 4.0)
netrc (~> 0.8) netrc (~> 0.8)
reverse_markdown (1.3.0) reverse_markdown (2.0.0)
nokogiri nokogiri
rspec-core (3.9.0) rexml (3.2.4)
rspec-support (~> 3.9.0) rspec-core (3.9.2)
rspec-expectations (3.9.0) rspec-support (~> 3.9.3)
rspec-expectations (3.9.2)
diff-lcs (>= 1.2.0, < 2.0) diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0) rspec-support (~> 3.9.0)
rspec-mocks (3.9.0) rspec-mocks (3.9.1)
diff-lcs (>= 1.2.0, < 2.0) diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0) rspec-support (~> 3.9.0)
rspec-rails (3.9.0) rspec-rails (4.0.1)
actionpack (>= 3.0) actionpack (>= 4.2)
activesupport (>= 3.0) activesupport (>= 4.2)
railties (>= 3.0) railties (>= 4.2)
rspec-core (~> 3.9.0) rspec-core (~> 3.9)
rspec-expectations (~> 3.9.0) rspec-expectations (~> 3.9)
rspec-mocks (~> 3.9.0) rspec-mocks (~> 3.9)
rspec-support (~> 3.9.0) rspec-support (~> 3.9)
rspec-support (3.9.0) rspec-support (3.9.3)
rubocop (0.72.0) rubocop (0.85.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10) parallel (~> 1.10)
parser (>= 2.6) parser (>= 2.7.0.1)
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.7)
rexml
rubocop-ast (>= 0.0.3)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.7) unicode-display_width (>= 1.4.0, < 2.0)
rubocop-performance (1.5.1) rubocop-ast (0.0.3)
parser (>= 2.7.0.1)
rubocop-performance (1.6.1)
rubocop (>= 0.71.0) rubocop (>= 0.71.0)
rubocop-rails (2.3.2) rubocop-rails (2.5.2)
activesupport
rack (>= 1.1) rack (>= 1.1)
rubocop (>= 0.72.0) rubocop (>= 0.72.0)
ruby-progressbar (1.10.1) ruby-progressbar (1.10.1)
ruby_dep (1.5.0) ruby_dep (1.5.0)
shoulda-matchers (4.1.2) shoulda-matchers (4.3.0)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
simplecov (0.16.1) simplecov (0.16.1)
docile (~> 1.1) docile (~> 1.1)
json (>= 1.8, < 3) json (>= 1.8, < 3)
simplecov-html (~> 0.10.0) simplecov-html (~> 0.10.0)
simplecov-html (0.10.2) simplecov-html (0.10.2)
solargraph (0.37.2) solargraph (0.39.8)
backport (~> 1.1) backport (~> 1.1)
benchmark
bundler (>= 1.17.2) bundler (>= 1.17.2)
htmlentities (~> 4.3, >= 4.3.4) e2mmap
jaro_winkler (~> 1.5) jaro_winkler (~> 1.5)
maruku (~> 0.7, >= 0.7.3)
nokogiri (~> 1.9, >= 1.9.1) nokogiri (~> 1.9, >= 1.9.1)
parser (~> 2.3) parser (~> 2.3)
reverse_markdown (~> 1.0, >= 1.0.5) reverse_markdown (>= 1.0.5, < 3)
rubocop (~> 0.52) rubocop (~> 0.52)
thor (~> 0.19, >= 0.19.4) thor (~> 1.0)
tilt (~> 2.0) tilt (~> 2.0)
yard (~> 0.9) yard (~> 0.9, >= 0.9.24)
spring (2.1.0) spring (2.1.0)
spring-watcher-listen (2.0.1) spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0) listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0) spring (>= 1.2, < 3.0)
sprockets (4.0.0) sprockets (3.7.2)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
rack (> 1, < 3) rack (> 1, < 3)
sprockets-rails (3.2.1) sprockets-rails (3.2.1)
actionpack (>= 4.0) actionpack (>= 4.0)
activesupport (>= 4.0) activesupport (>= 4.0)
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
sqlite3 (1.4.1) sqlite3 (1.4.2)
sync (0.5.0)
term-ansicolor (1.7.1) term-ansicolor (1.7.1)
tins (~> 1.0) tins (~> 1.0)
thor (0.20.3) thor (1.0.1)
thread_safe (0.3.6) thread_safe (0.3.6)
tilt (2.0.10) tilt (2.0.10)
tins (1.22.2) tins (1.25.0)
tzinfo (1.2.5) sync
tzinfo (1.2.7)
thread_safe (~> 0.1) thread_safe (~> 0.1)
unf (0.1.4) unf (0.1.4)
unf_ext unf_ext
unf_ext (0.0.7.6) unf_ext (0.0.7.7)
unicode-display_width (1.6.0) unicode-display_width (1.7.0)
warden (1.2.8) warden (1.2.8)
rack (>= 2.0.6) rack (>= 2.0.6)
websocket-driver (0.7.1) websocket-driver (0.7.2)
websocket-extensions (>= 0.1.0) websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.4) websocket-extensions (0.1.5)
yard (0.9.20) yard (0.9.25)
zeitwerk (2.3.0)
PLATFORMS PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
active_model_serializers active_model_serializers
bootsnap (>= 1.1.0) bootsnap (>= 1.4.2)
byebug byebug
coveralls coveralls
devise devise
@ -276,12 +307,12 @@ DEPENDENCIES
listen (>= 3.0.5, < 3.2) listen (>= 3.0.5, < 3.2)
mailgun-ruby mailgun-ruby
pg pg
puma (~> 3.11) puma (~> 4.1)
rack-cors rack-cors
railroady railroady
rails (~> 5.2.1) rails (~> 6.0.3)
rspec-rails rspec-rails
rubocop (= 0.72.0) rubocop (= 0.85.0)
rubocop-performance rubocop-performance
rubocop-rails rubocop-rails
shoulda-matchers shoulda-matchers
@ -292,7 +323,7 @@ DEPENDENCIES
tzinfo-data tzinfo-data
RUBY VERSION RUBY VERSION
ruby 2.6.2p47 ruby 2.6.5p114
BUNDLED WITH BUNDLED WITH
1.17.2 1.17.2

View File

@ -1,4 +1,4 @@
FROM ruby:2.6.2-alpine FROM ruby:2.6.5-alpine
RUN apk add --no-cache build-base tzdata sqlite sqlite-dev postgresql-dev && gem install tzinfo-data RUN apk add --no-cache build-base tzdata sqlite sqlite-dev postgresql-dev && gem install tzinfo-data
WORKDIR /app WORKDIR /app
COPY Gemfile* /app/ COPY Gemfile* /app/

View File

@ -49,7 +49,7 @@ RSpec.describe MatchesController, type: :controller do
it 'should return success' do it 'should return success' do
get :show, params: { id: @match.to_param } get :show, params: { id: @match.to_param }
expect(response).to be_successful expect(response).to be_successful
expect(response.content_type).to eq('application/json') expect(response.media_type).to eq('application/json')
end end
it 'should return the correct state' do it 'should return the correct state' do

View File

@ -248,7 +248,7 @@ RSpec.describe TournamentsController, type: :controller do
it 'renders a JSON response with the new tournament' do it 'renders a JSON response with the new tournament' do
post :create, params: create_playoff_tournament_data post :create, params: create_playoff_tournament_data
expect(response).to have_http_status(:created) expect(response).to have_http_status(:created)
expect(response.content_type).to eq('application/json') expect(response.media_type).to eq('application/json')
expect(response.location).to eq(tournament_url(Tournament.last)) expect(response.location).to eq(tournament_url(Tournament.last))
end end
end end
@ -329,7 +329,7 @@ RSpec.describe TournamentsController, type: :controller do
it 'renders a JSON response with the tournament' do it 'renders a JSON response with the tournament' do
put :update, params: { id: @tournament.to_param }.merge(valid_update) put :update, params: { id: @tournament.to_param }.merge(valid_update)
expect(response).to have_http_status(:ok) expect(response).to have_http_status(:ok)
expect(response.content_type).to eq('application/json') expect(response.media_type).to eq('application/json')
end end
context 'any variable relevant for group stage to playoff transition changed' do context 'any variable relevant for group stage to playoff transition changed' do