Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update change method name to "update_outdated_gems"
Make it less visually similar to "update_gem". Avoid developer confusion
  • Loading branch information
matthewhively committed Jul 21, 2025
commit ccf8f39f49f44582febef0590ebdb2b6218ff618
2 changes: 1 addition & 1 deletion lib/bummr/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def update
if outdated_gems.empty?
puts "No outdated gems to update".color(:green)
else
Bummr::Updater.new(outdated_gems).update_gems
Bummr::Updater.new(outdated_gems).update_outdated_gems

git.rebase_interactive(BASE_BRANCH)
test
Expand Down
2 changes: 1 addition & 1 deletion lib/bummr/updater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def initialize(outdated_gems)
@outdated_gems = outdated_gems
end

def update_gems
def update_outdated_gems
puts "Updating outdated gems".color(:green)

@outdated_gems.each_with_index do |gem, index|
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
context "when user agrees to move forward" do
def mock_bummr_standard_flow
updater = double
allow(updater).to receive(:update_gems)
allow(updater).to receive(:update_outdated_gems)

expect(cli).to receive(:display_info)
expect(cli).to receive(:yes?).and_return(true)
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/updater_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
let(:update_cmd) { "bundle update #{gem[:name]}" }
let(:git) { Bummr::Git.instance }

describe "#update_gems" do
describe "#update_outdated_gems" do
it "calls update_gem on each gem" do
allow(updater).to receive(:update_gem)
allow(updater).to receive(:puts) # NOOP this function call

updater.update_gems
updater.update_outdated_gems

outdated_gems.each_with_index do |gem, index|
expect(updater).to have_received(:update_gem).with(gem, index)
Expand Down