Skip to content

Commit

Permalink
Merge pull request #16558 from dduugg/mechanize-fixes
Browse files Browse the repository at this point in the history
Fix mechanize vendoring; add RBI defs
  • Loading branch information
Bo98 committed Feb 1, 2024
2 parents b93c48e + 8b826cc commit f5068ab
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 462 deletions.
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 @@ def vendor_gems
%w[
mechanize
].each do |gem|
(HOMEBREW_LIBRARY_PATH/"vendor/gems").cd do
Pathname.glob("#{gem}-*/").each { |path| FileUtils.rm_r(path) }
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.

0 comments on commit f5068ab

Please sign in to comment.