From 9ff2abbcdf5f40475b2c54fa9fdb0a62be2d02f2 Mon Sep 17 00:00:00 2001 From: botantony Date: Wed, 23 Apr 2025 14:20:11 +0200 Subject: [PATCH] no_autobump!: rename `no_autobump_msg` field to `no_autobump_message` Signed-off-by: botantony --- Library/Homebrew/ast_constants.rb | 2 +- Library/Homebrew/sorbet/rbi/dsl/cask/cask.rbi | 2 +- Library/Homebrew/test/cask/dsl_spec.rb | 5 +++-- Library/Homebrew/test/support/fixtures/cask/everything.json | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/ast_constants.rb b/Library/Homebrew/ast_constants.rb index 0d73f78d44..fa31aef6ed 100644 --- a/Library/Homebrew/ast_constants.rb +++ b/Library/Homebrew/ast_constants.rb @@ -18,7 +18,7 @@ FORMULA_COMPONENT_PRECEDENCE_LIST = T.let([ [{ name: :stable, type: :block_call }], [{ name: :livecheck, type: :block_call }], [{ name: :no_autobump!, type: :method_call }], - [{ name: :bottle, type: :block_call }], + [{ name: :bottle, type: :block_call }], [{ name: :pour_bottle?, type: :block_call }], [{ name: :head, type: :block_call }], [{ name: :bottle, type: :method_call }], diff --git a/Library/Homebrew/sorbet/rbi/dsl/cask/cask.rbi b/Library/Homebrew/sorbet/rbi/dsl/cask/cask.rbi index 432c8570d4..385d97082d 100644 --- a/Library/Homebrew/sorbet/rbi/dsl/cask/cask.rbi +++ b/Library/Homebrew/sorbet/rbi/dsl/cask/cask.rbi @@ -145,7 +145,7 @@ class Cask::Cask def name(*args, &block); end sig { params(args: T.untyped, block: T.untyped).returns(T.untyped) } - def no_autobump_msg(*args, &block); end + def no_autobump_message(*args, &block); end sig { params(args: T.untyped, block: T.untyped).returns(T.nilable(MacOSVersion)) } def on_system_block_min_os(*args, &block); end diff --git a/Library/Homebrew/test/cask/dsl_spec.rb b/Library/Homebrew/test/cask/dsl_spec.rb index 1d9b5cb5a3..c9b75cf482 100644 --- a/Library/Homebrew/test/cask/dsl_spec.rb +++ b/Library/Homebrew/test/cask/dsl_spec.rb @@ -157,7 +157,7 @@ RSpec.describe Cask::DSL, :cask do describe "no_autobump! stanze" do it "returns true if no_autobump! is not set" do - expect(cask.autobump?).to eq(true) + expect(cask.autobump?).to be(true) end context "when no_autobump! is set" do @@ -166,8 +166,9 @@ RSpec.describe Cask::DSL, :cask do no_autobump! because: "some reason" end end + it "returns false" do - expect(cask.autobump?).to eq(false) + expect(cask.autobump?).to be(false) expect(cask.no_autobump_message).to eq("some reason") end end diff --git a/Library/Homebrew/test/support/fixtures/cask/everything.json b/Library/Homebrew/test/support/fixtures/cask/everything.json index ddb9889084..b3386a37af 100644 --- a/Library/Homebrew/test/support/fixtures/cask/everything.json +++ b/Library/Homebrew/test/support/fixtures/cask/everything.json @@ -17,7 +17,7 @@ }, "version": "1.2.3", "autobump": true, - "no_autobump_msg": null, + "no_autobump_message": null, "installed": null, "installed_time": null, "bundle_version": null,