From 4d32699f6103e1a70f0dd2084cdeccff6fcc930a Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Tue, 14 Mar 2023 22:56:32 -0700 Subject: [PATCH] Placate rubocop --- Library/Homebrew/dev-cmd/bottle.rb | 1 - Library/Homebrew/tab.rb | 5 ++++- Library/Homebrew/test/support/lib/startup/config.rb | 1 - Library/Homebrew/test/tab_spec.rb | 6 ------ 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index be35d3211c..0bba2d5d9f 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -400,7 +400,6 @@ module Homebrew tab = Tab.for_keg(keg) original_tab = tab.dup tab.poured_from_bottle = false - tab.HEAD = nil tab.time = nil tab.changed_files = changed_files.dup if args.only_json_tab? diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb index 5a3f683396..b0cec2ec8c 100644 --- a/Library/Homebrew/tab.rb +++ b/Library/Homebrew/tab.rb @@ -15,7 +15,10 @@ class Tab FILENAME = "INSTALL_RECEIPT.json" - attr_accessor :homebrew_version, :used_options, :unused_options, :tabfile, :built_as_bottle, :installed_as_dependency, :installed_on_request, :changed_files, :poured_from_bottle, :loaded_from_api, :time, :source_modified_time, :stdlib, :compiler, :aliases, :runtime_dependencies, :arch, :source, :built_on, :HEAD + attr_accessor :homebrew_version, :tabfile, :built_as_bottle, :installed_as_dependency, :installed_on_request, + :changed_files, :poured_from_bottle, :loaded_from_api, :time, :stdlib, :aliases, :arch, :source, + :built_on + attr_writer :used_options, :unused_options, :compiler, :runtime_dependencies, :source_modified_time # Instantiates a Tab for a new installation of a formula. def self.create(formula, compiler, stdlib) diff --git a/Library/Homebrew/test/support/lib/startup/config.rb b/Library/Homebrew/test/support/lib/startup/config.rb index 822b0f51c5..00f13b2bce 100644 --- a/Library/Homebrew/test/support/lib/startup/config.rb +++ b/Library/Homebrew/test/support/lib/startup/config.rb @@ -47,5 +47,4 @@ TESTBALL_PATCHES_SHA256 = "799c2d551ac5c3a5759bea7796631a7906a6a24435b52261a3171 PATCH_A_SHA256 = "83404f4936d3257e65f176c4ffb5a5b8d6edd644a21c8d8dcc73e22a6d28fcfa" PATCH_B_SHA256 = "57958271bb802a59452d0816e0670d16c8b70bdf6530bcf6f78726489ad89b90" -TEST_SHA1 = "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef" TEST_SHA256 = "deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" diff --git a/Library/Homebrew/test/tab_spec.rb b/Library/Homebrew/test/tab_spec.rb index 00a7554ef1..0251c95f84 100644 --- a/Library/Homebrew/test/tab_spec.rb +++ b/Library/Homebrew/test/tab_spec.rb @@ -29,7 +29,6 @@ describe Tab do "changed_files" => [], "time" => time, "source_modified_time" => 0, - "HEAD" => TEST_SHA1, "compiler" => "clang", "stdlib" => "libcxx", "runtime_dependencies" => [], @@ -71,7 +70,6 @@ describe Tab do expect(tab).not_to be_head expect(tab.tap).to be_nil expect(tab.time).to be_nil - expect(tab.HEAD).to be_nil expect(tab.runtime_dependencies).to be_nil expect(tab.stable_version).to be_nil expect(tab.head_version).to be_nil @@ -154,7 +152,6 @@ describe Tab do end specify "other attributes" do - expect(tab.HEAD).to eq(TEST_SHA1) expect(tab.tap.name).to eq("homebrew/core") expect(tab.time).to eq(time) expect(tab).not_to be_built_as_bottle @@ -179,7 +176,6 @@ describe Tab do expect(tab.tap.name).to eq("homebrew/core") expect(tab.spec).to eq(:stable) expect(tab.time).to eq(Time.at(1_403_827_774).to_i) - expect(tab.HEAD).to eq(TEST_SHA1) expect(tab.cxxstdlib.compiler).to eq(:clang) expect(tab.cxxstdlib.type).to eq(:libcxx) expect(tab.runtime_dependencies).to eq(runtime_dependencies) @@ -207,7 +203,6 @@ describe Tab do expect(tab.tap.name).to eq("homebrew/core") expect(tab.spec).to eq(:stable) expect(tab.time).to eq(Time.at(1_403_827_774).to_i) - expect(tab.HEAD).to eq(TEST_SHA1) expect(tab.cxxstdlib.compiler).to eq(:clang) expect(tab.cxxstdlib.type).to eq(:libcxx) expect(tab.runtime_dependencies).to eq(runtime_dependencies) @@ -229,7 +224,6 @@ describe Tab do expect(tab.tap.name).to eq("homebrew/core") expect(tab.spec).to eq(:stable) expect(tab.time).to eq(Time.at(1_403_827_774).to_i) - expect(tab.HEAD).to eq(TEST_SHA1) expect(tab.cxxstdlib.compiler).to eq(:clang) expect(tab.cxxstdlib.type).to eq(:libcxx) expect(tab.runtime_dependencies).to be_nil