Skip to content

Commit

Permalink
Uncomment deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
Rylan12 committed Dec 17, 2023
1 parent 6431822 commit e5f20f9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 44 deletions.
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def caveats(*strings, &block)
end

def discontinued?
# odeprecated "`discontinued?`", "`deprecated?` or `disabled?`"
odeprecated "`discontinued?`", "`deprecated?` or `disabled?`"
@caveats&.discontinued? == true
end

Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/dsl/caveats.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def eval_caveats(&block)
end

caveat :discontinued do
# odeprecated "`caveats :discontinued`", "`deprecated!`"
odeprecated "`caveats :discontinued`", "`deprecated!`"
@discontinued = true
<<~EOS
#{@cask} has been officially discontinued upstream.
Expand Down
42 changes: 0 additions & 42 deletions Library/Homebrew/test/livecheck/skip_conditions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,6 @@
regex(/"stable":"(\d+(?:\.\d+)+)"/i)
end
end,
discontinued: Cask::Cask.new("test_discontinued") do
version "0.0.1"
sha256 :no_check

url "https://brew.sh/test-0.0.1.tgz"
name "Test Discontinued"
desc "Discontinued test cask"
homepage "https://brew.sh"

caveats do
discontinued
end
end,
deprecated: Cask::Cask.new("test_deprecated") do
version "0.0.1"
sha256 :no_check
Expand Down Expand Up @@ -245,13 +232,6 @@
},
},
cask: {
discontinued: {
cask: "test_discontinued",
status: "deprecated",
meta: {
livecheckable: false,
},
},
deprecated: {
cask: "test_deprecated",
status: "deprecated",
Expand Down Expand Up @@ -359,13 +339,6 @@
end
end

context "when a cask without a livecheckable is discontinued" do
it "skips" do
expect(skip_conditions.skip_information(casks[:discontinued]))
.to eq(status_hashes[:cask][:discontinued])
end
end

context "when a cask without a livecheckable is deprecated" do
it "skips" do
expect(skip_conditions.skip_information(casks[:deprecated]))
Expand Down Expand Up @@ -475,13 +448,6 @@
end
end

context "when a cask without a livecheckable is discontinued" do
it "errors" do
expect { skip_conditions.referenced_skip_information(casks[:discontinued], original_name) }
.to raise_error(RuntimeError, "Referenced cask (test_discontinued) is skipped as deprecated")
end
end

context "when a cask without a livecheckable is deprecated" do
it "errors" do
expect { skip_conditions.referenced_skip_information(casks[:deprecated], original_name) }
Expand Down Expand Up @@ -598,14 +564,6 @@
end
end

context "when the cask is discontinued without a livecheckable" do
it "prints skip information" do
expect { skip_conditions.print_skip_information(status_hashes[:cask][:discontinued]) }
.to output("test_discontinued: deprecated\n").to_stdout
.and not_to_output.to_stderr
end
end

context "when the cask is deprecated without a livecheckable" do
it "prints skip information" do
expect { skip_conditions.print_skip_information(status_hashes[:cask][:deprecated]) }
Expand Down

0 comments on commit e5f20f9

Please sign in to comment.