From aec846919599fc7fadbd63132d5530e593eca15b Mon Sep 17 00:00:00 2001 From: Alex Damian Negru Date: Tue, 6 Apr 2021 13:56:59 +0300 Subject: [PATCH] Bump to ruby-3 Use sinatra PR for ruby-3 compatibility https://github.com/sinatra/sinatra/pull/1684 Remove sinatra Bump bundler version Bump ruby version Temporarily disable rubocop/reek to focus on ruby-3 --- .travis.yml | 2 ++ Gemfile | 9 ++------- Gemfile.lock | 26 ++++++++++++++++---------- Guardfile | 18 +++++++++--------- 4 files changed, 29 insertions(+), 26 deletions(-) diff --git a/.travis.yml b/.travis.yml index be6c7596..170709ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,6 +34,8 @@ rvm: - 2.4.10 - 2.5.8 - 2.6.6 + - 2.7 + - 3.0 - ruby-head - jruby-head gemfile: diff --git a/Gemfile b/Gemfile index 8d8c325f..59ab9f15 100644 --- a/Gemfile +++ b/Gemfile @@ -1,18 +1,13 @@ # frozen_string_literal: true -ruby '2.7.2' +ruby '3.0.0' source 'https://rubygems.org' gemspec # Runtime dependency gem 'rack', '~> 2.0' - -# Pin Sinatra version temporarily, -# because Sinatra 2.0.5 has below issue that prevents our unit tests to pass. -# It will be fixed on the next release. -# https://github.com/sinatra/sinatra/commit/d8c1839 -gem 'sinatra', '2.0.4' +gem 'sinatra', git: 'https://github.com/andrewtblake/sinatra.git', branch: 'master' group :development, :test do gem 'guard-reek', '~> 1.2' diff --git a/Gemfile.lock b/Gemfile.lock index 190bab3e..6f8095cf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,16 @@ +GIT + remote: https://github.com/andrewtblake/sinatra.git + revision: e767648e060673cacbf3dc03844986fbf36283dc + branch: master + specs: + rack-protection (2.1.0) + rack + sinatra (2.1.0) + mustermann (~> 1.0) + rack (~> 2.2) + rack-protection (= 2.1.0) + tilt (~> 2.0) + PATH remote: . specs: @@ -57,8 +70,6 @@ GEM pry (~> 0.13.0) psych (3.3.1) rack (2.2.3) - rack-protection (2.0.4) - rack rainbow (3.0.0) rake (12.3.3) rb-fsevent (0.10.4) @@ -116,11 +127,6 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.2) - sinatra (2.0.4) - mustermann (~> 1.0) - rack (~> 2.0) - rack-protection (= 2.0.4) - tilt (~> 2.0) thor (0.20.3) tilt (2.0.10) unicode-display_width (2.0.0) @@ -145,11 +151,11 @@ DEPENDENCIES rubocop-rake (~> 0.5.1) rubocop-rspec (~> 2.2) simplecov (~> 0.16) - sinatra (= 2.0.4) + sinatra! thor (~> 0.19) RUBY VERSION - ruby 2.7.2p137 + ruby 3.0.0p0 BUNDLED WITH - 2.2.7 + 2.2.15 diff --git a/Guardfile b/Guardfile index 8ce30097..f0437950 100644 --- a/Guardfile +++ b/Guardfile @@ -15,12 +15,12 @@ guard :rspec, cmd: 'bundle exec rspec' do dsl.watch_spec_files_for(ruby.lib_files) end -guard :rubocop, cmd: 'bundle exec rubocop' do - watch(/.+\.rb$/) - watch(%r{(?:.+/)?\.rubocop(?:_todo)?\.yml$}) { |m| File.dirname(m[0]) } -end - -guard :reek, cmd: 'bundle exec reek' do - watch(/.+\.rb$/) - watch('.reek') -end +# guard :rubocop, cmd: 'bundle exec rubocop' do +# watch(/.+\.rb$/) +# watch(%r{(?:.+/)?\.rubocop(?:_todo)?\.yml$}) { |m| File.dirname(m[0]) } +# end +# +# guard :reek, cmd: 'bundle exec reek' do +# watch(/.+\.rb$/) +# watch('.reek') +# end