Class: SoftwareSpec

Inherits:
Object show all
Extended by:
Forwardable
Includes:
Downloadable, OnSystem::MacOSAndLinux
Defined in:
software_spec.rb,
sorbet/rbi/dsl/software_spec.rbi

Direct Known Subclasses

HeadSoftwareSpec

Instance Attribute Summary collapse

Attributes included from Downloadable

#phase

Instance Method Summary collapse

Methods included from OnSystem::MacOSAndLinux

included, #on_arch_conditional, #on_macos, #on_system_conditional

Methods included from Downloadable

#download_queue_message, #download_strategy, #downloaded!, #downloaded?, #downloaded_and_valid?, #downloading!, #extracting!, #fetched_size, #stage_from_download_queue, #stage_from_download_queue?, #staged_path_from_download_queue, #total_size, verification_cache, #verified!, #verifying!

Methods included from Utils::Output::Mixin

#issue_reporting_message, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_once, #opoo_outside_github_actions, #opoo_without_github_actions_annotation, #pretty_cannot_install, #pretty_deprecated, #pretty_disabled, #pretty_duration, #pretty_install_status, #pretty_installed, #pretty_uninstalled, #pretty_unmarked, #pretty_upgradable, #pretty_warning

Methods included from Context

current, current=, #debug?, #deferred_environment_expansion?, #quiet?, #verbose?, #with_context

Constructor Details

#initialize(flags: []) ⇒ 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.

Parameters:



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'software_spec.rb', line 69

def initialize(flags: [])
  super()

  @name = T.let(nil, T.nilable(String))
  @full_name = T.let(nil, T.nilable(String))
  @owner = T.let(nil, T.nilable(T.any(Formula, Cask::Cask)))

  # Ensure this is synced with `initialize_dup` and `freeze` (excluding simple objects like integers and booleans)
  @resource = T.let(Resource::Formula.new, Resource::Formula)
  @resources = T.let({}, T::Hash[String, Resource])
  @dependency_collector = T.let(DependencyCollector.new, DependencyCollector)
  @bottle_specification = T.let(BottleSpecification.new, BottleSpecification)
  @patches = T.let([], T::Array[T.any(EmbeddedPatch, ExternalPatch)])
  @options = T.let(Options.new, Options)
  @flags = flags
  @deprecated_flags = T.let([], T::Array[DeprecatedOption])
  @deprecated_options = T.let([], T::Array[DeprecatedOption])
  @build = T.let(BuildOptions.new(Options.create(@flags), options), BuildOptions)
  @compiler_failures = T.let([], T::Array[CompilerFailure])
  @depends_on_macos_bare_set_top_level = T.let(false, T::Boolean)
  @depends_on_macos_version_set_top_level = T.let(false, T::Boolean)
  @depends_on_maximum_macos_set_top_level = T.let(false, T::Boolean)
  @depends_on_macos_set_in_block = T.let(false, T::Boolean)
  @depends_on_linux_set_top_level = T.let(false, T::Boolean)
end

Instance Attribute Details

#bottle_specification ⇒ BottleSpecification (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.

Returns:



54
55
56
# File 'software_spec.rb', line 54

def bottle_specification
  @bottle_specification
end

#build ⇒ BuildOptions (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.

Returns:



33
34
35
# File 'software_spec.rb', line 33

def build
  @build
end

#compiler_failures ⇒ Array<CompilerFailure> (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.

Returns:



57
58
59
# File 'software_spec.rb', line 57

def compiler_failures
  @compiler_failures
end

#dependency_collector ⇒ DependencyCollector (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.

Returns:



51
52
53
# File 'software_spec.rb', line 51

def dependency_collector
  @dependency_collector
end

#depends_on_macos_set_in_block ⇒ Boolean (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.

Returns:

  • (Boolean)


60
61
62
# File 'software_spec.rb', line 60

def depends_on_macos_set_in_block
  @depends_on_macos_set_in_block
end

#deprecated_flags ⇒ Array<DeprecatedOption> (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.

Returns:



45
46
47
# File 'software_spec.rb', line 45

def deprecated_flags
  @deprecated_flags
end

#deprecated_options ⇒ Array<DeprecatedOption> (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.

Returns:



48
49
50
# File 'software_spec.rb', line 48

def deprecated_options
  @deprecated_options
end

#full_name ⇒ String? (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.

Returns:



27
28
29
# File 'software_spec.rb', line 27

def full_name
  @full_name
end

#name ⇒ String? (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.

Returns:



24
25
26
# File 'software_spec.rb', line 24

def name
  @name
end

#options ⇒ Options (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.

Returns:



42
43
44
# File 'software_spec.rb', line 42

def options
  @options
end

#owner ⇒ Formula, ...

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:



30
31
32
# File 'software_spec.rb', line 30

def owner
  @owner
end

#patches ⇒ Array<EmbeddedPatch, ExternalPatch> (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.



39
40
41
# File 'software_spec.rb', line 39

def patches
  @patches
end

#resources ⇒ Hash{String => Resource} (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.

Returns:



36
37
38
# File 'software_spec.rb', line 36

def resources
  @resources
end

Instance Method Details

#add_dep_option(dep) ⇒ 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.

This method returns an undefined value.

Parameters:



417
418
419
420
421
422
423
424
425
# File 'software_spec.rb', line 417

def add_dep_option(dep)
  dep.option_names.each do |name|
    if dep.optional? && !option_defined?("with-#{name}")
      options << Option.new("with-#{name}", "Build with #{name} support")
    elsif dep.recommended? && !option_defined?("without-#{name}")
      options << Option.new("without-#{name}", "Build without #{name} support")
    end
  end
end

#bottle(&block) ⇒ 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.

This method returns an undefined value.

Parameters:



177
178
179
# File 'software_spec.rb', line 177

def bottle(&block)
  bottle_specification.instance_eval(&block)
end

#bottle_defined? ⇒ 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.

Returns:

  • (Boolean)


154
155
156
# File 'software_spec.rb', line 154

def bottle_defined?
  !bottle_specification.collector.tags.empty?
end

#bottle_tag?(tag = nil) ⇒ 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.

Parameters:

Returns:

  • (Boolean)


159
160
161
# File 'software_spec.rb', line 159

def bottle_tag?(tag = nil)
  bottle_specification.tag?(Utils::Bottles.tag(tag))
end

#bottled?(tag = nil) ⇒ 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.

Parameters:

Returns:

  • (Boolean)


164
165
166
167
168
169
170
171
172
173
174
# File 'software_spec.rb', line 164

def bottled?(tag = nil)
  return false unless bottle_tag?(tag)

  return true if tag.present?
  return true if bottle_specification.compatible_locations?

  owner = self.owner
  return false unless owner.is_a?(Formula)

  owner.force_bottle || owner.bottle.present?
end

#cached_download(*args, &block) ⇒ 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.

Parameters:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


10
# File 'sorbet/rbi/dsl/software_spec.rbi', line 10

def cached_download(*args, &block); end

#checksum(*args, &block) ⇒ 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.

Parameters:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


13
# File 'sorbet/rbi/dsl/software_spec.rbi', line 13

def checksum(*args, &block); end

#clear_cache(*args, &block) ⇒ 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.

Parameters:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


16
# File 'sorbet/rbi/dsl/software_spec.rbi', line 16

def clear_cache(*args, &block); end

#declared_deps ⇒ Dependencies

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:



367
368
369
# File 'software_spec.rb', line 367

def declared_deps
  dependency_collector.deps
end

#depends_on(spec = nil, set_in_block: false, **spec_kwargs) ⇒ 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.

This method returns an undefined value.

Parameters:



262
263
264
265
266
267
# File 'software_spec.rb', line 262

def depends_on(spec = nil, set_in_block: false, **spec_kwargs)
  spec = spec_kwargs if spec.nil? && spec_kwargs.present?
  dep = dependency_collector.add(spec)
  record_os_requirement(dep, set_in_block:)
  add_dep_option(dep) if dep
end

#depends_on_linux_set_top_level? ⇒ 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.

Returns:

  • (Boolean)


277
278
279
# File 'software_spec.rb', line 277

def depends_on_linux_set_top_level?
  @depends_on_linux_set_top_level
end

#depends_on_macos_set_top_level? ⇒ 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.

Returns:

  • (Boolean)


270
271
272
273
274
# File 'software_spec.rb', line 270

def depends_on_macos_set_top_level?
  @depends_on_macos_bare_set_top_level ||
    @depends_on_macos_version_set_top_level ||
    @depends_on_maximum_macos_set_top_level
end

#deprecated_option(hash) ⇒ 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.

This method returns an undefined value.

Parameters:

Raises:

  • (ArgumentError)


231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
# File 'software_spec.rb', line 231

def deprecated_option(hash)
  raise ArgumentError, "deprecated_option hash must not be empty" if hash.empty?

  hash.each do |old_options, new_options|
    Array(old_options).each do |old_option|
      Array(new_options).each do |new_option|
        deprecated_option = DeprecatedOption.new(old_option, new_option)
        deprecated_options << deprecated_option

        old_flag = deprecated_option.old_flag
        new_flag = deprecated_option.current_flag
        next unless @flags.include? old_flag

        @flags -= [old_flag]
        @flags |= [new_flag]
        @deprecated_flags << deprecated_option
      end
    end
  end
  @build = BuildOptions.new(Options.create(@flags), options)
end

#deps ⇒ Dependencies

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:



362
363
364
# File 'software_spec.rb', line 362

def deps
  dependency_collector.deps.dup_without_system_deps
end

#download_queue_name(*args, &block) ⇒ 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.

Parameters:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


19
# File 'sorbet/rbi/dsl/software_spec.rbi', line 19

def download_queue_name(*args, &block); end

#download_queue_type(*args, &block) ⇒ 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.

Parameters:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


22
# File 'sorbet/rbi/dsl/software_spec.rbi', line 22

def download_queue_type(*args, &block); end

#downloader(*args, &block) ⇒ 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.

Parameters:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


25
# File 'sorbet/rbi/dsl/software_spec.rbi', line 25

def downloader(*args, &block); end

#fails_with(compiler, &block) ⇒ 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.

This method returns an undefined value.

Parameters:



412
413
414
# File 'software_spec.rb', line 412

def fails_with(compiler, &block)
  compiler_failures << CompilerFailure.create(compiler, &block)
end

#fetch(*args, &block) ⇒ 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.

Parameters:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


28
# File 'sorbet/rbi/dsl/software_spec.rbi', line 28

def fetch(*args, &block); end

#freeze ⇒ T.self_type

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:

  • (T.self_type)


112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'software_spec.rb', line 112

def freeze
  @resource.freeze
  @resources.freeze
  @dependency_collector.freeze
  @bottle_specification.freeze
  @patches.freeze
  @options.freeze
  @flags.freeze
  @deprecated_flags.freeze
  @deprecated_options.freeze
  @build.freeze
  @compiler_failures.freeze
  super
end

#initialize_dup(other) ⇒ 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.

This method returns an undefined value.

Parameters:



96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'software_spec.rb', line 96

def initialize_dup(other)
  super
  @resource = @resource.dup
  @resources = @resources.dup
  @dependency_collector = @dependency_collector.dup
  @bottle_specification = @bottle_specification.dup
  @patches = @patches.dup
  @options = @options.dup
  @flags = @flags.dup
  @deprecated_flags = @deprecated_flags.dup
  @deprecated_options = @deprecated_options.dup
  @build = @build.dup
  @compiler_failures = @compiler_failures.dup
end

#mirror(*args, &block) ⇒ 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.

Parameters:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


31
# File 'sorbet/rbi/dsl/software_spec.rbi', line 31

def mirror(*args, &block); end

#mirrors(*args, &block) ⇒ 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.

Parameters:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


34
# File 'sorbet/rbi/dsl/software_spec.rbi', line 34

def mirrors(*args, &block); end

#option(name, description = "") ⇒ 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.

This method returns an undefined value.

Parameters:

Raises:

  • (ArgumentError)


222
223
224
225
226
227
228
# File 'software_spec.rb', line 222

def option(name, description = "")
  raise ArgumentError, "option name is required" if name.empty?
  raise ArgumentError, "option name must be longer than one character: #{name}" if name.length <= 1
  raise ArgumentError, "option name must not start with dashes: #{name}" if name.start_with?("-")

  options << Option.new(name, description)
end

#option_defined?(name) ⇒ 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.

Parameters:

Returns:

  • (Boolean)


217
218
219
# File 'software_spec.rb', line 217

def option_defined?(name)
  options.include?(name)
end

#patch(strip = :p1, src = nil, &block) ⇒ 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.

This method returns an undefined value.

Parameters:



403
404
405
406
407
408
409
# File 'software_spec.rb', line 403

def patch(strip = :p1, src = nil, &block)
  p = Patch.create(strip, src, &block)
  return if p.is_a?(ExternalPatch) && p.url.blank?

  dependency_collector.add(p.resource) if p.is_a? ExternalPatch
  patches << p
end

#record_os_requirement(dep, set_in_block:) ⇒ 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.

This method returns an undefined value.

Parameters:

  • dep (T.untyped)
  • set_in_block (Boolean)


282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
# File 'software_spec.rb', line 282

def record_os_requirement(dep, set_in_block:)
  case dep
  when MacOSRequirement
    if set_in_block
      @depends_on_macos_set_in_block = true
      return
    end

    if @depends_on_linux_set_top_level
      raise ArgumentError,
            "`depends_on :linux` cannot be combined with `depends_on macos:`"
    end

    if !dep.version_specified?
      if @depends_on_macos_bare_set_top_level
        raise ArgumentError, "`depends_on :macos` cannot be combined with another macOS `depends_on`"
      end

      if @depends_on_macos_version_set_top_level || @depends_on_maximum_macos_set_top_level
        odisabled "`depends_on :macos` with `depends_on macos:`",
                  "`depends_on :macos` with `depends_on macos:` inside an `on_macos` block"
      end

      @depends_on_macos_bare_set_top_level = true
    elsif dep.comparator == "<="
      if @depends_on_macos_bare_set_top_level
        odisabled "`depends_on :macos` with `depends_on maximum_macos:`",
                  "`depends_on :macos` with `depends_on maximum_macos:` inside an `on_macos` block"
      end

      if @depends_on_maximum_macos_set_top_level
        raise ArgumentError, "`depends_on maximum_macos:` cannot be combined with another macOS `depends_on`"
      end

      @depends_on_maximum_macos_set_top_level = true
    else
      if @depends_on_macos_bare_set_top_level
        odisabled "`depends_on :macos` with `depends_on macos:`",
                  "`depends_on :macos` with `depends_on macos:` inside an `on_macos` block"
      end

      if @depends_on_macos_version_set_top_level
        raise ArgumentError, "`depends_on macos:` cannot be combined with another macOS `depends_on`"
      end

      @depends_on_macos_version_set_top_level = true
    end
  when LinuxRequirement
    return if set_in_block

    if depends_on_macos_set_top_level?
      raise ArgumentError,
            "`depends_on :linux` cannot be combined with `depends_on macos:`"
    end

    @depends_on_linux_set_top_level = true
  end
end

#recursive_dependencies ⇒ Array<Dependency>

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:



372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
# File 'software_spec.rb', line 372

def recursive_dependencies
  deps_f = []
  recursive_dependencies = deps.filter_map do |dep|
    deps_f << dep.to_formula
    dep
  rescue TapFormulaUnavailableError
    # Don't complain about missing cross-tap dependencies
    next
  end.uniq
  deps_f.compact.each do |f|
    f.recursive_dependencies.each do |dep|
      recursive_dependencies << dep unless recursive_dependencies.include?(dep)
    end
  end
  recursive_dependencies
end

#recursive_requirements ⇒ Requirements

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:



395
396
397
# File 'software_spec.rb', line 395

def recursive_requirements
  Requirement.expand(self)
end

#requirements ⇒ Requirements

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:



390
391
392
# File 'software_spec.rb', line 390

def requirements
  dependency_collector.requirements
end

#resource(name = nil, klass = Resource, &block) ⇒ Resource?

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.

Parameters:

Returns:



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'software_spec.rb', line 191

def resource(name = nil, klass = Resource, &block)
  if block
    raise ArgumentError, "Resource must have a name." if name.nil?
    raise DuplicateResourceError, name if resource_defined?(name)

    res = case klass
    when :test
      Resource.new(name, test: true, &block)
    when Symbol
      raise ArgumentError, "Unknown resource type: #{klass.inspect}"
    else
      klass.new(name, &block)
    end
    return unless res.url

    resources[name] = res
    dependency_collector.add(res)
    res
  else
    return @resource if name.nil?

    resources.fetch(name) { raise ResourceMissingError.new(owner, name) }
  end
end

#resource_defined?(name) ⇒ 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.

Parameters:

Returns:

  • (Boolean)


182
183
184
# File 'software_spec.rb', line 182

def resource_defined?(name)
  resources.key?(name)
end

#sha256(*args, &block) ⇒ 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.

Parameters:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


37
# File 'sorbet/rbi/dsl/software_spec.rbi', line 37

def sha256(*args, &block); end

#source_modified_time(*args, &block) ⇒ 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.

Parameters:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


40
# File 'sorbet/rbi/dsl/software_spec.rbi', line 40

def source_modified_time(*args, &block); end

#specs(*args, &block) ⇒ 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.

Parameters:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


43
# File 'sorbet/rbi/dsl/software_spec.rbi', line 43

def specs(*args, &block); end

#stage(*args, &block) ⇒ 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.

Parameters:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


46
# File 'sorbet/rbi/dsl/software_spec.rbi', line 46

def stage(*args, &block); end

#url(val = nil, specs = {}) ⇒ 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.

Parameters:

  • val (String, nil) (defaults to: nil)
  • specs (Hash{Symbol => T.anything}) (defaults to: {})

Returns:



145
146
147
148
149
150
151
# File 'software_spec.rb', line 145

def url(val = nil, specs = {})
  if val
    @resource.url(val, **specs)
    dependency_collector.add(@resource)
  end
  @resource.url
end

#uses_from_macos(dep, bounds = {}) ⇒ 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.

This method returns an undefined value.

Parameters:



347
348
349
350
351
352
353
354
355
356
357
358
359
# File 'software_spec.rb', line 347

def uses_from_macos(dep, bounds = {})
  if dep.is_a?(Hash)
    bounds = dep.dup
    dep, tags = bounds.shift
    dep = T.cast(dep, String)
    tags = [*tags]
    bounds = T.cast(bounds, T::Hash[Symbol, Symbol])
  else
    tags = []
  end

  depends_on UsesFromMacOSDependency.new(dep, tags, bounds:)
end

#using(*args, &block) ⇒ 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.

Parameters:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


49
# File 'sorbet/rbi/dsl/software_spec.rbi', line 49

def using(*args, &block); end

#verify_download_integrity(*args, &block) ⇒ 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.

Parameters:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


52
# File 'sorbet/rbi/dsl/software_spec.rbi', line 52

def verify_download_integrity(*args, &block); end

#version(*args, &block) ⇒ 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.

Parameters:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


55
# File 'sorbet/rbi/dsl/software_spec.rbi', line 55

def version(*args, &block); end