Skip to content

Commit

Permalink
Bump Ruby from 3.3.6 to 3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieMagee committed Dec 20, 2024
1 parent 945bb18 commit be20242
Show file tree
Hide file tree
Showing 21 changed files with 2,376 additions and 1,009 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"ghcr.io/devcontainers/features/github-cli": "latest",
"ghcr.io/devcontainers/features/node": "lts",
"ghcr.io/devcontainers/features/go": "latest",
"ghcr.io/devcontainers/features/ruby": "3.3.6",
"ghcr.io/devcontainers/features/ruby": "3.4.0-rc1",
"ghcr.io/devcontainers/features/rust": "latest",
"ghcr.io/devcontainers/features/dotnet": "latest",
"ghcr.io/devcontainers/features/sshd:1": {
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ AllCops:
- "dry-run/**/*"
- "bundler/helpers/spec_helpers/*"
NewCops: enable
TargetRubyVersion: 3.1
TargetRubyVersion: 3.4
SuggestExtensions: false
Gemspec/DeprecatedAttributeAssignment:
Enabled: true
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.6
3.4.0-rc1
2 changes: 1 addition & 1 deletion Dockerfile.updater-core
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ COPY --chown=dependabot:dependabot LICENSE $DEPENDABOT_HOME

# Install Ruby from official Docker image
# When bumping Ruby minor, need to also add the previous version to `bundler/helpers/v2/monkey_patches/definition_ruby_version_patch.rb`
COPY --from=docker.io/library/ruby:3.3.6-bookworm --chown=dependabot:dependabot /usr/local /usr/local
COPY --from=docker.io/library/ruby:3.4.0-rc1-bookworm --chown=dependabot:dependabot /usr/local /usr/local

# We had to explicitly bump this as the bundled version `0.2.2` in ubuntu 22.04 has a bug.
# Once Ubuntu base image pulls in a new enough yaml version, we may not need to
Expand Down
13 changes: 4 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ PATH
faraday (= 2.7.11)
faraday-retry (= 2.2.0)
gitlab (= 5.0.0)
json (< 2.7)
json (~> 2.9)
nokogiri (~> 1.8)
octokit (>= 4.6, < 8.0)
opentelemetry-api (~> 1.4)
Expand Down Expand Up @@ -210,7 +210,7 @@ GEM
rdoc
reline (>= 0.4.2)
jmespath (1.6.2)
json (2.6.3)
json (2.9.1)
language_server-protocol (3.17.0.3)
mime-types (3.5.2)
mime-types-data (~> 3.2015)
Expand All @@ -220,13 +220,8 @@ GEM
multi_xml (0.7.1)
bigdecimal (~> 3.1)
netrc (0.11.0)
nokogiri (1.16.0-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.0-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.0-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.0-x86_64-linux)
nokogiri (1.17.2)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
octokit (6.1.1)
faraday (>= 1, < 3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def source_requirements
Gem::Specification.new("Ruby\0", requested_version)
end

%w(2.5.3 2.6.10 2.7.8 3.0.7 3.1.6 3.2.4).each do |version|
%w(2.5.3 2.6.10 2.7.8 3.0.7 3.1.6 3.2.4 3.3.6).each do |version|
sources.metadata_source.specs << Gem::Specification.new("Ruby\0", version)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class RubyRequirementSetter
class RubyVersionNotFound < StandardError; end

RUBY_VERSIONS = %w(
1.8.7 1.9.3 2.0.0 2.1.10 2.2.10 2.3.8 2.4.10 2.5.9 2.6.9 2.7.6 3.0.6 3.1.6 3.2.4 3.3.6
1.8.7 1.9.3 2.0.0 2.1.10 2.2.10 2.3.8 2.4.10 2.5.9 2.6.9 2.7.6 3.0.6 3.1.6 3.2.4 3.3.6 3.4.0-rc1
).freeze

attr_reader :gemspec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,18 @@
it { is_expected.to include(%(gem "business", "~> 1.4.0")) }
end

context "when requiring ruby 3.4" do
let(:gemspec) do
bundler_project_dependency_file("gemfile_require_ruby_3_4", filename: "example.gemspec")
end
let(:content) do
bundler_project_dependency_file("gemfile", filename: "Gemfile").content
end

it { is_expected.to include("ruby '3.4.0-rc1'\n") }
it { is_expected.to include(%(gem "business", "~> 1.4.0")) }
end

context "when that can't be evaluated" do
let(:content) do
bundler_project_dependency_file("gemfile", filename: "Gemfile").content
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# frozen_string_literal: true

source "https://rubygems.org"

gem "business", "~> 1.4.0"
gem "statesman", "~> 1.2.0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
GEM
remote: https://rubygems.org/
specs:
business (1.4.0)
statesman (1.2.5)

PLATFORMS
ruby
x86_64-linux

DEPENDENCIES
business (~> 1.4.0)
statesman (~> 1.2.0)

BUNDLED WITH
2.6.0.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# frozen_string_literal: true

Gem::Specification.new do |spec|
spec.name = "example"
spec.version = "0.9.3"
spec.summary = "Automated dependency management"
spec.description = "Core logic for updating a GitHub repos dependencies"

spec.author = "Dependabot"
spec.email = "[email protected]"
spec.homepage = "https://github.com/hmarr/example"
spec.license = "MIT"

spec.require_path = "lib"
spec.files = Dir["CHANGELOG.md", "LICENSE.txt", "README.md",
"lib/**/*", "helpers/**/*"]

spec.required_ruby_version = ">= 3.4.0-rc1"
spec.required_rubygems_version = ">= 3.5.3"

spec.add_dependency 'business', '~> 1.0'
end
4 changes: 2 additions & 2 deletions common/dependabot-common.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
}

spec.version = Dependabot::VERSION
spec.required_ruby_version = ">= 3.1.0"
spec.required_ruby_version = ">= 3.4.0-rc1"
spec.required_rubygems_version = ">= 3.3.7"

spec.require_path = "lib"
Expand All @@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
spec.add_dependency "faraday", "2.7.11"
spec.add_dependency "faraday-retry", "2.2.0"
spec.add_dependency "gitlab", "5.0.0"
spec.add_dependency "json", "< 2.7"
spec.add_dependency "json", "~> 2.9"
spec.add_dependency "nokogiri", "~> 1.8"
spec.add_dependency "octokit", ">= 4.6", "< 8.0"
spec.add_dependency "opentelemetry-api", "~> 1.4"
Expand Down
1 change: 0 additions & 1 deletion common/lib/dependabot/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# frozen_string_literal: true

require "tmpdir"
require "set"
require "sorbet-runtime"

require "dependabot/requirement"
Expand Down
2 changes: 0 additions & 2 deletions npm_and_yarn/lib/dependabot/npm_and_yarn/update_checker.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# typed: true
# frozen_string_literal: true

require "set"

require "dependabot/git_commit_checker"
require "dependabot/requirements_update_strategy"
require "dependabot/shared_helpers"
Expand Down
1 change: 0 additions & 1 deletion nuget/lib/dependabot/nuget/cache_manager.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# typed: strict
# frozen_string_literal: true

require "set"
require "sorbet-runtime"

require "dependabot/file_fetchers"
Expand Down
1 change: 0 additions & 1 deletion nuget/lib/dependabot/nuget/file_fetcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
require "dependabot/file_fetchers/base"
require "dependabot/nuget/discovery/discovery_json_reader"
require "dependabot/nuget/native_helpers"
require "set"
require "sorbet-runtime"

module Dependabot
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit be20242

Please sign in to comment.