Class: Resource::BottleManifest Private
Overview
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
A resource for a bottle manifest.
Defined Under Namespace
Classes: Error
Instance Attribute Summary collapse
- #bottle ⇒ Object readonly private
 
Attributes inherited from Resource
#checksum, #download_strategy, #name, #owner, #patches, #source_modified_time
Attributes included from Downloadable
Instance Method Summary collapse
- #bottle_size ⇒ Integer? private
 - #download_queue_name ⇒ String private
 - #download_queue_type ⇒ String private
 - 
  
    
      #initialize(bottle)  ⇒ BottleManifest 
    
    
  
  
  
    constructor
  
  
  
  
  
  private
  
    
A new instance of BottleManifest.
 - #installed_size ⇒ Integer? private
 - #tab ⇒ Object private
 - #verify_download_integrity(_filename) ⇒ Object private
 
Methods inherited from Resource
#apply_patches, #fetch, #fetch_patches, #files, #freeze, #initialize_dup, #livecheck, #livecheck_defined?, #livecheckable?, #mirror, #patch, #prepare_patches, #sha256, #specs, #stage, #unpack, #url, #using, #version
Methods included from Utils::Output::Mixin
#odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_outside_github_actions, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled
Methods included from OnSystem::MacOSAndLinux
included, #on_arch_conditional, #on_macos, #on_system_conditional
Methods included from Downloadable
#cached_download, #clear_cache, #download_strategy, #downloaded?, #downloader, #fetch, #freeze, #initialize_dup, #version
Methods included from Context
current, current=, #debug?, #quiet?, #verbose?, #with_context
Constructor Details
#initialize(bottle) ⇒ BottleManifest
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
Returns a new instance of BottleManifest.
      311 312 313 314 315  | 
    
      # File 'resource.rb', line 311 def initialize(bottle) super("#{bottle.name}_bottle_manifest") @bottle = bottle @manifest_annotations = nil end  | 
  
Instance Attribute Details
#bottle ⇒ Object (readonly)
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
      309 310 311  | 
    
      # File 'resource.rb', line 309 def bottle @bottle end  | 
  
Instance Method Details
#bottle_size ⇒ Integer?
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
      334 335 336  | 
    
      # File 'resource.rb', line 334 def bottle_size manifest_annotations["sh.brew.bottle.size"]&.to_i end  | 
  
#download_queue_name ⇒ String
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
      347  | 
    
      # File 'resource.rb', line 347 def download_queue_name = "#{bottle.name} (#{bottle.resource.version})"  | 
  
#download_queue_type ⇒ String
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
      344  | 
    
      # File 'resource.rb', line 344 def download_queue_type = "Bottle Manifest"  | 
  
#installed_size ⇒ Integer?
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
      339 340 341  | 
    
      # File 'resource.rb', line 339 def installed_size manifest_annotations["sh.brew.bottle.installed_size"]&.to_i end  | 
  
#tab ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
      322 323 324 325 326 327 328 329 330 331  | 
    
      # File 'resource.rb', line 322 def tab tab = manifest_annotations["sh.brew.tab"] raise Error, "Couldn't find tab from manifest." if tab.blank? begin JSON.parse(tab) rescue JSON::ParserError raise Error, "Couldn't parse tab JSON." end end  | 
  
#verify_download_integrity(_filename) ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
      317 318 319 320  | 
    
      # File 'resource.rb', line 317 def verify_download_integrity(_filename) # We don't have a checksum, but we can at least try parsing it. tab end  |