Skip to content

Commit

Permalink
Relax Ruby requirement to allow 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbrictson committed Jul 11, 2024
1 parent 91ba2c8 commit 9650bd7
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ["3.1", "3.2", "3.3", "head"]
ruby: ["3.0", "3.1", "3.2", "3.3", "head"]
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ AllCops:
DisplayCopNames: true
DisplayStyleGuide: true
NewCops: enable
TargetRubyVersion: 3.1
TargetRubyVersion: 3.0
Exclude:
- "tmp/**/*"
- "vendor/**/*"
Expand Down
2 changes: 1 addition & 1 deletion bundle_update_interactive.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
spec.summary = "Adds a update-interactive command to Bundler"
spec.homepage = "https://github.com/mattbrictson/bundle_update_interactive"
spec.license = "MIT"
spec.required_ruby_version = ">= 3.1" # TODO: relax this
spec.required_ruby_version = ">= 3.0" # TODO: relax this

spec.metadata = {
"bug_tracker_uri" => "https://github.com/mattbrictson/bundle_update_interactive/issues",
Expand Down
4 changes: 2 additions & 2 deletions lib/bundle_update_interactive/cli/multi_select.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def selected_names
def self.prompt_for_gems_to_update(outdated_gems)
table = Table.new(outdated_gems)
title = "#{outdated_gems.length} gems can be updated."
chosen = new(title:, table:).prompt
chosen = new(title: title, table: table).prompt
outdated_gems.slice(*chosen)
end

Expand All @@ -42,7 +42,7 @@ def initialize(title:, table:)

def prompt
choices = table.gem_names.to_h { |name| [table.render_gem(name), name] }
tty_prompt.invoke_select(List, title, choices, help:)
tty_prompt.invoke_select(List, title, choices, help: help)
end

private
Expand Down
2 changes: 1 addition & 1 deletion lib/bundle_update_interactive/outdated_gem.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def changelog_uri
if git_version_changed?
"https://github.com/#{github_repo}/compare/#{current_git_version}...#{updated_git_version}"
elsif updated_lockfile_entry.rubygems_source?
changelog_locator.find_changelog_uri(name:, version: updated_version.to_s)
changelog_locator.find_changelog_uri(name: name, version: updated_version.to_s)
else
begin
Gem::Specification.find_by_name(name)&.homepage
Expand Down
2 changes: 1 addition & 1 deletion lib/bundle_update_interactive/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def generate
current_lockfile = Lockfile.parse
updated_lockfile = Lockfile.parse(BundlerCommands.read_updated_lockfile)

new(gemfile:, current_lockfile:, updated_lockfile:)
new(gemfile: gemfile, current_lockfile: current_lockfile, updated_lockfile: updated_lockfile)
end
end

Expand Down

0 comments on commit 9650bd7

Please sign in to comment.