Fix brew style

This commit is contained in:
Carlo Cabrera 2024-05-06 15:26:29 +01:00
parent 3b794fc6e8
commit be29afa5f7
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0
3 changed files with 4 additions and 6 deletions

View File

@ -134,7 +134,7 @@ class Tap
sig { returns(T::Set[Tap]) }
def self.allowed_taps
cache_key = "allowed_taps_#{Homebrew::EnvConfig.allowed_taps.to_s.gsub(" ", "_")}".to_sym
cache_key = :"allowed_taps_#{Homebrew::EnvConfig.allowed_taps.to_s.tr(" ", "_")}"
cache[cache_key] ||= begin
allowed_tap_list = Homebrew::EnvConfig.allowed_taps.to_s.split
@ -149,7 +149,7 @@ class Tap
sig { returns(T::Set[Tap]) }
def self.forbidden_taps
cache_key = "forbidden_taps_#{Homebrew::EnvConfig.forbidden_taps.to_s.gsub(" ", "_")}".to_sym
cache_key = :"forbidden_taps_#{Homebrew::EnvConfig.forbidden_taps.to_s.tr(" ", "_")}"
cache[cache_key] ||= begin
forbidden_tap_list = Homebrew::EnvConfig.forbidden_taps.to_s.split

View File

@ -327,8 +327,7 @@ RSpec.describe Cask::Installer, :cask do
describe "#forbidden_tap_check" do
before do
allow(Tap).to receive(:allowed_taps).and_return(allowed_taps_set)
allow(Tap).to receive(:forbidden_taps).and_return(forbidden_taps_set)
allow(Tap).to receive_messages(allowed_taps: allowed_taps_set, forbidden_taps: forbidden_taps_set)
end
let(:homebrew_forbidden) { Tap.fetch("homebrew/forbidden") }

View File

@ -259,8 +259,7 @@ RSpec.describe FormulaInstaller do
describe "#forbidden_tap_check" do
before do
allow(Tap).to receive(:allowed_taps).and_return(allowed_taps_set)
allow(Tap).to receive(:forbidden_taps).and_return(forbidden_taps_set)
allow(Tap).to receive_messages(allowed_taps: allowed_taps_set, forbidden_taps: forbidden_taps_set)
end
let(:homebrew_forbidden) { Tap.fetch("homebrew/forbidden") }