Merge branch 'Homebrew:master' into mohammad

This commit is contained in:
Mohammad Zain Abbas 2022-07-18 15:10:08 +02:00 committed by GitHub
commit 3e8cf6c8f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
623 changed files with 1145 additions and 347 deletions

View File

@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (6.1.6)
activesupport (6.1.6.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
@ -33,7 +33,7 @@ GEM
hpricot (0.8.6)
http-cookie (1.0.5)
domain_name (~> 0.5)
i18n (1.10.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
json (2.6.2)
json_schemer (0.2.21)
@ -57,13 +57,13 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2022.0105)
mini_portile2 (2.8.0)
minitest (5.16.1)
msgpack (1.5.2)
minitest (5.16.2)
msgpack (1.5.3)
mustache (1.1.1)
net-http-digest_auth (1.4.1)
net-http-persistent (4.0.1)
connection_pool (~> 2.2)
nokogiri (1.13.6)
nokogiri (1.13.7)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
parallel (1.22.1)
@ -84,7 +84,7 @@ GEM
method_source (~> 1.0)
public_suffix (4.0.7)
racc (1.6.0)
rack (2.2.3.1)
rack (2.2.4)
rainbow (3.1.1)
rbi (0.0.14)
ast
@ -124,7 +124,7 @@ GEM
rspec (>= 3, < 4)
rspec_junit_formatter (0.5.1)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.31.1)
rubocop (1.31.2)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.1.0.0)
@ -134,18 +134,18 @@ GEM
rubocop-ast (>= 1.18.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.18.0)
rubocop-ast (1.19.1)
parser (>= 3.1.1.0)
rubocop-performance (1.14.2)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.15.1)
rubocop-rails (2.15.2)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-rspec (2.11.1)
rubocop (~> 1.19)
rubocop-sorbet (0.6.10)
rubocop-rspec (2.12.1)
rubocop (~> 1.31)
rubocop-sorbet (0.6.11)
rubocop (>= 0.90.0)
ruby-macho (3.0.0)
ruby-progressbar (1.11.0)
@ -159,14 +159,14 @@ GEM
simplecov (~> 0.19)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
sorbet (0.5.10132)
sorbet-static (= 0.5.10132)
sorbet-runtime (0.5.10132)
sorbet (0.5.10160)
sorbet-static (= 0.5.10160)
sorbet-runtime (0.5.10160)
sorbet-runtime-stub (0.2.0)
sorbet-static (0.5.10132-universal-darwin-14)
sorbet-static-and-runtime (0.5.10132)
sorbet (= 0.5.10132)
sorbet-runtime (= 0.5.10132)
sorbet-static (0.5.10160-universal-darwin-14)
sorbet-static-and-runtime (0.5.10160)
sorbet (= 0.5.10160)
sorbet-runtime (= 0.5.10160)
spoom (1.1.11)
sorbet (>= 0.5.9204)
sorbet-runtime (>= 0.5.9204)
@ -191,7 +191,7 @@ GEM
diff-lcs (~> 1.3)
parser (>= 3.1.0)
uri_template (0.7.0)
warning (1.2.1)
warning (1.3.0)
webrick (1.7.0)
webrobots (0.1.2)
yard (0.9.28)

View File

@ -1,6 +1,8 @@
# typed: true
# frozen_string_literal: true
require "macos_versions"
FORMULA_COMPONENT_PRECEDENCE_LIST = [
[{ name: :include, type: :method_call }],
[{ name: :desc, type: :method_call }],
@ -28,6 +30,8 @@ FORMULA_COMPONENT_PRECEDENCE_LIST = [
[{ name: :uses_from_macos, type: :method_call }],
[{ name: :on_macos, type: :block_call }],
[{ name: :on_linux, type: :block_call }],
[{ name: :on_arm, type: :block_call }],
[{ name: :on_intel, type: :block_call }],
[{ name: :conflicts_with, type: :method_call }],
[{ name: :skip_clean, type: :method_call }],
[{ name: :cxxstdlib_check, type: :method_call }],

View File

@ -102,7 +102,15 @@ module Cask
casks.select do |cask|
raise CaskNotInstalledError, cask if !cask.installed? && !force
cask.outdated?(greedy: true)
if cask.outdated?(greedy: true)
true
elsif cask.version.latest?
opoo "Not upgrading #{cask.token}, the downloaded artifact has not changed"
false
else
opoo "Not upgrading #{cask.token}, the latest version is already installed"
false
end
end
end

View File

@ -92,7 +92,7 @@ module Cask
]).freeze
extend Predicable
include OnSystem
include OnSystem::MacOSOnly
attr_reader :cask, :token

View File

@ -106,7 +106,7 @@ module Homebrew
if Settings.read("donationmessage") != "true" && !args.quiet?
ohai "Homebrew is run entirely by unpaid volunteers. Please consider donating:"
puts " #{Formatter.url("https://github.com/Homebrew/brew#donations")}\n"
puts " #{Formatter.url("https://github.com/Homebrew/brew#donations")}\n\n"
# Consider the message possibly missed if not a TTY.
Settings.write "donationmessage", true if $stdout.tty?
@ -115,7 +115,7 @@ module Homebrew
install_core_tap_if_necessary
updated = false
new_repository_version = nil
new_tag = nil
initial_revision = ENV["HOMEBREW_UPDATE_BEFORE"].to_s
current_revision = ENV["HOMEBREW_UPDATE_AFTER"].to_s
@ -132,11 +132,15 @@ module Homebrew
"git", "-C", HOMEBREW_REPOSITORY, "tag", "--list", "--sort=-version:refname", "*.*"
).lines.first.chomp
if old_tag.blank? || (new_tag == old_tag)
puts "Updated Homebrew from #{shorten_revision(initial_revision)} to #{shorten_revision(current_revision)}."
Settings.write "latesttag", new_tag if new_tag != old_tag
if new_tag == old_tag
ohai "Updated Homebrew from #{shorten_revision(initial_revision)} to #{shorten_revision(current_revision)}."
elsif old_tag.blank?
ohai "Updated Homebrew from #{shorten_revision(initial_revision)} " \
"to #{new_tag} (#{shorten_revision(current_revision)})."
else
new_repository_version = new_tag
puts "Updated Homebrew from #{old_tag} (#{shorten_revision(initial_revision)}) " \
ohai "Updated Homebrew from #{old_tag} (#{shorten_revision(initial_revision)}) " \
"to #{new_tag} (#{shorten_revision(current_revision)})."
end
end
@ -235,22 +239,26 @@ module Homebrew
EOS
end
return if new_repository_version.blank?
return if new_tag.blank? || new_tag == old_tag || args.quiet?
puts
ohai "Homebrew was updated to version #{new_repository_version}"
Settings.write "latesttag", new_repository_version
if new_repository_version.split(".").last == "0"
new_major_version, new_minor_version, new_patch_version = new_tag.split(".").map(&:to_i)
old_major_version, old_minor_version = (old_tag.split(".")[0, 2]).map(&:to_i) if old_tag.present?
if old_tag.blank? || new_major_version > old_major_version \
|| new_minor_version > old_minor_version
puts <<~EOS
More detailed release notes are available on the Homebrew Blog:
#{Formatter.url("https://brew.sh/blog/#{new_repository_version}")}
EOS
elsif !args.quiet?
puts <<~EOS
The changelog can be found at:
#{Formatter.url("https://github.com/Homebrew/brew/releases/tag/#{new_repository_version}")}
The #{new_major_version}.#{new_minor_version}.0 release notes are available on the Homebrew Blog:
#{Formatter.url("https://brew.sh/blog/#{new_major_version}.#{new_minor_version}.0")}
EOS
end
return if new_patch_version.zero?
puts <<~EOS
The #{new_tag} changelog can be found at:
#{Formatter.url("https://github.com/Homebrew/brew/releases/tag/#{new_tag}")}
EOS
end
def shorten_revision(revision)

View File

@ -647,7 +647,7 @@ EOS
echo "Fetching ${DIR}..."
fi
local tmp_failure_file="${HOMEBREW_REPOSITORY}/.git/TMP_FETCH_FAILURES"
local tmp_failure_file="${DIR}/.git/TMP_FETCH_FAILURES"
rm -f "${tmp_failure_file}"
if [[ -n "${HOMEBREW_UPDATE_AUTO}" ]]

View File

@ -100,18 +100,11 @@ module Homebrew
return merge(args: args)
end
ensure_relocation_formulae_installed! unless args.skip_relocation?
args.named.to_resolved_formulae(uniq: false).each do |f|
bottle_formula f, args: args
end
end
def ensure_relocation_formulae_installed!
Keg.relocation_formulae.each do |f|
ensure_formula_installed!(f, latest: true)
end
end
def keg_contain?(string, keg, ignores, formula_and_runtime_deps_names = nil, args:)
@put_string_exists_header, @put_filenames = nil
@ -268,6 +261,7 @@ module Homebrew
def formula_ignores(f)
ignores = []
cellar_regex = Regexp.escape(HOMEBREW_CELLAR)
prefix_regex = Regexp.escape(HOMEBREW_PREFIX)
# Ignore matches to go keg, because all go binaries are statically linked.
any_go_deps = f.deps.any? do |dep|
@ -282,7 +276,7 @@ module Homebrew
# On Linux, GCC installation can be moved so long as the whole directory tree is moved together:
# https://gcc-help.gcc.gnu.narkive.com/GnwuCA7l/moving-gcc-from-the-installation-path-is-it-allowed.
when Version.formula_optionally_versioned_regex(:gcc)
%r{#{cellar_regex}/gcc} if OS.linux?
Regexp.union(%r{#{cellar_regex}/gcc}, %r{#{prefix_regex}/opt/gcc}) if OS.linux?
# binutils is relocatable for the same reason: https://github.com/Homebrew/brew/pull/11899#issuecomment-906804451.
when Version.formula_optionally_versioned_regex(:binutils)
%r{#{cellar_regex}/binutils} if OS.linux?

View File

@ -243,7 +243,7 @@ module Homebrew
elsif new_tag.present?
[
[
formula_spec.specs[:tag],
/#{formula_spec.specs[:tag]}(?=")/,
new_tag,
],
[
@ -283,8 +283,8 @@ module Homebrew
if forced_version && new_version != "0"
replacement_pairs << if old_contents.include?("version \"#{old_formula_version}\"")
[
old_formula_version.to_s,
new_version,
"version \"#{old_formula_version}\"",
"version \"#{new_version}\"",
]
elsif new_mirrors.present?
[

View File

@ -52,7 +52,8 @@ module Homebrew
"master"
end
start_commit, end_commit = nil
start_commit = nil
end_commit = "HEAD"
cd HOMEBREW_REPOSITORY do
start_commit = if (commit = args.commit)
commit
@ -79,14 +80,13 @@ module Homebrew
# ^0 ensures this points to the commit rather than the tag object.
"#{previous_tag}^0"
else
Utils.popen_read("git", "rev-parse", "origin/master").chomp
Utils.popen_read("git", "merge-base", "origin/master", end_commit).chomp
end
odie "Could not find start commit!" if start_commit.empty?
start_commit = Utils.popen_read("git", "rev-parse", start_commit).chomp
odie "Could not find start commit!" if start_commit.empty?
end_commit ||= "HEAD"
end_commit = Utils.popen_read("git", "rev-parse", end_commit).chomp
odie "Could not find end commit!" if end_commit.empty?

View File

@ -41,6 +41,8 @@ module OnSystem
raise ArgumentError, "Invalid OS `or_*` condition: #{or_condition.inspect}"
end
return false if Homebrew::SimulateSystem.linux? || (Homebrew::SimulateSystem.none? && OS.linux?)
base_os = MacOS::Version.from_symbol(os_name)
current_os = MacOS::Version.from_symbol(Homebrew::SimulateSystem.os || MacOS.version.to_sym)
@ -56,7 +58,7 @@ module OnSystem
end
sig { params(base: Class).void }
def self.included(base)
def setup_arch_methods(base)
ARCH_OPTIONS.each do |arch|
base.define_method("on_#{arch}") do |&block|
@on_system_blocks_exist = true
@ -70,7 +72,10 @@ module OnSystem
result
end
end
end
sig { params(base: Class).void }
def setup_base_os_methods(base)
BASE_OS_OPTIONS.each do |base_os|
base.define_method("on_#{base_os}") do |&block|
@on_system_blocks_exist = true
@ -85,6 +90,28 @@ module OnSystem
end
end
base.define_method(:on_system) do |linux, macos:, &block|
@on_system_blocks_exist = true
raise ArgumentError, "The first argument to `on_system` must be `:linux`" if linux != :linux
os_version, or_condition = if macos.to_s.include?("_or_")
macos.to_s.split(/_(?=or_)/).map(&:to_sym)
else
[macos.to_sym, nil]
end
return if !OnSystem.os_condition_met?(os_version, or_condition) && !OnSystem.os_condition_met?(:linux)
@called_in_on_system_block = true
result = block.call
@called_in_on_system_block = false
result
end
end
sig { params(base: Class).void }
def setup_macos_methods(base)
MacOSVersions::SYMBOLS.each_key do |os_name|
base.define_method("on_#{os_name}") do |or_condition = nil, &block|
@on_system_blocks_exist = true
@ -100,4 +127,30 @@ module OnSystem
end
end
end
sig { params(_base: Class).void }
def self.included(_base)
raise "Do not include `OnSystem` directly. Instead, include `OnSystem::MacOSAndLinux` or `OnSystem::MacOSOnly`"
end
module MacOSAndLinux
extend T::Sig
sig { params(base: Class).void }
def self.included(base)
OnSystem.setup_arch_methods(base)
OnSystem.setup_base_os_methods(base)
OnSystem.setup_macos_methods(base)
end
end
module MacOSOnly
extend T::Sig
sig { params(base: Class).void }
def self.included(base)
OnSystem.setup_arch_methods(base)
OnSystem.setup_macos_methods(base)
end
end
end

View File

@ -83,12 +83,11 @@ class Keg
def self.bottle_dependencies
@bottle_dependencies ||= begin
formulae = relocation_formulae
formulae = []
gcc = Formulary.factory(CompilerSelector.preferred_gcc)
if !Homebrew::EnvConfig.simulate_macos_on_linux? &&
DevelopmentTools.non_apple_gcc_version("gcc") < gcc.version.to_i
formulae += gcc.recursive_dependencies.map(&:name)
formulae << gcc.name
formulae << gcc
end
formulae
end

View File

@ -64,7 +64,7 @@ class Formula
include Utils::Shebang
include Utils::Shell
include Context
include OnSystem
include OnSystem::MacOSAndLinux
extend Forwardable
extend Cachable
extend Predicable
@ -2470,7 +2470,7 @@ class Formula
# The methods below define the formula DSL.
class << self
include BuildEnvironment::DSL
include OnSystem
include OnSystem::MacOSAndLinux
def method_added(method)
super

View File

@ -577,9 +577,8 @@ class FormulaInstaller
unsatisfied_reqs
end
def expand_dependencies
inherited_options = Hash.new { |hash, key| hash[key] = Options.new }
pour_bottle = pour_bottle?
def expand_dependencies_for_formula(formula, inherited_options)
any_bottle_used = false
# Cache for this expansion only. FormulaInstaller has a lot of inputs which can alter expansion.
cache_key = "FormulaInstaller-#{formula.full_name}-#{Time.now.to_f}"
@ -600,26 +599,34 @@ class FormulaInstaller
elsif dep.satisfied?(inherited_options[dep.name])
Dependency.skip
else
pour_bottle ||= install_bottle_for?(dep.to_formula, build)
any_bottle_used ||= install_bottle_for?(dep.to_formula, build)
end
end
[expanded_deps, any_bottle_used]
end
def expand_dependencies
inherited_options = Hash.new { |hash, key| hash[key] = Options.new }
any_bottle_used = pour_bottle?
expanded_deps, any_dep_bottle_used = expand_dependencies_for_formula(formula, inherited_options)
any_bottle_used ||= any_dep_bottle_used
# We require some dependencies (glibc, GCC 5, etc.) if binaries were built.
# Native binaries shouldn't exist in cross-platform `all` bottles.
if pour_bottle && !formula.bottled?(:all) && !Keg.bottle_dependencies.empty?
bottle_deps = if Keg.bottle_dependencies.exclude?(formula.name)
Keg.bottle_dependencies
elsif Keg.relocation_formulae.exclude?(formula.name)
Keg.relocation_formulae
else
[]
if any_bottle_used && !formula.bottled?(:all) && !Keg.bottle_dependencies.empty?
all_bottle_deps = Keg.bottle_dependencies.flat_map do |bottle_dep|
bottle_dep.recursive_dependencies.map(&:name) + [bottle_dep.name]
end
bottle_deps = bottle_deps.map { |formula| Dependency.new(formula) }
.reject do |dep|
inherited_options[dep.name] |= inherited_options_for(dep)
dep.satisfied? inherited_options[dep.name]
if all_bottle_deps.exclude?(formula.name)
bottle_deps = Keg.bottle_dependencies.flat_map do |bottle_dep|
expanded_bottle_deps, = expand_dependencies_for_formula(bottle_dep, inherited_options)
expanded_bottle_deps
end
expanded_deps = Dependency.merge_repeats(bottle_deps + expanded_deps)
end
expanded_deps = Dependency.merge_repeats(bottle_deps + expanded_deps)
end
expanded_deps.map { |dep| [dep, inherited_options[dep.name]] }

View File

@ -446,7 +446,7 @@ class Keg
/^gdk-pixbuf/,
"ghc",
/^gio/,
"lua",
/^lua/,
/^mecab/,
/^node/,
/^ocaml/,

View File

@ -367,12 +367,8 @@ class Keg
[]
end
def self.relocation_formulae
[]
end
def self.bottle_dependencies
relocation_formulae
[]
end
end

View File

@ -70,7 +70,7 @@ module Language
quiet_system python, "-c", script
end
def self.setup_install_args(prefix)
def self.setup_install_args(prefix, python = "python3")
shim = <<~PYTHON
import setuptools, tokenize
__file__ = 'setup.py'
@ -84,6 +84,7 @@ module Language
install
--prefix=#{prefix}
--install-scripts=#{prefix}/bin
--install-lib=#{prefix/site_packages(python)}
--single-version-externally-managed
--record=installed.txt
]

View File

@ -18,7 +18,7 @@ class Resource
include Context
include FileUtils
include OnSystem
include OnSystem::MacOSAndLinux
attr_reader :mirrors, :specs, :using, :source_modified_time, :patches, :owner
attr_writer :version
@ -121,6 +121,7 @@ class Resource
# is a {ResourceStageContext}.
# A target or a block must be given, but not both.
def unpack(target = nil)
current_working_directory = Pathname.pwd
mktemp(download_name) do |staging|
downloader.stage do
@source_modified_time = downloader.source_modified_time
@ -129,6 +130,7 @@ class Resource
yield ResourceStageContext.new(self, staging)
elsif target
target = Pathname(target)
target = current_working_directory/target if target.relative?
target.install Pathname.pwd.children
end
end

View File

@ -14,6 +14,12 @@ module RuboCop
class ComponentsOrder < FormulaCop
extend AutoCorrector
def on_system_methods
@on_system_methods ||= [:intel, :arm, :macos, :linux, *MacOSVersions::SYMBOLS.keys].map do |m|
:"on_#{m}"
end
end
def audit_formula(_node, _class_node, _parent_class_node, body_node)
@present_components, @offensive_nodes = check_order(FORMULA_COMPONENT_PRECEDENCE_LIST, body_node)
@ -25,48 +31,45 @@ module RuboCop
[{ name: :patch, type: :method_call }, { name: :patch, type: :block_call }],
]
on_macos_blocks = find_blocks(body_node, :on_macos)
on_system_methods.each do |on_method|
on_method_blocks = find_blocks(body_node, on_method)
next if on_method_blocks.empty?
if on_macos_blocks.length > 1
@offensive_node = on_macos_blocks.second
problem "there can only be one `on_macos` block in a formula."
if on_method_blocks.length > 1
@offensive_node = on_method_blocks.second
problem "there can only be one `#{on_method}` block in a formula."
end
check_on_system_block_content(component_precedence_list, on_method_blocks.first)
end
check_on_os_block_content(component_precedence_list, on_macos_blocks.first) if on_macos_blocks.any?
on_linux_blocks = find_blocks(body_node, :on_linux)
if on_linux_blocks.length > 1
@offensive_node = on_linux_blocks.second
problem "there can only be one `on_linux` block in a formula."
end
check_on_os_block_content(component_precedence_list, on_linux_blocks.first) if on_linux_blocks.any?
resource_blocks = find_blocks(body_node, :resource)
resource_blocks.each do |resource_block|
on_macos_blocks = find_blocks(resource_block.body, :on_macos)
on_linux_blocks = find_blocks(resource_block.body, :on_linux)
on_system_blocks = {}
if on_macos_blocks.length.zero? && on_linux_blocks.length.zero?
# Found nothing. Try without .body as depending on the code,
# on_macos or on_linux might be in .body or not ...
on_macos_blocks = find_blocks(resource_block, :on_macos)
on_linux_blocks = find_blocks(resource_block, :on_linux)
next if on_macos_blocks.length.zero? && on_linux_blocks.length.zero?
on_system_methods.each do |on_method|
on_system_blocks[on_method] = find_blocks(resource_block.body, on_method)
end
if on_system_blocks.empty?
# Found nothing. Try without .body as depending on the code,
# on_{system} might be in .body or not ...
on_system_methods.each do |on_method|
on_system_blocks[on_method] = find_blocks(resource_block, on_method)
end
end
next if on_system_blocks.empty?
@offensive_node = resource_block
next if on_macos_blocks.length.zero? && on_linux_blocks.length.zero?
on_system_bodies = []
on_os_bodies = []
(on_macos_blocks + on_linux_blocks).each do |on_os_block|
on_os_body = on_os_block.body
branches = on_os_body.if_type? ? on_os_body.branches : [on_os_body]
on_os_bodies += branches.map { |branch| [on_os_block, branch] }
on_system_blocks.each_value do |blocks|
blocks.each do |on_system_block|
on_system_body = on_system_block.body
branches = on_system_body.if_type? ? on_system_body.branches : [on_system_body]
on_system_bodies += branches.map { |branch| [on_system_block, branch] }
end
end
message = nil
@ -79,14 +82,20 @@ module RuboCop
minimum_methods = allowed_methods.first.map { |m| "`#{m}`" }.to_sentence
maximum_methods = allowed_methods.last.map { |m| "`#{m}`" }.to_sentence
on_os_bodies.each do |on_os_block, on_os_body|
method_name = on_os_block.method_name
child_nodes = on_os_body.begin_type? ? on_os_body.child_nodes : [on_os_body]
if child_nodes.all? { |n| n.send_type? || n.block_type? }
method_names = child_nodes.map(&:method_name)
next if allowed_methods.include? method_names
on_system_bodies.each do |on_system_block, on_system_body|
method_name = on_system_block.method_name
child_nodes = on_system_body.begin_type? ? on_system_body.child_nodes : [on_system_body]
if child_nodes.all? { |n| n.send_type? || n.block_type? || n.lvasgn_type? }
method_names = child_nodes.map do |node|
next if node.lvasgn_type?
next if node.method_name == :patch
next if on_system_methods.include? node.method_name
node.method_name
end.compact
next if method_names.empty? || allowed_methods.include?(method_names)
end
offending_node(on_os_block)
offending_node(on_system_block)
message = "`#{method_name}` blocks within `resource` blocks must contain at least " \
"#{minimum_methods} and at most #{maximum_methods} (in order)."
break
@ -97,32 +106,31 @@ module RuboCop
next
end
if on_macos_blocks.length > 1
problem "there can only be one `on_macos` block in a resource block."
next
end
if on_linux_blocks.length > 1
problem "there can only be one `on_linux` block in a resource block."
next
on_system_blocks.each do |on_method, blocks|
if blocks.length > 1
problem "there can only be one `#{on_method}` block in a resource block."
next
end
end
end
end
def check_on_os_block_content(component_precedence_list, on_os_block)
on_os_allowed_methods = %w[
def check_on_system_block_content(component_precedence_list, on_system_block)
on_system_allowed_methods = %w[
depends_on
patch
resource
deprecate!
disable!
conflicts_with
fails_with
keg_only
ignore_missing_libraries
]
_, offensive_node = check_order(component_precedence_list, on_os_block.body)
on_system_allowed_methods += on_system_methods.map(&:to_s)
_, offensive_node = check_order(component_precedence_list, on_system_block.body)
component_problem(*offensive_node) if offensive_node
child_nodes = on_os_block.body.begin_type? ? on_os_block.body.child_nodes : [on_os_block.body]
child_nodes = on_system_block.body.begin_type? ? on_system_block.body.child_nodes : [on_system_block.body]
child_nodes.each do |child|
valid_node = depends_on_node?(child)
# Check for RuboCop::AST::SendNode and RuboCop::AST::BlockNode instances
@ -130,13 +138,13 @@ module RuboCop
method_type = child.send_type? || child.block_type?
next unless method_type
valid_node ||= on_os_allowed_methods.include? child.method_name.to_s
valid_node ||= on_system_allowed_methods.include? child.method_name.to_s
@offensive_node = child
next if valid_node
problem "`#{on_os_block.method_name}` cannot include `#{child.method_name}`. " \
"Only #{on_os_allowed_methods.map { |m| "`#{m}`" }.to_sentence} are allowed."
problem "`#{on_system_block.method_name}` cannot include `#{child.method_name}`. " \
"Only #{on_system_allowed_methods.map { |m| "`#{m}`" }.to_sentence} are allowed."
end
end

View File

@ -43,6 +43,7 @@ module RuboCop
net-snmp
netcat
openldap
pax
pcsc-lite
pod2man
rpcgen
@ -81,6 +82,7 @@ module RuboCop
git
groff
gzip
less
openssl
perl
php

View File

@ -18,7 +18,7 @@ class SoftwareSpec
extend T::Sig
extend Forwardable
include OnSystem
include OnSystem::MacOSAndLinux
PREDEFINED_OPTIONS = {
universal: Option.new("universal", "Build a universal binary"),
@ -583,7 +583,7 @@ class BottleSpecification
end
class PourBottleCheck
include OnSystem
include OnSystem::MacOSAndLinux
def initialize(formula)
@formula = formula

View File

@ -2784,6 +2784,7 @@ end
module ActiveSupport::VERSION; end
ActiveSupport::VERSION::MAJOR = T.let(T.unsafe(nil), Integer)
ActiveSupport::VERSION::MINOR = T.let(T.unsafe(nil), Integer)
ActiveSupport::VERSION::PRE = T.let(T.unsafe(nil), String)
ActiveSupport::VERSION::STRING = T.let(T.unsafe(nil), String)
ActiveSupport::VERSION::TINY = T.let(T.unsafe(nil), Integer)

View File

@ -154,7 +154,7 @@ module I18n::Backend::Fallbacks
private
def on_fallback(_original_locale, _fallback_locale, _key, _optoins); end
def on_fallback(_original_locale, _fallback_locale, _key, _options); end
end
module I18n::Backend::Flatten
@ -427,6 +427,7 @@ module I18n::Base
def handle_exception(handling, exception, locale, key, options); end
def normalize_key(key, separator); end
def translate_key(key, throw, raise, locale, backend, options); end
end
class I18n::Config

View File

@ -293,7 +293,7 @@ class Minitest::Test < ::Minitest::Runnable
def capture_exceptions; end
def class_name; end
def neuter_exception(e); end
def new_exception(klass, msg, bt); end
def new_exception(klass, msg, bt, kill = T.unsafe(nil)); end
def run; end
def sanitize_exception(e); end
def with_info_handler(&block); end

View File

@ -872,6 +872,7 @@ class Rack::QueryParser::Params
def to_params_hash; end
end
class Rack::QueryParser::ParamsTooDeepError < ::RangeError; end
Rack::RACK_ERRORS = T.let(T.unsafe(nil), String)
Rack::RACK_HIJACK = T.let(T.unsafe(nil), String)
Rack::RACK_HIJACK_IO = T.let(T.unsafe(nil), String)
@ -1610,6 +1611,8 @@ Rack::Utils::KeySpaceConstrainedParams = Rack::QueryParser::Params
Rack::Utils::NULL_BYTE = T.let(T.unsafe(nil), String)
Rack::Utils::PATH_SEPS = T.let(T.unsafe(nil), Regexp)
Rack::Utils::ParameterTypeError = Rack::QueryParser::ParameterTypeError
Rack::Utils::RFC2822_DAY_NAME = T.let(T.unsafe(nil), Array)
Rack::Utils::RFC2822_MONTH_NAME = T.let(T.unsafe(nil), Array)
Rack::Utils::STATUS_WITH_NO_ENTITY_BODY = T.let(T.unsafe(nil), Hash)
Rack::Utils::SYMBOL_TO_STATUS_CODE = T.let(T.unsafe(nil), Hash)
Rack::VERSION = T.let(T.unsafe(nil), Array)

View File

@ -1391,7 +1391,6 @@ RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR = T.l
RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR_ATTR = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_BACKGROUND_SCENARIO_XSCENARIO_ETC = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_BEFORE_AFTER = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_BEGINNING_OF_DAY_BEGINNING_OF_WEEK_BEGINNING_OF_MONTH_ETC = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_BELONGS_TO_HAS_ONE_HAS_MANY_HAS_AND_BELONGS_TO_MANY = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_BE_EQ_EQL_EQUAL = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_BE_TRUTHY_BE_FALSEY_BE_FALSY_ETC = T.let(T.unsafe(nil), Set)
@ -1418,13 +1417,14 @@ RuboCop::AST::NodePattern::Sets::SET_DOWNCASE_UPCASE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_EACH_EXAMPLE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_INDEX_WITH_INDEX = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_OBJECT_WITH_OBJECT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_END_OF_DAY_END_OF_WEEK_END_OF_MONTH_ETC = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_ENUMERATOR_RATIONAL_COMPLEX_THREAD = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_EQL_EQ_BE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_ESCAPE_ENCODE_UNESCAPE_DECODE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_EXACTLY_AT_LEAST_AT_MOST = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_EXIST_EXISTS = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_EXPECT_ALLOW = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_FACTORYGIRL_FACTORYBOT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_FILETEST_FILE_DIR_SHELL = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_FIRST_LAST__ETC = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_FIXNUM_BIGNUM = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_FLATTEN_FLATTEN = T.let(T.unsafe(nil), Set)
@ -1504,7 +1504,9 @@ RuboCop::AST::NodePattern::Sets::SET_TYPE_TEMPLATE_TYPE_MEMBER = T.let(T.unsafe(
RuboCop::AST::NodePattern::Sets::SET_ZERO_POSITIVE_NEGATIVE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET__ = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET__AT_SLICE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET__EQL_ = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET__EQUAL_EQL = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET__FETCH = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET__GLOB = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET___ = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET___2 = T.let(T.unsafe(nil), Set)
@ -1514,12 +1516,14 @@ RuboCop::AST::NodePattern::Sets::SET___5 = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET___6 = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET___7 = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET___8 = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET___EQL = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET___EQL_ETC = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET___EQL_INCLUDE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET___METHOD_____CALLEE__ = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET____ = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET____ETC = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET____ETC_2 = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET____ETC_3 = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_____2 = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::VAR = T.let(T.unsafe(nil), String)
module RuboCop::AST::NumericNode
@ -1778,6 +1782,7 @@ class RuboCop::AST::Token
def left_ref_bracket?; end
def line; end
def pos; end
def regexp_dots?; end
def rescue_modifier?; end
def right_bracket?; end
def right_curly_brace?; end

View File

@ -510,6 +510,7 @@ RuboCop::Cop::Rails::DefaultScope::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Rails::DefaultScope::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::Delegate < ::RuboCop::Cop::Base
include ::RuboCop::Cop::VisibilityHelp
extend ::RuboCop::Cop::AutoCorrector
def delegate?(param0 = T.unsafe(nil)); end
@ -521,9 +522,8 @@ class RuboCop::Cop::Rails::Delegate < ::RuboCop::Cop::Base
def include_prefix_case?; end
def method_name_matches?(method_name, body); end
def prefixed_method_name(body); end
def private_or_protected_before(line); end
def private_or_protected_delegation(node); end
def private_or_protected_inline(line); end
def private_or_protected_inline(node); end
def register_offense(node); end
def trivial_delegate?(def_node); end
end
@ -756,13 +756,16 @@ class RuboCop::Cop::Rails::ExpandedDateRange < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
extend ::RuboCop::Cop::TargetRailsVersion
def expanded_date_range(param0 = T.unsafe(nil)); end
def on_irange(node); end
private
def same_receiver?(begin_node, end_node); end
def use_mapped_methods?(beginning_method, end_method); end
def allow?(begin_node, end_node); end
def any_arguments?(begin_node, end_node); end
def preferred_method(begin_node); end
def receiver_source(node); end
def register_offense(node, preferred_method); end
def same_argument?(begin_node, end_node); end
end
RuboCop::Cop::Rails::ExpandedDateRange::MAPPED_DATE_RANGE_METHODS = T.let(T.unsafe(nil), Hash)

View File

@ -6,6 +6,7 @@
module RuboCop; end
module RuboCop::Cop; end
RuboCop::Cop::IgnoredPattern = RuboCop::Cop::AllowedPattern
module RuboCop::Cop::RSpec; end
class RuboCop::Cop::RSpec::AlignLeftLetBrace < ::RuboCop::Cop::RSpec::Base
@ -167,6 +168,22 @@ end
RuboCop::Cop::RSpec::Capybara::FeatureMethods::MAP = T.let(T.unsafe(nil), Hash)
RuboCop::Cop::RSpec::Capybara::FeatureMethods::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::RSpec::Capybara::SpecificMatcher < ::RuboCop::Cop::RSpec::Base
def first_argument(param0 = T.unsafe(nil)); end
def on_send(node); end
private
def acceptable_pattern?(arg); end
def good_matcher(node, matcher); end
def message(node, matcher); end
def specific_matcher(arg); end
end
RuboCop::Cop::RSpec::Capybara::SpecificMatcher::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::RSpec::Capybara::SpecificMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
RuboCop::Cop::RSpec::Capybara::SpecificMatcher::SPECIFIC_MATCHER = T.let(T.unsafe(nil), Hash)
class RuboCop::Cop::RSpec::Capybara::VisibilityMatcher < ::RuboCop::Cop::RSpec::Base
def on_send(node); end
def visible_false?(param0 = T.unsafe(nil)); end
@ -192,7 +209,7 @@ class RuboCop::Cop::RSpec::ChangeByZero < ::RuboCop::Cop::RSpec::Base
private
def autocorrect(corrector, node); end
def check_offence(node); end
def check_offense(node); end
def compound_expectations?(node); end
end
@ -586,9 +603,11 @@ class RuboCop::Cop::RSpec::FactoryBot::CreateList < ::RuboCop::Cop::RSpec::Base
include ::RuboCop::RSpec::FactoryBot::Language
extend ::RuboCop::Cop::AutoCorrector
def arguments_include_method_call?(param0 = T.unsafe(nil)); end
def factory_call(param0 = T.unsafe(nil)); end
def factory_list_call(param0 = T.unsafe(nil)); end
def n_times_block_without_arg?(param0 = T.unsafe(nil)); end
def n_times_block?(param0 = T.unsafe(nil)); end
def n_times_block_with_arg_and_used?(param0 = T.unsafe(nil)); end
def on_block(node); end
def on_send(node); end
@ -619,7 +638,7 @@ class RuboCop::Cop::RSpec::FactoryBot::CreateList::CreateListCorrector
def call_with_block_replacement(node); end
def format_block(node); end
def format_multiline_block(node); end
def format_singeline_block(node); end
def format_singleline_block(node); end
def node; end
end
@ -1171,6 +1190,15 @@ end
RuboCop::Cop::RSpec::Rails::AvoidSetupHook::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::RSpec::Rails::HaveHttpStatus < ::RuboCop::Cop::RSpec::Base
extend ::RuboCop::Cop::AutoCorrector
def match_status(param0 = T.unsafe(nil)); end
def on_send(node); end
end
RuboCop::Cop::RSpec::Rails::HaveHttpStatus::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::RSpec::Rails::HttpStatus < ::RuboCop::Cop::RSpec::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
extend ::RuboCop::Cop::AutoCorrector
@ -1560,7 +1588,7 @@ class RuboCop::Cop::RSpec::VariableName < ::RuboCop::Cop::RSpec::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
include ::RuboCop::Cop::ConfigurableFormatting
include ::RuboCop::Cop::ConfigurableNaming
include ::RuboCop::Cop::IgnoredPattern
include ::RuboCop::Cop::AllowedPattern
include ::RuboCop::Cop::RSpec::Variable
def on_send(node); end

View File

@ -6,6 +6,7 @@
module RuboCop; end
module RuboCop::Cop; end
RuboCop::Cop::IgnoredPattern = RuboCop::Cop::AllowedPattern
module RuboCop::Cop::Sorbet; end
class RuboCop::Cop::Sorbet::AllowIncompatibleOverride < ::RuboCop::Cop::Cop

View File

@ -861,6 +861,7 @@ end
RuboCop::Cop::Bundler::DuplicatedGem::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Bundler::GemComment < ::RuboCop::Cop::Base
include ::RuboCop::Cop::VisibilityHelp
include ::RuboCop::Cop::DefNode
include ::RuboCop::Cop::GemDeclaration
@ -1336,6 +1337,7 @@ end
RuboCop::Cop::Corrector::NOOP_CONSUMER = T.let(T.unsafe(nil), Proc)
module RuboCop::Cop::DefNode
include ::RuboCop::Cop::VisibilityHelp
extend ::RuboCop::AST::NodePattern::Macros
def non_public_modifier?(param0 = T.unsafe(nil)); end
@ -1344,11 +1346,8 @@ module RuboCop::Cop::DefNode
def non_public?(node); end
def preceding_non_public_modifier?(node); end
def stripped_source_upto(index); end
end
RuboCop::Cop::DefNode::NON_PUBLIC_MODIFIERS = T.let(T.unsafe(nil), Array)
module RuboCop::Cop::Documentation
private
@ -2797,7 +2796,7 @@ class RuboCop::Cop::Layout::FirstArrayElementIndentation < ::RuboCop::Cop::Base
def base_description(indent_base_type); end
def brace_alignment_style; end
def check(array_node, left_parenthesis); end
def check_right_bracket(right_bracket, left_bracket, left_parenthesis); end
def check_right_bracket(right_bracket, first_elem, left_bracket, left_parenthesis); end
def message(base_description); end
def message_for_right_bracket(indent_base_type); end
end
@ -2835,7 +2834,7 @@ class RuboCop::Cop::Layout::FirstHashElementIndentation < ::RuboCop::Cop::Base
def brace_alignment_style; end
def check(hash_node, left_parenthesis); end
def check_based_on_longest_key(hash_node, left_brace, left_parenthesis); end
def check_right_brace(right_brace, left_brace, left_parenthesis); end
def check_right_brace(right_brace, first_pair, left_brace, left_parenthesis); end
def enforce_first_argument_with_fixed_indentation?; end
def message(base_description); end
def message_for_right_brace(indent_base_type); end
@ -5127,10 +5126,11 @@ class RuboCop::Cop::Lint::NonAtomicFileOperation < ::RuboCop::Cop::Base
private
def allowable_use_with_if?(if_node); end
def autocorrect(corrector, node, range); end
def force_option?(node); end
def message(node); end
def offense(node, exist_node); end
def register_offense(node, exist_node); end
def replacement_method(node); end
end
@ -6542,11 +6542,10 @@ module RuboCop::Cop::MultilineElementIndentation
def detected_styles(actual_column, offset, left_parenthesis, left_brace); end
def detected_styles_for_column(column, left_parenthesis, left_brace); end
def each_argument_node(node, type); end
def hash_pair_where_value_beginning_with(left_brace); end
def hash_pair_where_value_beginning_with(left_brace, first); end
def incorrect_style_detected(styles, first, base_column_type); end
def indent_base(left_brace, left_parenthesis); end
def indent_base(left_brace, first, left_parenthesis); end
def key_and_value_begin_on_same_line?(pair); end
def node_beginning_with(left_brace); end
def right_sibling_begins_on_subsequent_line?(pair); end
end
@ -8421,6 +8420,7 @@ RuboCop::Cop::Style::Documentation::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::DocumentationMethod < ::RuboCop::Cop::Base
include ::RuboCop::Cop::DocumentationComment
include ::RuboCop::Cop::VisibilityHelp
include ::RuboCop::Cop::DefNode
def module_function_node?(param0 = T.unsafe(nil)); end
@ -11971,7 +11971,6 @@ class RuboCop::Cop::Style::TopLevelMethodDefinition < ::RuboCop::Cop::Base
end
RuboCop::Cop::Style::TopLevelMethodDefinition::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::TopLevelMethodDefinition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Style::TrailingBodyOnClass < ::RuboCop::Cop::Base
include ::RuboCop::Cop::Alignment

View File

@ -24,10 +24,6 @@ module ActiveSupport::ForkTracker::CoreExtPrivate
include ::ActiveSupport::ForkTracker::CoreExt
end
module ActiveSupport::VERSION
PRE = ::T.let(nil, ::T.untyped)
end
class Addrinfo
def connect_internal(local_addrinfo, timeout=T.unsafe(nil)); end
end
@ -3607,6 +3603,16 @@ class Object
def self.yaml_tag(url); end
end
module OnSystem::MacOSAndLinux
extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks
end
module OnSystem::MacOSOnly
extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks
end
module OnSystem
extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks
@ -4350,6 +4356,8 @@ class Resource
def on_sierra(or_condition=T.unsafe(nil), &block); end
def on_system(linux, macos:, &block); end
def on_ventura(or_condition=T.unsafe(nil), &block); end
end
@ -4949,16 +4957,9 @@ end
module RuboCop::AST::NodePattern::Sets
SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped)
SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped)
SET_EXIST_EXISTS = ::T.let(nil, ::T.untyped)
SET_FILETEST_FILE_DIR_SHELL = ::T.let(nil, ::T.untyped)
SET_INCLUDE_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
SET_SYSTEM_SHELL_OUTPUT_PIPE_OUTPUT = ::T.let(nil, ::T.untyped)
SET_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
SET__EQL_ = ::T.let(nil, ::T.untyped)
SET__FETCH = ::T.let(nil, ::T.untyped)
SET___EQL_ETC = ::T.let(nil, ::T.untyped)
SET___EQL_INCLUDE = ::T.let(nil, ::T.untyped)
SET_____2 = ::T.let(nil, ::T.untyped)
end
class RuboCop::Cask::AST::CaskHeader

View File

@ -246,7 +246,7 @@ describe Cask::Cmd::List, :cask do
]
EOS
}
let(:original_macos_version) { MacOS.full_version.to_s }
let!(:original_macos_version) { MacOS.full_version.to_s }
before do
# Use a more limited symbols list to shorten the variations hash

View File

@ -1538,10 +1538,10 @@ describe Formula do
describe "#on_macos", :needs_macos do
let(:f) do
Class.new(Testball) do
@test = 0
attr_reader :test
def install
@test = 0
on_macos do
@test = 1
end
@ -1561,10 +1561,10 @@ describe Formula do
describe "#on_linux", :needs_linux do
let(:f) do
Class.new(Testball) do
@test = 0
attr_reader :test
def install
@test = 0
on_macos do
@test = 1
end
@ -1581,6 +1581,65 @@ describe Formula do
end
end
describe "#on_system" do
after do
Homebrew::SimulateSystem.clear
end
let(:f) do
Class.new(Testball) do
attr_reader :foo
attr_reader :bar
def install
@foo = 0
@bar = 0
on_system :linux, macos: :monterey do
@foo = 1
end
on_system :linux, macos: :big_sur_or_older do
@bar = 1
end
end
end.new
end
it "doesn't call code on Ventura", :needs_macos do
Homebrew::SimulateSystem.os = :ventura
f.brew { f.install }
expect(f.foo).to eq(0)
expect(f.bar).to eq(0)
end
it "calls code on Linux", :needs_linux do
Homebrew::SimulateSystem.os = :linux
f.brew { f.install }
expect(f.foo).to eq(1)
expect(f.bar).to eq(1)
end
it "calls code within `on_system :linux, macos: :monterey` on Monterey", :needs_macos do
Homebrew::SimulateSystem.os = :monterey
f.brew { f.install }
expect(f.foo).to eq(1)
expect(f.bar).to eq(0)
end
it "calls code within `on_system :linux, macos: :big_sur_or_older` on Big Sur", :needs_macos do
Homebrew::SimulateSystem.os = :big_sur
f.brew { f.install }
expect(f.foo).to eq(0)
expect(f.bar).to eq(1)
end
it "calls code within `on_system :linux, macos: :big_sur_or_older` on Catalina", :needs_macos do
Homebrew::SimulateSystem.os = :catalina
f.brew { f.install }
expect(f.foo).to eq(0)
expect(f.bar).to eq(1)
end
end
describe "on_{os_version} blocks", :needs_macos do
before do
Homebrew::SimulateSystem.os = :monterey
@ -1592,10 +1651,10 @@ describe Formula do
let(:f) do
Class.new(Testball) do
@test = 0
attr_reader :test
def install
@test = 0
on_monterey :or_newer do
@test = 1
end
@ -1647,10 +1706,10 @@ describe Formula do
let(:f) do
Class.new(Testball) do
@test = 0
attr_reader :test
def install
@test = 0
on_arm do
@test = 1
end
@ -1674,10 +1733,10 @@ describe Formula do
let(:f) do
Class.new(Testball) do
@test = 0
attr_reader :test
def install
@test = 0
on_arm do
@test = 1
end

View File

@ -337,7 +337,7 @@ describe RuboCop::Cop::FormulaAudit::ComponentsOrder do
RUBY
end
context "when formula has no OS-specific blocks" do
context "when formula has no system-specific blocks" do
it "reports no offenses" do
expect_no_offenses(<<~RUBY)
class Foo < Formula
@ -352,7 +352,7 @@ describe RuboCop::Cop::FormulaAudit::ComponentsOrder do
end
end
context "when formula has OS-specific block(s)" do
context "when formula has system-specific block(s)" do
it "reports no offenses when `on_macos` and `on_linux` are used correctly" do
expect_no_offenses(<<~RUBY)
class Foo < Formula
@ -363,7 +363,13 @@ describe RuboCop::Cop::FormulaAudit::ComponentsOrder do
uses_from_macos "libxml2"
on_macos do
depends_on "perl"
on_arm do
depends_on "perl"
end
on_intel do
depends_on "python"
end
resource "resource1" do
url "https://brew.sh/resource1.tar.gz"
@ -433,6 +439,70 @@ describe RuboCop::Cop::FormulaAudit::ComponentsOrder do
RUBY
end
it "reports no offenses when `on_intel` is used correctly" do
expect_no_offenses(<<~RUBY)
class Foo < Formula
homepage "https://brew.sh"
on_intel do
disable! because: :does_not_build
depends_on "readline"
end
def install
end
end
RUBY
end
it "reports no offenses when `on_arm` is used correctly" do
expect_no_offenses(<<~RUBY)
class Foo < Formula
homepage "https://brew.sh"
on_arm do
deprecate! because: "it's deprecated"
depends_on "readline"
end
def install
end
end
RUBY
end
it "reports no offenses when `on_monterey` is used correctly" do
expect_no_offenses(<<~RUBY)
class Foo < Formula
homepage "https://brew.sh"
on_monterey do
disable! because: :does_not_build
depends_on "readline"
end
def install
end
end
RUBY
end
it "reports no offenses when `on_monterey :or_older` is used correctly" do
expect_no_offenses(<<~RUBY)
class Foo < Formula
homepage "https://brew.sh"
on_monterey :or_older do
deprecate! because: "it's deprecated"
depends_on "readline"
end
def install
end
end
RUBY
end
it "reports an offense when there are multiple `on_macos` blocks" do
expect_offense(<<~RUBY)
class Foo < Formula
@ -465,6 +535,70 @@ describe RuboCop::Cop::FormulaAudit::ComponentsOrder do
RUBY
end
it "reports an offense when there are multiple `on_intel` blocks" do
expect_offense(<<~RUBY)
class Foo < Formula
url "https://brew.sh/foo-1.0.tgz"
on_intel do
depends_on "readline"
end
on_intel do
^^^^^^^^^^^ there can only be one `on_intel` block in a formula.
depends_on "foo"
end
end
RUBY
end
it "reports an offense when there are multiple `on_arm` blocks" do
expect_offense(<<~RUBY)
class Foo < Formula
url "https://brew.sh/foo-1.0.tgz"
on_arm do
depends_on "readline"
end
on_arm do
^^^^^^^^^ there can only be one `on_arm` block in a formula.
depends_on "foo"
end
end
RUBY
end
it "reports an offense when there are multiple `on_monterey` blocks" do
expect_offense(<<~RUBY)
class Foo < Formula
url "https://brew.sh/foo-1.0.tgz"
on_monterey do
depends_on "readline"
end
on_monterey do
^^^^^^^^^^^^^^ there can only be one `on_monterey` block in a formula.
depends_on "foo"
end
end
RUBY
end
it "reports an offense when there are multiple `on_monterey` blocks with parameters" do
expect_offense(<<~RUBY)
class Foo < Formula
url "https://brew.sh/foo-1.0.tgz"
on_monterey do
depends_on "readline"
end
on_monterey :or_older do
^^^^^^^^^^^^^^^^^^^^^^^^ there can only be one `on_monterey` block in a formula.
depends_on "foo"
end
end
RUBY
end
it "reports an offense when the `on_macos` block contains nodes other than `depends_on`, `patch` or `resource`" do
expect_offense(<<~RUBY)
class Foo < Formula
@ -491,6 +625,60 @@ describe RuboCop::Cop::FormulaAudit::ComponentsOrder do
RUBY
end
it "reports an offense when the `on_intel` block contains nodes other than `depends_on`, `patch` or `resource`" do
expect_offense(<<~RUBY)
class Foo < Formula
url "https://brew.sh/foo-1.0.tgz"
on_intel do
depends_on "readline"
uses_from_macos "ncurses"
^^^^^^^^^^^^^^^^^^^^^^^^^ `on_intel` cannot include `uses_from_macos`. [...]
end
end
RUBY
end
it "reports an offense when the `on_arm` block contains nodes other than `depends_on`, `patch` or `resource`" do
expect_offense(<<~RUBY)
class Foo < Formula
url "https://brew.sh/foo-1.0.tgz"
on_arm do
depends_on "readline"
uses_from_macos "ncurses"
^^^^^^^^^^^^^^^^^^^^^^^^^ `on_arm` cannot include `uses_from_macos`. [...]
end
end
RUBY
end
it "reports an offense when the `on_monterey` block contains nodes other than " \
"`depends_on`, `patch` or `resource`" do
expect_offense(<<~RUBY)
class Foo < Formula
url "https://brew.sh/foo-1.0.tgz"
on_monterey do
depends_on "readline"
uses_from_macos "ncurses"
^^^^^^^^^^^^^^^^^^^^^^^^^ `on_monterey` cannot include `uses_from_macos`. [...]
end
end
RUBY
end
it "reports an offense when the `on_monterey :or_older` block contains nodes other than " \
"`depends_on`, `patch` or `resource`" do
expect_offense(<<~RUBY)
class Foo < Formula
url "https://brew.sh/foo-1.0.tgz"
on_monterey :or_older do
depends_on "readline"
uses_from_macos "ncurses"
^^^^^^^^^^^^^^^^^^^^^^^^^ `on_monterey` cannot include `uses_from_macos`. [...]
end
end
RUBY
end
context "when in a resource block" do
it "reports no offenses for a valid `on_macos` and `on_linux` block" do
expect_no_offenses(<<~RUBY)
@ -512,19 +700,19 @@ describe RuboCop::Cop::FormulaAudit::ComponentsOrder do
RUBY
end
it "reports no offenses for a valid `on_macos` and `on_linux` block (with `version`)" do
it "reports no offenses for a valid `on_arm` and `on_intel` block (with `version`)" do
expect_no_offenses(<<~RUBY)
class Foo < Formula
homepage "https://brew.sh"
resource do
on_macos do
on_arm do
url "https://brew.sh/resource1.tar.gz"
version "1.2.3"
sha256 "586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35"
end
on_linux do
on_intel do
url "https://brew.sh/resource2.tar.gz"
version "1.2.3"
sha256 "586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35"
@ -576,6 +764,69 @@ describe RuboCop::Cop::FormulaAudit::ComponentsOrder do
RUBY
end
it "reports an offense if there are two `on_intel` blocks" do
expect_offense(<<~RUBY)
class Foo < Formula
url "https://brew.sh/foo-1.0.tgz"
resource do
^^^^^^^^^^^ there can only be one `on_intel` block in a resource block.
on_intel do
url "https://brew.sh/resource1.tar.gz"
sha256 "586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35"
end
on_intel do
url "https://brew.sh/resource2.tar.gz"
sha256 "586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35"
end
end
end
RUBY
end
it "reports an offense if there are two `on_arm` blocks" do
expect_offense(<<~RUBY)
class Foo < Formula
url "https://brew.sh/foo-1.0.tgz"
resource do
^^^^^^^^^^^ there can only be one `on_arm` block in a resource block.
on_arm do
url "https://brew.sh/resource1.tar.gz"
sha256 "586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35"
end
on_arm do
url "https://brew.sh/resource2.tar.gz"
sha256 "586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35"
end
end
end
RUBY
end
it "reports an offense if there are two `on_monterey` blocks" do
expect_offense(<<~RUBY)
class Foo < Formula
url "https://brew.sh/foo-1.0.tgz"
resource do
^^^^^^^^^^^ there can only be one `on_monterey` block in a resource block.
on_monterey do
url "https://brew.sh/resource1.tar.gz"
sha256 "586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35"
end
on_monterey :or_older do
url "https://brew.sh/resource2.tar.gz"
sha256 "586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35"
end
end
end
RUBY
end
it "reports no offenses if there is an `on_macos` block but no `on_linux` block" do
expect_no_offenses(<<~RUBY)
class Foo < Formula
@ -604,6 +855,34 @@ describe RuboCop::Cop::FormulaAudit::ComponentsOrder do
RUBY
end
it "reports no offenses if there is an `on_intel` block but no `on_arm` block" do
expect_no_offenses(<<~RUBY)
class Foo < Formula
url "https://brew.sh/foo-1.0.tgz"
resource do
on_intel do
url "https://brew.sh/resource1.tar.gz"
sha256 "586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35"
end
end
end
RUBY
end
it "reports no offenses if there is an `on_arm` block but no `on_intel` block" do
expect_no_offenses(<<~RUBY)
class Foo < Formula
url "https://brew.sh/foo-1.0.tgz"
resource do
on_arm do
url "https://brew.sh/resource1.tar.gz"
sha256 "586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35"
end
end
end
RUBY
end
it "reports an offense if the content of an `on_macos` block is improperly formatted" do
expect_offense(<<~RUBY)
class Foo < Formula
@ -697,19 +976,19 @@ describe RuboCop::Cop::FormulaAudit::ComponentsOrder do
RUBY
end
it "reports an offense if the content of an `on_linux` block is improperly formatted" do
it "reports an offense if the content of an `on_arm` block is improperly formatted" do
expect_offense(<<~RUBY)
class Foo < Formula
url "https://brew.sh/foo-1.0.tgz"
resource do
on_macos do
on_intel do
url "https://brew.sh/resource2.tar.gz"
sha256 "586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35"
end
on_linux do
^^^^^^^^^^^ `on_linux` blocks within `resource` blocks must contain at least `url` and `sha256` and at most `url`, `mirror`, `version` and `sha256` (in order).
on_arm do
^^^^^^^^^ `on_arm` blocks within `resource` blocks must contain at least `url` and `sha256` and at most `url`, `mirror`, `version` and `sha256` (in order).
sha256 "586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35"
url "https://brew.sh/resource2.tar.gz"
end
@ -718,18 +997,18 @@ describe RuboCop::Cop::FormulaAudit::ComponentsOrder do
RUBY
end
it "reports no offenses if an `on_linux` block has if-else branches that are properly formatted" do
it "reports no offenses if an `on_arm` block has if-else branches that are properly formatted" do
expect_no_offenses(<<~RUBY)
class Foo < Formula
url "https://brew.sh/foo-1.0.tgz"
resource do
on_macos do
on_intel do
url "https://brew.sh/resource2.tar.gz"
sha256 "586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35"
end
on_linux do
on_arm do
if foo == :bar
url "https://brew.sh/resource2.tar.gz"
sha256 "586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35"
@ -743,19 +1022,19 @@ describe RuboCop::Cop::FormulaAudit::ComponentsOrder do
RUBY
end
it "reports an offense if an `on_linux` block has if-else branches that aren't properly formatted" do
it "reports an offense if an `on_arm` block has if-else branches that aren't properly formatted" do
expect_offense(<<~RUBY)
class Foo < Formula
url "https://brew.sh/foo-1.0.tgz"
resource do
on_macos do
on_intel do
url "https://brew.sh/resource2.tar.gz"
sha256 "586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35"
end
on_linux do
^^^^^^^^^^^ `on_linux` blocks within `resource` blocks must contain at least `url` and `sha256` and at most `url`, `mirror`, `version` and `sha256` (in order).
on_arm do
^^^^^^^^^ `on_arm` blocks within `resource` blocks must contain at least `url` and `sha256` and at most `url`, `mirror`, `version` and `sha256` (in order).
if foo == :bar
url "https://brew.sh/resource2.tar.gz"
sha256 "586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35"

View File

@ -0,0 +1,44 @@
# typed: false
# frozen_string_literal: true
describe Utils do
describe "ruby_check_version_script" do
subject do
quiet_system "#{HOMEBREW_LIBRARY_PATH}/utils/ruby_check_version_script.rb", required_ruby_version
end
before do
ENV.delete("HOMEBREW_DEVELOPER")
ENV.delete("HOMEBREW_USE_RUBY_FROM_PATH")
end
describe "succeeds on Homebrew required Ruby version" do
let(:required_ruby_version) { HOMEBREW_REQUIRED_RUBY_VERSION }
it { is_expected.to be true }
end
describe "succeeds on newer mismatched major/minor required Ruby version and configurated environment" do
let(:required_ruby_version) { "2.0.0" }
before do
ENV["HOMEBREW_DEVELOPER"] = "1"
ENV["HOMEBREW_USE_RUBY_FROM_PATH"] = "1"
end
it { is_expected.to be true }
end
describe "fails on on mismatched major/minor required Ruby version" do
let(:required_ruby_version) { "1.2.3" }
it { is_expected.to be false }
end
describe "fails on invalid required Ruby version" do
let(:required_ruby_version) { "fish" }
it { is_expected.to be false }
end
end
end

View File

@ -17,7 +17,7 @@ test_ruby() {
# HOMEBREW_PATH is set by global.rb
# shellcheck disable=SC2154
find_ruby() {
if [[ -n "${HOMEBREW_MACOS}" ]]
if [[ -n "${HOMEBREW_MACOS}" && -z "${HOMEBREW_USE_RUBY_FROM_PATH}" ]]
then
echo "/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby"
else

View File

@ -1,4 +1,4 @@
#!/usr/bin/env ruby --enable-frozen-string-literal --disable=gems,did_you_mean,rubyopt
#!/usr/bin/env ruby
# typed: true
# frozen_string_literal: true
@ -17,7 +17,11 @@ ruby_version_major, ruby_version_minor, = ruby_version.canonical_segments
homebrew_required_ruby_version_major, homebrew_required_ruby_version_minor, =
homebrew_required_ruby_version.canonical_segments
if ruby_version_major != homebrew_required_ruby_version_major ||
ruby_version_minor != homebrew_required_ruby_version_minor
if !ENV.fetch("HOMEBREW_DEVELOPER", "").empty? &&
!ENV.fetch("HOMEBREW_USE_RUBY_FROM_PATH", "").empty? &&
ruby_version >= homebrew_required_ruby_version
return
elsif ruby_version_major != homebrew_required_ruby_version_major ||
ruby_version_minor != homebrew_required_ruby_version_minor
abort
end

View File

@ -4,17 +4,17 @@ ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby'
ruby_version = RbConfig::CONFIG["ruby_version"]
path = File.expand_path('..', __FILE__)
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/i18n-1.10.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/minitest-5.16.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/i18n-1.12.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/minitest-5.16.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/tzinfo-2.0.4/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/zeitwerk-2.6.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/activesupport-6.1.6/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/activesupport-6.1.6.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/public_suffix-4.0.7/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/addressable-2.8.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ast-2.4.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/bindata-2.4.10/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/x86_64-darwin-15/2.6.0-static/msgpack-1.5.2"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/msgpack-1.5.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/x86_64-darwin-15/2.6.0-static/msgpack-1.5.3"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/msgpack-1.5.3/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/x86_64-darwin-15/2.6.0-static/bootsnap-1.12.0"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/bootsnap-1.12.0/lib"
$:.unshift "#{path}/"
@ -49,7 +49,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/net-http-persistent-4
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mini_portile2-2.8.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/x86_64-darwin-15/2.6.0-static/racc-1.6.0"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/racc-1.6.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/nokogiri-1.13.6-x86_64-darwin/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/nokogiri-1.13.7-x86_64-darwin/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubyntlm-0.6.3/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/webrick-1.7.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/webrobots-0.1.2/lib"
@ -60,12 +60,12 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parallel-1.22.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parallel_tests-3.11.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parser-3.1.2.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rainbow-3.1.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-runtime-0.5.10132/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-runtime-0.5.10160/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parlour-8.0.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/patchelf-1.3.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/plist-3.6.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/pry-0.14.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rack-2.2.3.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rack-2.2.4/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unparser-0.6.4/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rbi-0.0.14/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/x86_64-darwin-15/2.6.0-static/rdiscount-2.2.0.2"
@ -83,26 +83,26 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-retry-0.6.2/lib
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-sorbet-1.8.3/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-wait-0.0.9/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec_junit_formatter-0.5.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-ast-1.18.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-ast-1.19.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.11.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-2.2.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.31.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.31.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.14.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.15.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.11.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.6.10/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.15.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.12.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.6.11/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-3.0.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-html-0.12.3/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov_json_formatter-0.1.4/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-0.21.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-cobertura-2.1.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-static-0.5.10132-universal-darwin-15/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-0.5.10132/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-static-0.5.10160-universal-darwin-15/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-0.5.10160/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-runtime-stub-0.2.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-static-and-runtime-0.5.10132/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-static-and-runtime-0.5.10160/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/thor-1.2.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/spoom-1.1.11/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/yard-0.9.28/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/yard-sorbet-0.6.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/tapioca-0.7.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/warning-1.2.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/warning-1.3.0/lib"

Some files were not shown because too many files have changed in this diff Show More