Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mechanize vendoring; add RBI defs #16558

Merged
merged 3 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions Library/Homebrew/dev-cmd/vendor-gems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@
%w[
mechanize
].each do |gem|
(HOMEBREW_LIBRARY_PATH/"vendor/gems").cd do
Pathname.glob("#{gem}-*/").each { |path| FileUtils.rm_r(path) }

Check warning on line 65 in Library/Homebrew/dev-cmd/vendor-gems.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/dev-cmd/vendor-gems.rb#L64-L65

Added lines #L64 - L65 were not covered by tests
Bo98 marked this conversation as resolved.
Show resolved Hide resolved
end
ohai "gem install #{gem}"
safe_system "gem", "install", gem, "--install-dir", "vendor",
"--no-document", "--no-wrappers", "--ignore-dependencies", "--force"
Expand Down
14 changes: 13 additions & 1 deletion Library/Homebrew/download_strategy.rbi
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# typed: strict

module AbstractDownloadStrategy::Pourable
include Kernel
requires_ancestor { AbstractDownloadStrategy }
end

class Mechanize::HTTP
ContentDisposition = Struct.new :type, :filename, :creation_date,
:modification_date, :read_date, :size, :parameters
end

class Mechanize::HTTP::ContentDispositionParser
sig {
params(content_disposition: String, header: T::Boolean)
.returns(T.nilable(Mechanize::HTTP::ContentDisposition))
}
def parse(content_disposition, header = false); end
end
24 changes: 0 additions & 24 deletions Library/Homebrew/vendor/gems/mechanize-2.9.1/LICENSE.txt

This file was deleted.

This file was deleted.

This file was deleted.

24 changes: 0 additions & 24 deletions Library/Homebrew/vendor/gems/mechanize-2.9.2/LICENSE.txt

This file was deleted.