Class: Cask::URL Private
- Includes:
- Kernel
- Defined in:
- cask/url.rb,
sorbet/rbi/dsl/cask/url.rbi
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.
Class corresponding to the url
stanza.
Defined Under Namespace
Classes: DSL
Constant Summary
Constants included from Kernel
Kernel::IGNORE_INTERRUPTS_MUTEX
Instance Method Summary collapse
- #branch ⇒ T.untyped private
- #cookies ⇒ Hash{::String => ::String}? private
- #data ⇒ T.untyped private
- #header ⇒ ::String, ... private
- #initialize(uri = nil, verified: nil, using: nil, tag: nil, branch: nil, revisions: nil, revision: nil, trust_cert: nil, cookies: nil, referer: nil, header: nil, user_agent: nil, data: nil, only_path: nil, caller_location: caller_locations.fetch(0), dsl: nil) ⇒ void constructor private
- #location ⇒ Homebrew::SourceLocation private
- #only_path ⇒ T.untyped private
- #path ⇒ T.untyped private
- #referer ⇒ ::String, ... private
- #revision ⇒ T.untyped private
- #revisions ⇒ Hash{::String, ::Symbol => ::String}? private
- #scheme ⇒ T.untyped private
- #specs ⇒ Hash{::Symbol => T.untyped} private
- #tag ⇒ ::String? private
- #trust_cert ⇒ Boolean? private
- #unversioned?(ignore_major_version: false) ⇒ Boolean private
- #uri ⇒ ::String, ::URI::Generic private
- #user_agent ⇒ ::String, ... private
- #using ⇒ ::Symbol, ... private
- #verified ⇒ T.untyped private
Methods included from Kernel
#disk_usage_readable, #ensure_executable!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_outside_github_actions, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path
Constructor Details
#initialize(uri = nil, verified: nil, using: nil, tag: nil, branch: nil, revisions: nil, revision: nil, trust_cert: nil, cookies: nil, referer: nil, header: nil, user_agent: nil, data: nil, only_path: nil, caller_location: caller_locations.fetch(0), dsl: nil) ⇒ void
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.
113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'cask/url.rb', line 113 def initialize( uri = nil, verified: nil, using: nil, tag: nil, branch: nil, revisions: nil, revision: nil, trust_cert: nil, cookies: nil, referer: nil, header: nil, user_agent: nil, data: nil, only_path: nil, caller_location: caller_locations.fetch(0), dsl: nil ) super( DSL.new(T.must(uri), verified:, using:, tag:, branch:, revisions:, revision:, trust_cert:, cookies:, referer:, header:, user_agent:, data:, only_path:) ) @caller_location = T.let(caller_location, Thread::Backtrace::Location) end |
Instance Method Details
#branch ⇒ T.untyped
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.
12 |
# File 'sorbet/rbi/dsl/cask/url.rbi', line 12 def branch; end |
#cookies ⇒ Hash{::String => ::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.
15 |
# File 'sorbet/rbi/dsl/cask/url.rbi', line 15 def ; end |
#data ⇒ T.untyped
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.
18 |
# File 'sorbet/rbi/dsl/cask/url.rbi', line 18 def data; end |
#header ⇒ ::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.
21 |
# File 'sorbet/rbi/dsl/cask/url.rbi', line 21 def header; end |
#location ⇒ Homebrew::SourceLocation
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.
127 128 129 |
# File 'cask/url.rb', line 127 def location Homebrew::SourceLocation.new(@caller_location.lineno, raw_url_line&.index("url")) end |
#only_path ⇒ T.untyped
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.
24 |
# File 'sorbet/rbi/dsl/cask/url.rbi', line 24 def only_path; end |
#path ⇒ T.untyped
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.
27 |
# File 'sorbet/rbi/dsl/cask/url.rbi', line 27 def path; end |
#referer ⇒ ::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.
30 |
# File 'sorbet/rbi/dsl/cask/url.rbi', line 30 def referer; end |
#revision ⇒ T.untyped
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.
33 |
# File 'sorbet/rbi/dsl/cask/url.rbi', line 33 def revision; end |
#revisions ⇒ Hash{::String, ::Symbol => ::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.
36 |
# File 'sorbet/rbi/dsl/cask/url.rbi', line 36 def revisions; end |
#scheme ⇒ T.untyped
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.
39 |
# File 'sorbet/rbi/dsl/cask/url.rbi', line 39 def scheme; end |
#specs ⇒ Hash{::Symbol => T.untyped}
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.
42 |
# File 'sorbet/rbi/dsl/cask/url.rbi', line 42 def specs; end |
#tag ⇒ ::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.
45 |
# File 'sorbet/rbi/dsl/cask/url.rbi', line 45 def tag; end |
#trust_cert ⇒ Boolean?
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.
51 |
# File 'sorbet/rbi/dsl/cask/url.rbi', line 51 def trust_cert; end |
#unversioned?(ignore_major_version: false) ⇒ Boolean
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.
132 133 134 135 136 137 138 139 140 141 |
# File 'cask/url.rb', line 132 def unversioned?(ignore_major_version: false) interpolated_url = raw_url_line&.then { |line| line[/url\s+"([^"]+)"/, 1] } return false unless interpolated_url interpolated_url = interpolated_url.gsub(/\#{\s*arch\s*}/, "") interpolated_url = interpolated_url.gsub(/\#{\s*version\s*\.major\s*}/, "") if ignore_major_version interpolated_url.exclude?('#{') end |
#uri ⇒ ::String, ::URI::Generic
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.
54 |
# File 'sorbet/rbi/dsl/cask/url.rbi', line 54 def uri; end |
#user_agent ⇒ ::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.
57 |
# File 'sorbet/rbi/dsl/cask/url.rbi', line 57 def user_agent; end |
#using ⇒ ::Symbol, ...
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.
60 |
# File 'sorbet/rbi/dsl/cask/url.rbi', line 60 def using; end |
#verified ⇒ T.untyped
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.
63 |
# File 'sorbet/rbi/dsl/cask/url.rbi', line 63 def verified; end |