Skip to content

Commit

Permalink
Added Ruby 3.3.0 to RubyRequirementSetter version requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
schinery committed Jan 10, 2024
1 parent 763f444 commit 61a640c
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 1 deletion.
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.4 3.2.2
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.4 3.2.2 3.3.0
).freeze

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

context "when requiring ruby 3.3" do
let(:gemspec) do
bundler_project_dependency_file("gemfile_require_ruby_3_3", filename: "example.gemspec")
end
let(:content) do
bundler_project_dependency_file("gemfile", filename: "Gemfile").content
end
it { is_expected.to include("ruby '3.3.0'\n") }
it { is_expected.to include(%(gem "business", "~> 1.4.0")) }
end

context "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,15 @@
GEM
remote: https://rubygems.org/
specs:
business (1.4.0)
statesman (1.2.1)

PLATFORMS
ruby

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

BUNDLED WITH
1.10.6
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 = "support@dependabot.com"
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.3.0"
spec.required_rubygems_version = ">= 2.6.11"

spec.add_dependency 'business', '~> 1.0'
end
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,15 @@
GEM
remote: https://rubygems.org/
specs:
business (1.4.0)
statesman (1.2.1)

PLATFORMS
ruby

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

BUNDLED WITH
2.5.3
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 = "support@dependabot.com"
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.3.0"
spec.required_rubygems_version = ">= 3.5.3"

spec.add_dependency 'business', '~> 1.0'
end

0 comments on commit 61a640c

Please sign in to comment.