diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index ce758c51734..d91c69064b3 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -35,7 +35,7 @@ body: - type: input attributes: label: Language version - description: If applicable, specify the language version you're using (e.g., Node.js `14.1`, Ruby `2.7`, etc.) + description: If applicable, specify the language version you're using (e.g., Node.js `14.1`, Ruby `3.1`, etc.) validations: required: false diff --git a/.rubocop.yml b/.rubocop.yml index 1d5710b4aa2..763aa81b251 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -256,6 +256,8 @@ Style/HashExcept: Enabled: true Style/HashLikeCase: Enabled: false +Style/HashSyntax: + EnforcedShorthandSyntax: either Style/HashTransformKeys: Enabled: false Style/HashTransformValues: @@ -320,3 +322,13 @@ Style/SpecialGlobalVars: Enabled: false Style/SelectByRegexp: Enabled: false + +# TODO these were temporarily disabled during the Ruby 2.7 -> 3.1 upgrade +# in order to keep the upgrade diff small, they will be enabled/fixed in +# a follow-on PR. +Naming/BlockForwarding: + Enabled: false +Style/MutableConstant: + Enabled: false +Style/RedundantFreeze: + Enabled: false diff --git a/.ruby-version b/.ruby-version index 49cdd668e1c..ef538c28109 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.7.6 +3.1.2 diff --git a/Dockerfile b/Dockerfile index b68c489feb3..1130ad7f049 100644 --- a/Dockerfile +++ b/Dockerfile @@ -68,7 +68,7 @@ RUN if ! getent group "$USER_GID"; then groupadd --gid "$USER_GID" dependabot ; ### RUBY -ARG RUBY_VERSION=2.7.6 +ARG RUBY_VERSION=3.1.2 ARG RUBY_INSTALL_VERSION=0.8.3 ARG RUBYGEMS_SYSTEM_VERSION=3.3.22 diff --git a/common/dependabot-common.gemspec b/common/dependabot-common.gemspec index 764900dcea9..254637b59a7 100644 --- a/common/dependabot-common.gemspec +++ b/common/dependabot-common.gemspec @@ -18,7 +18,7 @@ Gem::Specification.new do |spec| spec.require_path = "lib" spec.files = [] - spec.required_ruby_version = ">= 2.7.0" + spec.required_ruby_version = ">= 3.1.0" spec.required_rubygems_version = ">= 3.3.22" spec.add_dependency "activesupport", ">= 6.0.0" @@ -35,8 +35,6 @@ Gem::Specification.new do |spec| spec.add_dependency "parser", ">= 2.5", "< 4.0" spec.add_dependency "toml-rb", ">= 1.1.2", "< 3.0" - spec.add_development_dependency "debase", "0.2.3" - spec.add_development_dependency "debase-ruby_core_source", "0.10.17" spec.add_development_dependency "debug", ">= 1.0.0" spec.add_development_dependency "gpgme", "~> 2.0" spec.add_development_dependency "parallel_tests", "~> 3.13.0" @@ -45,7 +43,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency "rspec-its", "~> 1.2" spec.add_development_dependency "rubocop", "~> 1.36.0" spec.add_development_dependency "rubocop-performance", "~> 1.15.0" - spec.add_development_dependency "ruby-debug-ide", "~> 0.7.3" spec.add_development_dependency "simplecov", "~> 0.21.0" spec.add_development_dependency "simplecov-console", "~> 0.9.1" spec.add_development_dependency "stackprof", "~> 0.2.16" diff --git a/common/spec/warning_monkey_patch.rb b/common/spec/warning_monkey_patch.rb index 10af502fef7..399c85568d4 100644 --- a/common/spec/warning_monkey_patch.rb +++ b/common/spec/warning_monkey_patch.rb @@ -1,11 +1,11 @@ # frozen_string_literal: true ALLOW_PATTERNS = [ - # Ignore parser warnings for ruby 2.7 minor version mismatches. + # Ignore `parser/current` warnings for ruby patch version mismatches. # This is a recurring issue that occurs whenever the parser gets # ahead of our installed ruby version. - %r{parser/current is loading parser/ruby27}, - /2.7.\d-compliant syntax, but you are running 2.7.\d/, + %r{parser/current is loading parser/ruby31}, + /3.1.\d-compliant syntax, but you are running 3.1.\d/, %r{whitequark/parser} ].freeze diff --git a/omnibus/dependabot-omnibus.gemspec b/omnibus/dependabot-omnibus.gemspec index 4e8ff643f54..23e4487c9cc 100644 --- a/omnibus/dependabot-omnibus.gemspec +++ b/omnibus/dependabot-omnibus.gemspec @@ -17,7 +17,7 @@ Gem::Specification.new do |spec| spec.homepage = common_gemspec.homepage spec.license = common_gemspec.license - spec.required_ruby_version = ">= 2.7.0" + spec.required_ruby_version = ">= 3.1.0" spec.require_path = "lib" spec.files = ["lib/dependabot/omnibus.rb"] diff --git a/pub/dependabot-pub.gemspec b/pub/dependabot-pub.gemspec index ad7b92ecdca..50bb68e3815 100644 --- a/pub/dependabot-pub.gemspec +++ b/pub/dependabot-pub.gemspec @@ -24,6 +24,8 @@ Gem::Specification.new do |spec| spec.add_dependency "dependabot-common", Dependabot::VERSION + spec.add_development_dependency "webrick", ">= 1.7" + common_gemspec.development_dependencies.each do |dep| spec.add_development_dependency dep.name, dep.requirement.to_s end diff --git a/updater/Gemfile b/updater/Gemfile index d084ae33af3..e0e7c37262d 100644 --- a/updater/Gemfile +++ b/updater/Gemfile @@ -27,7 +27,7 @@ gem "sentry-raven", "~> 3.1" gem "terminal-table", "~> 3.0.2" group :test do - gem "byebug", "~> 11.1" + gem "debug", "~> 1.0.0" gem "rspec", "~> 3.11" gem "rubocop", "~> 1.36.0" gem "rubocop-performance", "~> 1.15.0" diff --git a/updater/spec/spec_helper.rb b/updater/spec/spec_helper.rb index 5fe57eb7ef7..e7c2efa6597 100644 --- a/updater/spec/spec_helper.rb +++ b/updater/spec/spec_helper.rb @@ -1,6 +1,5 @@ # frozen_string_literal: true -require "byebug" require "dependabot/logger" require "dependabot/python" require "dependabot/terraform"