From 9069d42550daa412599f8d85c5d5a9e049432ba3 Mon Sep 17 00:00:00 2001 From: hyuraku <32809703+hyuraku@users.noreply.github.com> Date: Wed, 30 Oct 2024 21:08:17 +0900 Subject: [PATCH 1/2] remove Cask::Config.explicit_s --- Library/Homebrew/cask/config.rb | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/Library/Homebrew/cask/config.rb b/Library/Homebrew/cask/config.rb index 30a5c521cb..a091d84a6d 100644 --- a/Library/Homebrew/cask/config.rb +++ b/Library/Homebrew/cask/config.rb @@ -188,23 +188,6 @@ module Cask self.class.new(explicit: other.explicit.merge(explicit)) end - # Get explicit configuration as a string. - # - # @api internal - # - # TODO: This is only used by `homebrew/bundle`, so move it there. - sig { returns(String) } - def explicit_s - explicit.map do |key, value| - # inverse of #env - converts :languages config key back to --language flag - if key == :languages - key = "language" - value = T.cast(explicit.fetch(:languages, []), T::Array[String]).join(",") - end - "#{key}: \"#{value.to_s.sub(/^#{Dir.home}/, "~")}\"" - end.join(", ") - end - sig { params(options: T.untyped).returns(String) } def to_json(*options) { From c60e80f0a9b707a2c6ca6ae39864634cac21a6cb Mon Sep 17 00:00:00 2001 From: hyuraku <32809703+hyuraku@users.noreply.github.com> Date: Wed, 30 Oct 2024 22:20:56 +0900 Subject: [PATCH 2/2] remove Cask::Config.explicit_s spec --- Library/Homebrew/test/cask/config_spec.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Library/Homebrew/test/cask/config_spec.rb b/Library/Homebrew/test/cask/config_spec.rb index bf7ba9b158..732b0fa2f5 100644 --- a/Library/Homebrew/test/cask/config_spec.rb +++ b/Library/Homebrew/test/cask/config_spec.rb @@ -71,10 +71,6 @@ RSpec.describe Cask::Config, :cask do it "returns array of preferred languages" do expect(config.explicit[:languages]).to eq(["zh-TW", "en"]) end - - it "returns string of explicit config keys and values" do - expect(config.explicit_s).to eq('appdir: "/explicit/path/to/apps", language: "zh-TW,en"') - end end context "when installing a cask and then adding a global default dir" do