Skip to content

Commit

Permalink
Merge pull request #3 from Mapotempo/upgrade_to_ruby_3_1
Browse files Browse the repository at this point in the history
Upgrade to ruby 3 1
  • Loading branch information
giallon authored Dec 22, 2023
2 parents d17258c + 6818542 commit 36b2b38
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deliver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.5
ruby-version: 3.1
- name: Install dependencies
run: bundle install
- name: Run tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.5
ruby-version: 3.1
- name: Install dependencies
run: bundle install
- name: Run tests
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
/tmp/
mapotempo_rubocop-*.gem
.byebug_history
.devcontainer
7 changes: 5 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
inherit_from:
- rubocop-default.yml
inherit_from:
- rubocop-default.yml

AllCops:
NewCops: disable
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.1.4
66 changes: 39 additions & 27 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,51 +1,63 @@
PATH
remote: .
specs:
mapotempo_rubocop (0.0.0)
rubocop (~> 0.81.0)
rubocop-minitest (~> 0.8.1)
rubocop-performance (~> 1.5.2)
mapotempo_rubocop (0.1.0)
rubocop (~> 1.56.1)
rubocop-minitest (~> 0.31.0)
rubocop-performance (~> 1.19.0)

GEM
remote: https://rubygems.org/
specs:
ast (2.4.1)
ast (2.4.2)
base64 (0.1.1)
byebug (11.1.3)
jaro_winkler (1.5.4)
minitest (5.14.2)
minitest-focus (1.2.1)
json (2.6.3)
language_server-protocol (3.17.0.3)
minitest (5.19.0)
minitest-focus (1.4.0)
minitest (>= 4, < 6)
parallel (1.19.2)
parser (2.7.1.5)
parallel (1.23.0)
parser (3.2.2.3)
ast (~> 2.4.1)
rainbow (3.0.0)
rake (10.5.0)
rexml (3.2.4)
rubocop (0.81.0)
jaro_winkler (~> 1.5.1)
racc
racc (1.7.1)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.8.1)
rexml (3.2.6)
rubocop (1.56.1)
base64 (~> 0.1.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 2.7.0.1)
parser (>= 3.2.2.3)
rainbow (>= 2.2.2, < 4.0)
rexml
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-minitest (0.8.1)
rubocop (>= 0.74)
rubocop-performance (1.5.2)
rubocop (>= 0.71.0)
ruby-progressbar (1.10.1)
unicode-display_width (1.7.0)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-minitest (0.31.0)
rubocop (>= 1.39, < 2.0)
rubocop-performance (1.19.0)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
ruby-progressbar (1.13.0)
unicode-display_width (2.4.2)

PLATFORMS
ruby

DEPENDENCIES
bundler (~> 1.17.3)
bundler (~> 2.3.26)
byebug
mapotempo_rubocop!
minitest
minitest-focus
rake (~> 10.0)
rake (~> 13.0.6)

BUNDLED WITH
1.17.3
2.3.26
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020 Valentin Le Guennec
Copyright (c) 2023 Valentin Le Guennec

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 5 additions & 5 deletions mapotempo_rubocop.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ Gem::Specification.new do |spec|
spec.files = Dir['{app,config,db,lib}/**/*', 'LICENSE', 'Rakefile', 'README.md', '*.yml']
spec.test_files = Dir['test/**/*']

spec.add_dependency 'rubocop', '~> 0.81.0'
spec.add_dependency 'rubocop-minitest', '~> 0.8.1'
spec.add_dependency 'rubocop-performance', '~> 1.5.2'
spec.add_dependency 'rubocop', '~> 1.56.1'
spec.add_dependency 'rubocop-minitest', '~> 0.31.0'
spec.add_dependency 'rubocop-performance', '~> 1.19.0'

spec.add_development_dependency 'bundler', '~> 1.17.3'
spec.add_development_dependency 'rake', '~> 10.0'
spec.add_development_dependency 'bundler', '~> 2.3.26'
spec.add_development_dependency 'rake', '~> 13.0.6'
end
2 changes: 1 addition & 1 deletion rubocop-all.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AllCops:
TargetRubyVersion: 2.5
TargetRubyVersion: 3.1
# Cop names are not displayed in offense messages by default. Change behavior
# by overriding DisplayCopNames, or by giving the -D/--display-cop-names
# option.
Expand Down
4 changes: 2 additions & 2 deletions test/mapotempo_rubocop_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def test_config_is_correct
parallel = ENV['RUBOCOP_PARALLEL'] || ENV['CI'] ? '--parallel' : nil
# parallel option could cause not to use rubocop from bundle
options = "#{parallel} -f c --config .rubocop.yml --fail-level E --display-only-fail-level-offenses"
cmd = "bundle exec rubocop ./* #{options}"
o = system(cmd, [:out, :err] => '/dev/null')
cmd = "bundle exec rubocop #{options}"
o = system(cmd)
assert o, "New Rubocop offenses added to the project, run: #{cmd}"
end
end

0 comments on commit 36b2b38

Please sign in to comment.