From f76b083b919cccdb7ff9578575e957c4b8b4a63f Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 19 Apr 2019 15:21:16 +0900 Subject: [PATCH 1/3] Use FrozenStringLiteralComment instead of flag. Unfortunately we cannot use `--frozen-string-literal` with Ruby 2.3 due to https://bugs.ruby-lang.org/issues/12031 and our usage of ERB. --- Library/.rubocop.yml | 3 +-- Library/Homebrew/.rubocop.yml | 5 +++++ Library/Homebrew/brew.sh | 5 +---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Library/.rubocop.yml b/Library/.rubocop.yml index 48b7093d10..d515d46b3f 100644 --- a/Library/.rubocop.yml +++ b/Library/.rubocop.yml @@ -93,8 +93,7 @@ Style/ConditionalAssignment: Style/Documentation: Enabled: false -# we want to add this slowly and manually -# TODO: add to more files +# don't want this for formulae but re-enabled for Library/Homebrew Style/FrozenStringLiteralComment: Enabled: false diff --git a/Library/Homebrew/.rubocop.yml b/Library/Homebrew/.rubocop.yml index c91eaa0f27..416a664bbc 100644 --- a/Library/Homebrew/.rubocop.yml +++ b/Library/Homebrew/.rubocop.yml @@ -117,6 +117,11 @@ Style/DocumentationMethod: Include: - 'Library/Homebrew/formula.rb' +# don't want this for formulae but re-enabled for Library/Homebrew +Style/FrozenStringLiteralComment: + Enabled: true + EnforcedStyle: always + # so many of these in formulae but none in here Style/GuardClause: Enabled: true diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index 761738c9ea..ba6592eba5 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -348,9 +348,6 @@ else RUBY_DISABLE_OPTIONS="--disable=gems,rubyopt" fi -# Don't set this for anyone (yet) -unset HOMEBREW_FROZEN_STRING_LITERAL - if [[ -z "$HOMEBREW_RUBY_WARNINGS" ]] then export HOMEBREW_RUBY_WARNINGS="-W0" @@ -502,5 +499,5 @@ else # Unshift command back into argument list (unless argument list was empty). [[ "$HOMEBREW_ARG_COUNT" -gt 0 ]] && set -- "$HOMEBREW_COMMAND" "$@" - { update-preinstall "$@"; exec "$HOMEBREW_RUBY_PATH" $HOMEBREW_FROZEN_STRING_LITERAL $HOMEBREW_RUBY_WARNINGS "$RUBY_DISABLE_OPTIONS" "$HOMEBREW_LIBRARY/Homebrew/brew.rb" "$@"; } + { update-preinstall "$@"; exec "$HOMEBREW_RUBY_PATH" $HOMEBREW_RUBY_WARNINGS "$RUBY_DISABLE_OPTIONS" "$HOMEBREW_LIBRARY/Homebrew/brew.rb" "$@"; } fi From 36dbad3922ad984f7c396a9757fe8ae9750c44b0 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 19 Apr 2019 15:38:03 +0900 Subject: [PATCH 2/3] Add frozen_string_literal to all files. --- Library/Homebrew/Gemfile | 2 ++ Library/Homebrew/PATH.rb | 2 ++ Library/Homebrew/brew.rb | 2 ++ Library/Homebrew/build.rb | 2 ++ Library/Homebrew/build_environment.rb | 2 ++ Library/Homebrew/build_options.rb | 2 ++ Library/Homebrew/cache_store.rb | 2 ++ Library/Homebrew/cask/all.rb | 2 ++ Library/Homebrew/cask/artifact.rb | 2 ++ .../Homebrew/cask/artifact/abstract_artifact.rb | 2 ++ .../cask/artifact/abstract_flight_block.rb | 2 ++ .../Homebrew/cask/artifact/abstract_uninstall.rb | 2 ++ Library/Homebrew/cask/artifact/app.rb | 2 ++ Library/Homebrew/cask/artifact/artifact.rb | 2 ++ .../Homebrew/cask/artifact/audio_unit_plugin.rb | 2 ++ Library/Homebrew/cask/artifact/binary.rb | 2 ++ Library/Homebrew/cask/artifact/colorpicker.rb | 2 ++ Library/Homebrew/cask/artifact/dictionary.rb | 2 ++ Library/Homebrew/cask/artifact/font.rb | 2 ++ Library/Homebrew/cask/artifact/input_method.rb | 2 ++ Library/Homebrew/cask/artifact/installer.rb | 2 ++ .../Homebrew/cask/artifact/internet_plugin.rb | 2 ++ Library/Homebrew/cask/artifact/moved.rb | 2 ++ Library/Homebrew/cask/artifact/pkg.rb | 2 ++ .../Homebrew/cask/artifact/postflight_block.rb | 2 ++ .../Homebrew/cask/artifact/preflight_block.rb | 2 ++ Library/Homebrew/cask/artifact/prefpane.rb | 2 ++ Library/Homebrew/cask/artifact/qlplugin.rb | 2 ++ Library/Homebrew/cask/artifact/relocated.rb | 4 +++- Library/Homebrew/cask/artifact/screen_saver.rb | 2 ++ Library/Homebrew/cask/artifact/service.rb | 2 ++ Library/Homebrew/cask/artifact/stage_only.rb | 2 ++ Library/Homebrew/cask/artifact/suite.rb | 2 ++ Library/Homebrew/cask/artifact/symlinked.rb | 2 ++ Library/Homebrew/cask/artifact/uninstall.rb | 2 ++ Library/Homebrew/cask/artifact/vst3_plugin.rb | 2 ++ Library/Homebrew/cask/artifact/vst_plugin.rb | 2 ++ Library/Homebrew/cask/artifact/zap.rb | 2 ++ Library/Homebrew/cask/audit.rb | 2 ++ Library/Homebrew/cask/auditor.rb | 2 ++ Library/Homebrew/cask/cache.rb | 2 ++ Library/Homebrew/cask/cask.rb | 2 ++ Library/Homebrew/cask/cask_dependencies.rb | 2 ++ Library/Homebrew/cask/cask_loader.rb | 2 ++ Library/Homebrew/cask/caskroom.rb | 2 ++ Library/Homebrew/cask/checkable.rb | 2 ++ Library/Homebrew/cask/cmd.rb | 2 ++ Library/Homebrew/cask/cmd/abstract_command.rb | 2 ++ .../cask/cmd/abstract_internal_command.rb | 2 ++ Library/Homebrew/cask/cmd/audit.rb | 2 ++ Library/Homebrew/cask/cmd/cat.rb | 2 ++ Library/Homebrew/cask/cmd/create.rb | 2 ++ Library/Homebrew/cask/cmd/doctor.rb | 2 ++ Library/Homebrew/cask/cmd/edit.rb | 2 ++ Library/Homebrew/cask/cmd/fetch.rb | 2 ++ Library/Homebrew/cask/cmd/home.rb | 2 ++ Library/Homebrew/cask/cmd/info.rb | 2 ++ Library/Homebrew/cask/cmd/install.rb | 2 ++ Library/Homebrew/cask/cmd/internal_help.rb | 2 ++ Library/Homebrew/cask/cmd/internal_stanza.rb | 2 ++ Library/Homebrew/cask/cmd/list.rb | 2 ++ Library/Homebrew/cask/cmd/options.rb | 2 ++ Library/Homebrew/cask/cmd/outdated.rb | 2 ++ Library/Homebrew/cask/cmd/reinstall.rb | 2 ++ Library/Homebrew/cask/cmd/style.rb | 2 ++ Library/Homebrew/cask/cmd/uninstall.rb | 2 ++ Library/Homebrew/cask/cmd/upgrade.rb | 2 ++ Library/Homebrew/cask/cmd/zap.rb | 2 ++ Library/Homebrew/cask/config.rb | 2 ++ Library/Homebrew/cask/download.rb | 2 ++ Library/Homebrew/cask/dsl.rb | 2 ++ Library/Homebrew/cask/dsl/appcast.rb | 2 ++ Library/Homebrew/cask/dsl/base.rb | 2 ++ Library/Homebrew/cask/dsl/caveats.rb | 2 ++ Library/Homebrew/cask/dsl/conflicts_with.rb | 2 ++ Library/Homebrew/cask/dsl/container.rb | 2 ++ Library/Homebrew/cask/dsl/depends_on.rb | 2 ++ Library/Homebrew/cask/dsl/postflight.rb | 2 ++ Library/Homebrew/cask/dsl/preflight.rb | 2 ++ .../Homebrew/cask/dsl/uninstall_postflight.rb | 2 ++ Library/Homebrew/cask/dsl/uninstall_preflight.rb | 2 ++ Library/Homebrew/cask/dsl/version.rb | 2 ++ Library/Homebrew/cask/exceptions.rb | 2 ++ Library/Homebrew/cask/installer.rb | 2 ++ Library/Homebrew/cask/macos.rb | 2 ++ Library/Homebrew/cask/metadata.rb | 4 +++- Library/Homebrew/cask/pkg.rb | 2 ++ Library/Homebrew/cask/quarantine.rb | 4 +++- Library/Homebrew/cask/staged.rb | 2 ++ Library/Homebrew/cask/topological_hash.rb | 2 ++ Library/Homebrew/cask/url.rb | 2 ++ Library/Homebrew/cask/utils.rb | 4 +++- Library/Homebrew/cask/verify.rb | 2 ++ Library/Homebrew/caveats.rb | 2 ++ Library/Homebrew/checksum.rb | 2 ++ Library/Homebrew/cleaner.rb | 2 ++ Library/Homebrew/cleanup.rb | 2 ++ Library/Homebrew/cli/args.rb | 2 ++ Library/Homebrew/cli/parser.rb | 2 ++ Library/Homebrew/cmd/--cache.rb | 2 ++ Library/Homebrew/cmd/--cellar.rb | 2 ++ Library/Homebrew/cmd/--env.rb | 2 ++ Library/Homebrew/cmd/--prefix.rb | 2 ++ Library/Homebrew/cmd/--repository.rb | 2 ++ Library/Homebrew/cmd/--version.rb | 2 ++ Library/Homebrew/cmd/analytics.rb | 2 ++ Library/Homebrew/cmd/cask.rb | 2 ++ Library/Homebrew/cmd/cat.rb | 2 ++ Library/Homebrew/cmd/cleanup.rb | 2 ++ Library/Homebrew/cmd/command.rb | 2 ++ Library/Homebrew/cmd/commands.rb | 2 ++ Library/Homebrew/cmd/config.rb | 2 ++ Library/Homebrew/cmd/deps.rb | 2 ++ Library/Homebrew/cmd/desc.rb | 2 ++ Library/Homebrew/cmd/diy.rb | 2 ++ Library/Homebrew/cmd/doctor.rb | 2 ++ Library/Homebrew/cmd/fetch.rb | 2 ++ Library/Homebrew/cmd/gist-logs.rb | 2 ++ Library/Homebrew/cmd/help.rb | 2 ++ Library/Homebrew/cmd/home.rb | 2 ++ Library/Homebrew/cmd/info.rb | 2 ++ Library/Homebrew/cmd/install.rb | 2 ++ Library/Homebrew/cmd/leaves.rb | 2 ++ Library/Homebrew/cmd/link.rb | 2 ++ Library/Homebrew/cmd/list.rb | 2 ++ Library/Homebrew/cmd/log.rb | 2 ++ Library/Homebrew/cmd/migrate.rb | 2 ++ Library/Homebrew/cmd/missing.rb | 2 ++ Library/Homebrew/cmd/options.rb | 2 ++ Library/Homebrew/cmd/outdated.rb | 2 ++ Library/Homebrew/cmd/pin.rb | 2 ++ Library/Homebrew/cmd/postinstall.rb | 2 ++ Library/Homebrew/cmd/readall.rb | 2 ++ Library/Homebrew/cmd/reinstall.rb | 2 ++ Library/Homebrew/cmd/search.rb | 2 ++ Library/Homebrew/cmd/sh.rb | 2 ++ Library/Homebrew/cmd/style.rb | 2 ++ Library/Homebrew/cmd/switch.rb | 2 ++ Library/Homebrew/cmd/tap-info.rb | 2 ++ Library/Homebrew/cmd/tap-pin.rb | 2 ++ Library/Homebrew/cmd/tap-unpin.rb | 2 ++ Library/Homebrew/cmd/tap.rb | 2 ++ Library/Homebrew/cmd/uninstall.rb | 2 ++ Library/Homebrew/cmd/unlink.rb | 2 ++ Library/Homebrew/cmd/unpack.rb | 2 ++ Library/Homebrew/cmd/unpin.rb | 2 ++ Library/Homebrew/cmd/untap.rb | 2 ++ Library/Homebrew/cmd/update-report.rb | 2 ++ Library/Homebrew/cmd/upgrade.rb | 2 ++ Library/Homebrew/cmd/uses.rb | 2 ++ Library/Homebrew/commands.rb | 2 ++ Library/Homebrew/compilers.rb | 2 ++ Library/Homebrew/config.rb | 2 ++ Library/Homebrew/cxxstdlib.rb | 2 ++ Library/Homebrew/debrew.rb | 2 ++ Library/Homebrew/debrew/irb.rb | 2 ++ Library/Homebrew/dependable.rb | 2 ++ Library/Homebrew/dependencies.rb | 2 ++ Library/Homebrew/dependency.rb | 2 ++ Library/Homebrew/dependency_collector.rb | 2 ++ Library/Homebrew/description_cache_store.rb | 2 ++ Library/Homebrew/descriptions.rb | 2 ++ Library/Homebrew/dev-cmd/audit.rb | 2 ++ Library/Homebrew/dev-cmd/bottle.rb | 4 +++- Library/Homebrew/dev-cmd/bump-formula-pr.rb | 2 ++ Library/Homebrew/dev-cmd/create.rb | 2 ++ Library/Homebrew/dev-cmd/edit.rb | 2 ++ Library/Homebrew/dev-cmd/extract.rb | 2 ++ Library/Homebrew/dev-cmd/formula.rb | 2 ++ Library/Homebrew/dev-cmd/irb.rb | 2 ++ Library/Homebrew/dev-cmd/linkage.rb | 2 ++ Library/Homebrew/dev-cmd/man.rb | 2 ++ Library/Homebrew/dev-cmd/mirror.rb | 2 ++ Library/Homebrew/dev-cmd/prof.rb | 2 ++ Library/Homebrew/dev-cmd/pull.rb | 2 ++ Library/Homebrew/dev-cmd/release-notes.rb | 2 ++ Library/Homebrew/dev-cmd/ruby.rb | 2 ++ Library/Homebrew/dev-cmd/tap-new.rb | 2 ++ Library/Homebrew/dev-cmd/test.rb | 2 ++ Library/Homebrew/dev-cmd/tests.rb | 2 ++ Library/Homebrew/dev-cmd/update-test.rb | 2 ++ Library/Homebrew/dev-cmd/vendor-gems.rb | 2 ++ Library/Homebrew/development_tools.rb | 2 ++ Library/Homebrew/diagnostic.rb | 2 ++ Library/Homebrew/download_strategy.rb | 2 ++ Library/Homebrew/emoji.rb | 2 ++ Library/Homebrew/exceptions.rb | 2 ++ Library/Homebrew/extend/ARGV.rb | 2 ++ Library/Homebrew/extend/ENV.rb | 2 ++ Library/Homebrew/extend/ENV/shared.rb | 2 ++ Library/Homebrew/extend/ENV/std.rb | 4 +++- Library/Homebrew/extend/ENV/super.rb | 2 ++ Library/Homebrew/extend/cachable.rb | 2 ++ Library/Homebrew/extend/git_repository.rb | 2 ++ Library/Homebrew/extend/hash_validator.rb | 2 ++ Library/Homebrew/extend/io.rb | 2 ++ Library/Homebrew/extend/module.rb | 2 ++ Library/Homebrew/extend/optparse.rb | 2 ++ Library/Homebrew/extend/os/analytics.rb | 2 ++ Library/Homebrew/extend/os/bottles.rb | 2 ++ Library/Homebrew/extend/os/caveats.rb | 2 ++ Library/Homebrew/extend/os/cleaner.rb | 2 ++ .../Homebrew/extend/os/dependency_collector.rb | 2 ++ Library/Homebrew/extend/os/development_tools.rb | 2 ++ Library/Homebrew/extend/os/diagnostic.rb | 2 ++ Library/Homebrew/extend/os/extend/ENV/shared.rb | 2 ++ Library/Homebrew/extend/os/extend/ENV/std.rb | 2 ++ Library/Homebrew/extend/os/extend/ENV/super.rb | 2 ++ .../Homebrew/extend/os/formula_cellar_checks.rb | 2 ++ Library/Homebrew/extend/os/formula_support.rb | 2 ++ Library/Homebrew/extend/os/hardware.rb | 2 ++ Library/Homebrew/extend/os/install.rb | 2 ++ Library/Homebrew/extend/os/keg.rb | 2 ++ Library/Homebrew/extend/os/keg_relocate.rb | 2 ++ Library/Homebrew/extend/os/language/java.rb | 2 ++ Library/Homebrew/extend/os/linkage_checker.rb | 2 ++ Library/Homebrew/extend/os/linux/cleaner.rb | 2 ++ .../extend/os/linux/dependency_collector.rb | 2 ++ .../extend/os/linux/development_tools.rb | 2 ++ Library/Homebrew/extend/os/linux/diagnostic.rb | 2 ++ .../extend/os/linux/extend/ENV/shared.rb | 2 ++ .../Homebrew/extend/os/linux/extend/ENV/std.rb | 2 ++ .../Homebrew/extend/os/linux/extend/ENV/super.rb | 2 ++ .../Homebrew/extend/os/linux/extend/pathname.rb | 2 ++ .../extend/os/linux/formula_cellar_checks.rb | 2 ++ Library/Homebrew/extend/os/linux/hardware/cpu.rb | 2 ++ Library/Homebrew/extend/os/linux/install.rb | 2 ++ Library/Homebrew/extend/os/linux/keg_relocate.rb | 2 ++ .../Homebrew/extend/os/linux/linkage_checker.rb | 2 ++ .../os/linux/requirements/java_requirement.rb | 2 ++ .../os/linux/requirements/osxfuse_requirement.rb | 2 ++ .../Homebrew/extend/os/linux/software_spec.rb | 2 ++ .../Homebrew/extend/os/linux/system_config.rb | 2 ++ Library/Homebrew/extend/os/linux/tap.rb | 2 ++ Library/Homebrew/extend/os/mac/caveats.rb | 2 ++ Library/Homebrew/extend/os/mac/cleaner.rb | 2 ++ .../extend/os/mac/dependency_collector.rb | 2 ++ .../Homebrew/extend/os/mac/development_tools.rb | 2 ++ Library/Homebrew/extend/os/mac/diagnostic.rb | 2 ++ .../Homebrew/extend/os/mac/extend/ENV/shared.rb | 2 ++ Library/Homebrew/extend/os/mac/extend/ENV/std.rb | 2 ++ .../Homebrew/extend/os/mac/extend/ENV/super.rb | 2 ++ .../Homebrew/extend/os/mac/extend/pathname.rb | 2 ++ .../extend/os/mac/formula_cellar_checks.rb | 2 ++ .../Homebrew/extend/os/mac/formula_support.rb | 2 ++ Library/Homebrew/extend/os/mac/hardware.rb | 2 ++ Library/Homebrew/extend/os/mac/hardware/cpu.rb | 2 ++ Library/Homebrew/extend/os/mac/keg.rb | 2 ++ Library/Homebrew/extend/os/mac/keg_relocate.rb | 2 ++ Library/Homebrew/extend/os/mac/language/java.rb | 2 ++ .../Homebrew/extend/os/mac/missing_formula.rb | 2 ++ .../os/mac/requirements/java_requirement.rb | 2 ++ .../os/mac/requirements/osxfuse_requirement.rb | 2 ++ .../os/mac/requirements/x11_requirement.rb | 2 ++ Library/Homebrew/extend/os/mac/search.rb | 2 ++ Library/Homebrew/extend/os/mac/system_config.rb | 2 ++ .../extend/os/mac/unpack_strategy/zip.rb | 2 ++ .../Homebrew/extend/os/mac/utils/analytics.rb | 4 +++- Library/Homebrew/extend/os/mac/utils/bottles.rb | 2 ++ Library/Homebrew/extend/os/missing_formula.rb | 2 ++ Library/Homebrew/extend/os/pathname.rb | 2 ++ .../extend/os/requirements/java_requirement.rb | 2 ++ .../os/requirements/osxfuse_requirement.rb | 2 ++ .../extend/os/requirements/x11_requirement.rb | 2 ++ Library/Homebrew/extend/os/search.rb | 2 ++ Library/Homebrew/extend/os/software_spec.rb | 2 ++ Library/Homebrew/extend/os/system_config.rb | 2 ++ Library/Homebrew/extend/os/tap.rb | 2 ++ Library/Homebrew/extend/pathname.rb | 2 ++ Library/Homebrew/extend/predicable.rb | 2 ++ Library/Homebrew/extend/string.rb | 2 ++ Library/Homebrew/fetch.rb | 2 ++ Library/Homebrew/formula.rb | 2 ++ Library/Homebrew/formula_assertions.rb | 2 ++ Library/Homebrew/formula_cellar_checks.rb | 2 ++ Library/Homebrew/formula_creator.rb | 2 ++ Library/Homebrew/formula_installer.rb | 2 ++ Library/Homebrew/formula_pin.rb | 2 ++ Library/Homebrew/formula_support.rb | 2 ++ Library/Homebrew/formula_versions.rb | 2 ++ Library/Homebrew/formulary.rb | 2 ++ Library/Homebrew/global.rb | 14 ++++++++------ Library/Homebrew/hardware.rb | 2 ++ Library/Homebrew/help.rb | 4 +++- Library/Homebrew/install.rb | 2 ++ Library/Homebrew/install_renamed.rb | 2 ++ Library/Homebrew/keg.rb | 2 ++ Library/Homebrew/keg_relocate.rb | 8 +++++--- Library/Homebrew/language/go.rb | 2 ++ Library/Homebrew/language/haskell.rb | 2 ++ Library/Homebrew/language/java.rb | 2 ++ Library/Homebrew/language/node.rb | 2 ++ Library/Homebrew/language/python.rb | 2 ++ .../language/python_virtualenv_constants.rb | 6 ++++-- Library/Homebrew/lazy_object.rb | 2 ++ Library/Homebrew/linkage_cache_store.rb | 2 ++ Library/Homebrew/linkage_checker.rb | 2 ++ Library/Homebrew/load_path.rb | 2 ++ Library/Homebrew/locale.rb | 2 ++ Library/Homebrew/lock_file.rb | 2 ++ Library/Homebrew/messages.rb | 2 ++ Library/Homebrew/metafiles.rb | 2 ++ Library/Homebrew/migrator.rb | 2 ++ Library/Homebrew/missing_formula.rb | 2 ++ Library/Homebrew/mktemp.rb | 2 ++ Library/Homebrew/official_taps.rb | 2 ++ Library/Homebrew/options.rb | 2 ++ Library/Homebrew/os.rb | 10 ++++++---- Library/Homebrew/os/global.rb | 2 ++ Library/Homebrew/os/linux.rb | 2 ++ Library/Homebrew/os/linux/diagnostic.rb | 2 ++ Library/Homebrew/os/linux/elf.rb | 4 +++- Library/Homebrew/os/linux/glibc.rb | 2 ++ Library/Homebrew/os/linux/global.rb | 6 ++++-- Library/Homebrew/os/linux/kernel.rb | 2 ++ Library/Homebrew/os/mac.rb | 2 ++ Library/Homebrew/os/mac/architecture_list.rb | 2 ++ Library/Homebrew/os/mac/keg.rb | 2 ++ Library/Homebrew/os/mac/mach.rb | 2 ++ Library/Homebrew/os/mac/sdk.rb | 2 ++ Library/Homebrew/os/mac/version.rb | 2 ++ Library/Homebrew/os/mac/xcode.rb | 16 +++++++++------- Library/Homebrew/os/mac/xquartz.rb | 6 ++++-- Library/Homebrew/patch.rb | 2 ++ Library/Homebrew/pkg_version.rb | 2 ++ Library/Homebrew/postinstall.rb | 2 ++ Library/Homebrew/readall.rb | 2 ++ Library/Homebrew/reinstall.rb | 2 ++ Library/Homebrew/requirement.rb | 2 ++ Library/Homebrew/requirements.rb | 2 ++ .../Homebrew/requirements/arch_requirement.rb | 2 ++ .../requirements/codesign_requirement.rb | 2 ++ .../Homebrew/requirements/java_requirement.rb | 2 ++ .../Homebrew/requirements/linux_requirement.rb | 2 ++ .../Homebrew/requirements/macos_requirement.rb | 2 ++ .../requirements/maximum_macos_requirement.rb | 2 ++ .../Homebrew/requirements/osxfuse_requirement.rb | 2 ++ .../Homebrew/requirements/tuntap_requirement.rb | 2 ++ Library/Homebrew/requirements/x11_requirement.rb | 2 ++ .../Homebrew/requirements/xcode_requirement.rb | 2 ++ Library/Homebrew/resource.rb | 2 ++ Library/Homebrew/rubocops.rb | 2 ++ Library/Homebrew/rubocops/cask/ast/cask_block.rb | 2 ++ .../Homebrew/rubocops/cask/ast/cask_header.rb | 2 ++ Library/Homebrew/rubocops/cask/ast/stanza.rb | 2 ++ .../Homebrew/rubocops/cask/constants/stanza.rb | 2 ++ Library/Homebrew/rubocops/cask/extend/node.rb | 2 ++ Library/Homebrew/rubocops/cask/extend/string.rb | 2 ++ .../rubocops/cask/homepage_matches_url.rb | 8 +++++--- .../rubocops/cask/homepage_url_trailing_slash.rb | 4 +++- .../Homebrew/rubocops/cask/mixin/cask_help.rb | 2 ++ .../rubocops/cask/mixin/on_homepage_stanza.rb | 2 ++ Library/Homebrew/rubocops/cask/no_dsl_version.rb | 4 +++- .../Homebrew/rubocops/cask/stanza_grouping.rb | 6 ++++-- Library/Homebrew/rubocops/cask/stanza_order.rb | 4 +++- Library/Homebrew/rubocops/caveats.rb | 2 ++ Library/Homebrew/rubocops/checksum.rb | 2 ++ Library/Homebrew/rubocops/class.rb | 2 ++ Library/Homebrew/rubocops/components_order.rb | 2 ++ .../Homebrew/rubocops/components_redundancy.rb | 8 +++++--- Library/Homebrew/rubocops/conflicts.rb | 4 +++- Library/Homebrew/rubocops/dependency_order.rb | 2 ++ Library/Homebrew/rubocops/extend/formula.rb | 2 ++ Library/Homebrew/rubocops/formula_desc.rb | 2 ++ Library/Homebrew/rubocops/homepage.rb | 2 ++ Library/Homebrew/rubocops/lines.rb | 2 ++ Library/Homebrew/rubocops/options.rb | 10 ++++++---- Library/Homebrew/rubocops/patches.rb | 2 ++ Library/Homebrew/rubocops/rubocop-cask.rb | 2 ++ Library/Homebrew/rubocops/text.rb | 2 ++ Library/Homebrew/rubocops/urls.rb | 2 ++ Library/Homebrew/sandbox.rb | 6 ++++-- Library/Homebrew/search.rb | 2 ++ Library/Homebrew/searchable.rb | 2 ++ Library/Homebrew/software_spec.rb | 2 ++ Library/Homebrew/style.rb | 2 ++ Library/Homebrew/system_command.rb | 2 ++ Library/Homebrew/system_config.rb | 2 ++ Library/Homebrew/tab.rb | 4 +++- Library/Homebrew/tap.rb | 2 ++ Library/Homebrew/tap_constants.rb | 2 ++ Library/Homebrew/test.rb | 2 ++ Library/Homebrew/test/ARGV_spec.rb | 2 ++ Library/Homebrew/test/ENV_spec.rb | 2 ++ Library/Homebrew/test/PATH_spec.rb | 2 ++ Library/Homebrew/test/bash_spec.rb | 2 ++ Library/Homebrew/test/bottle_filename_spec.rb | 2 ++ Library/Homebrew/test/build_environment_spec.rb | 2 ++ Library/Homebrew/test/build_options_spec.rb | 2 ++ Library/Homebrew/test/cache_store_spec.rb | 2 ++ .../test/cask/artifact/alt_target_spec.rb | 2 ++ Library/Homebrew/test/cask/artifact/app_spec.rb | 2 ++ .../Homebrew/test/cask/artifact/binary_spec.rb | 2 ++ .../test/cask/artifact/generic_artifact_spec.rb | 2 ++ .../test/cask/artifact/installer_spec.rb | 2 ++ Library/Homebrew/test/cask/artifact/pkg_spec.rb | 2 ++ .../test/cask/artifact/postflight_block_spec.rb | 2 ++ .../test/cask/artifact/preflight_block_spec.rb | 2 ++ .../artifact/shared_examples/uninstall_zap.rb | 2 ++ .../Homebrew/test/cask/artifact/suite_spec.rb | 2 ++ .../test/cask/artifact/two_apps_correct_spec.rb | 2 ++ .../test/cask/artifact/uninstall_no_zap_spec.rb | 2 ++ .../test/cask/artifact/uninstall_spec.rb | 2 ++ Library/Homebrew/test/cask/artifact/zap_spec.rb | 2 ++ Library/Homebrew/test/cask/audit_spec.rb | 2 ++ .../cask/cask_loader/from__path_loader_spec.rb | 2 ++ .../cask/cask_loader/from_content_loader_spec.rb | 2 ++ .../cask/cask_loader/from_uri_loader_spec.rb | 2 ++ Library/Homebrew/test/cask/cask_spec.rb | 2 ++ Library/Homebrew/test/cask/cmd/audit_spec.rb | 2 ++ Library/Homebrew/test/cask/cmd/cat_spec.rb | 2 ++ Library/Homebrew/test/cask/cmd/create_spec.rb | 2 ++ Library/Homebrew/test/cask/cmd/doctor_spec.rb | 2 ++ Library/Homebrew/test/cask/cmd/edit_spec.rb | 2 ++ Library/Homebrew/test/cask/cmd/fetch_spec.rb | 2 ++ Library/Homebrew/test/cask/cmd/home_spec.rb | 2 ++ Library/Homebrew/test/cask/cmd/info_spec.rb | 2 ++ Library/Homebrew/test/cask/cmd/install_spec.rb | 2 ++ .../test/cask/cmd/internal_stanza_spec.rb | 2 ++ Library/Homebrew/test/cask/cmd/list_spec.rb | 2 ++ Library/Homebrew/test/cask/cmd/options_spec.rb | 2 ++ Library/Homebrew/test/cask/cmd/outdated_spec.rb | 2 ++ Library/Homebrew/test/cask/cmd/reinstall_spec.rb | 2 ++ .../cask/cmd/shared_examples/invalid_option.rb | 2 ++ .../cmd/shared_examples/requires_cask_token.rb | 2 ++ Library/Homebrew/test/cask/cmd/style_spec.rb | 2 ++ Library/Homebrew/test/cask/cmd/uninstall_spec.rb | 2 ++ Library/Homebrew/test/cask/cmd/upgrade_spec.rb | 2 ++ Library/Homebrew/test/cask/cmd/zap_spec.rb | 2 ++ Library/Homebrew/test/cask/cmd_spec.rb | 2 ++ Library/Homebrew/test/cask/config_spec.rb | 2 ++ .../Homebrew/test/cask/conflicts_with_spec.rb | 2 ++ Library/Homebrew/test/cask/depends_on_spec.rb | 2 ++ Library/Homebrew/test/cask/dsl/appcast_spec.rb | 2 ++ Library/Homebrew/test/cask/dsl/caveats_spec.rb | 2 ++ .../Homebrew/test/cask/dsl/postflight_spec.rb | 2 ++ Library/Homebrew/test/cask/dsl/preflight_spec.rb | 2 ++ .../test/cask/dsl/shared_examples/base.rb | 2 ++ .../test/cask/dsl/shared_examples/staged.rb | 2 ++ .../test/cask/dsl/uninstall_postflight_spec.rb | 2 ++ .../test/cask/dsl/uninstall_preflight_spec.rb | 2 ++ Library/Homebrew/test/cask/dsl/version_spec.rb | 2 ++ Library/Homebrew/test/cask/dsl_spec.rb | 2 ++ Library/Homebrew/test/cask/installer_spec.rb | 2 ++ Library/Homebrew/test/cask/macos_spec.rb | 2 ++ Library/Homebrew/test/cask/pkg_spec.rb | 2 ++ Library/Homebrew/test/cask/quarantine_spec.rb | 2 ++ Library/Homebrew/test/cask/verify_spec.rb | 2 ++ Library/Homebrew/test/caveats_spec.rb | 2 ++ Library/Homebrew/test/checksum_spec.rb | 2 ++ .../Homebrew/test/checksum_verification_spec.rb | 2 ++ Library/Homebrew/test/cleaner_spec.rb | 2 ++ Library/Homebrew/test/cleanup_spec.rb | 2 ++ Library/Homebrew/test/cli/parser_spec.rb | 2 ++ Library/Homebrew/test/cmd/--cache_spec.rb | 2 ++ Library/Homebrew/test/cmd/--cellar_spec.rb | 2 ++ Library/Homebrew/test/cmd/--env_spec.rb | 2 ++ Library/Homebrew/test/cmd/--prefix_spec.rb | 2 ++ Library/Homebrew/test/cmd/--repository_spec.rb | 2 ++ Library/Homebrew/test/cmd/--version_spec.rb | 2 ++ Library/Homebrew/test/cmd/analytics_spec.rb | 2 ++ Library/Homebrew/test/cmd/bundle_spec.rb | 2 ++ Library/Homebrew/test/cmd/cask_spec.rb | 2 ++ Library/Homebrew/test/cmd/cat_spec.rb | 2 ++ Library/Homebrew/test/cmd/cleanup_spec.rb | 2 ++ Library/Homebrew/test/cmd/command_spec.rb | 2 ++ Library/Homebrew/test/cmd/commands_spec.rb | 2 ++ Library/Homebrew/test/cmd/config_spec.rb | 2 ++ .../test/cmd/custom-external-command_spec.rb | 2 ++ Library/Homebrew/test/cmd/deps_spec.rb | 2 ++ Library/Homebrew/test/cmd/desc_spec.rb | 2 ++ Library/Homebrew/test/cmd/diy_spec.rb | 2 ++ Library/Homebrew/test/cmd/doctor_spec.rb | 2 ++ Library/Homebrew/test/cmd/fetch_spec.rb | 2 ++ Library/Homebrew/test/cmd/gist-logs_spec.rb | 2 ++ Library/Homebrew/test/cmd/help_spec.rb | 2 ++ Library/Homebrew/test/cmd/home_spec.rb | 2 ++ Library/Homebrew/test/cmd/info_spec.rb | 2 ++ Library/Homebrew/test/cmd/install_spec.rb | 2 ++ Library/Homebrew/test/cmd/leaves_spec.rb | 2 ++ Library/Homebrew/test/cmd/link_spec.rb | 2 ++ Library/Homebrew/test/cmd/list_spec.rb | 2 ++ Library/Homebrew/test/cmd/log_spec.rb | 2 ++ Library/Homebrew/test/cmd/migrate_spec.rb | 2 ++ Library/Homebrew/test/cmd/missing_spec.rb | 2 ++ Library/Homebrew/test/cmd/options_spec.rb | 2 ++ Library/Homebrew/test/cmd/outdated_spec.rb | 2 ++ Library/Homebrew/test/cmd/pin_spec.rb | 2 ++ Library/Homebrew/test/cmd/postinstall_spec.rb | 2 ++ Library/Homebrew/test/cmd/readall_spec.rb | 2 ++ Library/Homebrew/test/cmd/reinstall_spec.rb | 2 ++ Library/Homebrew/test/cmd/search_spec.rb | 2 ++ Library/Homebrew/test/cmd/services_spec.rb | 2 ++ Library/Homebrew/test/cmd/sh_spec.rb | 2 ++ .../test/cmd/shared_examples/args_parse.rb | 2 ++ Library/Homebrew/test/cmd/style_spec.rb | 2 ++ Library/Homebrew/test/cmd/switch_spec.rb | 2 ++ Library/Homebrew/test/cmd/tap-info_spec.rb | 2 ++ Library/Homebrew/test/cmd/tap_spec.rb | 2 ++ Library/Homebrew/test/cmd/uninstall_spec.rb | 2 ++ Library/Homebrew/test/cmd/unlink_spec.rb | 2 ++ Library/Homebrew/test/cmd/unpack_spec.rb | 2 ++ Library/Homebrew/test/cmd/unpin_spec.rb | 2 ++ Library/Homebrew/test/cmd/untap_spec.rb | 2 ++ Library/Homebrew/test/cmd/update-report_spec.rb | 2 ++ Library/Homebrew/test/cmd/upgrade_spec.rb | 2 ++ Library/Homebrew/test/cmd/uses_spec.rb | 2 ++ Library/Homebrew/test/compiler_failure_spec.rb | 2 ++ Library/Homebrew/test/compiler_selector_spec.rb | 2 ++ Library/Homebrew/test/cxxstdlib_spec.rb | 2 ++ Library/Homebrew/test/dependable_spec.rb | 2 ++ Library/Homebrew/test/dependencies_spec.rb | 2 ++ .../Homebrew/test/dependency_collector_spec.rb | 2 ++ .../Homebrew/test/dependency_expansion_spec.rb | 2 ++ Library/Homebrew/test/dependency_spec.rb | 2 ++ .../test/description_cache_store_spec.rb | 2 ++ Library/Homebrew/test/descriptions_spec.rb | 2 ++ Library/Homebrew/test/dev-cmd/audit_spec.rb | 2 ++ Library/Homebrew/test/dev-cmd/bottle_spec.rb | 2 ++ .../test/dev-cmd/bump-formula-pr_spec.rb | 2 ++ Library/Homebrew/test/dev-cmd/create_spec.rb | 2 ++ Library/Homebrew/test/dev-cmd/edit_spec.rb | 2 ++ Library/Homebrew/test/dev-cmd/extract_spec.rb | 2 ++ Library/Homebrew/test/dev-cmd/formula_spec.rb | 2 ++ Library/Homebrew/test/dev-cmd/irb_spec.rb | 2 ++ Library/Homebrew/test/dev-cmd/linkage_spec.rb | 2 ++ Library/Homebrew/test/dev-cmd/man_spec.rb | 2 ++ Library/Homebrew/test/dev-cmd/mirror_spec.rb | 2 ++ Library/Homebrew/test/dev-cmd/prof_spec.rb | 2 ++ Library/Homebrew/test/dev-cmd/pull_spec.rb | 2 ++ .../Homebrew/test/dev-cmd/release-notes_spec.rb | 2 ++ Library/Homebrew/test/dev-cmd/ruby_spec.rb | 2 ++ Library/Homebrew/test/dev-cmd/tap-new_spec.rb | 2 ++ Library/Homebrew/test/dev-cmd/test_spec.rb | 2 ++ .../Homebrew/test/dev-cmd/vendor-gems_spec.rb | 2 ++ Library/Homebrew/test/diagnostic_checks_spec.rb | 2 ++ .../Homebrew/test/download_strategies_spec.rb | 2 ++ Library/Homebrew/test/emoji_spec.rb | 2 ++ .../Homebrew/test/error_during_execution_spec.rb | 2 ++ Library/Homebrew/test/exceptions_spec.rb | 2 ++ Library/Homebrew/test/formatter_spec.rb | 2 ++ .../test/formula_installer_bottle_spec.rb | 2 ++ Library/Homebrew/test/formula_installer_spec.rb | 2 ++ Library/Homebrew/test/formula_pin_spec.rb | 2 ++ Library/Homebrew/test/formula_spec.rb | 2 ++ .../Homebrew/test/formula_spec_selection_spec.rb | 2 ++ Library/Homebrew/test/formula_support_spec.rb | 2 ++ Library/Homebrew/test/formula_validation_spec.rb | 2 ++ Library/Homebrew/test/formulary_spec.rb | 2 ++ Library/Homebrew/test/hardware/cpu_spec.rb | 2 ++ Library/Homebrew/test/inreplace_spec.rb | 2 ++ Library/Homebrew/test/java_requirement_spec.rb | 2 ++ Library/Homebrew/test/keg_spec.rb | 2 ++ Library/Homebrew/test/language/go_spec.rb | 2 ++ Library/Homebrew/test/language/java_spec.rb | 2 ++ Library/Homebrew/test/language/node_spec.rb | 2 ++ Library/Homebrew/test/language/python_spec.rb | 2 ++ Library/Homebrew/test/lazy_object_spec.rb | 2 ++ .../Homebrew/test/linkage_cache_store_spec.rb | 2 ++ Library/Homebrew/test/locale_spec.rb | 2 ++ Library/Homebrew/test/lock_file_spec.rb | 2 ++ Library/Homebrew/test/messages_spec.rb | 2 ++ Library/Homebrew/test/migrator_spec.rb | 2 ++ Library/Homebrew/test/missing_formula_spec.rb | 2 ++ Library/Homebrew/test/options_spec.rb | 2 ++ .../test/os/linux/dependency_collector_spec.rb | 2 ++ .../Homebrew/test/os/linux/diagnostic_spec.rb | 2 ++ .../test/os/mac/dependency_collector_spec.rb | 2 ++ Library/Homebrew/test/os/mac/diagnostic_spec.rb | 2 ++ .../test/os/mac/java_requirement_spec.rb | 2 ++ Library/Homebrew/test/os/mac/keg_spec.rb | 2 ++ Library/Homebrew/test/os/mac/mach_spec.rb | 2 ++ Library/Homebrew/test/os/mac/version_spec.rb | 2 ++ Library/Homebrew/test/os/mac_spec.rb | 2 ++ Library/Homebrew/test/patch_spec.rb | 2 ++ Library/Homebrew/test/patching_spec.rb | 16 +++++++++------- Library/Homebrew/test/pathname_spec.rb | 2 ++ Library/Homebrew/test/pkg_version_spec.rb | 2 ++ Library/Homebrew/test/requirement_spec.rb | 2 ++ .../requirements/codesign_requirement_spec.rb | 2 ++ .../test/requirements/java_requirement_spec.rb | 2 ++ .../test/requirements/linux_requirement_spec.rb | 2 ++ .../test/requirements/macos_requirement_spec.rb | 2 ++ .../requirements/osxfuse_requirement_spec.rb | 2 ++ Library/Homebrew/test/requirements_spec.rb | 2 ++ Library/Homebrew/test/resource_spec.rb | 2 ++ Library/Homebrew/test/rubocop_spec.rb | 2 ++ .../rubocops/cask/homepage_matches_url_spec.rb | 2 ++ .../cask/homepage_url_trailing_slash_spec.rb | 2 ++ .../test/rubocops/cask/no_dsl_version_spec.rb | 2 ++ .../rubocops/cask/shared_examples/cask_cop.rb | 2 ++ .../test/rubocops/cask/stanza_grouping_spec.rb | 2 ++ .../test/rubocops/cask/stanza_order_spec.rb | 2 ++ Library/Homebrew/test/rubocops/caveats_spec.rb | 2 ++ Library/Homebrew/test/rubocops/checksum_spec.rb | 2 ++ Library/Homebrew/test/rubocops/class_spec.rb | 2 ++ .../test/rubocops/components_order_spec.rb | 2 ++ .../test/rubocops/components_redundancy_spec.rb | 2 ++ Library/Homebrew/test/rubocops/conflicts_spec.rb | 2 ++ .../test/rubocops/dependency_order_spec.rb | 2 ++ .../Homebrew/test/rubocops/formula_desc_spec.rb | 2 ++ Library/Homebrew/test/rubocops/homepage_spec.rb | 2 ++ Library/Homebrew/test/rubocops/lines_spec.rb | 2 ++ Library/Homebrew/test/rubocops/options_spec.rb | 2 ++ Library/Homebrew/test/rubocops/patches_spec.rb | 2 ++ Library/Homebrew/test/rubocops/text_spec.rb | 2 ++ Library/Homebrew/test/rubocops/urls_spec.rb | 2 ++ Library/Homebrew/test/sandbox_spec.rb | 2 ++ Library/Homebrew/test/search_spec.rb | 2 ++ Library/Homebrew/test/searchable_spec.rb | 2 ++ Library/Homebrew/test/software_spec_spec.rb | 2 ++ Library/Homebrew/test/spec_helper.rb | 2 ++ Library/Homebrew/test/string_spec.rb | 2 ++ .../Homebrew/test/support/fixtures/failball.rb | 2 ++ .../Homebrew/test/support/fixtures/testball.rb | 2 ++ .../test/support/fixtures/testball_bottle.rb | 2 ++ .../support/helper/cask/fake_system_command.rb | 2 ++ .../test/support/helper/cask/install_helper.rb | 2 ++ .../helper/cask/never_sudo_system_command.rb | 2 ++ Library/Homebrew/test/support/helper/fixtures.rb | 2 ++ Library/Homebrew/test/support/helper/formula.rb | 2 ++ .../test/support/helper/integration_mocks.rb | 2 ++ Library/Homebrew/test/support/helper/mktmpdir.rb | 2 ++ .../test/support/helper/output_as_tty.rb | 2 ++ .../helper/spec/shared_context/homebrew_cask.rb | 2 ++ .../spec/shared_context/integration_test.rb | 2 ++ Library/Homebrew/test/support/lib/config.rb | 14 ++++++++------ .../test/support/no_seed_progress_formatter.rb | 2 ++ .../Homebrew/test/system_command_result_spec.rb | 2 ++ Library/Homebrew/test/system_command_spec.rb | 2 ++ Library/Homebrew/test/tab_spec.rb | 2 ++ Library/Homebrew/test/tap_spec.rb | 2 ++ .../Homebrew/test/unpack_strategy/bazaar_spec.rb | 2 ++ .../Homebrew/test/unpack_strategy/bzip2_spec.rb | 2 ++ .../Homebrew/test/unpack_strategy/cvs_spec.rb | 2 ++ .../test/unpack_strategy/directory_spec.rb | 2 ++ .../Homebrew/test/unpack_strategy/dmg_spec.rb | 2 ++ .../Homebrew/test/unpack_strategy/git_spec.rb | 2 ++ .../Homebrew/test/unpack_strategy/gzip_spec.rb | 2 ++ .../Homebrew/test/unpack_strategy/jar_spec.rb | 2 ++ .../Homebrew/test/unpack_strategy/lha_spec.rb | 2 ++ .../Homebrew/test/unpack_strategy/lzip_spec.rb | 2 ++ .../test/unpack_strategy/mercurial_spec.rb | 2 ++ .../Homebrew/test/unpack_strategy/p7zip_spec.rb | 2 ++ .../Homebrew/test/unpack_strategy/rar_spec.rb | 2 ++ .../test/unpack_strategy/shared_examples.rb | 2 ++ .../test/unpack_strategy/subversion_spec.rb | 2 ++ .../Homebrew/test/unpack_strategy/tar_spec.rb | 2 ++ .../test/unpack_strategy/uncompressed_spec.rb | 2 ++ .../Homebrew/test/unpack_strategy/xar_spec.rb | 2 ++ Library/Homebrew/test/unpack_strategy/xz_spec.rb | 2 ++ .../Homebrew/test/unpack_strategy/zip_spec.rb | 2 ++ Library/Homebrew/test/unpack_strategy_spec.rb | 2 ++ Library/Homebrew/test/utils/analytics_spec.rb | 2 ++ .../Homebrew/test/utils/bottles/bintray_spec.rb | 2 ++ .../Homebrew/test/utils/bottles/bottles_spec.rb | 2 ++ .../test/utils/bottles/collector_spec.rb | 2 ++ Library/Homebrew/test/utils/curl_spec.rb | 2 ++ Library/Homebrew/test/utils/fork_spec.rb | 2 ++ Library/Homebrew/test/utils/git_spec.rb | 2 ++ Library/Homebrew/test/utils/github_spec.rb | 2 ++ Library/Homebrew/test/utils/popen_spec.rb | 2 ++ Library/Homebrew/test/utils/shell_spec.rb | 2 ++ Library/Homebrew/test/utils/svn_spec.rb | 2 ++ Library/Homebrew/test/utils/tty_spec.rb | 2 ++ Library/Homebrew/test/utils/user_spec.rb | 2 ++ Library/Homebrew/test/utils_spec.rb | 2 ++ Library/Homebrew/test/version_spec.rb | 2 ++ Library/Homebrew/test/x11_requirement_spec.rb | 2 ++ Library/Homebrew/unpack_strategy.rb | 2 ++ Library/Homebrew/unpack_strategy/bazaar.rb | 2 ++ Library/Homebrew/unpack_strategy/bzip2.rb | 2 ++ Library/Homebrew/unpack_strategy/cab.rb | 2 ++ Library/Homebrew/unpack_strategy/compress.rb | 2 ++ Library/Homebrew/unpack_strategy/cvs.rb | 2 ++ Library/Homebrew/unpack_strategy/directory.rb | 2 ++ Library/Homebrew/unpack_strategy/dmg.rb | 2 ++ Library/Homebrew/unpack_strategy/executable.rb | 2 ++ Library/Homebrew/unpack_strategy/fossil.rb | 2 ++ Library/Homebrew/unpack_strategy/generic_unar.rb | 2 ++ Library/Homebrew/unpack_strategy/git.rb | 2 ++ Library/Homebrew/unpack_strategy/gzip.rb | 2 ++ Library/Homebrew/unpack_strategy/jar.rb | 2 ++ Library/Homebrew/unpack_strategy/lha.rb | 2 ++ Library/Homebrew/unpack_strategy/lua_rock.rb | 2 ++ Library/Homebrew/unpack_strategy/lzip.rb | 2 ++ Library/Homebrew/unpack_strategy/lzma.rb | 2 ++ Library/Homebrew/unpack_strategy/mercurial.rb | 2 ++ .../unpack_strategy/microsoft_office_xml.rb | 2 ++ Library/Homebrew/unpack_strategy/otf.rb | 2 ++ Library/Homebrew/unpack_strategy/p7zip.rb | 2 ++ Library/Homebrew/unpack_strategy/pax.rb | 2 ++ Library/Homebrew/unpack_strategy/pkg.rb | 2 ++ Library/Homebrew/unpack_strategy/rar.rb | 2 ++ .../self_extracting_executable.rb | 2 ++ Library/Homebrew/unpack_strategy/sit.rb | 2 ++ Library/Homebrew/unpack_strategy/subversion.rb | 2 ++ Library/Homebrew/unpack_strategy/tar.rb | 2 ++ Library/Homebrew/unpack_strategy/ttf.rb | 2 ++ Library/Homebrew/unpack_strategy/uncompressed.rb | 2 ++ Library/Homebrew/unpack_strategy/xar.rb | 2 ++ Library/Homebrew/unpack_strategy/xz.rb | 2 ++ Library/Homebrew/unpack_strategy/zip.rb | 2 ++ Library/Homebrew/utils.rb | 2 ++ Library/Homebrew/utils/analytics.rb | 4 +++- Library/Homebrew/utils/bottles.rb | 2 ++ Library/Homebrew/utils/curl.rb | 2 ++ Library/Homebrew/utils/fork.rb | 2 ++ Library/Homebrew/utils/formatter.rb | 2 ++ Library/Homebrew/utils/gems.rb | 8 +++++--- Library/Homebrew/utils/git.rb | 2 ++ Library/Homebrew/utils/github.rb | 6 ++++-- Library/Homebrew/utils/inreplace.rb | 2 ++ Library/Homebrew/utils/link.rb | 2 ++ Library/Homebrew/utils/popen.rb | 2 ++ Library/Homebrew/utils/shell.rb | 2 ++ Library/Homebrew/utils/svn.rb | 2 ++ Library/Homebrew/utils/tty.rb | 2 ++ Library/Homebrew/utils/user.rb | 2 ++ Library/Homebrew/version.rb | 2 ++ Library/Homebrew/version/null.rb | 4 +++- 721 files changed, 1516 insertions(+), 74 deletions(-) diff --git a/Library/Homebrew/Gemfile b/Library/Homebrew/Gemfile index 8fc84b9e5e..975ad63837 100644 --- a/Library/Homebrew/Gemfile +++ b/Library/Homebrew/Gemfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source "https://rubygems.org" # installed gems diff --git a/Library/Homebrew/PATH.rb b/Library/Homebrew/PATH.rb index 263f26484e..4f46be178a 100644 --- a/Library/Homebrew/PATH.rb +++ b/Library/Homebrew/PATH.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PATH include Enumerable extend Forwardable diff --git a/Library/Homebrew/brew.rb b/Library/Homebrew/brew.rb index a84e32626f..9c2b77c733 100644 --- a/Library/Homebrew/brew.rb +++ b/Library/Homebrew/brew.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + raise "HOMEBREW_BREW_FILE was not exported! Please call bin/brew directly!" unless ENV["HOMEBREW_BREW_FILE"] std_trap = trap("INT") { exit! 130 } # no backtrace thanks diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb index ab99bf46e1..7e62852204 100644 --- a/Library/Homebrew/build.rb +++ b/Library/Homebrew/build.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This script is loaded by formula_installer as a separate instance. # Thrown exceptions are propagated back to the parent process over a pipe diff --git a/Library/Homebrew/build_environment.rb b/Library/Homebrew/build_environment.rb index d8ecdccbdf..7a991f2be0 100644 --- a/Library/Homebrew/build_environment.rb +++ b/Library/Homebrew/build_environment.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class BuildEnvironment def initialize(*settings) @settings = Set.new(*settings) diff --git a/Library/Homebrew/build_options.rb b/Library/Homebrew/build_options.rb index bc7b278a67..fc81bb8218 100644 --- a/Library/Homebrew/build_options.rb +++ b/Library/Homebrew/build_options.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class BuildOptions # @private def initialize(args, options) diff --git a/Library/Homebrew/cache_store.rb b/Library/Homebrew/cache_store.rb index 9aeac80ee4..842161ec1f 100644 --- a/Library/Homebrew/cache_store.rb +++ b/Library/Homebrew/cache_store.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "json" # diff --git a/Library/Homebrew/cask/all.rb b/Library/Homebrew/cask/all.rb index 6b8bf5f60e..f845205677 100644 --- a/Library/Homebrew/cask/all.rb +++ b/Library/Homebrew/cask/all.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "hardware" require "cask/artifact" diff --git a/Library/Homebrew/cask/artifact.rb b/Library/Homebrew/cask/artifact.rb index 1d89d6e9d7..98ccf9d66c 100644 --- a/Library/Homebrew/cask/artifact.rb +++ b/Library/Homebrew/cask/artifact.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/app" require "cask/artifact/artifact" # generic 'artifact' stanza require "cask/artifact/binary" diff --git a/Library/Homebrew/cask/artifact/abstract_artifact.rb b/Library/Homebrew/cask/artifact/abstract_artifact.rb index c313fcdb47..d75748d997 100644 --- a/Library/Homebrew/cask/artifact/abstract_artifact.rb +++ b/Library/Homebrew/cask/artifact/abstract_artifact.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask module Artifact class AbstractArtifact diff --git a/Library/Homebrew/cask/artifact/abstract_flight_block.rb b/Library/Homebrew/cask/artifact/abstract_flight_block.rb index dff490b77a..3eb47fe82f 100644 --- a/Library/Homebrew/cask/artifact/abstract_flight_block.rb +++ b/Library/Homebrew/cask/artifact/abstract_flight_block.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/abstract_artifact" module Cask diff --git a/Library/Homebrew/cask/artifact/abstract_uninstall.rb b/Library/Homebrew/cask/artifact/abstract_uninstall.rb index 9cca7f11b9..7261a054f8 100644 --- a/Library/Homebrew/cask/artifact/abstract_uninstall.rb +++ b/Library/Homebrew/cask/artifact/abstract_uninstall.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "timeout" require "utils/user" diff --git a/Library/Homebrew/cask/artifact/app.rb b/Library/Homebrew/cask/artifact/app.rb index a1c92120e9..99bf5fcbb5 100644 --- a/Library/Homebrew/cask/artifact/app.rb +++ b/Library/Homebrew/cask/artifact/app.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/moved" module Cask diff --git a/Library/Homebrew/cask/artifact/artifact.rb b/Library/Homebrew/cask/artifact/artifact.rb index 39c7511305..1252f40f03 100644 --- a/Library/Homebrew/cask/artifact/artifact.rb +++ b/Library/Homebrew/cask/artifact/artifact.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/moved" require "extend/hash_validator" diff --git a/Library/Homebrew/cask/artifact/audio_unit_plugin.rb b/Library/Homebrew/cask/artifact/audio_unit_plugin.rb index 84c1a694ab..b027d294d3 100644 --- a/Library/Homebrew/cask/artifact/audio_unit_plugin.rb +++ b/Library/Homebrew/cask/artifact/audio_unit_plugin.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/moved" module Cask diff --git a/Library/Homebrew/cask/artifact/binary.rb b/Library/Homebrew/cask/artifact/binary.rb index a630e7c6fd..39c525762e 100644 --- a/Library/Homebrew/cask/artifact/binary.rb +++ b/Library/Homebrew/cask/artifact/binary.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/symlinked" module Cask diff --git a/Library/Homebrew/cask/artifact/colorpicker.rb b/Library/Homebrew/cask/artifact/colorpicker.rb index 28a9b7db06..627260c333 100644 --- a/Library/Homebrew/cask/artifact/colorpicker.rb +++ b/Library/Homebrew/cask/artifact/colorpicker.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/moved" module Cask diff --git a/Library/Homebrew/cask/artifact/dictionary.rb b/Library/Homebrew/cask/artifact/dictionary.rb index 129fab095f..fe2c2b65b1 100644 --- a/Library/Homebrew/cask/artifact/dictionary.rb +++ b/Library/Homebrew/cask/artifact/dictionary.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/moved" module Cask diff --git a/Library/Homebrew/cask/artifact/font.rb b/Library/Homebrew/cask/artifact/font.rb index ebf158c223..3f9f385189 100644 --- a/Library/Homebrew/cask/artifact/font.rb +++ b/Library/Homebrew/cask/artifact/font.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/moved" module Cask diff --git a/Library/Homebrew/cask/artifact/input_method.rb b/Library/Homebrew/cask/artifact/input_method.rb index 3637e3ca2f..8024951844 100644 --- a/Library/Homebrew/cask/artifact/input_method.rb +++ b/Library/Homebrew/cask/artifact/input_method.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/moved" module Cask diff --git a/Library/Homebrew/cask/artifact/installer.rb b/Library/Homebrew/cask/artifact/installer.rb index 612b86c5fb..e1be5f5054 100644 --- a/Library/Homebrew/cask/artifact/installer.rb +++ b/Library/Homebrew/cask/artifact/installer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/abstract_artifact" require "extend/hash_validator" diff --git a/Library/Homebrew/cask/artifact/internet_plugin.rb b/Library/Homebrew/cask/artifact/internet_plugin.rb index da7404789b..21dd0b37f1 100644 --- a/Library/Homebrew/cask/artifact/internet_plugin.rb +++ b/Library/Homebrew/cask/artifact/internet_plugin.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/moved" module Cask diff --git a/Library/Homebrew/cask/artifact/moved.rb b/Library/Homebrew/cask/artifact/moved.rb index 67b0ca2e5a..077c957a55 100644 --- a/Library/Homebrew/cask/artifact/moved.rb +++ b/Library/Homebrew/cask/artifact/moved.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/relocated" module Cask diff --git a/Library/Homebrew/cask/artifact/pkg.rb b/Library/Homebrew/cask/artifact/pkg.rb index 505bbbb95a..139a835714 100644 --- a/Library/Homebrew/cask/artifact/pkg.rb +++ b/Library/Homebrew/cask/artifact/pkg.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "plist" require "utils/user" diff --git a/Library/Homebrew/cask/artifact/postflight_block.rb b/Library/Homebrew/cask/artifact/postflight_block.rb index 50c1e5d7fa..43cb49f5bd 100644 --- a/Library/Homebrew/cask/artifact/postflight_block.rb +++ b/Library/Homebrew/cask/artifact/postflight_block.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/abstract_flight_block" module Cask diff --git a/Library/Homebrew/cask/artifact/preflight_block.rb b/Library/Homebrew/cask/artifact/preflight_block.rb index 3984eab8a0..341cdb1e0f 100644 --- a/Library/Homebrew/cask/artifact/preflight_block.rb +++ b/Library/Homebrew/cask/artifact/preflight_block.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/abstract_flight_block" module Cask diff --git a/Library/Homebrew/cask/artifact/prefpane.rb b/Library/Homebrew/cask/artifact/prefpane.rb index 7221a1a803..393d6e5c4a 100644 --- a/Library/Homebrew/cask/artifact/prefpane.rb +++ b/Library/Homebrew/cask/artifact/prefpane.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/moved" module Cask diff --git a/Library/Homebrew/cask/artifact/qlplugin.rb b/Library/Homebrew/cask/artifact/qlplugin.rb index 4317b5f3b8..b9c5f8f069 100644 --- a/Library/Homebrew/cask/artifact/qlplugin.rb +++ b/Library/Homebrew/cask/artifact/qlplugin.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/moved" module Cask diff --git a/Library/Homebrew/cask/artifact/relocated.rb b/Library/Homebrew/cask/artifact/relocated.rb index 59fa34a0bc..55d7efdc83 100644 --- a/Library/Homebrew/cask/artifact/relocated.rb +++ b/Library/Homebrew/cask/artifact/relocated.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/abstract_artifact" require "extend/hash_validator" @@ -50,7 +52,7 @@ module Cask private - ALT_NAME_ATTRIBUTE = "com.apple.metadata:kMDItemAlternateNames".freeze + ALT_NAME_ATTRIBUTE = "com.apple.metadata:kMDItemAlternateNames" # Try to make the asset searchable under the target name. Spotlight # respects this attribute for many filetypes, but ignores it for App diff --git a/Library/Homebrew/cask/artifact/screen_saver.rb b/Library/Homebrew/cask/artifact/screen_saver.rb index 2a7746e9ba..ba30416256 100644 --- a/Library/Homebrew/cask/artifact/screen_saver.rb +++ b/Library/Homebrew/cask/artifact/screen_saver.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/moved" module Cask diff --git a/Library/Homebrew/cask/artifact/service.rb b/Library/Homebrew/cask/artifact/service.rb index 87c28928f3..b42d22c43e 100644 --- a/Library/Homebrew/cask/artifact/service.rb +++ b/Library/Homebrew/cask/artifact/service.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/moved" module Cask diff --git a/Library/Homebrew/cask/artifact/stage_only.rb b/Library/Homebrew/cask/artifact/stage_only.rb index add6ba3dab..d0b2295c38 100644 --- a/Library/Homebrew/cask/artifact/stage_only.rb +++ b/Library/Homebrew/cask/artifact/stage_only.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/abstract_artifact" module Cask diff --git a/Library/Homebrew/cask/artifact/suite.rb b/Library/Homebrew/cask/artifact/suite.rb index 7a02898263..4d8332f709 100644 --- a/Library/Homebrew/cask/artifact/suite.rb +++ b/Library/Homebrew/cask/artifact/suite.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/moved" module Cask diff --git a/Library/Homebrew/cask/artifact/symlinked.rb b/Library/Homebrew/cask/artifact/symlinked.rb index dc6d434e2c..8043f0a843 100644 --- a/Library/Homebrew/cask/artifact/symlinked.rb +++ b/Library/Homebrew/cask/artifact/symlinked.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/relocated" module Cask diff --git a/Library/Homebrew/cask/artifact/uninstall.rb b/Library/Homebrew/cask/artifact/uninstall.rb index 93b6ada85c..cdd2da2b86 100644 --- a/Library/Homebrew/cask/artifact/uninstall.rb +++ b/Library/Homebrew/cask/artifact/uninstall.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/abstract_uninstall" module Cask diff --git a/Library/Homebrew/cask/artifact/vst3_plugin.rb b/Library/Homebrew/cask/artifact/vst3_plugin.rb index f067c014c2..ea5dc05d05 100644 --- a/Library/Homebrew/cask/artifact/vst3_plugin.rb +++ b/Library/Homebrew/cask/artifact/vst3_plugin.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/moved" module Cask diff --git a/Library/Homebrew/cask/artifact/vst_plugin.rb b/Library/Homebrew/cask/artifact/vst_plugin.rb index 661e16de7f..6796e286ca 100644 --- a/Library/Homebrew/cask/artifact/vst_plugin.rb +++ b/Library/Homebrew/cask/artifact/vst_plugin.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/moved" module Cask diff --git a/Library/Homebrew/cask/artifact/zap.rb b/Library/Homebrew/cask/artifact/zap.rb index 168797468f..cd1ccc736d 100644 --- a/Library/Homebrew/cask/artifact/zap.rb +++ b/Library/Homebrew/cask/artifact/zap.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/artifact/abstract_uninstall" module Cask diff --git a/Library/Homebrew/cask/audit.rb b/Library/Homebrew/cask/audit.rb index 6e73ccf16f..861a7064c7 100644 --- a/Library/Homebrew/cask/audit.rb +++ b/Library/Homebrew/cask/audit.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/checkable" require "cask/download" require "digest" diff --git a/Library/Homebrew/cask/auditor.rb b/Library/Homebrew/cask/auditor.rb index 8a5485739f..c36aa5012f 100644 --- a/Library/Homebrew/cask/auditor.rb +++ b/Library/Homebrew/cask/auditor.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/download" module Cask diff --git a/Library/Homebrew/cask/cache.rb b/Library/Homebrew/cask/cache.rb index 525d8c2b63..2286398620 100644 --- a/Library/Homebrew/cask/cache.rb +++ b/Library/Homebrew/cask/cache.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask module Cache module_function diff --git a/Library/Homebrew/cask/cask.rb b/Library/Homebrew/cask/cask.rb index 46e7542bb0..23d20dcc78 100644 --- a/Library/Homebrew/cask/cask.rb +++ b/Library/Homebrew/cask/cask.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/cask_loader" require "cask/config" require "cask/dsl" diff --git a/Library/Homebrew/cask/cask_dependencies.rb b/Library/Homebrew/cask/cask_dependencies.rb index f40fc4fe97..8ef27001e6 100644 --- a/Library/Homebrew/cask/cask_dependencies.rb +++ b/Library/Homebrew/cask/cask_dependencies.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "delegate" require "cask/topological_hash" diff --git a/Library/Homebrew/cask/cask_loader.rb b/Library/Homebrew/cask/cask_loader.rb index 1416442b84..bd375b0de9 100644 --- a/Library/Homebrew/cask/cask_loader.rb +++ b/Library/Homebrew/cask/cask_loader.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/cask" require "uri" diff --git a/Library/Homebrew/cask/caskroom.rb b/Library/Homebrew/cask/caskroom.rb index 73a1b0ae8d..542ea0bcad 100644 --- a/Library/Homebrew/cask/caskroom.rb +++ b/Library/Homebrew/cask/caskroom.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "utils/user" module Cask diff --git a/Library/Homebrew/cask/checkable.rb b/Library/Homebrew/cask/checkable.rb index bac03f5fb9..1e7a87464d 100644 --- a/Library/Homebrew/cask/checkable.rb +++ b/Library/Homebrew/cask/checkable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask module Checkable def errors diff --git a/Library/Homebrew/cask/cmd.rb b/Library/Homebrew/cask/cmd.rb index 79b0077e25..eaa73213a5 100644 --- a/Library/Homebrew/cask/cmd.rb +++ b/Library/Homebrew/cask/cmd.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "optparse" require "shellwords" diff --git a/Library/Homebrew/cask/cmd/abstract_command.rb b/Library/Homebrew/cask/cmd/abstract_command.rb index 9b6510269f..faf0dd4edb 100644 --- a/Library/Homebrew/cask/cmd/abstract_command.rb +++ b/Library/Homebrew/cask/cmd/abstract_command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "options" require "search" diff --git a/Library/Homebrew/cask/cmd/abstract_internal_command.rb b/Library/Homebrew/cask/cmd/abstract_internal_command.rb index 52c47f5cb2..c07fe8b5be 100644 --- a/Library/Homebrew/cask/cmd/abstract_internal_command.rb +++ b/Library/Homebrew/cask/cmd/abstract_internal_command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class Cmd class AbstractInternalCommand < AbstractCommand diff --git a/Library/Homebrew/cask/cmd/audit.rb b/Library/Homebrew/cask/cmd/audit.rb index a127bd4b10..5c9307aed0 100644 --- a/Library/Homebrew/cask/cmd/audit.rb +++ b/Library/Homebrew/cask/cmd/audit.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class Cmd class Audit < AbstractCommand diff --git a/Library/Homebrew/cask/cmd/cat.rb b/Library/Homebrew/cask/cmd/cat.rb index 558dadc216..6278522570 100644 --- a/Library/Homebrew/cask/cmd/cat.rb +++ b/Library/Homebrew/cask/cmd/cat.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class Cmd class Cat < AbstractCommand diff --git a/Library/Homebrew/cask/cmd/create.rb b/Library/Homebrew/cask/cmd/create.rb index 43da210442..68fb976da0 100644 --- a/Library/Homebrew/cask/cmd/create.rb +++ b/Library/Homebrew/cask/cmd/create.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class Cmd class Create < AbstractCommand diff --git a/Library/Homebrew/cask/cmd/doctor.rb b/Library/Homebrew/cask/cmd/doctor.rb index e1a0b583eb..ddd033a2e1 100644 --- a/Library/Homebrew/cask/cmd/doctor.rb +++ b/Library/Homebrew/cask/cmd/doctor.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "system_config" require "cask/checkable" diff --git a/Library/Homebrew/cask/cmd/edit.rb b/Library/Homebrew/cask/cmd/edit.rb index 549f889552..e7837a477d 100644 --- a/Library/Homebrew/cask/cmd/edit.rb +++ b/Library/Homebrew/cask/cmd/edit.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class Cmd class Edit < AbstractCommand diff --git a/Library/Homebrew/cask/cmd/fetch.rb b/Library/Homebrew/cask/cmd/fetch.rb index 4b3d6d82c7..cebf3d8d89 100644 --- a/Library/Homebrew/cask/cmd/fetch.rb +++ b/Library/Homebrew/cask/cmd/fetch.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/download" module Cask diff --git a/Library/Homebrew/cask/cmd/home.rb b/Library/Homebrew/cask/cmd/home.rb index e9258a48af..16adc13a5d 100644 --- a/Library/Homebrew/cask/cmd/home.rb +++ b/Library/Homebrew/cask/cmd/home.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class Cmd class Home < AbstractCommand diff --git a/Library/Homebrew/cask/cmd/info.rb b/Library/Homebrew/cask/cmd/info.rb index 9899e60060..0bc8187491 100644 --- a/Library/Homebrew/cask/cmd/info.rb +++ b/Library/Homebrew/cask/cmd/info.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "json" require "cask/installer" diff --git a/Library/Homebrew/cask/cmd/install.rb b/Library/Homebrew/cask/cmd/install.rb index fd9eda548f..44a02ed00a 100644 --- a/Library/Homebrew/cask/cmd/install.rb +++ b/Library/Homebrew/cask/cmd/install.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class Cmd class Install < AbstractCommand diff --git a/Library/Homebrew/cask/cmd/internal_help.rb b/Library/Homebrew/cask/cmd/internal_help.rb index 9698a405f6..2ddac93dbe 100644 --- a/Library/Homebrew/cask/cmd/internal_help.rb +++ b/Library/Homebrew/cask/cmd/internal_help.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class Cmd class InternalHelp < AbstractInternalCommand diff --git a/Library/Homebrew/cask/cmd/internal_stanza.rb b/Library/Homebrew/cask/cmd/internal_stanza.rb index be830311a0..9095614e10 100644 --- a/Library/Homebrew/cask/cmd/internal_stanza.rb +++ b/Library/Homebrew/cask/cmd/internal_stanza.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class Cmd class InternalStanza < AbstractInternalCommand diff --git a/Library/Homebrew/cask/cmd/list.rb b/Library/Homebrew/cask/cmd/list.rb index 9d336366d5..08e9604e1f 100644 --- a/Library/Homebrew/cask/cmd/list.rb +++ b/Library/Homebrew/cask/cmd/list.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class Cmd class List < AbstractCommand diff --git a/Library/Homebrew/cask/cmd/options.rb b/Library/Homebrew/cask/cmd/options.rb index 8de1a28631..9dca4e3d7f 100644 --- a/Library/Homebrew/cask/cmd/options.rb +++ b/Library/Homebrew/cask/cmd/options.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class Cmd module Options diff --git a/Library/Homebrew/cask/cmd/outdated.rb b/Library/Homebrew/cask/cmd/outdated.rb index 519758317b..f11bd6dd31 100644 --- a/Library/Homebrew/cask/cmd/outdated.rb +++ b/Library/Homebrew/cask/cmd/outdated.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class Cmd class Outdated < AbstractCommand diff --git a/Library/Homebrew/cask/cmd/reinstall.rb b/Library/Homebrew/cask/cmd/reinstall.rb index 87a964189d..a8711bec88 100644 --- a/Library/Homebrew/cask/cmd/reinstall.rb +++ b/Library/Homebrew/cask/cmd/reinstall.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class Cmd class Reinstall < Install diff --git a/Library/Homebrew/cask/cmd/style.rb b/Library/Homebrew/cask/cmd/style.rb index d2a4138eec..539aee1179 100644 --- a/Library/Homebrew/cask/cmd/style.rb +++ b/Library/Homebrew/cask/cmd/style.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class Cmd class Style < AbstractCommand diff --git a/Library/Homebrew/cask/cmd/uninstall.rb b/Library/Homebrew/cask/cmd/uninstall.rb index 9b9f134347..dfa8bbfb77 100644 --- a/Library/Homebrew/cask/cmd/uninstall.rb +++ b/Library/Homebrew/cask/cmd/uninstall.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class Cmd class Uninstall < AbstractCommand diff --git a/Library/Homebrew/cask/cmd/upgrade.rb b/Library/Homebrew/cask/cmd/upgrade.rb index 709f64aa31..b248bbe14d 100644 --- a/Library/Homebrew/cask/cmd/upgrade.rb +++ b/Library/Homebrew/cask/cmd/upgrade.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/config" module Cask diff --git a/Library/Homebrew/cask/cmd/zap.rb b/Library/Homebrew/cask/cmd/zap.rb index 8436a1ff7b..73a8b68581 100644 --- a/Library/Homebrew/cask/cmd/zap.rb +++ b/Library/Homebrew/cask/cmd/zap.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class Cmd class Zap < AbstractCommand diff --git a/Library/Homebrew/cask/config.rb b/Library/Homebrew/cask/config.rb index 404370e689..527e3f0722 100644 --- a/Library/Homebrew/cask/config.rb +++ b/Library/Homebrew/cask/config.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "json" require "extend/hash_validator" diff --git a/Library/Homebrew/cask/download.rb b/Library/Homebrew/cask/download.rb index 0a5b2c3578..eb3a444bc4 100644 --- a/Library/Homebrew/cask/download.rb +++ b/Library/Homebrew/cask/download.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "fileutils" require "cask/cache" require "cask/quarantine" diff --git a/Library/Homebrew/cask/dsl.rb b/Library/Homebrew/cask/dsl.rb index 7db3d80dfa..eaceac0029 100644 --- a/Library/Homebrew/cask/dsl.rb +++ b/Library/Homebrew/cask/dsl.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "locale" require "lazy_object" diff --git a/Library/Homebrew/cask/dsl/appcast.rb b/Library/Homebrew/cask/dsl/appcast.rb index 98a0411714..f2296ad942 100644 --- a/Library/Homebrew/cask/dsl/appcast.rb +++ b/Library/Homebrew/cask/dsl/appcast.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class DSL class Appcast diff --git a/Library/Homebrew/cask/dsl/base.rb b/Library/Homebrew/cask/dsl/base.rb index d526752596..2a14a1c8c5 100644 --- a/Library/Homebrew/cask/dsl/base.rb +++ b/Library/Homebrew/cask/dsl/base.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class DSL class Base diff --git a/Library/Homebrew/cask/dsl/caveats.rb b/Library/Homebrew/cask/dsl/caveats.rb index e2e43349d8..2ddd19b055 100644 --- a/Library/Homebrew/cask/dsl/caveats.rb +++ b/Library/Homebrew/cask/dsl/caveats.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Caveats DSL. Each method should handle output, following the # convention of at least one trailing blank line so that the user # can distinguish separate caveats. diff --git a/Library/Homebrew/cask/dsl/conflicts_with.rb b/Library/Homebrew/cask/dsl/conflicts_with.rb index 2505743a60..abd9477226 100644 --- a/Library/Homebrew/cask/dsl/conflicts_with.rb +++ b/Library/Homebrew/cask/dsl/conflicts_with.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "extend/hash_validator" using HashValidator diff --git a/Library/Homebrew/cask/dsl/container.rb b/Library/Homebrew/cask/dsl/container.rb index 9c49e2da12..378e94ced2 100644 --- a/Library/Homebrew/cask/dsl/container.rb +++ b/Library/Homebrew/cask/dsl/container.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "unpack_strategy" module Cask diff --git a/Library/Homebrew/cask/dsl/depends_on.rb b/Library/Homebrew/cask/dsl/depends_on.rb index 13c8381d7d..56a4107274 100644 --- a/Library/Homebrew/cask/dsl/depends_on.rb +++ b/Library/Homebrew/cask/dsl/depends_on.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubygems" module Cask diff --git a/Library/Homebrew/cask/dsl/postflight.rb b/Library/Homebrew/cask/dsl/postflight.rb index a2c0db3bcd..9e0b1f55b6 100644 --- a/Library/Homebrew/cask/dsl/postflight.rb +++ b/Library/Homebrew/cask/dsl/postflight.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/staged" module Cask diff --git a/Library/Homebrew/cask/dsl/preflight.rb b/Library/Homebrew/cask/dsl/preflight.rb index 0eab22179e..1cf1e03b56 100644 --- a/Library/Homebrew/cask/dsl/preflight.rb +++ b/Library/Homebrew/cask/dsl/preflight.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class DSL class Preflight < Base diff --git a/Library/Homebrew/cask/dsl/uninstall_postflight.rb b/Library/Homebrew/cask/dsl/uninstall_postflight.rb index 458d96c733..db83749a22 100644 --- a/Library/Homebrew/cask/dsl/uninstall_postflight.rb +++ b/Library/Homebrew/cask/dsl/uninstall_postflight.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class DSL class UninstallPostflight < Base diff --git a/Library/Homebrew/cask/dsl/uninstall_preflight.rb b/Library/Homebrew/cask/dsl/uninstall_preflight.rb index 38376f272d..25d8f1d0d5 100644 --- a/Library/Homebrew/cask/dsl/uninstall_preflight.rb +++ b/Library/Homebrew/cask/dsl/uninstall_preflight.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/staged" module Cask diff --git a/Library/Homebrew/cask/dsl/version.rb b/Library/Homebrew/cask/dsl/version.rb index e93a886f84..29faf0c8ab 100644 --- a/Library/Homebrew/cask/dsl/version.rb +++ b/Library/Homebrew/cask/dsl/version.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class DSL class Version < ::String diff --git a/Library/Homebrew/cask/exceptions.rb b/Library/Homebrew/cask/exceptions.rb index 8cbf70d105..401203f8ae 100644 --- a/Library/Homebrew/cask/exceptions.rb +++ b/Library/Homebrew/cask/exceptions.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class CaskError < RuntimeError; end diff --git a/Library/Homebrew/cask/installer.rb b/Library/Homebrew/cask/installer.rb index 98c1fc1042..e25af65750 100644 --- a/Library/Homebrew/cask/installer.rb +++ b/Library/Homebrew/cask/installer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubygems" require "formula_installer" diff --git a/Library/Homebrew/cask/macos.rb b/Library/Homebrew/cask/macos.rb index 967b895bc7..84a8eb54ed 100644 --- a/Library/Homebrew/cask/macos.rb +++ b/Library/Homebrew/cask/macos.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "os/mac/version" module OS diff --git a/Library/Homebrew/cask/metadata.rb b/Library/Homebrew/cask/metadata.rb index 276554b354..9a47567e9f 100644 --- a/Library/Homebrew/cask/metadata.rb +++ b/Library/Homebrew/cask/metadata.rb @@ -1,6 +1,8 @@ +# frozen_string_literal: true + module Cask module Metadata - METADATA_SUBDIR = ".metadata".freeze + METADATA_SUBDIR = ".metadata" def metadata_master_container_path @metadata_master_container_path ||= caskroom_path.join(METADATA_SUBDIR) diff --git a/Library/Homebrew/cask/pkg.rb b/Library/Homebrew/cask/pkg.rb index 070dd197dd..42986319d9 100644 --- a/Library/Homebrew/cask/pkg.rb +++ b/Library/Homebrew/cask/pkg.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask class Pkg def self.all_matching(regexp, command) diff --git a/Library/Homebrew/cask/quarantine.rb b/Library/Homebrew/cask/quarantine.rb index 7cddb7b33d..ee3cd70fad 100644 --- a/Library/Homebrew/cask/quarantine.rb +++ b/Library/Homebrew/cask/quarantine.rb @@ -1,9 +1,11 @@ +# frozen_string_literal: true + require "development_tools" module Cask module Quarantine module_function - QUARANTINE_ATTRIBUTE = "com.apple.quarantine".freeze + QUARANTINE_ATTRIBUTE = "com.apple.quarantine" QUARANTINE_SCRIPT = (HOMEBREW_LIBRARY_PATH/"cask/utils/quarantine.swift").freeze diff --git a/Library/Homebrew/cask/staged.rb b/Library/Homebrew/cask/staged.rb index e2aacc351a..b0216fc344 100644 --- a/Library/Homebrew/cask/staged.rb +++ b/Library/Homebrew/cask/staged.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "utils/user" module Cask diff --git a/Library/Homebrew/cask/topological_hash.rb b/Library/Homebrew/cask/topological_hash.rb index 8320bbb89c..919dc161f7 100644 --- a/Library/Homebrew/cask/topological_hash.rb +++ b/Library/Homebrew/cask/topological_hash.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "tsort" # a basic topologically sortable hashmap diff --git a/Library/Homebrew/cask/url.rb b/Library/Homebrew/cask/url.rb index 678d795696..329a1bfe06 100644 --- a/Library/Homebrew/cask/url.rb +++ b/Library/Homebrew/cask/url.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class URL ATTRIBUTES = [ :using, diff --git a/Library/Homebrew/cask/utils.rb b/Library/Homebrew/cask/utils.rb index d95091a516..69bdd96526 100644 --- a/Library/Homebrew/cask/utils.rb +++ b/Library/Homebrew/cask/utils.rb @@ -1,9 +1,11 @@ +# frozen_string_literal: true + require "utils/user" require "yaml" require "open3" require "stringio" -BUG_REPORTS_URL = "https://github.com/Homebrew/homebrew-cask#reporting-bugs".freeze +BUG_REPORTS_URL = "https://github.com/Homebrew/homebrew-cask#reporting-bugs" module Cask module Utils diff --git a/Library/Homebrew/cask/verify.rb b/Library/Homebrew/cask/verify.rb index 06bc03d8cd..ca0c0ddeea 100644 --- a/Library/Homebrew/cask/verify.rb +++ b/Library/Homebrew/cask/verify.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask module Verify module_function diff --git a/Library/Homebrew/caveats.rb b/Library/Homebrew/caveats.rb index 6f9fcb9cca..e420867226 100644 --- a/Library/Homebrew/caveats.rb +++ b/Library/Homebrew/caveats.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "language/python" class Caveats diff --git a/Library/Homebrew/checksum.rb b/Library/Homebrew/checksum.rb index c1d0e70551..fe0960df4a 100644 --- a/Library/Homebrew/checksum.rb +++ b/Library/Homebrew/checksum.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Checksum extend Forwardable diff --git a/Library/Homebrew/cleaner.rb b/Library/Homebrew/cleaner.rb index 416de41fce..3f5e3aa377 100644 --- a/Library/Homebrew/cleaner.rb +++ b/Library/Homebrew/cleaner.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Cleans a newly installed keg. # By default: # diff --git a/Library/Homebrew/cleanup.rb b/Library/Homebrew/cleanup.rb index cfce53568a..7b569ca72b 100644 --- a/Library/Homebrew/cleanup.rb +++ b/Library/Homebrew/cleanup.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "utils/bottles" require "utils/gems" require "formula" diff --git a/Library/Homebrew/cli/args.rb b/Library/Homebrew/cli/args.rb index 3f2ff69068..bcb3563cd4 100644 --- a/Library/Homebrew/cli/args.rb +++ b/Library/Homebrew/cli/args.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "ostruct" module Homebrew diff --git a/Library/Homebrew/cli/parser.rb b/Library/Homebrew/cli/parser.rb index bd3473558f..8626201c84 100644 --- a/Library/Homebrew/cli/parser.rb +++ b/Library/Homebrew/cli/parser.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cli/args" require "optparse" require "set" diff --git a/Library/Homebrew/cmd/--cache.rb b/Library/Homebrew/cmd/--cache.rb index a593af31dc..c814e1a53f 100644 --- a/Library/Homebrew/cmd/--cache.rb +++ b/Library/Homebrew/cmd/--cache.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "fetch" require "cli/parser" diff --git a/Library/Homebrew/cmd/--cellar.rb b/Library/Homebrew/cmd/--cellar.rb index a9e7758fb5..859d90b6d8 100644 --- a/Library/Homebrew/cmd/--cellar.rb +++ b/Library/Homebrew/cmd/--cellar.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cli/parser" module Homebrew diff --git a/Library/Homebrew/cmd/--env.rb b/Library/Homebrew/cmd/--env.rb index 7a8c39befa..e696ca665d 100644 --- a/Library/Homebrew/cmd/--env.rb +++ b/Library/Homebrew/cmd/--env.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "extend/ENV" require "build_environment" require "utils/shell" diff --git a/Library/Homebrew/cmd/--prefix.rb b/Library/Homebrew/cmd/--prefix.rb index 86295cd2f4..04135da0ac 100644 --- a/Library/Homebrew/cmd/--prefix.rb +++ b/Library/Homebrew/cmd/--prefix.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cli/parser" module Homebrew diff --git a/Library/Homebrew/cmd/--repository.rb b/Library/Homebrew/cmd/--repository.rb index d283fbfedd..2d3f6ba361 100644 --- a/Library/Homebrew/cmd/--repository.rb +++ b/Library/Homebrew/cmd/--repository.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cli/parser" module Homebrew diff --git a/Library/Homebrew/cmd/--version.rb b/Library/Homebrew/cmd/--version.rb index b5c4283be6..c89ba493d5 100644 --- a/Library/Homebrew/cmd/--version.rb +++ b/Library/Homebrew/cmd/--version.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cli/parser" module Homebrew diff --git a/Library/Homebrew/cmd/analytics.rb b/Library/Homebrew/cmd/analytics.rb index 0b24527d9e..ac49c188df 100644 --- a/Library/Homebrew/cmd/analytics.rb +++ b/Library/Homebrew/cmd/analytics.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cli/parser" module Homebrew diff --git a/Library/Homebrew/cmd/cask.rb b/Library/Homebrew/cmd/cask.rb index 667c25607b..82f0ffcd00 100644 --- a/Library/Homebrew/cmd/cask.rb +++ b/Library/Homebrew/cmd/cask.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/all" module Homebrew diff --git a/Library/Homebrew/cmd/cat.rb b/Library/Homebrew/cmd/cat.rb index 3214d3d2f4..a8c360dcc0 100644 --- a/Library/Homebrew/cmd/cat.rb +++ b/Library/Homebrew/cmd/cat.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cli/parser" module Homebrew diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb index dc714f0b50..e1840843b5 100644 --- a/Library/Homebrew/cmd/cleanup.rb +++ b/Library/Homebrew/cmd/cleanup.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cleanup" require "cli/parser" diff --git a/Library/Homebrew/cmd/command.rb b/Library/Homebrew/cmd/command.rb index 9fad816fd1..0968eeda22 100644 --- a/Library/Homebrew/cmd/command.rb +++ b/Library/Homebrew/cmd/command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "commands" require "cli/parser" diff --git a/Library/Homebrew/cmd/commands.rb b/Library/Homebrew/cmd/commands.rb index 8705db0944..3bf14e1fc2 100644 --- a/Library/Homebrew/cmd/commands.rb +++ b/Library/Homebrew/cmd/commands.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cli/parser" module Homebrew diff --git a/Library/Homebrew/cmd/config.rb b/Library/Homebrew/cmd/config.rb index 7f21c9c347..f1e8e0a369 100644 --- a/Library/Homebrew/cmd/config.rb +++ b/Library/Homebrew/cmd/config.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "system_config" require "cli/parser" diff --git a/Library/Homebrew/cmd/deps.rb b/Library/Homebrew/cmd/deps.rb index ed4ed93918..8835c59957 100644 --- a/Library/Homebrew/cmd/deps.rb +++ b/Library/Homebrew/cmd/deps.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "ostruct" require "cli/parser" diff --git a/Library/Homebrew/cmd/desc.rb b/Library/Homebrew/cmd/desc.rb index 27689bd476..b30a8cb276 100644 --- a/Library/Homebrew/cmd/desc.rb +++ b/Library/Homebrew/cmd/desc.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "descriptions" require "search" require "description_cache_store" diff --git a/Library/Homebrew/cmd/diy.rb b/Library/Homebrew/cmd/diy.rb index cda37e600d..48bcc9ccc2 100644 --- a/Library/Homebrew/cmd/diy.rb +++ b/Library/Homebrew/cmd/diy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "cli/parser" diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 6f05571250..709bbaf383 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "diagnostic" require "cli/parser" diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb index f98ad6d8a5..66fb5c5ebc 100644 --- a/Library/Homebrew/cmd/fetch.rb +++ b/Library/Homebrew/cmd/fetch.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "fetch" require "cli/parser" diff --git a/Library/Homebrew/cmd/gist-logs.rb b/Library/Homebrew/cmd/gist-logs.rb index a6329cc0ac..6986f6160f 100644 --- a/Library/Homebrew/cmd/gist-logs.rb +++ b/Library/Homebrew/cmd/gist-logs.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "install" require "system_config" diff --git a/Library/Homebrew/cmd/help.rb b/Library/Homebrew/cmd/help.rb index 84d28ab358..d75c424e1c 100644 --- a/Library/Homebrew/cmd/help.rb +++ b/Library/Homebrew/cmd/help.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "help" module Homebrew diff --git a/Library/Homebrew/cmd/home.rb b/Library/Homebrew/cmd/home.rb index a001762077..eb81019d1a 100644 --- a/Library/Homebrew/cmd/home.rb +++ b/Library/Homebrew/cmd/home.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cli/parser" module Homebrew diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index 0007af6fdf..7bac8db03a 100644 --- a/Library/Homebrew/cmd/info.rb +++ b/Library/Homebrew/cmd/info.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "missing_formula" require "caveats" require "cli/parser" diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 9200344a5d..f64c03ea2d 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "missing_formula" require "formula_installer" require "development_tools" diff --git a/Library/Homebrew/cmd/leaves.rb b/Library/Homebrew/cmd/leaves.rb index 4583ec181f..f9bbfe2143 100644 --- a/Library/Homebrew/cmd/leaves.rb +++ b/Library/Homebrew/cmd/leaves.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "tab" require "cli/parser" diff --git a/Library/Homebrew/cmd/link.rb b/Library/Homebrew/cmd/link.rb index 2427f798d2..fe280a3812 100644 --- a/Library/Homebrew/cmd/link.rb +++ b/Library/Homebrew/cmd/link.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "ostruct" require "caveats" require "cli/parser" diff --git a/Library/Homebrew/cmd/list.rb b/Library/Homebrew/cmd/list.rb index cc590b090f..3b3b1ef3f2 100644 --- a/Library/Homebrew/cmd/list.rb +++ b/Library/Homebrew/cmd/list.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "metafiles" require "formula" require "cli/parser" diff --git a/Library/Homebrew/cmd/log.rb b/Library/Homebrew/cmd/log.rb index 6506fd929d..000543faa3 100644 --- a/Library/Homebrew/cmd/log.rb +++ b/Library/Homebrew/cmd/log.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "cli/parser" diff --git a/Library/Homebrew/cmd/migrate.rb b/Library/Homebrew/cmd/migrate.rb index 4c863b203d..25a94da2ab 100644 --- a/Library/Homebrew/cmd/migrate.rb +++ b/Library/Homebrew/cmd/migrate.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "migrator" require "cli/parser" diff --git a/Library/Homebrew/cmd/missing.rb b/Library/Homebrew/cmd/missing.rb index 56d7a38807..b0d4fb7ac8 100644 --- a/Library/Homebrew/cmd/missing.rb +++ b/Library/Homebrew/cmd/missing.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "tab" require "diagnostic" diff --git a/Library/Homebrew/cmd/options.rb b/Library/Homebrew/cmd/options.rb index 340355cac8..e30baddfb7 100644 --- a/Library/Homebrew/cmd/options.rb +++ b/Library/Homebrew/cmd/options.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "options" require "cli/parser" diff --git a/Library/Homebrew/cmd/outdated.rb b/Library/Homebrew/cmd/outdated.rb index b233612476..6e66764faa 100644 --- a/Library/Homebrew/cmd/outdated.rb +++ b/Library/Homebrew/cmd/outdated.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "keg" require "cli/parser" diff --git a/Library/Homebrew/cmd/pin.rb b/Library/Homebrew/cmd/pin.rb index 148f9f3953..33ae70e439 100644 --- a/Library/Homebrew/cmd/pin.rb +++ b/Library/Homebrew/cmd/pin.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "cli/parser" diff --git a/Library/Homebrew/cmd/postinstall.rb b/Library/Homebrew/cmd/postinstall.rb index 8c62077602..4f11e89310 100644 --- a/Library/Homebrew/cmd/postinstall.rb +++ b/Library/Homebrew/cmd/postinstall.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "sandbox" require "formula_installer" require "cli/parser" diff --git a/Library/Homebrew/cmd/readall.rb b/Library/Homebrew/cmd/readall.rb index 3303abe370..24dd837e56 100644 --- a/Library/Homebrew/cmd/readall.rb +++ b/Library/Homebrew/cmd/readall.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "readall" require "cli/parser" diff --git a/Library/Homebrew/cmd/reinstall.rb b/Library/Homebrew/cmd/reinstall.rb index 3cab670733..8185971502 100644 --- a/Library/Homebrew/cmd/reinstall.rb +++ b/Library/Homebrew/cmd/reinstall.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula_installer" require "development_tools" require "messages" diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb index 4007527f9d..3efacc74ac 100644 --- a/Library/Homebrew/cmd/search.rb +++ b/Library/Homebrew/cmd/search.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "missing_formula" require "descriptions" diff --git a/Library/Homebrew/cmd/sh.rb b/Library/Homebrew/cmd/sh.rb index 42137f0678..6d3fec814f 100644 --- a/Library/Homebrew/cmd/sh.rb +++ b/Library/Homebrew/cmd/sh.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "extend/ENV" require "formula" require "cli/parser" diff --git a/Library/Homebrew/cmd/style.rb b/Library/Homebrew/cmd/style.rb index 881b73bd5f..b62ac97c78 100644 --- a/Library/Homebrew/cmd/style.rb +++ b/Library/Homebrew/cmd/style.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "json" require "open3" require "style" diff --git a/Library/Homebrew/cmd/switch.rb b/Library/Homebrew/cmd/switch.rb index 99484f83eb..56e005d1d8 100644 --- a/Library/Homebrew/cmd/switch.rb +++ b/Library/Homebrew/cmd/switch.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "keg" require "cli/parser" diff --git a/Library/Homebrew/cmd/tap-info.rb b/Library/Homebrew/cmd/tap-info.rb index 134b0bf7c4..a5f0093b2c 100644 --- a/Library/Homebrew/cmd/tap-info.rb +++ b/Library/Homebrew/cmd/tap-info.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cli/parser" module Homebrew diff --git a/Library/Homebrew/cmd/tap-pin.rb b/Library/Homebrew/cmd/tap-pin.rb index 3f0ddcb9ab..114dd9e65e 100644 --- a/Library/Homebrew/cmd/tap-pin.rb +++ b/Library/Homebrew/cmd/tap-pin.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cli/parser" module Homebrew diff --git a/Library/Homebrew/cmd/tap-unpin.rb b/Library/Homebrew/cmd/tap-unpin.rb index 64a320f222..1cab3cbf6d 100644 --- a/Library/Homebrew/cmd/tap-unpin.rb +++ b/Library/Homebrew/cmd/tap-unpin.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cli/parser" module Homebrew diff --git a/Library/Homebrew/cmd/tap.rb b/Library/Homebrew/cmd/tap.rb index d3cce4549a..6bb3d164c5 100644 --- a/Library/Homebrew/cmd/tap.rb +++ b/Library/Homebrew/cmd/tap.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cli/parser" module Homebrew diff --git a/Library/Homebrew/cmd/uninstall.rb b/Library/Homebrew/cmd/uninstall.rb index aff746b818..e50c8f8ca4 100644 --- a/Library/Homebrew/cmd/uninstall.rb +++ b/Library/Homebrew/cmd/uninstall.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "keg" require "formula" require "diagnostic" diff --git a/Library/Homebrew/cmd/unlink.rb b/Library/Homebrew/cmd/unlink.rb index b63b060f59..f41e95e8ca 100644 --- a/Library/Homebrew/cmd/unlink.rb +++ b/Library/Homebrew/cmd/unlink.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "ostruct" require "cli/parser" diff --git a/Library/Homebrew/cmd/unpack.rb b/Library/Homebrew/cmd/unpack.rb index e12b354c6f..f56ae42a6f 100644 --- a/Library/Homebrew/cmd/unpack.rb +++ b/Library/Homebrew/cmd/unpack.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "stringio" require "formula" require "cli/parser" diff --git a/Library/Homebrew/cmd/unpin.rb b/Library/Homebrew/cmd/unpin.rb index 0722418d1d..2ffd949893 100644 --- a/Library/Homebrew/cmd/unpin.rb +++ b/Library/Homebrew/cmd/unpin.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "cli/parser" diff --git a/Library/Homebrew/cmd/untap.rb b/Library/Homebrew/cmd/untap.rb index d86c80f37d..3333999845 100644 --- a/Library/Homebrew/cmd/untap.rb +++ b/Library/Homebrew/cmd/untap.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cli/parser" module Homebrew diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb index d8da2b0d4c..0f8e8f213a 100644 --- a/Library/Homebrew/cmd/update-report.rb +++ b/Library/Homebrew/cmd/update-report.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula_versions" require "migrator" require "formulary" diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb index cd71173a85..c968c5b32a 100644 --- a/Library/Homebrew/cmd/upgrade.rb +++ b/Library/Homebrew/cmd/upgrade.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "install" require "reinstall" require "formula_installer" diff --git a/Library/Homebrew/cmd/uses.rb b/Library/Homebrew/cmd/uses.rb index f8fd73b248..d70f877a33 100644 --- a/Library/Homebrew/cmd/uses.rb +++ b/Library/Homebrew/cmd/uses.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "cli/parser" diff --git a/Library/Homebrew/commands.rb b/Library/Homebrew/commands.rb index 9f25f2a2e6..46db178917 100644 --- a/Library/Homebrew/commands.rb +++ b/Library/Homebrew/commands.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Commands def self.path(cmd) [ diff --git a/Library/Homebrew/compilers.rb b/Library/Homebrew/compilers.rb index a76f2ba1da..e2c6080687 100644 --- a/Library/Homebrew/compilers.rb +++ b/Library/Homebrew/compilers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # @private module CompilerConstants GNU_GCC_VERSIONS = %w[4.9 5 6 7 8].freeze diff --git a/Library/Homebrew/config.rb b/Library/Homebrew/config.rb index 7dec7452c2..30d39094de 100644 --- a/Library/Homebrew/config.rb +++ b/Library/Homebrew/config.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + raise "HOMEBREW_BREW_FILE was not exported! Please call bin/brew directly!" unless ENV["HOMEBREW_BREW_FILE"] # Path to `bin/brew` main executable in `HOMEBREW_PREFIX` diff --git a/Library/Homebrew/cxxstdlib.rb b/Library/Homebrew/cxxstdlib.rb index 82f4c76058..1b279c28b9 100644 --- a/Library/Homebrew/cxxstdlib.rb +++ b/Library/Homebrew/cxxstdlib.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "compilers" class CxxStdlib diff --git a/Library/Homebrew/debrew.rb b/Library/Homebrew/debrew.rb index de5c4686ac..f3827b9642 100644 --- a/Library/Homebrew/debrew.rb +++ b/Library/Homebrew/debrew.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "mutex_m" require "debrew/irb" diff --git a/Library/Homebrew/debrew/irb.rb b/Library/Homebrew/debrew/irb.rb index eeb3758a98..7087bd8599 100644 --- a/Library/Homebrew/debrew/irb.rb +++ b/Library/Homebrew/debrew/irb.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "irb" module IRB diff --git a/Library/Homebrew/dependable.rb b/Library/Homebrew/dependable.rb index ce0f5fd4e0..2b97e7db75 100644 --- a/Library/Homebrew/dependable.rb +++ b/Library/Homebrew/dependable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "options" module Dependable diff --git a/Library/Homebrew/dependencies.rb b/Library/Homebrew/dependencies.rb index 386890c80a..dff99d5407 100644 --- a/Library/Homebrew/dependencies.rb +++ b/Library/Homebrew/dependencies.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "delegate" class Dependencies < DelegateClass(Array) diff --git a/Library/Homebrew/dependency.rb b/Library/Homebrew/dependency.rb index b5afba777b..ec9acadabb 100644 --- a/Library/Homebrew/dependency.rb +++ b/Library/Homebrew/dependency.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "dependable" # A dependency on another Homebrew formula. diff --git a/Library/Homebrew/dependency_collector.rb b/Library/Homebrew/dependency_collector.rb index 8ad82f9ce9..e7e9e9006b 100644 --- a/Library/Homebrew/dependency_collector.rb +++ b/Library/Homebrew/dependency_collector.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "dependency" require "dependencies" require "requirement" diff --git a/Library/Homebrew/description_cache_store.rb b/Library/Homebrew/description_cache_store.rb index 984cefd165..b507aed6bd 100644 --- a/Library/Homebrew/description_cache_store.rb +++ b/Library/Homebrew/description_cache_store.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "set" require "cache_store" require "searchable" diff --git a/Library/Homebrew/descriptions.rb b/Library/Homebrew/descriptions.rb index 137c79bf31..46b7f2ef31 100644 --- a/Library/Homebrew/descriptions.rb +++ b/Library/Homebrew/descriptions.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "formula_versions" require "search" diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index e578558cc0..690d04acf5 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "formula_versions" require "utils/curl" diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index 60d10efa4a..b5c22b39ef 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "utils/bottles" require "tab" @@ -7,7 +9,7 @@ require "cli/parser" require "utils/inreplace" require "erb" -BOTTLE_ERB = <<-EOS.freeze +BOTTLE_ERB = <<-EOS bottle do <% if !["#{HOMEBREW_BOTTLE_DEFAULT_DOMAIN}/bottles", "https://homebrew.bintray.com/bottles"].include?(root_url) %> root_url "<%= root_url %>" diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb index f81211371f..574a0c9a47 100644 --- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "cli/parser" diff --git a/Library/Homebrew/dev-cmd/create.rb b/Library/Homebrew/dev-cmd/create.rb index 308320459d..96bdaf524e 100644 --- a/Library/Homebrew/dev-cmd/create.rb +++ b/Library/Homebrew/dev-cmd/create.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "formula_creator" require "missing_formula" diff --git a/Library/Homebrew/dev-cmd/edit.rb b/Library/Homebrew/dev-cmd/edit.rb index 1b1b6f341d..b4ace42c59 100644 --- a/Library/Homebrew/dev-cmd/edit.rb +++ b/Library/Homebrew/dev-cmd/edit.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "cli/parser" diff --git a/Library/Homebrew/dev-cmd/extract.rb b/Library/Homebrew/dev-cmd/extract.rb index 6b532f882c..761d63af6c 100644 --- a/Library/Homebrew/dev-cmd/extract.rb +++ b/Library/Homebrew/dev-cmd/extract.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cli/parser" require "utils/git" require "formulary" diff --git a/Library/Homebrew/dev-cmd/formula.rb b/Library/Homebrew/dev-cmd/formula.rb index 673588fa91..7b1ca23073 100644 --- a/Library/Homebrew/dev-cmd/formula.rb +++ b/Library/Homebrew/dev-cmd/formula.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "cli/parser" diff --git a/Library/Homebrew/dev-cmd/irb.rb b/Library/Homebrew/dev-cmd/irb.rb index e0fa43c680..819373f5b5 100644 --- a/Library/Homebrew/dev-cmd/irb.rb +++ b/Library/Homebrew/dev-cmd/irb.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cli/parser" class Symbol diff --git a/Library/Homebrew/dev-cmd/linkage.rb b/Library/Homebrew/dev-cmd/linkage.rb index 4da94cfdde..d864ec9c39 100644 --- a/Library/Homebrew/dev-cmd/linkage.rb +++ b/Library/Homebrew/dev-cmd/linkage.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cache_store" require "linkage_checker" require "cli/parser" diff --git a/Library/Homebrew/dev-cmd/man.rb b/Library/Homebrew/dev-cmd/man.rb index 2efa0a0e9b..b8e871da0d 100644 --- a/Library/Homebrew/dev-cmd/man.rb +++ b/Library/Homebrew/dev-cmd/man.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "erb" require "ostruct" diff --git a/Library/Homebrew/dev-cmd/mirror.rb b/Library/Homebrew/dev-cmd/mirror.rb index 8662756db8..298e9e5949 100644 --- a/Library/Homebrew/dev-cmd/mirror.rb +++ b/Library/Homebrew/dev-cmd/mirror.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cli/parser" module Homebrew diff --git a/Library/Homebrew/dev-cmd/prof.rb b/Library/Homebrew/dev-cmd/prof.rb index be85d0f98e..e84cd11aec 100644 --- a/Library/Homebrew/dev-cmd/prof.rb +++ b/Library/Homebrew/dev-cmd/prof.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cli/parser" module Homebrew diff --git a/Library/Homebrew/dev-cmd/pull.rb b/Library/Homebrew/dev-cmd/pull.rb index 9a2fcd6c81..0fbfffeb19 100644 --- a/Library/Homebrew/dev-cmd/pull.rb +++ b/Library/Homebrew/dev-cmd/pull.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "net/http" require "net/https" require "json" diff --git a/Library/Homebrew/dev-cmd/release-notes.rb b/Library/Homebrew/dev-cmd/release-notes.rb index 2b51ee960e..fd65abc499 100644 --- a/Library/Homebrew/dev-cmd/release-notes.rb +++ b/Library/Homebrew/dev-cmd/release-notes.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cli/parser" module Homebrew diff --git a/Library/Homebrew/dev-cmd/ruby.rb b/Library/Homebrew/dev-cmd/ruby.rb index b7012a7d8e..dcc20138eb 100644 --- a/Library/Homebrew/dev-cmd/ruby.rb +++ b/Library/Homebrew/dev-cmd/ruby.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cli/parser" module Homebrew diff --git a/Library/Homebrew/dev-cmd/tap-new.rb b/Library/Homebrew/dev-cmd/tap-new.rb index 9408a8d0e0..db5e742c15 100644 --- a/Library/Homebrew/dev-cmd/tap-new.rb +++ b/Library/Homebrew/dev-cmd/tap-new.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "tap" require "cli/parser" diff --git a/Library/Homebrew/dev-cmd/test.rb b/Library/Homebrew/dev-cmd/test.rb index 5515c57f50..4c10ac5588 100644 --- a/Library/Homebrew/dev-cmd/test.rb +++ b/Library/Homebrew/dev-cmd/test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "extend/ENV" require "sandbox" require "timeout" diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb index fb44ee6605..34795359ab 100644 --- a/Library/Homebrew/dev-cmd/tests.rb +++ b/Library/Homebrew/dev-cmd/tests.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cli/parser" require "fileutils" diff --git a/Library/Homebrew/dev-cmd/update-test.rb b/Library/Homebrew/dev-cmd/update-test.rb index 84832cd235..25c9e316ac 100644 --- a/Library/Homebrew/dev-cmd/update-test.rb +++ b/Library/Homebrew/dev-cmd/update-test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cli/parser" module Homebrew diff --git a/Library/Homebrew/dev-cmd/vendor-gems.rb b/Library/Homebrew/dev-cmd/vendor-gems.rb index 0188f9d7ba..3c22d1c3a5 100644 --- a/Library/Homebrew/dev-cmd/vendor-gems.rb +++ b/Library/Homebrew/dev-cmd/vendor-gems.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "cli/parser" diff --git a/Library/Homebrew/development_tools.rb b/Library/Homebrew/development_tools.rb index b5d938ab57..aed19cc8d7 100644 --- a/Library/Homebrew/development_tools.rb +++ b/Library/Homebrew/development_tools.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # @private class DevelopmentTools class << self diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb index 2560cfd7a7..23bbcfc890 100644 --- a/Library/Homebrew/diagnostic.rb +++ b/Library/Homebrew/diagnostic.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "keg" require "language/python" require "formula" diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 544c1e411c..f2ef478d73 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "json" require "rexml/document" require "time" diff --git a/Library/Homebrew/emoji.rb b/Library/Homebrew/emoji.rb index 652d5b2eb6..68e015630a 100644 --- a/Library/Homebrew/emoji.rb +++ b/Library/Homebrew/emoji.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Emoji class << self def install_badge diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index 4c4158295e..83bfce4779 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "shellwords" class UsageError < RuntimeError diff --git a/Library/Homebrew/extend/ARGV.rb b/Library/Homebrew/extend/ARGV.rb index 57127524fb..dfea80f2e8 100644 --- a/Library/Homebrew/extend/ARGV.rb +++ b/Library/Homebrew/extend/ARGV.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module HomebrewArgvExtension def named # TODO: use @instance variable to ||= cache when moving to CLI::Parser diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb index e0eee1b753..4d8bae1024 100644 --- a/Library/Homebrew/extend/ENV.rb +++ b/Library/Homebrew/extend/ENV.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "hardware" require "extend/ENV/shared" require "extend/ENV/std" diff --git a/Library/Homebrew/extend/ENV/shared.rb b/Library/Homebrew/extend/ENV/shared.rb index 9198c19a63..067deee696 100644 --- a/Library/Homebrew/extend/ENV/shared.rb +++ b/Library/Homebrew/extend/ENV/shared.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "compilers" require "development_tools" diff --git a/Library/Homebrew/extend/ENV/std.rb b/Library/Homebrew/extend/ENV/std.rb index eb079f19be..06f4e50d37 100644 --- a/Library/Homebrew/extend/ENV/std.rb +++ b/Library/Homebrew/extend/ENV/std.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "hardware" require "extend/ENV/shared" @@ -6,7 +8,7 @@ module Stdenv include SharedEnvExtension # @private - SAFE_CFLAGS_FLAGS = "-w -pipe".freeze + SAFE_CFLAGS_FLAGS = "-w -pipe" # @private def setup_build_environment(formula = nil) diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb index 403144a3c4..2aa440689b 100644 --- a/Library/Homebrew/extend/ENV/super.rb +++ b/Library/Homebrew/extend/ENV/super.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "extend/ENV/shared" require "development_tools" diff --git a/Library/Homebrew/extend/cachable.rb b/Library/Homebrew/extend/cachable.rb index 69d86ccb7b..7545096485 100644 --- a/Library/Homebrew/extend/cachable.rb +++ b/Library/Homebrew/extend/cachable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cachable def cache @cache ||= {} diff --git a/Library/Homebrew/extend/git_repository.rb b/Library/Homebrew/extend/git_repository.rb index 8cd389ddf2..caf69be7bf 100644 --- a/Library/Homebrew/extend/git_repository.rb +++ b/Library/Homebrew/extend/git_repository.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "utils/git" require "utils/popen" diff --git a/Library/Homebrew/extend/hash_validator.rb b/Library/Homebrew/extend/hash_validator.rb index 1a00d3fa1e..ff6d7aec57 100644 --- a/Library/Homebrew/extend/hash_validator.rb +++ b/Library/Homebrew/extend/hash_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module HashValidator refine Hash do def assert_valid_keys!(*valid_keys) diff --git a/Library/Homebrew/extend/io.rb b/Library/Homebrew/extend/io.rb index 4ddfecde27..21080e1fe7 100644 --- a/Library/Homebrew/extend/io.rb +++ b/Library/Homebrew/extend/io.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class IO def readline_nonblock(sep = $INPUT_RECORD_SEPARATOR) line = +"" diff --git a/Library/Homebrew/extend/module.rb b/Library/Homebrew/extend/module.rb index b314543739..5ba8ae7e0f 100644 --- a/Library/Homebrew/extend/module.rb +++ b/Library/Homebrew/extend/module.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Module def attr_rw(*attrs) file, line, = caller.first.split(":") diff --git a/Library/Homebrew/extend/optparse.rb b/Library/Homebrew/extend/optparse.rb index 801f7baddd..d59dcbeca2 100644 --- a/Library/Homebrew/extend/optparse.rb +++ b/Library/Homebrew/extend/optparse.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "optparse" OptionParser.accept Pathname do |path| diff --git a/Library/Homebrew/extend/os/analytics.rb b/Library/Homebrew/extend/os/analytics.rb index 13b981169c..749d80c66d 100644 --- a/Library/Homebrew/extend/os/analytics.rb +++ b/Library/Homebrew/extend/os/analytics.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + require "extend/os/mac/utils/analytics" if OS.mac? diff --git a/Library/Homebrew/extend/os/bottles.rb b/Library/Homebrew/extend/os/bottles.rb index 6ee9a2146e..b9426c9d5e 100644 --- a/Library/Homebrew/extend/os/bottles.rb +++ b/Library/Homebrew/extend/os/bottles.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + require "extend/os/mac/utils/bottles" if OS.mac? diff --git a/Library/Homebrew/extend/os/caveats.rb b/Library/Homebrew/extend/os/caveats.rb index e67138087b..6dddc2a8f9 100644 --- a/Library/Homebrew/extend/os/caveats.rb +++ b/Library/Homebrew/extend/os/caveats.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + require "extend/os/mac/caveats" if OS.mac? diff --git a/Library/Homebrew/extend/os/cleaner.rb b/Library/Homebrew/extend/os/cleaner.rb index 26226b93df..0fc9822e77 100644 --- a/Library/Homebrew/extend/os/cleaner.rb +++ b/Library/Homebrew/extend/os/cleaner.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if OS.mac? require "extend/os/mac/cleaner" elsif OS.linux? diff --git a/Library/Homebrew/extend/os/dependency_collector.rb b/Library/Homebrew/extend/os/dependency_collector.rb index f3635e3da9..b73abbdcf2 100644 --- a/Library/Homebrew/extend/os/dependency_collector.rb +++ b/Library/Homebrew/extend/os/dependency_collector.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if OS.mac? require "extend/os/mac/dependency_collector" elsif OS.linux? diff --git a/Library/Homebrew/extend/os/development_tools.rb b/Library/Homebrew/extend/os/development_tools.rb index 3280c85b0c..61385fc5c9 100644 --- a/Library/Homebrew/extend/os/development_tools.rb +++ b/Library/Homebrew/extend/os/development_tools.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if OS.mac? require "extend/os/mac/development_tools" elsif OS.linux? diff --git a/Library/Homebrew/extend/os/diagnostic.rb b/Library/Homebrew/extend/os/diagnostic.rb index 34d09f9614..d94fb033bb 100644 --- a/Library/Homebrew/extend/os/diagnostic.rb +++ b/Library/Homebrew/extend/os/diagnostic.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if OS.mac? require "extend/os/mac/diagnostic" elsif OS.linux? diff --git a/Library/Homebrew/extend/os/extend/ENV/shared.rb b/Library/Homebrew/extend/os/extend/ENV/shared.rb index 1a6b2294b7..ee2c60f12e 100644 --- a/Library/Homebrew/extend/os/extend/ENV/shared.rb +++ b/Library/Homebrew/extend/os/extend/ENV/shared.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if OS.mac? require "extend/os/mac/extend/ENV/shared" elsif OS.linux? diff --git a/Library/Homebrew/extend/os/extend/ENV/std.rb b/Library/Homebrew/extend/os/extend/ENV/std.rb index 7d117c626e..4fa49e135b 100644 --- a/Library/Homebrew/extend/os/extend/ENV/std.rb +++ b/Library/Homebrew/extend/os/extend/ENV/std.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if OS.mac? require "extend/os/mac/extend/ENV/std" elsif OS.linux? diff --git a/Library/Homebrew/extend/os/extend/ENV/super.rb b/Library/Homebrew/extend/os/extend/ENV/super.rb index 951f4cac84..e7d197638e 100644 --- a/Library/Homebrew/extend/os/extend/ENV/super.rb +++ b/Library/Homebrew/extend/os/extend/ENV/super.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if OS.mac? require "extend/os/mac/extend/ENV/super" elsif OS.linux? diff --git a/Library/Homebrew/extend/os/formula_cellar_checks.rb b/Library/Homebrew/extend/os/formula_cellar_checks.rb index 30805adfb5..85bf7f77b6 100644 --- a/Library/Homebrew/extend/os/formula_cellar_checks.rb +++ b/Library/Homebrew/extend/os/formula_cellar_checks.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if OS.mac? require "extend/os/mac/formula_cellar_checks" elsif OS.linux? diff --git a/Library/Homebrew/extend/os/formula_support.rb b/Library/Homebrew/extend/os/formula_support.rb index e1708c93d9..b092c72bc4 100644 --- a/Library/Homebrew/extend/os/formula_support.rb +++ b/Library/Homebrew/extend/os/formula_support.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + require "extend/os/mac/formula_support" if OS.mac? diff --git a/Library/Homebrew/extend/os/hardware.rb b/Library/Homebrew/extend/os/hardware.rb index 728775cace..f23d41e4a1 100644 --- a/Library/Homebrew/extend/os/hardware.rb +++ b/Library/Homebrew/extend/os/hardware.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if OS.mac? require "extend/os/mac/hardware" require "extend/os/mac/hardware/cpu" diff --git a/Library/Homebrew/extend/os/install.rb b/Library/Homebrew/extend/os/install.rb index a98faed821..8e93626dbe 100644 --- a/Library/Homebrew/extend/os/install.rb +++ b/Library/Homebrew/extend/os/install.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + require "extend/os/linux/install" if OS.linux? diff --git a/Library/Homebrew/extend/os/keg.rb b/Library/Homebrew/extend/os/keg.rb index 4164a96263..7b321b1b97 100644 --- a/Library/Homebrew/extend/os/keg.rb +++ b/Library/Homebrew/extend/os/keg.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + require "extend/os/mac/keg" if OS.mac? diff --git a/Library/Homebrew/extend/os/keg_relocate.rb b/Library/Homebrew/extend/os/keg_relocate.rb index 6bfe18f286..2107c83884 100644 --- a/Library/Homebrew/extend/os/keg_relocate.rb +++ b/Library/Homebrew/extend/os/keg_relocate.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if OS.mac? require "extend/os/mac/keg_relocate" elsif OS.linux? diff --git a/Library/Homebrew/extend/os/language/java.rb b/Library/Homebrew/extend/os/language/java.rb index 0394f41991..03e20040e8 100644 --- a/Library/Homebrew/extend/os/language/java.rb +++ b/Library/Homebrew/extend/os/language/java.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + require "extend/os/mac/language/java" if OS.mac? diff --git a/Library/Homebrew/extend/os/linkage_checker.rb b/Library/Homebrew/extend/os/linkage_checker.rb index 9ded9646d8..4fe4204f6a 100644 --- a/Library/Homebrew/extend/os/linkage_checker.rb +++ b/Library/Homebrew/extend/os/linkage_checker.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + require "extend/os/linux/linkage_checker" if OS.linux? diff --git a/Library/Homebrew/extend/os/linux/cleaner.rb b/Library/Homebrew/extend/os/linux/cleaner.rb index d82ef11644..21d646c0b3 100644 --- a/Library/Homebrew/extend/os/linux/cleaner.rb +++ b/Library/Homebrew/extend/os/linux/cleaner.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Cleaner private diff --git a/Library/Homebrew/extend/os/linux/dependency_collector.rb b/Library/Homebrew/extend/os/linux/dependency_collector.rb index 1949002cc3..b965138c00 100644 --- a/Library/Homebrew/extend/os/linux/dependency_collector.rb +++ b/Library/Homebrew/extend/os/linux/dependency_collector.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class DependencyCollector def java_dep_if_needed(tags) req = JavaRequirement.new(tags) diff --git a/Library/Homebrew/extend/os/linux/development_tools.rb b/Library/Homebrew/extend/os/linux/development_tools.rb index af0a123832..590c0e0d77 100644 --- a/Library/Homebrew/extend/os/linux/development_tools.rb +++ b/Library/Homebrew/extend/os/linux/development_tools.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class DevelopmentTools class << self def locate(tool) diff --git a/Library/Homebrew/extend/os/linux/diagnostic.rb b/Library/Homebrew/extend/os/linux/diagnostic.rb index 7279e59fab..c1698ecedd 100644 --- a/Library/Homebrew/extend/os/linux/diagnostic.rb +++ b/Library/Homebrew/extend/os/linux/diagnostic.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "tempfile" require "utils/shell" require "os/linux/diagnostic" diff --git a/Library/Homebrew/extend/os/linux/extend/ENV/shared.rb b/Library/Homebrew/extend/os/linux/extend/ENV/shared.rb index 4d938d08fd..4b76a64afb 100644 --- a/Library/Homebrew/extend/os/linux/extend/ENV/shared.rb +++ b/Library/Homebrew/extend/os/linux/extend/ENV/shared.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SharedEnvExtension # @private def effective_arch diff --git a/Library/Homebrew/extend/os/linux/extend/ENV/std.rb b/Library/Homebrew/extend/os/linux/extend/ENV/std.rb index a129530db9..af3f462eee 100644 --- a/Library/Homebrew/extend/os/linux/extend/ENV/std.rb +++ b/Library/Homebrew/extend/os/linux/extend/ENV/std.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stdenv def setup_build_environment(formula = nil) generic_setup_build_environment(formula) diff --git a/Library/Homebrew/extend/os/linux/extend/ENV/super.rb b/Library/Homebrew/extend/os/linux/extend/ENV/super.rb index b8e1f1dd93..94eb819d6e 100644 --- a/Library/Homebrew/extend/os/linux/extend/ENV/super.rb +++ b/Library/Homebrew/extend/os/linux/extend/ENV/super.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Superenv # @private def self.bin diff --git a/Library/Homebrew/extend/os/linux/extend/pathname.rb b/Library/Homebrew/extend/os/linux/extend/pathname.rb index 604351da70..7b4bd63719 100644 --- a/Library/Homebrew/extend/os/linux/extend/pathname.rb +++ b/Library/Homebrew/extend/os/linux/extend/pathname.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "os/linux/elf" class Pathname diff --git a/Library/Homebrew/extend/os/linux/formula_cellar_checks.rb b/Library/Homebrew/extend/os/linux/formula_cellar_checks.rb index 0665f5678a..00a14f98b8 100644 --- a/Library/Homebrew/extend/os/linux/formula_cellar_checks.rb +++ b/Library/Homebrew/extend/os/linux/formula_cellar_checks.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module FormulaCellarChecks def valid_library_extension?(filename) generic_valid_library_extension?(filename) || filename.basename.to_s.include?(".so.") diff --git a/Library/Homebrew/extend/os/linux/hardware/cpu.rb b/Library/Homebrew/extend/os/linux/hardware/cpu.rb index 75d983ff00..4de99e35f7 100644 --- a/Library/Homebrew/extend/os/linux/hardware/cpu.rb +++ b/Library/Homebrew/extend/os/linux/hardware/cpu.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Hardware class CPU class << self diff --git a/Library/Homebrew/extend/os/linux/install.rb b/Library/Homebrew/extend/os/linux/install.rb index 84b96ac060..7efbff87da 100644 --- a/Library/Homebrew/extend/os/linux/install.rb +++ b/Library/Homebrew/extend/os/linux/install.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Homebrew module Install module_function diff --git a/Library/Homebrew/extend/os/linux/keg_relocate.rb b/Library/Homebrew/extend/os/linux/keg_relocate.rb index dd08361de6..a3da66d279 100644 --- a/Library/Homebrew/extend/os/linux/keg_relocate.rb +++ b/Library/Homebrew/extend/os/linux/keg_relocate.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Keg def relocate_dynamic_linkage(relocation) # Patching the dynamic linker of glibc breaks it. diff --git a/Library/Homebrew/extend/os/linux/linkage_checker.rb b/Library/Homebrew/extend/os/linux/linkage_checker.rb index a1a6fa7f4b..95fd37ac70 100644 --- a/Library/Homebrew/extend/os/linux/linkage_checker.rb +++ b/Library/Homebrew/extend/os/linux/linkage_checker.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class LinkageChecker # Libraries provided by glibc and gcc. SYSTEM_LIBRARY_WHITELIST = %w[ diff --git a/Library/Homebrew/extend/os/linux/requirements/java_requirement.rb b/Library/Homebrew/extend/os/linux/requirements/java_requirement.rb index 23a68743d0..1b1b6347c6 100644 --- a/Library/Homebrew/extend/os/linux/requirements/java_requirement.rb +++ b/Library/Homebrew/extend/os/linux/requirements/java_requirement.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "language/java" class JavaRequirement < Requirement diff --git a/Library/Homebrew/extend/os/linux/requirements/osxfuse_requirement.rb b/Library/Homebrew/extend/os/linux/requirements/osxfuse_requirement.rb index b4cb9fc623..2c2d79f45c 100644 --- a/Library/Homebrew/extend/os/linux/requirements/osxfuse_requirement.rb +++ b/Library/Homebrew/extend/os/linux/requirements/osxfuse_requirement.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "requirement" class OsxfuseRequirement < Requirement diff --git a/Library/Homebrew/extend/os/linux/software_spec.rb b/Library/Homebrew/extend/os/linux/software_spec.rb index 7e62ef9d8e..12ed0de45c 100644 --- a/Library/Homebrew/extend/os/linux/software_spec.rb +++ b/Library/Homebrew/extend/os/linux/software_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class BottleSpecification def skip_relocation? false diff --git a/Library/Homebrew/extend/os/linux/system_config.rb b/Library/Homebrew/extend/os/linux/system_config.rb index 53c42fcf32..bae9ad3e4e 100644 --- a/Library/Homebrew/extend/os/linux/system_config.rb +++ b/Library/Homebrew/extend/os/linux/system_config.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "os/linux/glibc" diff --git a/Library/Homebrew/extend/os/linux/tap.rb b/Library/Homebrew/extend/os/linux/tap.rb index 4242ef099b..854a3d9eb4 100644 --- a/Library/Homebrew/extend/os/linux/tap.rb +++ b/Library/Homebrew/extend/os/linux/tap.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CoreTap < Tap # @private def initialize diff --git a/Library/Homebrew/extend/os/mac/caveats.rb b/Library/Homebrew/extend/os/mac/caveats.rb index 7ddfb5fb4d..05df496cb0 100644 --- a/Library/Homebrew/extend/os/mac/caveats.rb +++ b/Library/Homebrew/extend/os/mac/caveats.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Caveats undef plist_caveats diff --git a/Library/Homebrew/extend/os/mac/cleaner.rb b/Library/Homebrew/extend/os/mac/cleaner.rb index 69d82814d7..35b6e374cf 100644 --- a/Library/Homebrew/extend/os/mac/cleaner.rb +++ b/Library/Homebrew/extend/os/mac/cleaner.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Cleaner private diff --git a/Library/Homebrew/extend/os/mac/dependency_collector.rb b/Library/Homebrew/extend/os/mac/dependency_collector.rb index 014fecdb5e..11c58bbe76 100644 --- a/Library/Homebrew/extend/os/mac/dependency_collector.rb +++ b/Library/Homebrew/extend/os/mac/dependency_collector.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class DependencyCollector undef git_dep_if_needed, subversion_dep_if_needed, cvs_dep_if_needed, xz_dep_if_needed, unzip_dep_if_needed, bzip2_dep_if_needed diff --git a/Library/Homebrew/extend/os/mac/development_tools.rb b/Library/Homebrew/extend/os/mac/development_tools.rb index 0d175c0ece..e1b1d0e87b 100644 --- a/Library/Homebrew/extend/os/mac/development_tools.rb +++ b/Library/Homebrew/extend/os/mac/development_tools.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "os/mac/xcode" # @private diff --git a/Library/Homebrew/extend/os/mac/diagnostic.rb b/Library/Homebrew/extend/os/mac/diagnostic.rb index 3847d64ad2..ae16cf5624 100644 --- a/Library/Homebrew/extend/os/mac/diagnostic.rb +++ b/Library/Homebrew/extend/os/mac/diagnostic.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Homebrew module Diagnostic class Checks diff --git a/Library/Homebrew/extend/os/mac/extend/ENV/shared.rb b/Library/Homebrew/extend/os/mac/extend/ENV/shared.rb index 67a3944c39..476d30f752 100644 --- a/Library/Homebrew/extend/os/mac/extend/ENV/shared.rb +++ b/Library/Homebrew/extend/os/mac/extend/ENV/shared.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SharedEnvExtension def no_weak_imports_support? return false unless compiler == :clang diff --git a/Library/Homebrew/extend/os/mac/extend/ENV/std.rb b/Library/Homebrew/extend/os/mac/extend/ENV/std.rb index a44a614a61..049fa6adce 100644 --- a/Library/Homebrew/extend/os/mac/extend/ENV/std.rb +++ b/Library/Homebrew/extend/os/mac/extend/ENV/std.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stdenv # @private diff --git a/Library/Homebrew/extend/os/mac/extend/ENV/super.rb b/Library/Homebrew/extend/os/mac/extend/ENV/super.rb index 6cc29ba1e2..b5485e33a4 100644 --- a/Library/Homebrew/extend/os/mac/extend/ENV/super.rb +++ b/Library/Homebrew/extend/os/mac/extend/ENV/super.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Superenv class << self undef bin diff --git a/Library/Homebrew/extend/os/mac/extend/pathname.rb b/Library/Homebrew/extend/os/mac/extend/pathname.rb index 4ced5a0944..9289aa73b3 100644 --- a/Library/Homebrew/extend/os/mac/extend/pathname.rb +++ b/Library/Homebrew/extend/os/mac/extend/pathname.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "os/mac/mach" class Pathname diff --git a/Library/Homebrew/extend/os/mac/formula_cellar_checks.rb b/Library/Homebrew/extend/os/mac/formula_cellar_checks.rb index 97b02c91dd..9f0805404a 100644 --- a/Library/Homebrew/extend/os/mac/formula_cellar_checks.rb +++ b/Library/Homebrew/extend/os/mac/formula_cellar_checks.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cache_store" require "linkage_checker" diff --git a/Library/Homebrew/extend/os/mac/formula_support.rb b/Library/Homebrew/extend/os/mac/formula_support.rb index 39309663d6..95f316be88 100644 --- a/Library/Homebrew/extend/os/mac/formula_support.rb +++ b/Library/Homebrew/extend/os/mac/formula_support.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class KegOnlyReason def valid? true diff --git a/Library/Homebrew/extend/os/mac/hardware.rb b/Library/Homebrew/extend/os/mac/hardware.rb index 25e9d0c58c..b41439350f 100644 --- a/Library/Homebrew/extend/os/mac/hardware.rb +++ b/Library/Homebrew/extend/os/mac/hardware.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Hardware def self.oldest_cpu(version = MacOS.version) if version >= :mojave diff --git a/Library/Homebrew/extend/os/mac/hardware/cpu.rb b/Library/Homebrew/extend/os/mac/hardware/cpu.rb index c8e3c9f393..75a56877ee 100644 --- a/Library/Homebrew/extend/os/mac/hardware/cpu.rb +++ b/Library/Homebrew/extend/os/mac/hardware/cpu.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Hardware class CPU class << self diff --git a/Library/Homebrew/extend/os/mac/keg.rb b/Library/Homebrew/extend/os/mac/keg.rb index a0dc175ca8..c0b1e3fcc3 100644 --- a/Library/Homebrew/extend/os/mac/keg.rb +++ b/Library/Homebrew/extend/os/mac/keg.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Keg GENERIC_KEG_LINK_DIRECTORIES = (remove_const :KEG_LINK_DIRECTORIES).freeze KEG_LINK_DIRECTORIES = (GENERIC_KEG_LINK_DIRECTORIES + ["Frameworks"]).freeze diff --git a/Library/Homebrew/extend/os/mac/keg_relocate.rb b/Library/Homebrew/extend/os/mac/keg_relocate.rb index 8fed56b88e..170b828a7c 100644 --- a/Library/Homebrew/extend/os/mac/keg_relocate.rb +++ b/Library/Homebrew/extend/os/mac/keg_relocate.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Keg class << self undef file_linked_libraries diff --git a/Library/Homebrew/extend/os/mac/language/java.rb b/Library/Homebrew/extend/os/mac/language/java.rb index ef5615353a..d750bf6325 100644 --- a/Library/Homebrew/extend/os/mac/language/java.rb +++ b/Library/Homebrew/extend/os/mac/language/java.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Language module Java def self.java_home_cmd(version = nil) diff --git a/Library/Homebrew/extend/os/mac/missing_formula.rb b/Library/Homebrew/extend/os/mac/missing_formula.rb index cf54137adb..5e4879b728 100644 --- a/Library/Homebrew/extend/os/mac/missing_formula.rb +++ b/Library/Homebrew/extend/os/mac/missing_formula.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Homebrew module MissingFormula class << self diff --git a/Library/Homebrew/extend/os/mac/requirements/java_requirement.rb b/Library/Homebrew/extend/os/mac/requirements/java_requirement.rb index 59b208d78c..f8130f7589 100644 --- a/Library/Homebrew/extend/os/mac/requirements/java_requirement.rb +++ b/Library/Homebrew/extend/os/mac/requirements/java_requirement.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class JavaRequirement < Requirement env do env_java_common diff --git a/Library/Homebrew/extend/os/mac/requirements/osxfuse_requirement.rb b/Library/Homebrew/extend/os/mac/requirements/osxfuse_requirement.rb index f6ca8cfc28..bcdfabdf78 100644 --- a/Library/Homebrew/extend/os/mac/requirements/osxfuse_requirement.rb +++ b/Library/Homebrew/extend/os/mac/requirements/osxfuse_requirement.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "requirement" class OsxfuseRequirement < Requirement diff --git a/Library/Homebrew/extend/os/mac/requirements/x11_requirement.rb b/Library/Homebrew/extend/os/mac/requirements/x11_requirement.rb index f4a5da6958..5c0f5cb9c5 100644 --- a/Library/Homebrew/extend/os/mac/requirements/x11_requirement.rb +++ b/Library/Homebrew/extend/os/mac/requirements/x11_requirement.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "requirement" class X11Requirement < Requirement diff --git a/Library/Homebrew/extend/os/mac/search.rb b/Library/Homebrew/extend/os/mac/search.rb index d26cf17276..82cf08b5c1 100644 --- a/Library/Homebrew/extend/os/mac/search.rb +++ b/Library/Homebrew/extend/os/mac/search.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/cask" require "cask/cask_loader" diff --git a/Library/Homebrew/extend/os/mac/system_config.rb b/Library/Homebrew/extend/os/mac/system_config.rb index ec017bdc26..6d92ee2d60 100644 --- a/Library/Homebrew/extend/os/mac/system_config.rb +++ b/Library/Homebrew/extend/os/mac/system_config.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class SystemConfig class << self undef describe_java, describe_homebrew_ruby diff --git a/Library/Homebrew/extend/os/mac/unpack_strategy/zip.rb b/Library/Homebrew/extend/os/mac/unpack_strategy/zip.rb index 6f0dc90a38..4aaf225f18 100644 --- a/Library/Homebrew/extend/os/mac/unpack_strategy/zip.rb +++ b/Library/Homebrew/extend/os/mac/unpack_strategy/zip.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UnpackStrategy class Zip prepend Module.new { diff --git a/Library/Homebrew/extend/os/mac/utils/analytics.rb b/Library/Homebrew/extend/os/mac/utils/analytics.rb index f59ba37fe2..3e624df8ae 100644 --- a/Library/Homebrew/extend/os/mac/utils/analytics.rb +++ b/Library/Homebrew/extend/os/mac/utils/analytics.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + module Utils module Analytics class << self def custom_prefix_label - "non-/usr/local".freeze + "non-/usr/local" end end end diff --git a/Library/Homebrew/extend/os/mac/utils/bottles.rb b/Library/Homebrew/extend/os/mac/utils/bottles.rb index 954ca0b36d..09bb7027b7 100644 --- a/Library/Homebrew/extend/os/mac/utils/bottles.rb +++ b/Library/Homebrew/extend/os/mac/utils/bottles.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Utils class Bottles class << self diff --git a/Library/Homebrew/extend/os/missing_formula.rb b/Library/Homebrew/extend/os/missing_formula.rb index c589925764..b77e642741 100644 --- a/Library/Homebrew/extend/os/missing_formula.rb +++ b/Library/Homebrew/extend/os/missing_formula.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + require "extend/os/mac/missing_formula" if OS.mac? diff --git a/Library/Homebrew/extend/os/pathname.rb b/Library/Homebrew/extend/os/pathname.rb index 5e6edeb309..58e109e3f0 100644 --- a/Library/Homebrew/extend/os/pathname.rb +++ b/Library/Homebrew/extend/os/pathname.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if OS.mac? require "extend/os/mac/extend/pathname" elsif OS.linux? diff --git a/Library/Homebrew/extend/os/requirements/java_requirement.rb b/Library/Homebrew/extend/os/requirements/java_requirement.rb index 673d53079b..85c36f1aec 100644 --- a/Library/Homebrew/extend/os/requirements/java_requirement.rb +++ b/Library/Homebrew/extend/os/requirements/java_requirement.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if OS.mac? require "extend/os/mac/requirements/java_requirement" elsif OS.linux? diff --git a/Library/Homebrew/extend/os/requirements/osxfuse_requirement.rb b/Library/Homebrew/extend/os/requirements/osxfuse_requirement.rb index ab491aa1e4..eab9176f3d 100644 --- a/Library/Homebrew/extend/os/requirements/osxfuse_requirement.rb +++ b/Library/Homebrew/extend/os/requirements/osxfuse_requirement.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if OS.mac? require "extend/os/mac/requirements/osxfuse_requirement" elsif OS.linux? diff --git a/Library/Homebrew/extend/os/requirements/x11_requirement.rb b/Library/Homebrew/extend/os/requirements/x11_requirement.rb index 664b6c7c0a..5389f38a19 100644 --- a/Library/Homebrew/extend/os/requirements/x11_requirement.rb +++ b/Library/Homebrew/extend/os/requirements/x11_requirement.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + require "extend/os/mac/requirements/x11_requirement" if OS.mac? diff --git a/Library/Homebrew/extend/os/search.rb b/Library/Homebrew/extend/os/search.rb index 69c6b02543..c6909a0fa0 100644 --- a/Library/Homebrew/extend/os/search.rb +++ b/Library/Homebrew/extend/os/search.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + require "extend/os/mac/search" if OS.mac? diff --git a/Library/Homebrew/extend/os/software_spec.rb b/Library/Homebrew/extend/os/software_spec.rb index a3421738f1..aae7c12999 100644 --- a/Library/Homebrew/extend/os/software_spec.rb +++ b/Library/Homebrew/extend/os/software_spec.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + require "extend/os/linux/software_spec" if OS.linux? diff --git a/Library/Homebrew/extend/os/system_config.rb b/Library/Homebrew/extend/os/system_config.rb index b80eec5e8e..9c06e9a02c 100644 --- a/Library/Homebrew/extend/os/system_config.rb +++ b/Library/Homebrew/extend/os/system_config.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if OS.mac? require "extend/os/mac/system_config" elsif OS.linux? diff --git a/Library/Homebrew/extend/os/tap.rb b/Library/Homebrew/extend/os/tap.rb index 93c67d484a..82e0a09f66 100644 --- a/Library/Homebrew/extend/os/tap.rb +++ b/Library/Homebrew/extend/os/tap.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + require "extend/os/linux/tap" if OS.linux? diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index 77c3ce6516..1ad0ff96a6 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "resource" require "metafiles" diff --git a/Library/Homebrew/extend/predicable.rb b/Library/Homebrew/extend/predicable.rb index d02fbb89be..dba7f17b5f 100644 --- a/Library/Homebrew/extend/predicable.rb +++ b/Library/Homebrew/extend/predicable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Predicable def attr_predicate(*attrs) attrs.each do |attr| diff --git a/Library/Homebrew/extend/string.rb b/Library/Homebrew/extend/string.rb index 71f08c453b..1d8619bb96 100644 --- a/Library/Homebrew/extend/string.rb +++ b/Library/Homebrew/extend/string.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Contains backports from newer versions of Ruby require "backports/2.4.0/string/match" require "backports/2.5.0/string/delete_prefix" diff --git a/Library/Homebrew/fetch.rb b/Library/Homebrew/fetch.rb index 32f9e3f7c6..4d9a13719d 100644 --- a/Library/Homebrew/fetch.rb +++ b/Library/Homebrew/fetch.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Homebrew module Fetch module_function diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 5fd2553b55..79aa5f98f7 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cache_store" require "formula_support" require "lock_file" diff --git a/Library/Homebrew/formula_assertions.rb b/Library/Homebrew/formula_assertions.rb index 2ef69d6d7c..b1f9a2aab5 100644 --- a/Library/Homebrew/formula_assertions.rb +++ b/Library/Homebrew/formula_assertions.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Homebrew module Assertions require "rubygems" diff --git a/Library/Homebrew/formula_cellar_checks.rb b/Library/Homebrew/formula_cellar_checks.rb index c8080ec94c..dfd7c3cc97 100644 --- a/Library/Homebrew/formula_cellar_checks.rb +++ b/Library/Homebrew/formula_cellar_checks.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "utils/shell" module FormulaCellarChecks diff --git a/Library/Homebrew/formula_creator.rb b/Library/Homebrew/formula_creator.rb index c9de19fb10..b7ee699a13 100644 --- a/Library/Homebrew/formula_creator.rb +++ b/Library/Homebrew/formula_creator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "digest" require "erb" diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index afedd08de6..215e45df32 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cxxstdlib" require "formula" require "keg" diff --git a/Library/Homebrew/formula_pin.rb b/Library/Homebrew/formula_pin.rb index c312808008..f9c54097fa 100644 --- a/Library/Homebrew/formula_pin.rb +++ b/Library/Homebrew/formula_pin.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "keg" class FormulaPin diff --git a/Library/Homebrew/formula_support.rb b/Library/Homebrew/formula_support.rb index 05347a10d1..008c023b25 100644 --- a/Library/Homebrew/formula_support.rb +++ b/Library/Homebrew/formula_support.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Used to track formulae that cannot be installed at the same time. FormulaConflict = Struct.new(:name, :reason) diff --git a/Library/Homebrew/formula_versions.rb b/Library/Homebrew/formula_versions.rb index c4248fbdf5..ae1c670637 100644 --- a/Library/Homebrew/formula_versions.rb +++ b/Library/Homebrew/formula_versions.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" class FormulaVersions diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index 9722eeafdc..e884fe7442 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "digest/md5" require "extend/cachable" diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index 9f976f604a..5156179073 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "English" require "json" require "json/add/exception" @@ -33,7 +35,7 @@ ARGV.extend(HomebrewArgvExtension) HOMEBREW_PRODUCT = ENV["HOMEBREW_PRODUCT"] HOMEBREW_VERSION = ENV["HOMEBREW_VERSION"] -HOMEBREW_WWW = "https://brew.sh".freeze +HOMEBREW_WWW = "https://brew.sh" require "rbconfig" @@ -42,10 +44,10 @@ RUBY_BIN = RUBY_PATH.dirname.freeze HOMEBREW_USER_AGENT_CURL = ENV["HOMEBREW_USER_AGENT_CURL"] HOMEBREW_USER_AGENT_RUBY = - "#{ENV["HOMEBREW_USER_AGENT"]} ruby/#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}".freeze + "#{ENV["HOMEBREW_USER_AGENT"]} ruby/#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}" HOMEBREW_USER_AGENT_FAKE_SAFARI = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/602.4.8 " \ - "(KHTML, like Gecko) Version/10.0.3 Safari/602.4.8".freeze + "(KHTML, like Gecko) Version/10.0.3 Safari/602.4.8" HOMEBREW_BOTTLE_DEFAULT_DOMAIN = ENV["HOMEBREW_BOTTLE_DEFAULT_DOMAIN"] HOMEBREW_BOTTLE_DOMAIN = ENV["HOMEBREW_BOTTLE_DOMAIN"] @@ -57,9 +59,9 @@ require "os/global" module Homebrew extend FileUtils - DEFAULT_PREFIX ||= "/usr/local".freeze - DEFAULT_CELLAR = "#{DEFAULT_PREFIX}/Cellar".freeze - DEFAULT_REPOSITORY = "#{DEFAULT_PREFIX}/Homebrew".freeze + DEFAULT_PREFIX ||= "/usr/local" + DEFAULT_CELLAR = "#{DEFAULT_PREFIX}/Cellar" + DEFAULT_REPOSITORY = "#{DEFAULT_PREFIX}/Homebrew" class << self attr_writer :failed, :raise_deprecation_exceptions, :auditing, :args diff --git a/Library/Homebrew/hardware.rb b/Library/Homebrew/hardware.rb index cda94a4913..37fd2c49c6 100644 --- a/Library/Homebrew/hardware.rb +++ b/Library/Homebrew/hardware.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Hardware class CPU INTEL_32BIT_ARCHS = [:i386].freeze diff --git a/Library/Homebrew/help.rb b/Library/Homebrew/help.rb index 6593b1baac..c99e6dae7f 100644 --- a/Library/Homebrew/help.rb +++ b/Library/Homebrew/help.rb @@ -1,4 +1,6 @@ -HOMEBREW_HELP = <<~EOS.freeze +# frozen_string_literal: true + +HOMEBREW_HELP = <<~EOS Example usage: brew search [TEXT|/REGEX/] brew info [FORMULA...] diff --git a/Library/Homebrew/install.rb b/Library/Homebrew/install.rb index 256993e3df..215845e362 100644 --- a/Library/Homebrew/install.rb +++ b/Library/Homebrew/install.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "diagnostic" require "fileutils" require "hardware" diff --git a/Library/Homebrew/install_renamed.rb b/Library/Homebrew/install_renamed.rb index dc5d4cda8b..9fa6f37fa2 100644 --- a/Library/Homebrew/install_renamed.rb +++ b/Library/Homebrew/install_renamed.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module InstallRenamed def install_p(_, new_basename) super do |src, dst| diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index 39125daa0b..a1f480e1fc 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "keg_relocate" require "language/python" require "lock_file" diff --git a/Library/Homebrew/keg_relocate.rb b/Library/Homebrew/keg_relocate.rb index 9936ecbe2e..b8028ceab5 100644 --- a/Library/Homebrew/keg_relocate.rb +++ b/Library/Homebrew/keg_relocate.rb @@ -1,7 +1,9 @@ +# frozen_string_literal: true + class Keg - PREFIX_PLACEHOLDER = "@@HOMEBREW_PREFIX@@".freeze - CELLAR_PLACEHOLDER = "@@HOMEBREW_CELLAR@@".freeze - REPOSITORY_PLACEHOLDER = "@@HOMEBREW_REPOSITORY@@".freeze + PREFIX_PLACEHOLDER = "@@HOMEBREW_PREFIX@@" + CELLAR_PLACEHOLDER = "@@HOMEBREW_CELLAR@@" + REPOSITORY_PLACEHOLDER = "@@HOMEBREW_REPOSITORY@@" Relocation = Struct.new(:old_prefix, :old_cellar, :old_repository, :new_prefix, :new_cellar, :new_repository) do diff --git a/Library/Homebrew/language/go.rb b/Library/Homebrew/language/go.rb index 90922ddb74..7dbbf5bf8a 100644 --- a/Library/Homebrew/language/go.rb +++ b/Library/Homebrew/language/go.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "resource" module Language diff --git a/Library/Homebrew/language/haskell.rb b/Library/Homebrew/language/haskell.rb index bf68441fae..e4b11e3071 100644 --- a/Library/Homebrew/language/haskell.rb +++ b/Library/Homebrew/language/haskell.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Language module Haskell module Cabal diff --git a/Library/Homebrew/language/java.rb b/Library/Homebrew/language/java.rb index 01ff28d9eb..5311b1f588 100644 --- a/Library/Homebrew/language/java.rb +++ b/Library/Homebrew/language/java.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Language module Java def self.java_home_cmd(_ = nil) diff --git a/Library/Homebrew/language/node.rb b/Library/Homebrew/language/node.rb index 28d9ee4b83..4ae81f0bc0 100644 --- a/Library/Homebrew/language/node.rb +++ b/Library/Homebrew/language/node.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Language module Node def self.npm_cache_config diff --git a/Library/Homebrew/language/python.rb b/Library/Homebrew/language/python.rb index f026e32a66..ce811330d5 100644 --- a/Library/Homebrew/language/python.rb +++ b/Library/Homebrew/language/python.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "language/python_virtualenv_constants" module Language diff --git a/Library/Homebrew/language/python_virtualenv_constants.rb b/Library/Homebrew/language/python_virtualenv_constants.rb index f39dd4ff27..67af7da6db 100644 --- a/Library/Homebrew/language/python_virtualenv_constants.rb +++ b/Library/Homebrew/language/python_virtualenv_constants.rb @@ -1,6 +1,8 @@ +# frozen_string_literal: true + PYTHON_VIRTUALENV_URL = "https://files.pythonhosted.org/packages/37/db" \ "/89d6b043b22052109da35416abc3c397655e4bd3cff031446ba02b9654fa" \ - "/virtualenv-16.4.3.tar.gz".freeze + "/virtualenv-16.4.3.tar.gz" PYTHON_VIRTUALENV_SHA256 = - "984d7e607b0a5d1329425dd8845bd971b957424b5ba664729fab51ab8c11bc39".freeze + "984d7e607b0a5d1329425dd8845bd971b957424b5ba664729fab51ab8c11bc39" diff --git a/Library/Homebrew/lazy_object.rb b/Library/Homebrew/lazy_object.rb index 520ae643db..d54f15ed7e 100644 --- a/Library/Homebrew/lazy_object.rb +++ b/Library/Homebrew/lazy_object.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class LazyObject < Delegator def initialize(&callable) super(callable) diff --git a/Library/Homebrew/linkage_cache_store.rb b/Library/Homebrew/linkage_cache_store.rb index 408ad0f22f..6ab77998ed 100644 --- a/Library/Homebrew/linkage_cache_store.rb +++ b/Library/Homebrew/linkage_cache_store.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "set" require "cache_store" diff --git a/Library/Homebrew/linkage_checker.rb b/Library/Homebrew/linkage_checker.rb index 9e1a34fe69..27a6c0a38f 100644 --- a/Library/Homebrew/linkage_checker.rb +++ b/Library/Homebrew/linkage_checker.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "keg" require "formula" require "linkage_cache_store" diff --git a/Library/Homebrew/load_path.rb b/Library/Homebrew/load_path.rb index d465c8db8a..c3eb983565 100644 --- a/Library/Homebrew/load_path.rb +++ b/Library/Homebrew/load_path.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "pathname" HOMEBREW_LIBRARY_PATH = Pathname(__dir__).realpath.freeze diff --git a/Library/Homebrew/locale.rb b/Library/Homebrew/locale.rb index 4c05be5be8..d9c520959c 100644 --- a/Library/Homebrew/locale.rb +++ b/Library/Homebrew/locale.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Locale class ParserError < StandardError end diff --git a/Library/Homebrew/lock_file.rb b/Library/Homebrew/lock_file.rb index c694c62220..99c1afda5e 100644 --- a/Library/Homebrew/lock_file.rb +++ b/Library/Homebrew/lock_file.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "fcntl" class LockFile diff --git a/Library/Homebrew/messages.rb b/Library/Homebrew/messages.rb index 55cf102645..8ecd36d085 100644 --- a/Library/Homebrew/messages.rb +++ b/Library/Homebrew/messages.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # A Messages object collects messages that may need to be displayed together # at the end of a multi-step `brew` command run. class Messages diff --git a/Library/Homebrew/metafiles.rb b/Library/Homebrew/metafiles.rb index 963f5c45b2..5159623f1d 100644 --- a/Library/Homebrew/metafiles.rb +++ b/Library/Homebrew/metafiles.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Metafiles # https://github.com/github/markup#markups EXTENSIONS = Set.new(%w[ diff --git a/Library/Homebrew/migrator.rb b/Library/Homebrew/migrator.rb index 60bb0ce711..0c11faad79 100644 --- a/Library/Homebrew/migrator.rb +++ b/Library/Homebrew/migrator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "lock_file" require "keg" require "tab" diff --git a/Library/Homebrew/missing_formula.rb b/Library/Homebrew/missing_formula.rb index 2ab03c4c57..b3778677af 100644 --- a/Library/Homebrew/missing_formula.rb +++ b/Library/Homebrew/missing_formula.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formulary" require "cask/cmd/abstract_command" require "cask/cmd/info" diff --git a/Library/Homebrew/mktemp.rb b/Library/Homebrew/mktemp.rb index 2a8d698b44..716c3d269c 100644 --- a/Library/Homebrew/mktemp.rb +++ b/Library/Homebrew/mktemp.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Performs `Formula#mktemp`'s functionality, and tracks the results. # Each instance is only intended to be used once. class Mktemp diff --git a/Library/Homebrew/official_taps.rb b/Library/Homebrew/official_taps.rb index 74059c908b..44fb542503 100644 --- a/Library/Homebrew/official_taps.rb +++ b/Library/Homebrew/official_taps.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + OFFICIAL_CASK_TAPS = %w[ cask versions diff --git a/Library/Homebrew/options.rb b/Library/Homebrew/options.rb index fa043c4a94..c386c2ee4b 100644 --- a/Library/Homebrew/options.rb +++ b/Library/Homebrew/options.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Option attr_reader :name, :description, :flag diff --git a/Library/Homebrew/os.rb b/Library/Homebrew/os.rb index 44e169485a..2108c279d7 100644 --- a/Library/Homebrew/os.rb +++ b/Library/Homebrew/os.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module OS def self.mac? return false if ENV["HOMEBREW_TEST_GENERIC_OS"] @@ -20,12 +22,12 @@ module OS !OS::Mac.outdated_release? && ARGV.none? { |v| v.start_with?("--cc=") } && ENV["HOMEBREW_PREFIX"] == "/usr/local" - ISSUES_URL = "https://docs.brew.sh/Troubleshooting".freeze + ISSUES_URL = "https://docs.brew.sh/Troubleshooting" end - PATH_OPEN = "/usr/bin/open".freeze + PATH_OPEN = "/usr/bin/open" elsif OS.linux? require "os/linux" - ISSUES_URL = "https://docs.brew.sh/Troubleshooting".freeze - PATH_OPEN = "xdg-open".freeze + ISSUES_URL = "https://docs.brew.sh/Troubleshooting" + PATH_OPEN = "xdg-open" end end diff --git a/Library/Homebrew/os/global.rb b/Library/Homebrew/os/global.rb index 7808b7e5b1..9d6250c235 100644 --- a/Library/Homebrew/os/global.rb +++ b/Library/Homebrew/os/global.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + require "os/linux/global" if OS.linux? diff --git a/Library/Homebrew/os/linux.rb b/Library/Homebrew/os/linux.rb index af0c598b26..cc26893e79 100644 --- a/Library/Homebrew/os/linux.rb +++ b/Library/Homebrew/os/linux.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module OS # Define OS::Mac on Linux for formula API compatibility. module Mac diff --git a/Library/Homebrew/os/linux/diagnostic.rb b/Library/Homebrew/os/linux/diagnostic.rb index 66cd7fe8af..1844c658ee 100644 --- a/Library/Homebrew/os/linux/diagnostic.rb +++ b/Library/Homebrew/os/linux/diagnostic.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Homebrew module Diagnostic class Checks diff --git a/Library/Homebrew/os/linux/elf.rb b/Library/Homebrew/os/linux/elf.rb index b7a1fcb72d..4e3a99a494 100644 --- a/Library/Homebrew/os/linux/elf.rb +++ b/Library/Homebrew/os/linux/elf.rb @@ -1,7 +1,9 @@ +# frozen_string_literal: true + # @see https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header module ELFShim MAGIC_NUMBER_OFFSET = 0 - MAGIC_NUMBER_ASCII = "\x7fELF".freeze + MAGIC_NUMBER_ASCII = "\x7fELF" OS_ABI_OFFSET = 0x07 OS_ABI_SYSTEM_V = 0 diff --git a/Library/Homebrew/os/linux/glibc.rb b/Library/Homebrew/os/linux/glibc.rb index 0d7397c9c5..8a7fa52506 100644 --- a/Library/Homebrew/os/linux/glibc.rb +++ b/Library/Homebrew/os/linux/glibc.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module OS module Linux module Glibc diff --git a/Library/Homebrew/os/linux/global.rb b/Library/Homebrew/os/linux/global.rb index 893cec29e7..a4d7e2c0ed 100644 --- a/Library/Homebrew/os/linux/global.rb +++ b/Library/Homebrew/os/linux/global.rb @@ -1,7 +1,9 @@ +# frozen_string_literal: true + module Homebrew DEFAULT_PREFIX ||= if ENV["HOMEBREW_FORCE_HOMEBREW_ON_LINUX"] - "/usr/local".freeze + "/usr/local" else - "/home/linuxbrew/.linuxbrew".freeze + "/home/linuxbrew/.linuxbrew" end.freeze end diff --git a/Library/Homebrew/os/linux/kernel.rb b/Library/Homebrew/os/linux/kernel.rb index 4534409e6d..b35927dd3c 100644 --- a/Library/Homebrew/os/linux/kernel.rb +++ b/Library/Homebrew/os/linux/kernel.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module OS module Linux module Kernel diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb index 3f800e7023..078e3fd0c5 100644 --- a/Library/Homebrew/os/mac.rb +++ b/Library/Homebrew/os/mac.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "os/mac/version" require "os/mac/xcode" require "os/mac/xquartz" diff --git a/Library/Homebrew/os/mac/architecture_list.rb b/Library/Homebrew/os/mac/architecture_list.rb index aa3c035b79..8ade3fe0c0 100644 --- a/Library/Homebrew/os/mac/architecture_list.rb +++ b/Library/Homebrew/os/mac/architecture_list.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "hardware" module ArchitectureListExtension diff --git a/Library/Homebrew/os/mac/keg.rb b/Library/Homebrew/os/mac/keg.rb index 631a699168..65d4ceb029 100644 --- a/Library/Homebrew/os/mac/keg.rb +++ b/Library/Homebrew/os/mac/keg.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Keg def change_dylib_id(id, file) return if file.dylib_id == id diff --git a/Library/Homebrew/os/mac/mach.rb b/Library/Homebrew/os/mac/mach.rb index 4e7c86e98f..aa8baa5423 100644 --- a/Library/Homebrew/os/mac/mach.rb +++ b/Library/Homebrew/os/mac/mach.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "macho" require "os/mac/architecture_list" diff --git a/Library/Homebrew/os/mac/sdk.rb b/Library/Homebrew/os/mac/sdk.rb index 1bae724ee7..1fa1356f8d 100644 --- a/Library/Homebrew/os/mac/sdk.rb +++ b/Library/Homebrew/os/mac/sdk.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "os/mac/version" module OS diff --git a/Library/Homebrew/os/mac/version.rb b/Library/Homebrew/os/mac/version.rb index 4527bdafe9..f0652cf8c8 100644 --- a/Library/Homebrew/os/mac/version.rb +++ b/Library/Homebrew/os/mac/version.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "version" module OS diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index 536e20cd92..194bf237b5 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -1,11 +1,13 @@ +# frozen_string_literal: true + module OS module Mac module Xcode module_function DEFAULT_BUNDLE_PATH = Pathname.new("/Applications/Xcode.app").freeze - BUNDLE_ID = "com.apple.dt.Xcode".freeze - OLD_BUNDLE_ID = "com.apple.Xcode".freeze + BUNDLE_ID = "com.apple.dt.Xcode" + OLD_BUNDLE_ID = "com.apple.Xcode" def latest_version case MacOS.version @@ -185,12 +187,12 @@ module OS module_function # The original Mavericks CLT package ID - EXECUTABLE_PKG_ID = "com.apple.pkg.CLTools_Executables".freeze - MAVERICKS_NEW_PKG_ID = "com.apple.pkg.CLTools_Base".freeze # obsolete - PKG_PATH = "/Library/Developer/CommandLineTools".freeze + EXECUTABLE_PKG_ID = "com.apple.pkg.CLTools_Executables" + MAVERICKS_NEW_PKG_ID = "com.apple.pkg.CLTools_Base" # obsolete + PKG_PATH = "/Library/Developer/CommandLineTools" HEADER_PKG_PATH = - "/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_:macos_version.pkg".freeze - HEADER_PKG_ID = "com.apple.pkg.macOS_SDK_headers_for_macOS_10.14".freeze + "/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_:macos_version.pkg" + HEADER_PKG_ID = "com.apple.pkg.macOS_SDK_headers_for_macOS_10.14" # Returns true even if outdated tools are installed def installed? diff --git a/Library/Homebrew/os/mac/xquartz.rb b/Library/Homebrew/os/mac/xquartz.rb index 566adb9129..5df7112760 100644 --- a/Library/Homebrew/os/mac/xquartz.rb +++ b/Library/Homebrew/os/mac/xquartz.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module OS module Mac X11 = XQuartz = Module.new # rubocop:disable Style/MutableConstant @@ -6,8 +8,8 @@ module OS module_function DEFAULT_BUNDLE_PATH = Pathname.new("Applications/Utilities/XQuartz.app").freeze - FORGE_BUNDLE_ID = "org.macosforge.xquartz.X11".freeze - FORGE_PKG_ID = "org.macosforge.xquartz.pkg".freeze + FORGE_BUNDLE_ID = "org.macosforge.xquartz.X11" + FORGE_PKG_ID = "org.macosforge.xquartz.pkg" PKGINFO_VERSION_MAP = { "2.6.34" => "2.6.3", diff --git a/Library/Homebrew/patch.rb b/Library/Homebrew/patch.rb index 94d037726d..8f0d5a5c05 100644 --- a/Library/Homebrew/patch.rb +++ b/Library/Homebrew/patch.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "resource" require "erb" diff --git a/Library/Homebrew/pkg_version.rb b/Library/Homebrew/pkg_version.rb index 8838a996af..43b45d60eb 100644 --- a/Library/Homebrew/pkg_version.rb +++ b/Library/Homebrew/pkg_version.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "version" class PkgVersion diff --git a/Library/Homebrew/postinstall.rb b/Library/Homebrew/postinstall.rb index 94c56e48fc..3498e03d69 100644 --- a/Library/Homebrew/postinstall.rb +++ b/Library/Homebrew/postinstall.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + old_trap = trap("INT") { exit! 130 } require "global" diff --git a/Library/Homebrew/readall.rb b/Library/Homebrew/readall.rb index de1ece8d63..327bcef52f 100644 --- a/Library/Homebrew/readall.rb +++ b/Library/Homebrew/readall.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" module Readall diff --git a/Library/Homebrew/reinstall.rb b/Library/Homebrew/reinstall.rb index fd131e84cc..088be0faff 100644 --- a/Library/Homebrew/reinstall.rb +++ b/Library/Homebrew/reinstall.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula_installer" require "development_tools" require "messages" diff --git a/Library/Homebrew/requirement.rb b/Library/Homebrew/requirement.rb index 9474aabfda..ebd2179a24 100644 --- a/Library/Homebrew/requirement.rb +++ b/Library/Homebrew/requirement.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "dependable" require "dependency" require "dependencies" diff --git a/Library/Homebrew/requirements.rb b/Library/Homebrew/requirements.rb index 0173017e87..cf7cf6be80 100644 --- a/Library/Homebrew/requirements.rb +++ b/Library/Homebrew/requirements.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "requirement" require "requirements/arch_requirement" require "requirements/codesign_requirement" diff --git a/Library/Homebrew/requirements/arch_requirement.rb b/Library/Homebrew/requirements/arch_requirement.rb index 9a28daa46d..03a988c76b 100644 --- a/Library/Homebrew/requirements/arch_requirement.rb +++ b/Library/Homebrew/requirements/arch_requirement.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "requirement" class ArchRequirement < Requirement diff --git a/Library/Homebrew/requirements/codesign_requirement.rb b/Library/Homebrew/requirements/codesign_requirement.rb index aaf4f650fa..9a48f204bf 100644 --- a/Library/Homebrew/requirements/codesign_requirement.rb +++ b/Library/Homebrew/requirements/codesign_requirement.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CodesignRequirement < Requirement fatal true diff --git a/Library/Homebrew/requirements/java_requirement.rb b/Library/Homebrew/requirements/java_requirement.rb index 76992fcfa3..d563ac5476 100644 --- a/Library/Homebrew/requirements/java_requirement.rb +++ b/Library/Homebrew/requirements/java_requirement.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "language/java" class JavaRequirement < Requirement diff --git a/Library/Homebrew/requirements/linux_requirement.rb b/Library/Homebrew/requirements/linux_requirement.rb index cb4666e562..74daf4cf4a 100644 --- a/Library/Homebrew/requirements/linux_requirement.rb +++ b/Library/Homebrew/requirements/linux_requirement.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class LinuxRequirement < Requirement fatal true diff --git a/Library/Homebrew/requirements/macos_requirement.rb b/Library/Homebrew/requirements/macos_requirement.rb index 7f40d37fed..d984efc6ef 100644 --- a/Library/Homebrew/requirements/macos_requirement.rb +++ b/Library/Homebrew/requirements/macos_requirement.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "requirement" class MacOSRequirement < Requirement diff --git a/Library/Homebrew/requirements/maximum_macos_requirement.rb b/Library/Homebrew/requirements/maximum_macos_requirement.rb index 4dd7fd73d5..415f862ed7 100644 --- a/Library/Homebrew/requirements/maximum_macos_requirement.rb +++ b/Library/Homebrew/requirements/maximum_macos_requirement.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "requirement" class MaximumMacOSRequirement < Requirement diff --git a/Library/Homebrew/requirements/osxfuse_requirement.rb b/Library/Homebrew/requirements/osxfuse_requirement.rb index 2e67a4b050..79712de53c 100644 --- a/Library/Homebrew/requirements/osxfuse_requirement.rb +++ b/Library/Homebrew/requirements/osxfuse_requirement.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "requirement" class OsxfuseRequirement < Requirement diff --git a/Library/Homebrew/requirements/tuntap_requirement.rb b/Library/Homebrew/requirements/tuntap_requirement.rb index 3ae1420802..80b842977d 100644 --- a/Library/Homebrew/requirements/tuntap_requirement.rb +++ b/Library/Homebrew/requirements/tuntap_requirement.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "requirement" class TuntapRequirement < Requirement diff --git a/Library/Homebrew/requirements/x11_requirement.rb b/Library/Homebrew/requirements/x11_requirement.rb index 539d374804..58ecf33cf4 100644 --- a/Library/Homebrew/requirements/x11_requirement.rb +++ b/Library/Homebrew/requirements/x11_requirement.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "requirement" class X11Requirement < Requirement diff --git a/Library/Homebrew/requirements/xcode_requirement.rb b/Library/Homebrew/requirements/xcode_requirement.rb index 8d596fbf4a..caeb67724b 100644 --- a/Library/Homebrew/requirements/xcode_requirement.rb +++ b/Library/Homebrew/requirements/xcode_requirement.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "requirement" class XcodeRequirement < Requirement diff --git a/Library/Homebrew/resource.rb b/Library/Homebrew/resource.rb index 1ca20ee2b3..b4c32f1736 100644 --- a/Library/Homebrew/resource.rb +++ b/Library/Homebrew/resource.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "download_strategy" require "checksum" require "version" diff --git a/Library/Homebrew/rubocops.rb b/Library/Homebrew/rubocops.rb index 78e4a92e06..b3a1fabbe3 100644 --- a/Library/Homebrew/rubocops.rb +++ b/Library/Homebrew/rubocops.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "load_path" require "rubocop-rspec" diff --git a/Library/Homebrew/rubocops/cask/ast/cask_block.rb b/Library/Homebrew/rubocops/cask/ast/cask_block.rb index bc8db95905..98e97c0c34 100644 --- a/Library/Homebrew/rubocops/cask/ast/cask_block.rb +++ b/Library/Homebrew/rubocops/cask/ast/cask_block.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "forwardable" module RuboCop diff --git a/Library/Homebrew/rubocops/cask/ast/cask_header.rb b/Library/Homebrew/rubocops/cask/ast/cask_header.rb index 475dd2d8f7..8668c2daad 100644 --- a/Library/Homebrew/rubocops/cask/ast/cask_header.rb +++ b/Library/Homebrew/rubocops/cask/ast/cask_header.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module RuboCop module Cask module AST diff --git a/Library/Homebrew/rubocops/cask/ast/stanza.rb b/Library/Homebrew/rubocops/cask/ast/stanza.rb index c81e560c22..8a6b7a5452 100644 --- a/Library/Homebrew/rubocops/cask/ast/stanza.rb +++ b/Library/Homebrew/rubocops/cask/ast/stanza.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "forwardable" module RuboCop diff --git a/Library/Homebrew/rubocops/cask/constants/stanza.rb b/Library/Homebrew/rubocops/cask/constants/stanza.rb index 0cdfef8ba3..ad7b41ce46 100644 --- a/Library/Homebrew/rubocops/cask/constants/stanza.rb +++ b/Library/Homebrew/rubocops/cask/constants/stanza.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module RuboCop module Cask # Constants available globally for use in all Cask cops. diff --git a/Library/Homebrew/rubocops/cask/extend/node.rb b/Library/Homebrew/rubocops/cask/extend/node.rb index f8c365d21a..8e179e70dc 100644 --- a/Library/Homebrew/rubocops/cask/extend/node.rb +++ b/Library/Homebrew/rubocops/cask/extend/node.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module RuboCop module AST # Extensions for RuboCop's AST Node class diff --git a/Library/Homebrew/rubocops/cask/extend/string.rb b/Library/Homebrew/rubocops/cask/extend/string.rb index 45d50157dc..73ac1a98ba 100644 --- a/Library/Homebrew/rubocops/cask/extend/string.rb +++ b/Library/Homebrew/rubocops/cask/extend/string.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Utility method extensions for String class String def undent diff --git a/Library/Homebrew/rubocops/cask/homepage_matches_url.rb b/Library/Homebrew/rubocops/cask/homepage_matches_url.rb index ddd020f56f..850132129e 100644 --- a/Library/Homebrew/rubocops/cask/homepage_matches_url.rb +++ b/Library/Homebrew/rubocops/cask/homepage_matches_url.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "forwardable" module RuboCop @@ -13,11 +15,11 @@ module RuboCop REFERENCE_URL = "https://github.com/Homebrew/homebrew-cask/blob/master/doc/" \ - "cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment".freeze + "cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment" COMMENT_FORMAT = /# [^ ]+ was verified as official when first introduced to the cask/.freeze - MSG_NO_MATCH = "`%{url}` does not match `%{full_url}`".freeze + MSG_NO_MATCH = "`%{url}` does not match `%{full_url}`" MSG_MISSING = ("`%{domain}` does not match `%{homepage}`, a comment has to be added " \ "above the `url` stanza. For details, see " + REFERENCE_URL).freeze @@ -26,7 +28,7 @@ module RuboCop "For details, see " + REFERENCE_URL).freeze MSG_UNNECESSARY = "The URL's domain `%{domain}` matches the homepage `%{homepage}`, " \ - "the comment above the `url` stanza is unnecessary".freeze + "the comment above the `url` stanza is unnecessary" def on_cask(cask_block) @cask_block = cask_block diff --git a/Library/Homebrew/rubocops/cask/homepage_url_trailing_slash.rb b/Library/Homebrew/rubocops/cask/homepage_url_trailing_slash.rb index 267ecad2ce..ab7f0987a2 100644 --- a/Library/Homebrew/rubocops/cask/homepage_url_trailing_slash.rb +++ b/Library/Homebrew/rubocops/cask/homepage_url_trailing_slash.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "forwardable" require "uri" @@ -9,7 +11,7 @@ module RuboCop class HomepageUrlTrailingSlash < Cop include OnHomepageStanza - MSG_NO_SLASH = "'%{url}' must have a slash after the domain.".freeze + MSG_NO_SLASH = "'%{url}' must have a slash after the domain." def on_homepage_stanza(stanza) url_node = stanza.stanza_node.first_argument diff --git a/Library/Homebrew/rubocops/cask/mixin/cask_help.rb b/Library/Homebrew/rubocops/cask/mixin/cask_help.rb index a8ffea470e..9dc0800c9c 100644 --- a/Library/Homebrew/rubocops/cask/mixin/cask_help.rb +++ b/Library/Homebrew/rubocops/cask/mixin/cask_help.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module RuboCop module Cop module Cask diff --git a/Library/Homebrew/rubocops/cask/mixin/on_homepage_stanza.rb b/Library/Homebrew/rubocops/cask/mixin/on_homepage_stanza.rb index 0656bcb525..24d65737c3 100644 --- a/Library/Homebrew/rubocops/cask/mixin/on_homepage_stanza.rb +++ b/Library/Homebrew/rubocops/cask/mixin/on_homepage_stanza.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module RuboCop module Cop module Cask diff --git a/Library/Homebrew/rubocops/cask/no_dsl_version.rb b/Library/Homebrew/rubocops/cask/no_dsl_version.rb index ba6dc3f2c9..8fcdd44351 100644 --- a/Library/Homebrew/rubocops/cask/no_dsl_version.rb +++ b/Library/Homebrew/rubocops/cask/no_dsl_version.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "forwardable" module RuboCop @@ -19,7 +21,7 @@ module RuboCop extend Forwardable include CaskHelp - MESSAGE = "Use `%{preferred}` instead of `%{current}`".freeze + MESSAGE = "Use `%{preferred}` instead of `%{current}`" def on_cask(cask_block) @cask_header = cask_block.header diff --git a/Library/Homebrew/rubocops/cask/stanza_grouping.rb b/Library/Homebrew/rubocops/cask/stanza_grouping.rb index 279e3d06b0..631d2c7e2a 100644 --- a/Library/Homebrew/rubocops/cask/stanza_grouping.rb +++ b/Library/Homebrew/rubocops/cask/stanza_grouping.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "forwardable" module RuboCop @@ -12,10 +14,10 @@ module RuboCop include RangeHelp MISSING_LINE_MSG = "stanza groups should be separated by a single " \ - "empty line".freeze + "empty line" EXTRA_LINE_MSG = "stanzas within the same group should have no lines " \ - "between them".freeze + "between them" def on_cask(cask_block) @cask_block = cask_block diff --git a/Library/Homebrew/rubocops/cask/stanza_order.rb b/Library/Homebrew/rubocops/cask/stanza_order.rb index 0de2e88b72..0c960e843f 100644 --- a/Library/Homebrew/rubocops/cask/stanza_order.rb +++ b/Library/Homebrew/rubocops/cask/stanza_order.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "forwardable" module RuboCop @@ -10,7 +12,7 @@ module RuboCop extend Forwardable include CaskHelp - MESSAGE = "`%{stanza}` stanza out of order".freeze + MESSAGE = "`%{stanza}` stanza out of order" def on_cask(cask_block) @cask_block = cask_block diff --git a/Library/Homebrew/rubocops/caveats.rb b/Library/Homebrew/rubocops/caveats.rb index 6b6550a6e5..09233e48ea 100644 --- a/Library/Homebrew/rubocops/caveats.rb +++ b/Library/Homebrew/rubocops/caveats.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/extend/formula" module RuboCop diff --git a/Library/Homebrew/rubocops/checksum.rb b/Library/Homebrew/rubocops/checksum.rb index 3eb213eba8..4feff95e1a 100644 --- a/Library/Homebrew/rubocops/checksum.rb +++ b/Library/Homebrew/rubocops/checksum.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/extend/formula" module RuboCop diff --git a/Library/Homebrew/rubocops/class.rb b/Library/Homebrew/rubocops/class.rb index bba73ea672..ab5edf01b1 100644 --- a/Library/Homebrew/rubocops/class.rb +++ b/Library/Homebrew/rubocops/class.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/extend/formula" module RuboCop diff --git a/Library/Homebrew/rubocops/components_order.rb b/Library/Homebrew/rubocops/components_order.rb index c60a4c49fe..709f0fa1bf 100644 --- a/Library/Homebrew/rubocops/components_order.rb +++ b/Library/Homebrew/rubocops/components_order.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/extend/formula" module RuboCop diff --git a/Library/Homebrew/rubocops/components_redundancy.rb b/Library/Homebrew/rubocops/components_redundancy.rb index 1a192d178c..d0d6298d50 100644 --- a/Library/Homebrew/rubocops/components_redundancy.rb +++ b/Library/Homebrew/rubocops/components_redundancy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/extend/formula" module RuboCop @@ -11,9 +13,9 @@ module RuboCop # - `stable do` should not be present without a `head` or `devel` spec class ComponentsRedundancy < FormulaCop - HEAD_MSG = "`head` and `head do` should not be simultaneously present".freeze - BOTTLE_MSG = "`bottle :modifier` and `bottle do` should not be simultaneously present".freeze - STABLE_MSG = "`stable do` should not be present without a `head` or `devel` spec".freeze + HEAD_MSG = "`head` and `head do` should not be simultaneously present" + BOTTLE_MSG = "`bottle :modifier` and `bottle do` should not be simultaneously present" + STABLE_MSG = "`stable do` should not be present without a `head` or `devel` spec" def audit_formula(_node, _class_node, _parent_class_node, body_node) stable_block = find_block(body_node, :stable) diff --git a/Library/Homebrew/rubocops/conflicts.rb b/Library/Homebrew/rubocops/conflicts.rb index 6dfe46901a..ce7385c427 100644 --- a/Library/Homebrew/rubocops/conflicts.rb +++ b/Library/Homebrew/rubocops/conflicts.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/extend/formula" require "extend/string" @@ -7,7 +9,7 @@ module RuboCop # This cop audits versioned Formulae for `conflicts_with`. class Conflicts < FormulaCop MSG = "Versioned formulae should not use `conflicts_with`. " \ - "Use `keg_only :versioned_formula` instead.".freeze + "Use `keg_only :versioned_formula` instead." WHITELIST = %w[ bash-completion@ diff --git a/Library/Homebrew/rubocops/dependency_order.rb b/Library/Homebrew/rubocops/dependency_order.rb index 1b7fac34a5..1b70f67213 100644 --- a/Library/Homebrew/rubocops/dependency_order.rb +++ b/Library/Homebrew/rubocops/dependency_order.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/extend/formula" module RuboCop diff --git a/Library/Homebrew/rubocops/extend/formula.rb b/Library/Homebrew/rubocops/extend/formula.rb index 4db4eff872..41ea92d2d1 100644 --- a/Library/Homebrew/rubocops/extend/formula.rb +++ b/Library/Homebrew/rubocops/extend/formula.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Silence compatibility warning. begin old_verbosity = $VERBOSE diff --git a/Library/Homebrew/rubocops/formula_desc.rb b/Library/Homebrew/rubocops/formula_desc.rb index ba5608cce4..ee6673b0d9 100644 --- a/Library/Homebrew/rubocops/formula_desc.rb +++ b/Library/Homebrew/rubocops/formula_desc.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/extend/formula" require "extend/string" diff --git a/Library/Homebrew/rubocops/homepage.rb b/Library/Homebrew/rubocops/homepage.rb index 8038e786c2..53f06405c9 100644 --- a/Library/Homebrew/rubocops/homepage.rb +++ b/Library/Homebrew/rubocops/homepage.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/extend/formula" module RuboCop diff --git a/Library/Homebrew/rubocops/lines.rb b/Library/Homebrew/rubocops/lines.rb index 718f5f8061..3e9f8a9cc5 100644 --- a/Library/Homebrew/rubocops/lines.rb +++ b/Library/Homebrew/rubocops/lines.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/extend/formula" module RuboCop diff --git a/Library/Homebrew/rubocops/options.rb b/Library/Homebrew/rubocops/options.rb index a5a0c5e870..665803212f 100644 --- a/Library/Homebrew/rubocops/options.rb +++ b/Library/Homebrew/rubocops/options.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/extend/formula" module RuboCop @@ -5,11 +7,11 @@ module RuboCop module FormulaAudit # This cop audits `options` in Formulae. class Options < FormulaCop - DEPRECATION_MSG = "macOS has been 64-bit only since 10.6 so 32-bit options are deprecated.".freeze - UNI_DEPRECATION_MSG = "macOS has been 64-bit only since 10.6 so universal options are deprecated.".freeze + DEPRECATION_MSG = "macOS has been 64-bit only since 10.6 so 32-bit options are deprecated." + UNI_DEPRECATION_MSG = "macOS has been 64-bit only since 10.6 so universal options are deprecated." - DEP_OPTION = "Formulae should not use `deprecated_option`".freeze - OPTION = "Formulae should not have an `option`".freeze + DEP_OPTION = "Formulae should not use `deprecated_option`" + OPTION = "Formulae should not have an `option`" def audit_formula(_node, _class_node, _parent_class_node, body_node) option_call_nodes = find_every_method_call_by_name(body_node, :option) diff --git a/Library/Homebrew/rubocops/patches.rb b/Library/Homebrew/rubocops/patches.rb index 7e912fd306..c5494b0377 100644 --- a/Library/Homebrew/rubocops/patches.rb +++ b/Library/Homebrew/rubocops/patches.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/extend/formula" require "extend/string" diff --git a/Library/Homebrew/rubocops/rubocop-cask.rb b/Library/Homebrew/rubocops/rubocop-cask.rb index f528e59b49..3af610ebef 100644 --- a/Library/Homebrew/rubocops/rubocop-cask.rb +++ b/Library/Homebrew/rubocops/rubocop-cask.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocop" require "rubocops/cask/constants/stanza" diff --git a/Library/Homebrew/rubocops/text.rb b/Library/Homebrew/rubocops/text.rb index 78cffd7115..482c1a0aac 100644 --- a/Library/Homebrew/rubocops/text.rb +++ b/Library/Homebrew/rubocops/text.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/extend/formula" module RuboCop diff --git a/Library/Homebrew/rubocops/urls.rb b/Library/Homebrew/rubocops/urls.rb index 83fb8798f0..774364d682 100644 --- a/Library/Homebrew/rubocops/urls.rb +++ b/Library/Homebrew/rubocops/urls.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/extend/formula" module RuboCop diff --git a/Library/Homebrew/sandbox.rb b/Library/Homebrew/sandbox.rb index 413347023f..2fd0ae13be 100644 --- a/Library/Homebrew/sandbox.rb +++ b/Library/Homebrew/sandbox.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + require "erb" require "tempfile" class Sandbox - SANDBOX_EXEC = "/usr/bin/sandbox-exec".freeze + SANDBOX_EXEC = "/usr/bin/sandbox-exec" def self.available? OS.mac? && File.executable?(SANDBOX_EXEC) @@ -150,7 +152,7 @@ class Sandbox end class SandboxProfile - SEATBELT_ERB = <<~ERB.freeze + SEATBELT_ERB = <<~ERB (version 1) (debug deny) ; log all denied operations to /var/log/system.log <%= rules.join("\n") %> diff --git a/Library/Homebrew/search.rb b/Library/Homebrew/search.rb index 8d6e8f0128..1da53e64a4 100644 --- a/Library/Homebrew/search.rb +++ b/Library/Homebrew/search.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "searchable" require "description_cache_store" diff --git a/Library/Homebrew/searchable.rb b/Library/Homebrew/searchable.rb index 72079b2161..05b00d98fe 100644 --- a/Library/Homebrew/searchable.rb +++ b/Library/Homebrew/searchable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Searchable def search(string_or_regex, &block) case string_or_regex diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb index 2e17a9882f..2ea629de8f 100644 --- a/Library/Homebrew/software_spec.rb +++ b/Library/Homebrew/software_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "resource" require "checksum" require "version" diff --git a/Library/Homebrew/style.rb b/Library/Homebrew/style.rb index f4d53e5a1b..a0b97c00b7 100644 --- a/Library/Homebrew/style.rb +++ b/Library/Homebrew/style.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Homebrew module Style module_function diff --git a/Library/Homebrew/system_command.rb b/Library/Homebrew/system_command.rb index fe2ca7dc46..e365ec1ab2 100644 --- a/Library/Homebrew/system_command.rb +++ b/Library/Homebrew/system_command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "open3" require "ostruct" require "plist" diff --git a/Library/Homebrew/system_config.rb b/Library/Homebrew/system_config.rb index 14ab93d0f5..50853070fa 100644 --- a/Library/Homebrew/system_config.rb +++ b/Library/Homebrew/system_config.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "hardware" require "software_spec" require "rexml/document" diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb index 28c3e6594f..b6a208a6d1 100644 --- a/Library/Homebrew/tab.rb +++ b/Library/Homebrew/tab.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cxxstdlib" require "ostruct" require "options" @@ -12,7 +14,7 @@ require "extend/cachable" class Tab < OpenStruct extend Cachable - FILENAME = "INSTALL_RECEIPT.json".freeze + FILENAME = "INSTALL_RECEIPT.json" # Instantiates a Tab for a new installation of a formula. def self.create(formula, compiler, stdlib) diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb index c395f94db5..0d9cacdb62 100644 --- a/Library/Homebrew/tap.rb +++ b/Library/Homebrew/tap.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "extend/cachable" require "readall" require "description_cache_store" diff --git a/Library/Homebrew/tap_constants.rb b/Library/Homebrew/tap_constants.rb index 0c6bd3adcd..c375ba8dc8 100644 --- a/Library/Homebrew/tap_constants.rb +++ b/Library/Homebrew/tap_constants.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # match taps' formulae, e.g. someuser/sometap/someformula HOMEBREW_TAP_FORMULA_REGEX = %r{^([\w-]+)/([\w-]+)/([\w+-.@]+)$}.freeze # match taps' casks, e.g. someuser/sometap/somecask diff --git a/Library/Homebrew/test.rb b/Library/Homebrew/test.rb index 92ab9dce30..11ed7f37b3 100644 --- a/Library/Homebrew/test.rb +++ b/Library/Homebrew/test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + old_trap = trap("INT") { exit! 130 } require "global" diff --git a/Library/Homebrew/test/ARGV_spec.rb b/Library/Homebrew/test/ARGV_spec.rb index 04944c4a10..868240a1c3 100644 --- a/Library/Homebrew/test/ARGV_spec.rb +++ b/Library/Homebrew/test/ARGV_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "extend/ARGV" describe HomebrewArgvExtension do diff --git a/Library/Homebrew/test/ENV_spec.rb b/Library/Homebrew/test/ENV_spec.rb index 050cfb2bef..726479c648 100644 --- a/Library/Homebrew/test/ENV_spec.rb +++ b/Library/Homebrew/test/ENV_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "extend/ENV" shared_examples EnvActivation do diff --git a/Library/Homebrew/test/PATH_spec.rb b/Library/Homebrew/test/PATH_spec.rb index db5df9b44f..eda4461f64 100644 --- a/Library/Homebrew/test/PATH_spec.rb +++ b/Library/Homebrew/test/PATH_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "PATH" describe PATH do diff --git a/Library/Homebrew/test/bash_spec.rb b/Library/Homebrew/test/bash_spec.rb index 60ce8416ac..b3b552249e 100644 --- a/Library/Homebrew/test/bash_spec.rb +++ b/Library/Homebrew/test/bash_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "open3" describe "Bash" do diff --git a/Library/Homebrew/test/bottle_filename_spec.rb b/Library/Homebrew/test/bottle_filename_spec.rb index 6ad205c135..f7db07f96e 100644 --- a/Library/Homebrew/test/bottle_filename_spec.rb +++ b/Library/Homebrew/test/bottle_filename_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "software_spec" diff --git a/Library/Homebrew/test/build_environment_spec.rb b/Library/Homebrew/test/build_environment_spec.rb index 0675b6aaeb..e5bc95da36 100644 --- a/Library/Homebrew/test/build_environment_spec.rb +++ b/Library/Homebrew/test/build_environment_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "build_environment" describe BuildEnvironment do diff --git a/Library/Homebrew/test/build_options_spec.rb b/Library/Homebrew/test/build_options_spec.rb index 8c60e128ec..fc034eaa29 100644 --- a/Library/Homebrew/test/build_options_spec.rb +++ b/Library/Homebrew/test/build_options_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "build_options" require "options" diff --git a/Library/Homebrew/test/cache_store_spec.rb b/Library/Homebrew/test/cache_store_spec.rb index fb0fbcb0ab..8981b741be 100644 --- a/Library/Homebrew/test/cache_store_spec.rb +++ b/Library/Homebrew/test/cache_store_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cache_store" describe CacheStoreDatabase do diff --git a/Library/Homebrew/test/cask/artifact/alt_target_spec.rb b/Library/Homebrew/test/cask/artifact/alt_target_spec.rb index b2808c420d..3fdbe36cbd 100644 --- a/Library/Homebrew/test/cask/artifact/alt_target_spec.rb +++ b/Library/Homebrew/test/cask/artifact/alt_target_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::Artifact::App, :cask do describe "activate to alternate target" do let(:cask) { Cask::CaskLoader.load(cask_path("with-alt-target")) } diff --git a/Library/Homebrew/test/cask/artifact/app_spec.rb b/Library/Homebrew/test/cask/artifact/app_spec.rb index 14917b4f42..0b318351db 100644 --- a/Library/Homebrew/test/cask/artifact/app_spec.rb +++ b/Library/Homebrew/test/cask/artifact/app_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::Artifact::App, :cask do let(:cask) { Cask::CaskLoader.load(cask_path("local-caffeine")) } let(:command) { SystemCommand } diff --git a/Library/Homebrew/test/cask/artifact/binary_spec.rb b/Library/Homebrew/test/cask/artifact/binary_spec.rb index 0aa60c38fe..d905e8d8f0 100644 --- a/Library/Homebrew/test/cask/artifact/binary_spec.rb +++ b/Library/Homebrew/test/cask/artifact/binary_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::Artifact::Binary, :cask do let(:cask) { Cask::CaskLoader.load(cask_path("with-binary")).tap do |cask| diff --git a/Library/Homebrew/test/cask/artifact/generic_artifact_spec.rb b/Library/Homebrew/test/cask/artifact/generic_artifact_spec.rb index 83fb55fc58..c15b878510 100644 --- a/Library/Homebrew/test/cask/artifact/generic_artifact_spec.rb +++ b/Library/Homebrew/test/cask/artifact/generic_artifact_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::Artifact::Artifact, :cask do let(:cask) { Cask::CaskLoader.load(cask_path("with-generic-artifact")) } diff --git a/Library/Homebrew/test/cask/artifact/installer_spec.rb b/Library/Homebrew/test/cask/artifact/installer_spec.rb index 68b0e24ed8..6bff500bbc 100644 --- a/Library/Homebrew/test/cask/artifact/installer_spec.rb +++ b/Library/Homebrew/test/cask/artifact/installer_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::Artifact::Installer, :cask do subject(:installer) { described_class.new(cask, **args) } diff --git a/Library/Homebrew/test/cask/artifact/pkg_spec.rb b/Library/Homebrew/test/cask/artifact/pkg_spec.rb index 9d3cf6f711..19087acd94 100644 --- a/Library/Homebrew/test/cask/artifact/pkg_spec.rb +++ b/Library/Homebrew/test/cask/artifact/pkg_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::Artifact::Pkg, :cask do let(:cask) { Cask::CaskLoader.load(cask_path("with-installable")) } let(:fake_system_command) { class_double(SystemCommand) } diff --git a/Library/Homebrew/test/cask/artifact/postflight_block_spec.rb b/Library/Homebrew/test/cask/artifact/postflight_block_spec.rb index 75c6d10d0b..52cd1bf0ca 100644 --- a/Library/Homebrew/test/cask/artifact/postflight_block_spec.rb +++ b/Library/Homebrew/test/cask/artifact/postflight_block_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::Artifact::PostflightBlock, :cask do describe "install_phase" do it "calls the specified block after installing, passing a Cask mini-dsl" do diff --git a/Library/Homebrew/test/cask/artifact/preflight_block_spec.rb b/Library/Homebrew/test/cask/artifact/preflight_block_spec.rb index 8d07807f07..7546690b0a 100644 --- a/Library/Homebrew/test/cask/artifact/preflight_block_spec.rb +++ b/Library/Homebrew/test/cask/artifact/preflight_block_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::Artifact::PreflightBlock, :cask do describe "install_phase" do it "calls the specified block before installing, passing a Cask mini-dsl" do diff --git a/Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb b/Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb index 3a80e6e905..d5b3c7a990 100644 --- a/Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb +++ b/Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "benchmark" shared_examples "#uninstall_phase or #zap_phase" do diff --git a/Library/Homebrew/test/cask/artifact/suite_spec.rb b/Library/Homebrew/test/cask/artifact/suite_spec.rb index 3f4a2d6dc8..7cf983f053 100644 --- a/Library/Homebrew/test/cask/artifact/suite_spec.rb +++ b/Library/Homebrew/test/cask/artifact/suite_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::Artifact::Suite, :cask do let(:cask) { Cask::CaskLoader.load(cask_path("with-suite")) } diff --git a/Library/Homebrew/test/cask/artifact/two_apps_correct_spec.rb b/Library/Homebrew/test/cask/artifact/two_apps_correct_spec.rb index 7381c832ba..200823abb0 100644 --- a/Library/Homebrew/test/cask/artifact/two_apps_correct_spec.rb +++ b/Library/Homebrew/test/cask/artifact/two_apps_correct_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::Artifact::App, :cask do describe "multiple apps" do let(:cask) { Cask::CaskLoader.load(cask_path("with-two-apps-correct")) } diff --git a/Library/Homebrew/test/cask/artifact/uninstall_no_zap_spec.rb b/Library/Homebrew/test/cask/artifact/uninstall_no_zap_spec.rb index 863db064e3..ae2cce3f91 100644 --- a/Library/Homebrew/test/cask/artifact/uninstall_no_zap_spec.rb +++ b/Library/Homebrew/test/cask/artifact/uninstall_no_zap_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::Artifact::Zap, :cask do let(:cask) { Cask::CaskLoader.load(cask_path("with-installable")) } diff --git a/Library/Homebrew/test/cask/artifact/uninstall_spec.rb b/Library/Homebrew/test/cask/artifact/uninstall_spec.rb index 5d5a70c704..8996884ff7 100644 --- a/Library/Homebrew/test/cask/artifact/uninstall_spec.rb +++ b/Library/Homebrew/test/cask/artifact/uninstall_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples/uninstall_zap" describe Cask::Artifact::Uninstall, :cask do diff --git a/Library/Homebrew/test/cask/artifact/zap_spec.rb b/Library/Homebrew/test/cask/artifact/zap_spec.rb index 15122dda81..3c942ef57a 100644 --- a/Library/Homebrew/test/cask/artifact/zap_spec.rb +++ b/Library/Homebrew/test/cask/artifact/zap_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples/uninstall_zap" describe Cask::Artifact::Zap, :cask do diff --git a/Library/Homebrew/test/cask/audit_spec.rb b/Library/Homebrew/test/cask/audit_spec.rb index 06f7db4d20..41c7dbf3ff 100644 --- a/Library/Homebrew/test/cask/audit_spec.rb +++ b/Library/Homebrew/test/cask/audit_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::Audit, :cask do def include_msg?(messages, msg) if msg.is_a?(Regexp) diff --git a/Library/Homebrew/test/cask/cask_loader/from__path_loader_spec.rb b/Library/Homebrew/test/cask/cask_loader/from__path_loader_spec.rb index ad9c85a68c..36de965054 100644 --- a/Library/Homebrew/test/cask/cask_loader/from__path_loader_spec.rb +++ b/Library/Homebrew/test/cask/cask_loader/from__path_loader_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::CaskLoader::FromPathLoader do describe "#load" do context "when the file does not contain a cask" do diff --git a/Library/Homebrew/test/cask/cask_loader/from_content_loader_spec.rb b/Library/Homebrew/test/cask/cask_loader/from_content_loader_spec.rb index 22f1b8530a..41836b9a1c 100644 --- a/Library/Homebrew/test/cask/cask_loader/from_content_loader_spec.rb +++ b/Library/Homebrew/test/cask/cask_loader/from_content_loader_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::CaskLoader::FromContentLoader do alias_matcher :be_able_to_load, :be_can_load diff --git a/Library/Homebrew/test/cask/cask_loader/from_uri_loader_spec.rb b/Library/Homebrew/test/cask/cask_loader/from_uri_loader_spec.rb index 1d919aba85..cb8e021523 100644 --- a/Library/Homebrew/test/cask/cask_loader/from_uri_loader_spec.rb +++ b/Library/Homebrew/test/cask/cask_loader/from_uri_loader_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::CaskLoader::FromURILoader do alias_matcher :be_able_to_load, :be_can_load diff --git a/Library/Homebrew/test/cask/cask_spec.rb b/Library/Homebrew/test/cask/cask_spec.rb index 5b0687925d..986b7561cb 100644 --- a/Library/Homebrew/test/cask/cask_spec.rb +++ b/Library/Homebrew/test/cask/cask_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::Cask, :cask do let(:cask) { described_class.new("versioned-cask") } diff --git a/Library/Homebrew/test/cask/cmd/audit_spec.rb b/Library/Homebrew/test/cask/cmd/audit_spec.rb index 529019b0ca..f8269b687c 100644 --- a/Library/Homebrew/test/cask/cmd/audit_spec.rb +++ b/Library/Homebrew/test/cask/cmd/audit_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples/invalid_option" describe Cask::Cmd::Audit, :cask do diff --git a/Library/Homebrew/test/cask/cmd/cat_spec.rb b/Library/Homebrew/test/cask/cmd/cat_spec.rb index 8d8a761d8f..5c424e6e67 100644 --- a/Library/Homebrew/test/cask/cmd/cat_spec.rb +++ b/Library/Homebrew/test/cask/cmd/cat_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples/requires_cask_token" require_relative "shared_examples/invalid_option" diff --git a/Library/Homebrew/test/cask/cmd/create_spec.rb b/Library/Homebrew/test/cask/cmd/create_spec.rb index 89fc13e813..2effe846c9 100644 --- a/Library/Homebrew/test/cask/cmd/create_spec.rb +++ b/Library/Homebrew/test/cask/cmd/create_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples/requires_cask_token" require_relative "shared_examples/invalid_option" diff --git a/Library/Homebrew/test/cask/cmd/doctor_spec.rb b/Library/Homebrew/test/cask/cmd/doctor_spec.rb index 90aa14c930..166808389d 100644 --- a/Library/Homebrew/test/cask/cmd/doctor_spec.rb +++ b/Library/Homebrew/test/cask/cmd/doctor_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples/invalid_option" describe Cask::Cmd::Doctor, :cask do diff --git a/Library/Homebrew/test/cask/cmd/edit_spec.rb b/Library/Homebrew/test/cask/cmd/edit_spec.rb index 2d5f2a9a1a..58f4d21e4f 100644 --- a/Library/Homebrew/test/cask/cmd/edit_spec.rb +++ b/Library/Homebrew/test/cask/cmd/edit_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples/requires_cask_token" require_relative "shared_examples/invalid_option" diff --git a/Library/Homebrew/test/cask/cmd/fetch_spec.rb b/Library/Homebrew/test/cask/cmd/fetch_spec.rb index 153f5bb42a..35ecf63318 100644 --- a/Library/Homebrew/test/cask/cmd/fetch_spec.rb +++ b/Library/Homebrew/test/cask/cmd/fetch_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples/requires_cask_token" require_relative "shared_examples/invalid_option" diff --git a/Library/Homebrew/test/cask/cmd/home_spec.rb b/Library/Homebrew/test/cask/cmd/home_spec.rb index be115715fb..2462b7c4f5 100644 --- a/Library/Homebrew/test/cask/cmd/home_spec.rb +++ b/Library/Homebrew/test/cask/cmd/home_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples/invalid_option" describe Cask::Cmd::Home, :cask do diff --git a/Library/Homebrew/test/cask/cmd/info_spec.rb b/Library/Homebrew/test/cask/cmd/info_spec.rb index e2a73c1036..2883ca2395 100644 --- a/Library/Homebrew/test/cask/cmd/info_spec.rb +++ b/Library/Homebrew/test/cask/cmd/info_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples/requires_cask_token" require_relative "shared_examples/invalid_option" diff --git a/Library/Homebrew/test/cask/cmd/install_spec.rb b/Library/Homebrew/test/cask/cmd/install_spec.rb index 1efe513b4c..a5b0adbf7b 100644 --- a/Library/Homebrew/test/cask/cmd/install_spec.rb +++ b/Library/Homebrew/test/cask/cmd/install_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples/requires_cask_token" require_relative "shared_examples/invalid_option" diff --git a/Library/Homebrew/test/cask/cmd/internal_stanza_spec.rb b/Library/Homebrew/test/cask/cmd/internal_stanza_spec.rb index 5ea9056739..a208adbfb3 100644 --- a/Library/Homebrew/test/cask/cmd/internal_stanza_spec.rb +++ b/Library/Homebrew/test/cask/cmd/internal_stanza_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::Cmd::InternalStanza, :cask do it "shows stanza of the Specified Cask" do command = described_class.new("homepage", "local-caffeine") diff --git a/Library/Homebrew/test/cask/cmd/list_spec.rb b/Library/Homebrew/test/cask/cmd/list_spec.rb index 7d63076e46..bc285acb7b 100644 --- a/Library/Homebrew/test/cask/cmd/list_spec.rb +++ b/Library/Homebrew/test/cask/cmd/list_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples/invalid_option" describe Cask::Cmd::List, :cask do diff --git a/Library/Homebrew/test/cask/cmd/options_spec.rb b/Library/Homebrew/test/cask/cmd/options_spec.rb index 0f254573f6..3c95f4bf3e 100644 --- a/Library/Homebrew/test/cask/cmd/options_spec.rb +++ b/Library/Homebrew/test/cask/cmd/options_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::Cmd, :cask do it "supports setting the appdir" do described_class.new.process_options("help", "--appdir=/some/path/foo") diff --git a/Library/Homebrew/test/cask/cmd/outdated_spec.rb b/Library/Homebrew/test/cask/cmd/outdated_spec.rb index 23f2044624..57763d1deb 100644 --- a/Library/Homebrew/test/cask/cmd/outdated_spec.rb +++ b/Library/Homebrew/test/cask/cmd/outdated_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples/invalid_option" describe Cask::Cmd::Outdated, :cask do diff --git a/Library/Homebrew/test/cask/cmd/reinstall_spec.rb b/Library/Homebrew/test/cask/cmd/reinstall_spec.rb index e011e35b6c..dfc16d21f0 100644 --- a/Library/Homebrew/test/cask/cmd/reinstall_spec.rb +++ b/Library/Homebrew/test/cask/cmd/reinstall_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples/invalid_option" describe Cask::Cmd::Reinstall, :cask do diff --git a/Library/Homebrew/test/cask/cmd/shared_examples/invalid_option.rb b/Library/Homebrew/test/cask/cmd/shared_examples/invalid_option.rb index 12a05be922..467a1be08d 100644 --- a/Library/Homebrew/test/cask/cmd/shared_examples/invalid_option.rb +++ b/Library/Homebrew/test/cask/cmd/shared_examples/invalid_option.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + shared_examples "a command that handles invalid options" do context "when an invalid option is specified" do it "raises an exception when no Cask is specified" do diff --git a/Library/Homebrew/test/cask/cmd/shared_examples/requires_cask_token.rb b/Library/Homebrew/test/cask/cmd/shared_examples/requires_cask_token.rb index 8361270fbf..0e68acc85a 100644 --- a/Library/Homebrew/test/cask/cmd/shared_examples/requires_cask_token.rb +++ b/Library/Homebrew/test/cask/cmd/shared_examples/requires_cask_token.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + shared_examples "a command that requires a Cask token" do context "when no Cask is specified" do it "raises an exception " do diff --git a/Library/Homebrew/test/cask/cmd/style_spec.rb b/Library/Homebrew/test/cask/cmd/style_spec.rb index 336fa1140d..7e49ab3305 100644 --- a/Library/Homebrew/test/cask/cmd/style_spec.rb +++ b/Library/Homebrew/test/cask/cmd/style_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "open3" require "rubygems" diff --git a/Library/Homebrew/test/cask/cmd/uninstall_spec.rb b/Library/Homebrew/test/cask/cmd/uninstall_spec.rb index dc6a07e01d..a29977447e 100644 --- a/Library/Homebrew/test/cask/cmd/uninstall_spec.rb +++ b/Library/Homebrew/test/cask/cmd/uninstall_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples/requires_cask_token" require_relative "shared_examples/invalid_option" diff --git a/Library/Homebrew/test/cask/cmd/upgrade_spec.rb b/Library/Homebrew/test/cask/cmd/upgrade_spec.rb index 704c8ca3e0..503778eb15 100644 --- a/Library/Homebrew/test/cask/cmd/upgrade_spec.rb +++ b/Library/Homebrew/test/cask/cmd/upgrade_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples/invalid_option" describe Cask::Cmd::Upgrade, :cask do diff --git a/Library/Homebrew/test/cask/cmd/zap_spec.rb b/Library/Homebrew/test/cask/cmd/zap_spec.rb index fd646477e8..66d90c58a3 100644 --- a/Library/Homebrew/test/cask/cmd/zap_spec.rb +++ b/Library/Homebrew/test/cask/cmd/zap_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples/requires_cask_token" require_relative "shared_examples/invalid_option" diff --git a/Library/Homebrew/test/cask/cmd_spec.rb b/Library/Homebrew/test/cask/cmd_spec.rb index ee2a68fd46..1674d0e6ae 100644 --- a/Library/Homebrew/test/cask/cmd_spec.rb +++ b/Library/Homebrew/test/cask/cmd_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::Cmd, :cask do it "lists the taps for Casks that show up in two taps" do listing = described_class.nice_listing(%w[ diff --git a/Library/Homebrew/test/cask/config_spec.rb b/Library/Homebrew/test/cask/config_spec.rb index f160104bbe..f7cc6aebc0 100644 --- a/Library/Homebrew/test/cask/config_spec.rb +++ b/Library/Homebrew/test/cask/config_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::Config, :cask do subject(:config) { described_class.new } diff --git a/Library/Homebrew/test/cask/conflicts_with_spec.rb b/Library/Homebrew/test/cask/conflicts_with_spec.rb index 5a8a676336..059685af36 100644 --- a/Library/Homebrew/test/cask/conflicts_with_spec.rb +++ b/Library/Homebrew/test/cask/conflicts_with_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "conflicts_with", :cask do describe "conflicts_with cask" do let(:local_caffeine) { diff --git a/Library/Homebrew/test/cask/depends_on_spec.rb b/Library/Homebrew/test/cask/depends_on_spec.rb index 235c446e20..f8d679e6eb 100644 --- a/Library/Homebrew/test/cask/depends_on_spec.rb +++ b/Library/Homebrew/test/cask/depends_on_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # TODO: this test should be named after the corresponding class, once # that class is abstracted from installer.rb describe "Satisfy Dependencies and Requirements", :cask do diff --git a/Library/Homebrew/test/cask/dsl/appcast_spec.rb b/Library/Homebrew/test/cask/dsl/appcast_spec.rb index 437d72e56e..a3b1cf671c 100644 --- a/Library/Homebrew/test/cask/dsl/appcast_spec.rb +++ b/Library/Homebrew/test/cask/dsl/appcast_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/cask" describe Cask::DSL::Appcast do diff --git a/Library/Homebrew/test/cask/dsl/caveats_spec.rb b/Library/Homebrew/test/cask/dsl/caveats_spec.rb index f44e6ab7cc..8c7af89554 100644 --- a/Library/Homebrew/test/cask/dsl/caveats_spec.rb +++ b/Library/Homebrew/test/cask/dsl/caveats_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test/cask/dsl/shared_examples/base" describe Cask::DSL::Caveats, :cask do diff --git a/Library/Homebrew/test/cask/dsl/postflight_spec.rb b/Library/Homebrew/test/cask/dsl/postflight_spec.rb index 46479b55b6..2c0ea9a014 100644 --- a/Library/Homebrew/test/cask/dsl/postflight_spec.rb +++ b/Library/Homebrew/test/cask/dsl/postflight_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test/cask/dsl/shared_examples/base" require "test/cask/dsl/shared_examples/staged" diff --git a/Library/Homebrew/test/cask/dsl/preflight_spec.rb b/Library/Homebrew/test/cask/dsl/preflight_spec.rb index 2bcf1f6654..1bf38464a0 100644 --- a/Library/Homebrew/test/cask/dsl/preflight_spec.rb +++ b/Library/Homebrew/test/cask/dsl/preflight_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test/cask/dsl/shared_examples/base" require "test/cask/dsl/shared_examples/staged" diff --git a/Library/Homebrew/test/cask/dsl/shared_examples/base.rb b/Library/Homebrew/test/cask/dsl/shared_examples/base.rb index ccb425dd78..c46715d516 100644 --- a/Library/Homebrew/test/cask/dsl/shared_examples/base.rb +++ b/Library/Homebrew/test/cask/dsl/shared_examples/base.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/dsl/base" shared_examples Cask::DSL::Base do diff --git a/Library/Homebrew/test/cask/dsl/shared_examples/staged.rb b/Library/Homebrew/test/cask/dsl/shared_examples/staged.rb index 78e6ae5997..a4d29f84cf 100644 --- a/Library/Homebrew/test/cask/dsl/shared_examples/staged.rb +++ b/Library/Homebrew/test/cask/dsl/shared_examples/staged.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/staged" shared_examples Cask::Staged do diff --git a/Library/Homebrew/test/cask/dsl/uninstall_postflight_spec.rb b/Library/Homebrew/test/cask/dsl/uninstall_postflight_spec.rb index 14f02d4eb7..846cd90553 100644 --- a/Library/Homebrew/test/cask/dsl/uninstall_postflight_spec.rb +++ b/Library/Homebrew/test/cask/dsl/uninstall_postflight_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test/cask/dsl/shared_examples/base" describe Cask::DSL::UninstallPostflight, :cask do diff --git a/Library/Homebrew/test/cask/dsl/uninstall_preflight_spec.rb b/Library/Homebrew/test/cask/dsl/uninstall_preflight_spec.rb index 9e8db707af..f32679dd0b 100644 --- a/Library/Homebrew/test/cask/dsl/uninstall_preflight_spec.rb +++ b/Library/Homebrew/test/cask/dsl/uninstall_preflight_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test/cask/dsl/shared_examples/base" require "test/cask/dsl/shared_examples/staged" diff --git a/Library/Homebrew/test/cask/dsl/version_spec.rb b/Library/Homebrew/test/cask/dsl/version_spec.rb index ace2e09373..55271f0dd1 100644 --- a/Library/Homebrew/test/cask/dsl/version_spec.rb +++ b/Library/Homebrew/test/cask/dsl/version_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::DSL::Version, :cask do shared_examples "expectations hash" do |input_name, expectations| expectations.each do |input_value, expected_output| diff --git a/Library/Homebrew/test/cask/dsl_spec.rb b/Library/Homebrew/test/cask/dsl_spec.rb index d26f237e27..3e1de25e8d 100644 --- a/Library/Homebrew/test/cask/dsl_spec.rb +++ b/Library/Homebrew/test/cask/dsl_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::DSL, :cask do let(:cask) { Cask::CaskLoader.load(cask_path(token.to_s)) } let(:token) { "basic-cask" } diff --git a/Library/Homebrew/test/cask/installer_spec.rb b/Library/Homebrew/test/cask/installer_spec.rb index 4d2bad775b..1c77e811a8 100644 --- a/Library/Homebrew/test/cask/installer_spec.rb +++ b/Library/Homebrew/test/cask/installer_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::Installer, :cask do describe "install" do let(:empty_depends_on_stub) { diff --git a/Library/Homebrew/test/cask/macos_spec.rb b/Library/Homebrew/test/cask/macos_spec.rb index 2e385acd53..830f5d453b 100644 --- a/Library/Homebrew/test/cask/macos_spec.rb +++ b/Library/Homebrew/test/cask/macos_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe MacOS, :cask do it "says '/' is undeletable" do expect(MacOS).to be_undeletable( diff --git a/Library/Homebrew/test/cask/pkg_spec.rb b/Library/Homebrew/test/cask/pkg_spec.rb index e64de0d9fe..f3eccc97c9 100644 --- a/Library/Homebrew/test/cask/pkg_spec.rb +++ b/Library/Homebrew/test/cask/pkg_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::Pkg, :cask do describe "#uninstall" do let(:fake_system_command) { NeverSudoSystemCommand } diff --git a/Library/Homebrew/test/cask/quarantine_spec.rb b/Library/Homebrew/test/cask/quarantine_spec.rb index c46706b00b..684587bbdd 100644 --- a/Library/Homebrew/test/cask/quarantine_spec.rb +++ b/Library/Homebrew/test/cask/quarantine_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Cask::Quarantine, :cask do matcher :be_quarantined do match do |path| diff --git a/Library/Homebrew/test/cask/verify_spec.rb b/Library/Homebrew/test/cask/verify_spec.rb index e5589c4b51..f48f0c5d64 100644 --- a/Library/Homebrew/test/cask/verify_spec.rb +++ b/Library/Homebrew/test/cask/verify_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Cask describe Verify, :cask do describe "::all" do diff --git a/Library/Homebrew/test/caveats_spec.rb b/Library/Homebrew/test/caveats_spec.rb index ad260aebe4..ff010ff161 100644 --- a/Library/Homebrew/test/caveats_spec.rb +++ b/Library/Homebrew/test/caveats_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "caveats" diff --git a/Library/Homebrew/test/checksum_spec.rb b/Library/Homebrew/test/checksum_spec.rb index 89658c483a..7dc8945810 100644 --- a/Library/Homebrew/test/checksum_spec.rb +++ b/Library/Homebrew/test/checksum_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "checksum" describe Checksum do diff --git a/Library/Homebrew/test/checksum_verification_spec.rb b/Library/Homebrew/test/checksum_verification_spec.rb index 247f08688f..7f3109ca40 100644 --- a/Library/Homebrew/test/checksum_verification_spec.rb +++ b/Library/Homebrew/test/checksum_verification_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" describe Formula do diff --git a/Library/Homebrew/test/cleaner_spec.rb b/Library/Homebrew/test/cleaner_spec.rb index 62e4c36620..bba23b7b81 100644 --- a/Library/Homebrew/test/cleaner_spec.rb +++ b/Library/Homebrew/test/cleaner_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cleaner" require "formula" diff --git a/Library/Homebrew/test/cleanup_spec.rb b/Library/Homebrew/test/cleanup_spec.rb index 9b3df12c8c..ce6a0f21f9 100644 --- a/Library/Homebrew/test/cleanup_spec.rb +++ b/Library/Homebrew/test/cleanup_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test/support/fixtures/testball" require "cleanup" require "cask/cache" diff --git a/Library/Homebrew/test/cli/parser_spec.rb b/Library/Homebrew/test/cli/parser_spec.rb index fd911574a4..a0cfa8c5cf 100644 --- a/Library/Homebrew/test/cli/parser_spec.rb +++ b/Library/Homebrew/test/cli/parser_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "../../cli/parser" describe Homebrew::CLI::Parser do diff --git a/Library/Homebrew/test/cmd/--cache_spec.rb b/Library/Homebrew/test/cmd/--cache_spec.rb index 143f2e6e6d..d682565306 100644 --- a/Library/Homebrew/test/cmd/--cache_spec.rb +++ b/Library/Homebrew/test/cmd/--cache_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.__cache_args" do diff --git a/Library/Homebrew/test/cmd/--cellar_spec.rb b/Library/Homebrew/test/cmd/--cellar_spec.rb index fdfeb6b39d..5919a2f6a5 100644 --- a/Library/Homebrew/test/cmd/--cellar_spec.rb +++ b/Library/Homebrew/test/cmd/--cellar_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.__cellar_args" do diff --git a/Library/Homebrew/test/cmd/--env_spec.rb b/Library/Homebrew/test/cmd/--env_spec.rb index 270e602f7f..2f94f13100 100644 --- a/Library/Homebrew/test/cmd/--env_spec.rb +++ b/Library/Homebrew/test/cmd/--env_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.__env_args" do diff --git a/Library/Homebrew/test/cmd/--prefix_spec.rb b/Library/Homebrew/test/cmd/--prefix_spec.rb index 5aec238653..51c34fe222 100644 --- a/Library/Homebrew/test/cmd/--prefix_spec.rb +++ b/Library/Homebrew/test/cmd/--prefix_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.__prefix_args" do diff --git a/Library/Homebrew/test/cmd/--repository_spec.rb b/Library/Homebrew/test/cmd/--repository_spec.rb index 6e56a114d7..a6d351d903 100644 --- a/Library/Homebrew/test/cmd/--repository_spec.rb +++ b/Library/Homebrew/test/cmd/--repository_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.__repository_args" do diff --git a/Library/Homebrew/test/cmd/--version_spec.rb b/Library/Homebrew/test/cmd/--version_spec.rb index 2fcd6b0b6e..3650b7d44b 100644 --- a/Library/Homebrew/test/cmd/--version_spec.rb +++ b/Library/Homebrew/test/cmd/--version_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.__version_args" do diff --git a/Library/Homebrew/test/cmd/analytics_spec.rb b/Library/Homebrew/test/cmd/analytics_spec.rb index 7671bdf931..82545513bc 100644 --- a/Library/Homebrew/test/cmd/analytics_spec.rb +++ b/Library/Homebrew/test/cmd/analytics_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.analytics_args" do diff --git a/Library/Homebrew/test/cmd/bundle_spec.rb b/Library/Homebrew/test/cmd/bundle_spec.rb index c2434254e2..61d7fb2251 100644 --- a/Library/Homebrew/test/cmd/bundle_spec.rb +++ b/Library/Homebrew/test/cmd/bundle_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "brew bundle", :integration_test, :needs_test_cmd_taps do describe "check" do it "checks if a Brewfile's dependencies are satisfied", :needs_network do diff --git a/Library/Homebrew/test/cmd/cask_spec.rb b/Library/Homebrew/test/cmd/cask_spec.rb index 0bc178cc59..675ac09e93 100644 --- a/Library/Homebrew/test/cmd/cask_spec.rb +++ b/Library/Homebrew/test/cmd/cask_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "brew cask", :integration_test, :needs_macos, :needs_network do describe "list" do it "returns a list of installed Casks" do diff --git a/Library/Homebrew/test/cmd/cat_spec.rb b/Library/Homebrew/test/cmd/cat_spec.rb index a79878eb97..2a9132e768 100644 --- a/Library/Homebrew/test/cmd/cat_spec.rb +++ b/Library/Homebrew/test/cmd/cat_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.cat_args" do diff --git a/Library/Homebrew/test/cmd/cleanup_spec.rb b/Library/Homebrew/test/cmd/cleanup_spec.rb index 9a5f53b274..a822752c3f 100644 --- a/Library/Homebrew/test/cmd/cleanup_spec.rb +++ b/Library/Homebrew/test/cmd/cleanup_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.cleanup_args" do diff --git a/Library/Homebrew/test/cmd/command_spec.rb b/Library/Homebrew/test/cmd/command_spec.rb index 83122f247b..1d71661f24 100644 --- a/Library/Homebrew/test/cmd/command_spec.rb +++ b/Library/Homebrew/test/cmd/command_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.command_args" do diff --git a/Library/Homebrew/test/cmd/commands_spec.rb b/Library/Homebrew/test/cmd/commands_spec.rb index 6c0ab0b67a..7091a345e0 100644 --- a/Library/Homebrew/test/cmd/commands_spec.rb +++ b/Library/Homebrew/test/cmd/commands_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/command" require "cmd/commands" require "fileutils" diff --git a/Library/Homebrew/test/cmd/config_spec.rb b/Library/Homebrew/test/cmd/config_spec.rb index c92a71c4be..2c454e14d5 100644 --- a/Library/Homebrew/test/cmd/config_spec.rb +++ b/Library/Homebrew/test/cmd/config_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.config_args" do diff --git a/Library/Homebrew/test/cmd/custom-external-command_spec.rb b/Library/Homebrew/test/cmd/custom-external-command_spec.rb index 7a4e6501de..b6aedd83ea 100644 --- a/Library/Homebrew/test/cmd/custom-external-command_spec.rb +++ b/Library/Homebrew/test/cmd/custom-external-command_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "brew custom-external-command", :integration_test do it "is supported" do mktmpdir do |path| diff --git a/Library/Homebrew/test/cmd/deps_spec.rb b/Library/Homebrew/test/cmd/deps_spec.rb index 50a30c5e11..8ec40bffbd 100644 --- a/Library/Homebrew/test/cmd/deps_spec.rb +++ b/Library/Homebrew/test/cmd/deps_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "brew deps", :integration_test do it "outputs all of a Formula's dependencies and their dependencies on separate lines" do setup_test_formula "foo" diff --git a/Library/Homebrew/test/cmd/desc_spec.rb b/Library/Homebrew/test/cmd/desc_spec.rb index c820faa8d4..3564842262 100644 --- a/Library/Homebrew/test/cmd/desc_spec.rb +++ b/Library/Homebrew/test/cmd/desc_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.desc_args" do diff --git a/Library/Homebrew/test/cmd/diy_spec.rb b/Library/Homebrew/test/cmd/diy_spec.rb index 914cd3f40f..5168cf5522 100644 --- a/Library/Homebrew/test/cmd/diy_spec.rb +++ b/Library/Homebrew/test/cmd/diy_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.diy_args" do diff --git a/Library/Homebrew/test/cmd/doctor_spec.rb b/Library/Homebrew/test/cmd/doctor_spec.rb index 4e3803232b..eea6caab79 100644 --- a/Library/Homebrew/test/cmd/doctor_spec.rb +++ b/Library/Homebrew/test/cmd/doctor_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.doctor_args" do diff --git a/Library/Homebrew/test/cmd/fetch_spec.rb b/Library/Homebrew/test/cmd/fetch_spec.rb index 599360dc3f..a49cbfd8ee 100644 --- a/Library/Homebrew/test/cmd/fetch_spec.rb +++ b/Library/Homebrew/test/cmd/fetch_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.fetch_args" do diff --git a/Library/Homebrew/test/cmd/gist-logs_spec.rb b/Library/Homebrew/test/cmd/gist-logs_spec.rb index 848780f70e..490373c7d2 100644 --- a/Library/Homebrew/test/cmd/gist-logs_spec.rb +++ b/Library/Homebrew/test/cmd/gist-logs_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.gist_logs_args" do diff --git a/Library/Homebrew/test/cmd/help_spec.rb b/Library/Homebrew/test/cmd/help_spec.rb index 04b7d53c18..b94d8a7ef1 100644 --- a/Library/Homebrew/test/cmd/help_spec.rb +++ b/Library/Homebrew/test/cmd/help_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "brew", :integration_test do describe "help" do it "prints help for a documented Ruby command" do diff --git a/Library/Homebrew/test/cmd/home_spec.rb b/Library/Homebrew/test/cmd/home_spec.rb index 421fcdf9b1..15aee21eb2 100644 --- a/Library/Homebrew/test/cmd/home_spec.rb +++ b/Library/Homebrew/test/cmd/home_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.home_args" do diff --git a/Library/Homebrew/test/cmd/info_spec.rb b/Library/Homebrew/test/cmd/info_spec.rb index 35901269c2..acb131e839 100644 --- a/Library/Homebrew/test/cmd/info_spec.rb +++ b/Library/Homebrew/test/cmd/info_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/info" require "cmd/shared_examples/args_parse" diff --git a/Library/Homebrew/test/cmd/install_spec.rb b/Library/Homebrew/test/cmd/install_spec.rb index 217dba5026..0bc91c86c5 100644 --- a/Library/Homebrew/test/cmd/install_spec.rb +++ b/Library/Homebrew/test/cmd/install_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.install_args" do diff --git a/Library/Homebrew/test/cmd/leaves_spec.rb b/Library/Homebrew/test/cmd/leaves_spec.rb index ea6960641b..ee56b3cbe5 100644 --- a/Library/Homebrew/test/cmd/leaves_spec.rb +++ b/Library/Homebrew/test/cmd/leaves_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.leaves_args" do diff --git a/Library/Homebrew/test/cmd/link_spec.rb b/Library/Homebrew/test/cmd/link_spec.rb index 8460e05e29..f76b5a1d89 100644 --- a/Library/Homebrew/test/cmd/link_spec.rb +++ b/Library/Homebrew/test/cmd/link_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.link_args" do diff --git a/Library/Homebrew/test/cmd/list_spec.rb b/Library/Homebrew/test/cmd/list_spec.rb index c04c5890e2..e12a8522d1 100644 --- a/Library/Homebrew/test/cmd/list_spec.rb +++ b/Library/Homebrew/test/cmd/list_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.list_args" do diff --git a/Library/Homebrew/test/cmd/log_spec.rb b/Library/Homebrew/test/cmd/log_spec.rb index 31d91607b6..7ed48a2d1f 100644 --- a/Library/Homebrew/test/cmd/log_spec.rb +++ b/Library/Homebrew/test/cmd/log_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.log_args" do diff --git a/Library/Homebrew/test/cmd/migrate_spec.rb b/Library/Homebrew/test/cmd/migrate_spec.rb index a983d9e19d..8c8faee079 100644 --- a/Library/Homebrew/test/cmd/migrate_spec.rb +++ b/Library/Homebrew/test/cmd/migrate_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.migrate_args" do diff --git a/Library/Homebrew/test/cmd/missing_spec.rb b/Library/Homebrew/test/cmd/missing_spec.rb index 180df1b125..8f5a3382f0 100644 --- a/Library/Homebrew/test/cmd/missing_spec.rb +++ b/Library/Homebrew/test/cmd/missing_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.missing_args" do diff --git a/Library/Homebrew/test/cmd/options_spec.rb b/Library/Homebrew/test/cmd/options_spec.rb index 3a50bab974..655c3fa0ec 100644 --- a/Library/Homebrew/test/cmd/options_spec.rb +++ b/Library/Homebrew/test/cmd/options_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.options_args" do diff --git a/Library/Homebrew/test/cmd/outdated_spec.rb b/Library/Homebrew/test/cmd/outdated_spec.rb index 73f41e039a..54a6593285 100644 --- a/Library/Homebrew/test/cmd/outdated_spec.rb +++ b/Library/Homebrew/test/cmd/outdated_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.outdated_args" do diff --git a/Library/Homebrew/test/cmd/pin_spec.rb b/Library/Homebrew/test/cmd/pin_spec.rb index cc13874283..a34a3e21c8 100644 --- a/Library/Homebrew/test/cmd/pin_spec.rb +++ b/Library/Homebrew/test/cmd/pin_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.pin_args" do diff --git a/Library/Homebrew/test/cmd/postinstall_spec.rb b/Library/Homebrew/test/cmd/postinstall_spec.rb index cf6cd213f0..ed676f5588 100644 --- a/Library/Homebrew/test/cmd/postinstall_spec.rb +++ b/Library/Homebrew/test/cmd/postinstall_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.postinstall_args" do diff --git a/Library/Homebrew/test/cmd/readall_spec.rb b/Library/Homebrew/test/cmd/readall_spec.rb index 23772a9376..03f3b2ae5c 100644 --- a/Library/Homebrew/test/cmd/readall_spec.rb +++ b/Library/Homebrew/test/cmd/readall_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.readall_args" do diff --git a/Library/Homebrew/test/cmd/reinstall_spec.rb b/Library/Homebrew/test/cmd/reinstall_spec.rb index d2361e93af..45b5a48ffb 100644 --- a/Library/Homebrew/test/cmd/reinstall_spec.rb +++ b/Library/Homebrew/test/cmd/reinstall_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "extend/ENV" require "cmd/shared_examples/args_parse" diff --git a/Library/Homebrew/test/cmd/search_spec.rb b/Library/Homebrew/test/cmd/search_spec.rb index c6e4f33614..40932a5c43 100644 --- a/Library/Homebrew/test/cmd/search_spec.rb +++ b/Library/Homebrew/test/cmd/search_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/search" require "cmd/shared_examples/args_parse" diff --git a/Library/Homebrew/test/cmd/services_spec.rb b/Library/Homebrew/test/cmd/services_spec.rb index 669e84e5f8..decee40faf 100644 --- a/Library/Homebrew/test/cmd/services_spec.rb +++ b/Library/Homebrew/test/cmd/services_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "brew services", :integration_test, :needs_macos, :needs_network do it "allows controlling services" do setup_remote_tap "homebrew/services" diff --git a/Library/Homebrew/test/cmd/sh_spec.rb b/Library/Homebrew/test/cmd/sh_spec.rb index 97bf92ce19..52000a549d 100644 --- a/Library/Homebrew/test/cmd/sh_spec.rb +++ b/Library/Homebrew/test/cmd/sh_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.sh_args" do diff --git a/Library/Homebrew/test/cmd/shared_examples/args_parse.rb b/Library/Homebrew/test/cmd/shared_examples/args_parse.rb index b95b5eb9b5..6230b9e43b 100644 --- a/Library/Homebrew/test/cmd/shared_examples/args_parse.rb +++ b/Library/Homebrew/test/cmd/shared_examples/args_parse.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + shared_examples "parseable arguments" do subject(:method_name) do |example| example.metadata[:example_group][:parent_example_group][:description] diff --git a/Library/Homebrew/test/cmd/style_spec.rb b/Library/Homebrew/test/cmd/style_spec.rb index cd71be0321..7e42891345 100644 --- a/Library/Homebrew/test/cmd/style_spec.rb +++ b/Library/Homebrew/test/cmd/style_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/style" require "cmd/shared_examples/args_parse" diff --git a/Library/Homebrew/test/cmd/switch_spec.rb b/Library/Homebrew/test/cmd/switch_spec.rb index b7903256c8..d50f993e47 100644 --- a/Library/Homebrew/test/cmd/switch_spec.rb +++ b/Library/Homebrew/test/cmd/switch_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.switch_args" do diff --git a/Library/Homebrew/test/cmd/tap-info_spec.rb b/Library/Homebrew/test/cmd/tap-info_spec.rb index 61e493c1ac..d03ca17843 100644 --- a/Library/Homebrew/test/cmd/tap-info_spec.rb +++ b/Library/Homebrew/test/cmd/tap-info_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.tap_info_args" do diff --git a/Library/Homebrew/test/cmd/tap_spec.rb b/Library/Homebrew/test/cmd/tap_spec.rb index d635c903be..69f43ae84a 100644 --- a/Library/Homebrew/test/cmd/tap_spec.rb +++ b/Library/Homebrew/test/cmd/tap_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.tap_args" do diff --git a/Library/Homebrew/test/cmd/uninstall_spec.rb b/Library/Homebrew/test/cmd/uninstall_spec.rb index 6cc0510fe7..696be790e3 100644 --- a/Library/Homebrew/test/cmd/uninstall_spec.rb +++ b/Library/Homebrew/test/cmd/uninstall_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/uninstall" require "cmd/shared_examples/args_parse" diff --git a/Library/Homebrew/test/cmd/unlink_spec.rb b/Library/Homebrew/test/cmd/unlink_spec.rb index 7d38c37414..1489393165 100644 --- a/Library/Homebrew/test/cmd/unlink_spec.rb +++ b/Library/Homebrew/test/cmd/unlink_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.unlink_args" do diff --git a/Library/Homebrew/test/cmd/unpack_spec.rb b/Library/Homebrew/test/cmd/unpack_spec.rb index 3ddeedb45a..0a0c27eeef 100644 --- a/Library/Homebrew/test/cmd/unpack_spec.rb +++ b/Library/Homebrew/test/cmd/unpack_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.unpack_args" do diff --git a/Library/Homebrew/test/cmd/unpin_spec.rb b/Library/Homebrew/test/cmd/unpin_spec.rb index d5c4766fd6..be3faa7c85 100644 --- a/Library/Homebrew/test/cmd/unpin_spec.rb +++ b/Library/Homebrew/test/cmd/unpin_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.unpin_args" do diff --git a/Library/Homebrew/test/cmd/untap_spec.rb b/Library/Homebrew/test/cmd/untap_spec.rb index caef63c58b..9e2568597f 100644 --- a/Library/Homebrew/test/cmd/untap_spec.rb +++ b/Library/Homebrew/test/cmd/untap_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.untap_args" do diff --git a/Library/Homebrew/test/cmd/update-report_spec.rb b/Library/Homebrew/test/cmd/update-report_spec.rb index 6442c19ff1..d073534313 100644 --- a/Library/Homebrew/test/cmd/update-report_spec.rb +++ b/Library/Homebrew/test/cmd/update-report_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/update-report" require "formula_versions" require "yaml" diff --git a/Library/Homebrew/test/cmd/upgrade_spec.rb b/Library/Homebrew/test/cmd/upgrade_spec.rb index 3bc325d1ce..9f139fc059 100644 --- a/Library/Homebrew/test/cmd/upgrade_spec.rb +++ b/Library/Homebrew/test/cmd/upgrade_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.upgrade_args" do diff --git a/Library/Homebrew/test/cmd/uses_spec.rb b/Library/Homebrew/test/cmd/uses_spec.rb index b09027392d..8321777bab 100644 --- a/Library/Homebrew/test/cmd/uses_spec.rb +++ b/Library/Homebrew/test/cmd/uses_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.uses_args" do diff --git a/Library/Homebrew/test/compiler_failure_spec.rb b/Library/Homebrew/test/compiler_failure_spec.rb index ee71c1f64d..08763e33cb 100644 --- a/Library/Homebrew/test/compiler_failure_spec.rb +++ b/Library/Homebrew/test/compiler_failure_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "compilers" describe CompilerFailure do diff --git a/Library/Homebrew/test/compiler_selector_spec.rb b/Library/Homebrew/test/compiler_selector_spec.rb index 254fdefebf..f00c58addd 100644 --- a/Library/Homebrew/test/compiler_selector_spec.rb +++ b/Library/Homebrew/test/compiler_selector_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "compilers" require "software_spec" diff --git a/Library/Homebrew/test/cxxstdlib_spec.rb b/Library/Homebrew/test/cxxstdlib_spec.rb index ea1631a011..0cd0b2070d 100644 --- a/Library/Homebrew/test/cxxstdlib_spec.rb +++ b/Library/Homebrew/test/cxxstdlib_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "cxxstdlib" diff --git a/Library/Homebrew/test/dependable_spec.rb b/Library/Homebrew/test/dependable_spec.rb index 8ffc2506c7..2beb3c4570 100644 --- a/Library/Homebrew/test/dependable_spec.rb +++ b/Library/Homebrew/test/dependable_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "dependable" describe Dependable do diff --git a/Library/Homebrew/test/dependencies_spec.rb b/Library/Homebrew/test/dependencies_spec.rb index ed86cb630f..07da34497f 100644 --- a/Library/Homebrew/test/dependencies_spec.rb +++ b/Library/Homebrew/test/dependencies_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "dependencies" require "dependency" diff --git a/Library/Homebrew/test/dependency_collector_spec.rb b/Library/Homebrew/test/dependency_collector_spec.rb index b921286a94..d4af7885a8 100644 --- a/Library/Homebrew/test/dependency_collector_spec.rb +++ b/Library/Homebrew/test/dependency_collector_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "dependency_collector" describe DependencyCollector do diff --git a/Library/Homebrew/test/dependency_expansion_spec.rb b/Library/Homebrew/test/dependency_expansion_spec.rb index 16c37b9312..c3a1c4b7ea 100644 --- a/Library/Homebrew/test/dependency_expansion_spec.rb +++ b/Library/Homebrew/test/dependency_expansion_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "dependency" describe Dependency do diff --git a/Library/Homebrew/test/dependency_spec.rb b/Library/Homebrew/test/dependency_spec.rb index bc2fa813b1..ec772097ed 100644 --- a/Library/Homebrew/test/dependency_spec.rb +++ b/Library/Homebrew/test/dependency_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "dependency" describe Dependency do diff --git a/Library/Homebrew/test/description_cache_store_spec.rb b/Library/Homebrew/test/description_cache_store_spec.rb index d4aa1aa136..a5855a9cef 100644 --- a/Library/Homebrew/test/description_cache_store_spec.rb +++ b/Library/Homebrew/test/description_cache_store_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "description_cache_store" describe DescriptionCacheStore do diff --git a/Library/Homebrew/test/descriptions_spec.rb b/Library/Homebrew/test/descriptions_spec.rb index 9fe327fd0e..01aa00434e 100644 --- a/Library/Homebrew/test/descriptions_spec.rb +++ b/Library/Homebrew/test/descriptions_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "descriptions" describe Descriptions do diff --git a/Library/Homebrew/test/dev-cmd/audit_spec.rb b/Library/Homebrew/test/dev-cmd/audit_spec.rb index c8fd7b000e..246749f969 100644 --- a/Library/Homebrew/test/dev-cmd/audit_spec.rb +++ b/Library/Homebrew/test/dev-cmd/audit_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "dev-cmd/audit" require "formulary" require "cmd/shared_examples/args_parse" diff --git a/Library/Homebrew/test/dev-cmd/bottle_spec.rb b/Library/Homebrew/test/dev-cmd/bottle_spec.rb index 4180796ea1..1acbf44802 100644 --- a/Library/Homebrew/test/dev-cmd/bottle_spec.rb +++ b/Library/Homebrew/test/dev-cmd/bottle_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.bottle_args" do diff --git a/Library/Homebrew/test/dev-cmd/bump-formula-pr_spec.rb b/Library/Homebrew/test/dev-cmd/bump-formula-pr_spec.rb index 1ca0a2e5b1..9cdc95f9a3 100644 --- a/Library/Homebrew/test/dev-cmd/bump-formula-pr_spec.rb +++ b/Library/Homebrew/test/dev-cmd/bump-formula-pr_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.bump_formula_pr_args" do diff --git a/Library/Homebrew/test/dev-cmd/create_spec.rb b/Library/Homebrew/test/dev-cmd/create_spec.rb index 37d119c039..e4e98c2074 100644 --- a/Library/Homebrew/test/dev-cmd/create_spec.rb +++ b/Library/Homebrew/test/dev-cmd/create_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.create_args" do diff --git a/Library/Homebrew/test/dev-cmd/edit_spec.rb b/Library/Homebrew/test/dev-cmd/edit_spec.rb index da9f7af210..df88019fa5 100644 --- a/Library/Homebrew/test/dev-cmd/edit_spec.rb +++ b/Library/Homebrew/test/dev-cmd/edit_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.edit_args" do diff --git a/Library/Homebrew/test/dev-cmd/extract_spec.rb b/Library/Homebrew/test/dev-cmd/extract_spec.rb index abff3d6d20..169f078073 100644 --- a/Library/Homebrew/test/dev-cmd/extract_spec.rb +++ b/Library/Homebrew/test/dev-cmd/extract_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.extract_args" do diff --git a/Library/Homebrew/test/dev-cmd/formula_spec.rb b/Library/Homebrew/test/dev-cmd/formula_spec.rb index f64817194c..d9e96bc7b9 100644 --- a/Library/Homebrew/test/dev-cmd/formula_spec.rb +++ b/Library/Homebrew/test/dev-cmd/formula_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.formula_args" do diff --git a/Library/Homebrew/test/dev-cmd/irb_spec.rb b/Library/Homebrew/test/dev-cmd/irb_spec.rb index 291bdc161a..666374c879 100644 --- a/Library/Homebrew/test/dev-cmd/irb_spec.rb +++ b/Library/Homebrew/test/dev-cmd/irb_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.irb_args" do diff --git a/Library/Homebrew/test/dev-cmd/linkage_spec.rb b/Library/Homebrew/test/dev-cmd/linkage_spec.rb index 7a0ffa5980..f083b5cb66 100644 --- a/Library/Homebrew/test/dev-cmd/linkage_spec.rb +++ b/Library/Homebrew/test/dev-cmd/linkage_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.linkage_args" do diff --git a/Library/Homebrew/test/dev-cmd/man_spec.rb b/Library/Homebrew/test/dev-cmd/man_spec.rb index 5cb905678f..07eab3a255 100644 --- a/Library/Homebrew/test/dev-cmd/man_spec.rb +++ b/Library/Homebrew/test/dev-cmd/man_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.man_args" do diff --git a/Library/Homebrew/test/dev-cmd/mirror_spec.rb b/Library/Homebrew/test/dev-cmd/mirror_spec.rb index 2c11572bfc..4ad0dc02a4 100644 --- a/Library/Homebrew/test/dev-cmd/mirror_spec.rb +++ b/Library/Homebrew/test/dev-cmd/mirror_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.mirror_args" do diff --git a/Library/Homebrew/test/dev-cmd/prof_spec.rb b/Library/Homebrew/test/dev-cmd/prof_spec.rb index a3c39b5c5a..c2dc0b3d45 100644 --- a/Library/Homebrew/test/dev-cmd/prof_spec.rb +++ b/Library/Homebrew/test/dev-cmd/prof_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.prof_args" do diff --git a/Library/Homebrew/test/dev-cmd/pull_spec.rb b/Library/Homebrew/test/dev-cmd/pull_spec.rb index aaf11e71f6..926b660bc4 100644 --- a/Library/Homebrew/test/dev-cmd/pull_spec.rb +++ b/Library/Homebrew/test/dev-cmd/pull_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.pull_args" do diff --git a/Library/Homebrew/test/dev-cmd/release-notes_spec.rb b/Library/Homebrew/test/dev-cmd/release-notes_spec.rb index 973e2b0aa3..bbe9bff874 100644 --- a/Library/Homebrew/test/dev-cmd/release-notes_spec.rb +++ b/Library/Homebrew/test/dev-cmd/release-notes_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.release_notes_args" do diff --git a/Library/Homebrew/test/dev-cmd/ruby_spec.rb b/Library/Homebrew/test/dev-cmd/ruby_spec.rb index 0f65d6888a..42bb98c1fd 100644 --- a/Library/Homebrew/test/dev-cmd/ruby_spec.rb +++ b/Library/Homebrew/test/dev-cmd/ruby_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.ruby_args" do diff --git a/Library/Homebrew/test/dev-cmd/tap-new_spec.rb b/Library/Homebrew/test/dev-cmd/tap-new_spec.rb index 868650c7a4..316637c048 100644 --- a/Library/Homebrew/test/dev-cmd/tap-new_spec.rb +++ b/Library/Homebrew/test/dev-cmd/tap-new_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.tap_new_args" do diff --git a/Library/Homebrew/test/dev-cmd/test_spec.rb b/Library/Homebrew/test/dev-cmd/test_spec.rb index 8d6bb479ce..26f45c4218 100644 --- a/Library/Homebrew/test/dev-cmd/test_spec.rb +++ b/Library/Homebrew/test/dev-cmd/test_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.test_args" do diff --git a/Library/Homebrew/test/dev-cmd/vendor-gems_spec.rb b/Library/Homebrew/test/dev-cmd/vendor-gems_spec.rb index 3d75313397..ac08d29470 100644 --- a/Library/Homebrew/test/dev-cmd/vendor-gems_spec.rb +++ b/Library/Homebrew/test/dev-cmd/vendor-gems_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cmd/shared_examples/args_parse" describe "Homebrew.vendor_gems_args" do diff --git a/Library/Homebrew/test/diagnostic_checks_spec.rb b/Library/Homebrew/test/diagnostic_checks_spec.rb index 76ce1222db..8d75726c59 100644 --- a/Library/Homebrew/test/diagnostic_checks_spec.rb +++ b/Library/Homebrew/test/diagnostic_checks_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "diagnostic" describe Homebrew::Diagnostic::Checks do diff --git a/Library/Homebrew/test/download_strategies_spec.rb b/Library/Homebrew/test/download_strategies_spec.rb index 21df40c50d..615daa05f9 100644 --- a/Library/Homebrew/test/download_strategies_spec.rb +++ b/Library/Homebrew/test/download_strategies_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "download_strategy" describe AbstractDownloadStrategy do diff --git a/Library/Homebrew/test/emoji_spec.rb b/Library/Homebrew/test/emoji_spec.rb index f2aec7ad2d..4343c37d11 100644 --- a/Library/Homebrew/test/emoji_spec.rb +++ b/Library/Homebrew/test/emoji_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "emoji" describe Emoji do diff --git a/Library/Homebrew/test/error_during_execution_spec.rb b/Library/Homebrew/test/error_during_execution_spec.rb index bd3b96e6c6..513ff7a503 100644 --- a/Library/Homebrew/test/error_during_execution_spec.rb +++ b/Library/Homebrew/test/error_during_execution_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe ErrorDuringExecution do subject(:error) { described_class.new(command, status: status, output: output) } diff --git a/Library/Homebrew/test/exceptions_spec.rb b/Library/Homebrew/test/exceptions_spec.rb index 934a651d98..63bc8410b8 100644 --- a/Library/Homebrew/test/exceptions_spec.rb +++ b/Library/Homebrew/test/exceptions_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "exceptions" describe MultipleVersionsInstalledError do diff --git a/Library/Homebrew/test/formatter_spec.rb b/Library/Homebrew/test/formatter_spec.rb index 168b80ba8d..fb348213ac 100644 --- a/Library/Homebrew/test/formatter_spec.rb +++ b/Library/Homebrew/test/formatter_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "utils/formatter" require "utils/tty" diff --git a/Library/Homebrew/test/formula_installer_bottle_spec.rb b/Library/Homebrew/test/formula_installer_bottle_spec.rb index 30d19ca3fa..3560cc7f95 100644 --- a/Library/Homebrew/test/formula_installer_bottle_spec.rb +++ b/Library/Homebrew/test/formula_installer_bottle_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "formula_installer" require "keg" diff --git a/Library/Homebrew/test/formula_installer_spec.rb b/Library/Homebrew/test/formula_installer_spec.rb index dc4dc91170..682a665a5e 100644 --- a/Library/Homebrew/test/formula_installer_spec.rb +++ b/Library/Homebrew/test/formula_installer_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "formula_installer" require "keg" diff --git a/Library/Homebrew/test/formula_pin_spec.rb b/Library/Homebrew/test/formula_pin_spec.rb index b06c5eff95..03e83da672 100644 --- a/Library/Homebrew/test/formula_pin_spec.rb +++ b/Library/Homebrew/test/formula_pin_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula_pin" describe FormulaPin do diff --git a/Library/Homebrew/test/formula_spec.rb b/Library/Homebrew/test/formula_spec.rb index f51548aaa2..5e7e885f9a 100644 --- a/Library/Homebrew/test/formula_spec.rb +++ b/Library/Homebrew/test/formula_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test/support/fixtures/testball" require "formula" diff --git a/Library/Homebrew/test/formula_spec_selection_spec.rb b/Library/Homebrew/test/formula_spec_selection_spec.rb index 20231ffda2..98fb361718 100644 --- a/Library/Homebrew/test/formula_spec_selection_spec.rb +++ b/Library/Homebrew/test/formula_spec_selection_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" describe Formula do diff --git a/Library/Homebrew/test/formula_support_spec.rb b/Library/Homebrew/test/formula_support_spec.rb index 31fc879d89..d20fedddf5 100644 --- a/Library/Homebrew/test/formula_support_spec.rb +++ b/Library/Homebrew/test/formula_support_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula_support" describe KegOnlyReason do diff --git a/Library/Homebrew/test/formula_validation_spec.rb b/Library/Homebrew/test/formula_validation_spec.rb index ff50c86d12..53c679e8dc 100644 --- a/Library/Homebrew/test/formula_validation_spec.rb +++ b/Library/Homebrew/test/formula_validation_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" describe Formula do diff --git a/Library/Homebrew/test/formulary_spec.rb b/Library/Homebrew/test/formulary_spec.rb index 14df97fd41..326657456f 100644 --- a/Library/Homebrew/test/formulary_spec.rb +++ b/Library/Homebrew/test/formulary_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formula" require "formula_installer" require "utils/bottles" diff --git a/Library/Homebrew/test/hardware/cpu_spec.rb b/Library/Homebrew/test/hardware/cpu_spec.rb index c9b5829b2e..0a6f2101cc 100644 --- a/Library/Homebrew/test/hardware/cpu_spec.rb +++ b/Library/Homebrew/test/hardware/cpu_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "hardware" describe Hardware::CPU do diff --git a/Library/Homebrew/test/inreplace_spec.rb b/Library/Homebrew/test/inreplace_spec.rb index 896b19f5a5..0500e1ca49 100644 --- a/Library/Homebrew/test/inreplace_spec.rb +++ b/Library/Homebrew/test/inreplace_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "extend/string" require "tempfile" require "utils/inreplace" diff --git a/Library/Homebrew/test/java_requirement_spec.rb b/Library/Homebrew/test/java_requirement_spec.rb index 859c2d9fbb..f851136a0b 100644 --- a/Library/Homebrew/test/java_requirement_spec.rb +++ b/Library/Homebrew/test/java_requirement_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "requirements/java_requirement" describe JavaRequirement do diff --git a/Library/Homebrew/test/keg_spec.rb b/Library/Homebrew/test/keg_spec.rb index 3c06f5b1c7..2df44f9b1e 100644 --- a/Library/Homebrew/test/keg_spec.rb +++ b/Library/Homebrew/test/keg_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "keg" require "stringio" diff --git a/Library/Homebrew/test/language/go_spec.rb b/Library/Homebrew/test/language/go_spec.rb index 1625b7f78e..ac631f38cc 100644 --- a/Library/Homebrew/test/language/go_spec.rb +++ b/Library/Homebrew/test/language/go_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "language/go" describe Language::Go do diff --git a/Library/Homebrew/test/language/java_spec.rb b/Library/Homebrew/test/language/java_spec.rb index 32b6de1b6c..59d49e5e66 100644 --- a/Library/Homebrew/test/language/java_spec.rb +++ b/Library/Homebrew/test/language/java_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "language/java" describe Language::Java do diff --git a/Library/Homebrew/test/language/node_spec.rb b/Library/Homebrew/test/language/node_spec.rb index 7632a5dc07..0501297b7c 100644 --- a/Library/Homebrew/test/language/node_spec.rb +++ b/Library/Homebrew/test/language/node_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "language/node" describe Language::Node do diff --git a/Library/Homebrew/test/language/python_spec.rb b/Library/Homebrew/test/language/python_spec.rb index fb2b924251..a474e04da6 100644 --- a/Library/Homebrew/test/language/python_spec.rb +++ b/Library/Homebrew/test/language/python_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "language/python" require "resource" diff --git a/Library/Homebrew/test/lazy_object_spec.rb b/Library/Homebrew/test/lazy_object_spec.rb index 77e3f23f80..57ca637fa4 100644 --- a/Library/Homebrew/test/lazy_object_spec.rb +++ b/Library/Homebrew/test/lazy_object_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "lazy_object" describe LazyObject do diff --git a/Library/Homebrew/test/linkage_cache_store_spec.rb b/Library/Homebrew/test/linkage_cache_store_spec.rb index 0b1d6a8d7b..51dec2b1dc 100644 --- a/Library/Homebrew/test/linkage_cache_store_spec.rb +++ b/Library/Homebrew/test/linkage_cache_store_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "linkage_cache_store" describe LinkageCacheStore do diff --git a/Library/Homebrew/test/locale_spec.rb b/Library/Homebrew/test/locale_spec.rb index 819a2f2757..f761861348 100644 --- a/Library/Homebrew/test/locale_spec.rb +++ b/Library/Homebrew/test/locale_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "locale" describe Locale do diff --git a/Library/Homebrew/test/lock_file_spec.rb b/Library/Homebrew/test/lock_file_spec.rb index 82c47a70a7..f9e9496489 100644 --- a/Library/Homebrew/test/lock_file_spec.rb +++ b/Library/Homebrew/test/lock_file_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "lock_file" describe LockFile do diff --git a/Library/Homebrew/test/messages_spec.rb b/Library/Homebrew/test/messages_spec.rb index 527b35d23e..69a20b92e9 100644 --- a/Library/Homebrew/test/messages_spec.rb +++ b/Library/Homebrew/test/messages_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "messages" require "spec_helper" diff --git a/Library/Homebrew/test/migrator_spec.rb b/Library/Homebrew/test/migrator_spec.rb index f189e7a10b..e17a4bf440 100644 --- a/Library/Homebrew/test/migrator_spec.rb +++ b/Library/Homebrew/test/migrator_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "migrator" require "test/support/fixtures/testball" require "tab" diff --git a/Library/Homebrew/test/missing_formula_spec.rb b/Library/Homebrew/test/missing_formula_spec.rb index 8fd86c510d..30c21b09ae 100644 --- a/Library/Homebrew/test/missing_formula_spec.rb +++ b/Library/Homebrew/test/missing_formula_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "missing_formula" describe Homebrew::MissingFormula do diff --git a/Library/Homebrew/test/options_spec.rb b/Library/Homebrew/test/options_spec.rb index 770485cc83..b864fe662e 100644 --- a/Library/Homebrew/test/options_spec.rb +++ b/Library/Homebrew/test/options_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "options" describe Option do diff --git a/Library/Homebrew/test/os/linux/dependency_collector_spec.rb b/Library/Homebrew/test/os/linux/dependency_collector_spec.rb index 52f2d750bd..0bc48fc0da 100644 --- a/Library/Homebrew/test/os/linux/dependency_collector_spec.rb +++ b/Library/Homebrew/test/os/linux/dependency_collector_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "dependency_collector" describe DependencyCollector do diff --git a/Library/Homebrew/test/os/linux/diagnostic_spec.rb b/Library/Homebrew/test/os/linux/diagnostic_spec.rb index d5d85cc0fd..4c1b2cf5ac 100644 --- a/Library/Homebrew/test/os/linux/diagnostic_spec.rb +++ b/Library/Homebrew/test/os/linux/diagnostic_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "diagnostic" describe Homebrew::Diagnostic::Checks do diff --git a/Library/Homebrew/test/os/mac/dependency_collector_spec.rb b/Library/Homebrew/test/os/mac/dependency_collector_spec.rb index 90a23f3753..842cf3c5f0 100644 --- a/Library/Homebrew/test/os/mac/dependency_collector_spec.rb +++ b/Library/Homebrew/test/os/mac/dependency_collector_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "dependency_collector" describe DependencyCollector do diff --git a/Library/Homebrew/test/os/mac/diagnostic_spec.rb b/Library/Homebrew/test/os/mac/diagnostic_spec.rb index 91a94eb892..353a4e7b68 100644 --- a/Library/Homebrew/test/os/mac/diagnostic_spec.rb +++ b/Library/Homebrew/test/os/mac/diagnostic_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "diagnostic" describe Homebrew::Diagnostic::Checks do diff --git a/Library/Homebrew/test/os/mac/java_requirement_spec.rb b/Library/Homebrew/test/os/mac/java_requirement_spec.rb index afb17d7424..97c8606f90 100644 --- a/Library/Homebrew/test/os/mac/java_requirement_spec.rb +++ b/Library/Homebrew/test/os/mac/java_requirement_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "requirements/java_requirement" require "fileutils" diff --git a/Library/Homebrew/test/os/mac/keg_spec.rb b/Library/Homebrew/test/os/mac/keg_spec.rb index c1786f5d3a..b70068c953 100644 --- a/Library/Homebrew/test/os/mac/keg_spec.rb +++ b/Library/Homebrew/test/os/mac/keg_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "keg" describe Keg do diff --git a/Library/Homebrew/test/os/mac/mach_spec.rb b/Library/Homebrew/test/os/mac/mach_spec.rb index f07f45b780..c10a661f9a 100644 --- a/Library/Homebrew/test/os/mac/mach_spec.rb +++ b/Library/Homebrew/test/os/mac/mach_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "Mach-O Pathname tests" do specify "fat dylib" do pn = dylib_path("fat") diff --git a/Library/Homebrew/test/os/mac/version_spec.rb b/Library/Homebrew/test/os/mac/version_spec.rb index a74f541461..0901b0aae3 100644 --- a/Library/Homebrew/test/os/mac/version_spec.rb +++ b/Library/Homebrew/test/os/mac/version_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "version" require "os/mac/version" diff --git a/Library/Homebrew/test/os/mac_spec.rb b/Library/Homebrew/test/os/mac_spec.rb index 97f15dd610..dcb04a77a8 100644 --- a/Library/Homebrew/test/os/mac_spec.rb +++ b/Library/Homebrew/test/os/mac_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "locale" require "os/mac" diff --git a/Library/Homebrew/test/patch_spec.rb b/Library/Homebrew/test/patch_spec.rb index d29630c6b7..463894ff4c 100644 --- a/Library/Homebrew/test/patch_spec.rb +++ b/Library/Homebrew/test/patch_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "patch" describe Patch do diff --git a/Library/Homebrew/test/patching_spec.rb b/Library/Homebrew/test/patching_spec.rb index a03bae8ed3..b921bb5d76 100644 --- a/Library/Homebrew/test/patching_spec.rb +++ b/Library/Homebrew/test/patching_spec.rb @@ -1,15 +1,17 @@ +# frozen_string_literal: true + require "formula" describe "patching" do - TESTBALL_URL = "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz".freeze - TESTBALL_PATCHES_URL = "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1-patches.tgz".freeze - PATCH_URL_A = "file://#{TEST_FIXTURE_DIR}/patches/noop-a.diff".freeze - PATCH_URL_B = "file://#{TEST_FIXTURE_DIR}/patches/noop-b.diff".freeze + TESTBALL_URL = "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz" + TESTBALL_PATCHES_URL = "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1-patches.tgz" + PATCH_URL_A = "file://#{TEST_FIXTURE_DIR}/patches/noop-a.diff" + PATCH_URL_B = "file://#{TEST_FIXTURE_DIR}/patches/noop-b.diff" PATCH_A_CONTENTS = File.read("#{TEST_FIXTURE_DIR}/patches/noop-a.diff").freeze PATCH_B_CONTENTS = File.read("#{TEST_FIXTURE_DIR}/patches/noop-b.diff").freeze - APPLY_A = "noop-a.diff".freeze - APPLY_B = "noop-b.diff".freeze - APPLY_C = "noop-c.diff".freeze + APPLY_A = "noop-a.diff" + APPLY_B = "noop-b.diff" + APPLY_C = "noop-c.diff" def formula(name = "formula_name", path: Formulary.core_path(name), spec: :stable, alias_path: nil, &block) Class.new(Formula) { diff --git a/Library/Homebrew/test/pathname_spec.rb b/Library/Homebrew/test/pathname_spec.rb index 1967420212..454460796e 100644 --- a/Library/Homebrew/test/pathname_spec.rb +++ b/Library/Homebrew/test/pathname_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "extend/pathname" require "install_renamed" diff --git a/Library/Homebrew/test/pkg_version_spec.rb b/Library/Homebrew/test/pkg_version_spec.rb index b1cceb32ce..8e456ad623 100644 --- a/Library/Homebrew/test/pkg_version_spec.rb +++ b/Library/Homebrew/test/pkg_version_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "pkg_version" describe PkgVersion do diff --git a/Library/Homebrew/test/requirement_spec.rb b/Library/Homebrew/test/requirement_spec.rb index 43a3e34feb..e199ad7df4 100644 --- a/Library/Homebrew/test/requirement_spec.rb +++ b/Library/Homebrew/test/requirement_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "extend/ENV" require "requirement" diff --git a/Library/Homebrew/test/requirements/codesign_requirement_spec.rb b/Library/Homebrew/test/requirements/codesign_requirement_spec.rb index 5940c6d6f5..483104bce6 100644 --- a/Library/Homebrew/test/requirements/codesign_requirement_spec.rb +++ b/Library/Homebrew/test/requirements/codesign_requirement_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "requirements/codesign_requirement" describe CodesignRequirement do diff --git a/Library/Homebrew/test/requirements/java_requirement_spec.rb b/Library/Homebrew/test/requirements/java_requirement_spec.rb index 50e29b2091..969532d0c7 100644 --- a/Library/Homebrew/test/requirements/java_requirement_spec.rb +++ b/Library/Homebrew/test/requirements/java_requirement_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "requirements/java_requirement" describe JavaRequirement do diff --git a/Library/Homebrew/test/requirements/linux_requirement_spec.rb b/Library/Homebrew/test/requirements/linux_requirement_spec.rb index 3d456f1f1f..cb8d3a34d5 100644 --- a/Library/Homebrew/test/requirements/linux_requirement_spec.rb +++ b/Library/Homebrew/test/requirements/linux_requirement_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "requirements/linux_requirement" describe LinuxRequirement do diff --git a/Library/Homebrew/test/requirements/macos_requirement_spec.rb b/Library/Homebrew/test/requirements/macos_requirement_spec.rb index 7828e73185..71d080e557 100644 --- a/Library/Homebrew/test/requirements/macos_requirement_spec.rb +++ b/Library/Homebrew/test/requirements/macos_requirement_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "requirements/macos_requirement" describe MacOSRequirement do diff --git a/Library/Homebrew/test/requirements/osxfuse_requirement_spec.rb b/Library/Homebrew/test/requirements/osxfuse_requirement_spec.rb index 59a3553077..0737bd8e54 100644 --- a/Library/Homebrew/test/requirements/osxfuse_requirement_spec.rb +++ b/Library/Homebrew/test/requirements/osxfuse_requirement_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "requirements/osxfuse_requirement" describe OsxfuseRequirement do diff --git a/Library/Homebrew/test/requirements_spec.rb b/Library/Homebrew/test/requirements_spec.rb index 7ad7cb7f32..f20e7bc9ed 100644 --- a/Library/Homebrew/test/requirements_spec.rb +++ b/Library/Homebrew/test/requirements_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "requirements" describe Requirements do diff --git a/Library/Homebrew/test/resource_spec.rb b/Library/Homebrew/test/resource_spec.rb index 6bc514e631..fde2eacaca 100644 --- a/Library/Homebrew/test/resource_spec.rb +++ b/Library/Homebrew/test/resource_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "resource" describe Resource do diff --git a/Library/Homebrew/test/rubocop_spec.rb b/Library/Homebrew/test/rubocop_spec.rb index 64f86ad441..7ac9cd58a8 100644 --- a/Library/Homebrew/test/rubocop_spec.rb +++ b/Library/Homebrew/test/rubocop_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "open3" describe "RuboCop" do diff --git a/Library/Homebrew/test/rubocops/cask/homepage_matches_url_spec.rb b/Library/Homebrew/test/rubocops/cask/homepage_matches_url_spec.rb index c863e9e06a..05c32ba66c 100644 --- a/Library/Homebrew/test/rubocops/cask/homepage_matches_url_spec.rb +++ b/Library/Homebrew/test/rubocops/cask/homepage_matches_url_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/rubocop-cask" require "test/rubocops/cask/shared_examples/cask_cop" diff --git a/Library/Homebrew/test/rubocops/cask/homepage_url_trailing_slash_spec.rb b/Library/Homebrew/test/rubocops/cask/homepage_url_trailing_slash_spec.rb index 9eaf31f22d..81fea8a007 100644 --- a/Library/Homebrew/test/rubocops/cask/homepage_url_trailing_slash_spec.rb +++ b/Library/Homebrew/test/rubocops/cask/homepage_url_trailing_slash_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/rubocop-cask" require "test/rubocops/cask/shared_examples/cask_cop" diff --git a/Library/Homebrew/test/rubocops/cask/no_dsl_version_spec.rb b/Library/Homebrew/test/rubocops/cask/no_dsl_version_spec.rb index 30e32b47f0..9f52bd7bf2 100644 --- a/Library/Homebrew/test/rubocops/cask/no_dsl_version_spec.rb +++ b/Library/Homebrew/test/rubocops/cask/no_dsl_version_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/rubocop-cask" require "test/rubocops/cask/shared_examples/cask_cop" diff --git a/Library/Homebrew/test/rubocops/cask/shared_examples/cask_cop.rb b/Library/Homebrew/test/rubocops/cask/shared_examples/cask_cop.rb index 0da2c06b7b..3a11d6be0e 100644 --- a/Library/Homebrew/test/rubocops/cask/shared_examples/cask_cop.rb +++ b/Library/Homebrew/test/rubocops/cask/shared_examples/cask_cop.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module CaskCop shared_examples "does not report any offenses" do it "does not report any offenses" do diff --git a/Library/Homebrew/test/rubocops/cask/stanza_grouping_spec.rb b/Library/Homebrew/test/rubocops/cask/stanza_grouping_spec.rb index 6e34f7ffb7..c8a70a2865 100644 --- a/Library/Homebrew/test/rubocops/cask/stanza_grouping_spec.rb +++ b/Library/Homebrew/test/rubocops/cask/stanza_grouping_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/rubocop-cask" require "test/rubocops/cask/shared_examples/cask_cop" diff --git a/Library/Homebrew/test/rubocops/cask/stanza_order_spec.rb b/Library/Homebrew/test/rubocops/cask/stanza_order_spec.rb index a73f2ca3f1..7db8ab7272 100644 --- a/Library/Homebrew/test/rubocops/cask/stanza_order_spec.rb +++ b/Library/Homebrew/test/rubocops/cask/stanza_order_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/rubocop-cask" require "test/rubocops/cask/shared_examples/cask_cop" diff --git a/Library/Homebrew/test/rubocops/caveats_spec.rb b/Library/Homebrew/test/rubocops/caveats_spec.rb index c2b826630a..a19e8ab8f5 100644 --- a/Library/Homebrew/test/rubocops/caveats_spec.rb +++ b/Library/Homebrew/test/rubocops/caveats_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/caveats" describe RuboCop::Cop::FormulaAudit::Caveats do diff --git a/Library/Homebrew/test/rubocops/checksum_spec.rb b/Library/Homebrew/test/rubocops/checksum_spec.rb index 31206c9f5e..0d3f0e5420 100644 --- a/Library/Homebrew/test/rubocops/checksum_spec.rb +++ b/Library/Homebrew/test/rubocops/checksum_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/checksum" describe RuboCop::Cop::FormulaAudit::Checksum do diff --git a/Library/Homebrew/test/rubocops/class_spec.rb b/Library/Homebrew/test/rubocops/class_spec.rb index 070f6e9ab4..617e7204ef 100644 --- a/Library/Homebrew/test/rubocops/class_spec.rb +++ b/Library/Homebrew/test/rubocops/class_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/class" describe RuboCop::Cop::FormulaAudit::ClassName do diff --git a/Library/Homebrew/test/rubocops/components_order_spec.rb b/Library/Homebrew/test/rubocops/components_order_spec.rb index c47a85cc4d..3faa594424 100644 --- a/Library/Homebrew/test/rubocops/components_order_spec.rb +++ b/Library/Homebrew/test/rubocops/components_order_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/components_order" describe RuboCop::Cop::FormulaAudit::ComponentsOrder do diff --git a/Library/Homebrew/test/rubocops/components_redundancy_spec.rb b/Library/Homebrew/test/rubocops/components_redundancy_spec.rb index 9a1943e42e..30672ec9dc 100644 --- a/Library/Homebrew/test/rubocops/components_redundancy_spec.rb +++ b/Library/Homebrew/test/rubocops/components_redundancy_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/components_redundancy" describe RuboCop::Cop::FormulaAudit::ComponentsRedundancy do diff --git a/Library/Homebrew/test/rubocops/conflicts_spec.rb b/Library/Homebrew/test/rubocops/conflicts_spec.rb index 5e45e45934..db8fa42e57 100644 --- a/Library/Homebrew/test/rubocops/conflicts_spec.rb +++ b/Library/Homebrew/test/rubocops/conflicts_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/conflicts" describe RuboCop::Cop::FormulaAudit::Conflicts do diff --git a/Library/Homebrew/test/rubocops/dependency_order_spec.rb b/Library/Homebrew/test/rubocops/dependency_order_spec.rb index 0f76b7dcb7..c724b8956a 100644 --- a/Library/Homebrew/test/rubocops/dependency_order_spec.rb +++ b/Library/Homebrew/test/rubocops/dependency_order_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/dependency_order" describe RuboCop::Cop::FormulaAudit::DependencyOrder do diff --git a/Library/Homebrew/test/rubocops/formula_desc_spec.rb b/Library/Homebrew/test/rubocops/formula_desc_spec.rb index ed52c60897..9aa51fe936 100644 --- a/Library/Homebrew/test/rubocops/formula_desc_spec.rb +++ b/Library/Homebrew/test/rubocops/formula_desc_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/formula_desc" describe RuboCop::Cop::FormulaAudit::DescLength do diff --git a/Library/Homebrew/test/rubocops/homepage_spec.rb b/Library/Homebrew/test/rubocops/homepage_spec.rb index fd41e89fb2..284d501df3 100644 --- a/Library/Homebrew/test/rubocops/homepage_spec.rb +++ b/Library/Homebrew/test/rubocops/homepage_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/homepage" describe RuboCop::Cop::FormulaAudit::Homepage do diff --git a/Library/Homebrew/test/rubocops/lines_spec.rb b/Library/Homebrew/test/rubocops/lines_spec.rb index 193d2b8cda..2ad2497185 100644 --- a/Library/Homebrew/test/rubocops/lines_spec.rb +++ b/Library/Homebrew/test/rubocops/lines_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/lines" describe RuboCop::Cop::FormulaAudit::Lines do diff --git a/Library/Homebrew/test/rubocops/options_spec.rb b/Library/Homebrew/test/rubocops/options_spec.rb index a2eac92d8f..487724def4 100644 --- a/Library/Homebrew/test/rubocops/options_spec.rb +++ b/Library/Homebrew/test/rubocops/options_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/options" describe RuboCop::Cop::FormulaAudit::Options do diff --git a/Library/Homebrew/test/rubocops/patches_spec.rb b/Library/Homebrew/test/rubocops/patches_spec.rb index 81f382ecc7..efb899d946 100644 --- a/Library/Homebrew/test/rubocops/patches_spec.rb +++ b/Library/Homebrew/test/rubocops/patches_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/patches" describe RuboCop::Cop::FormulaAudit::Patches do diff --git a/Library/Homebrew/test/rubocops/text_spec.rb b/Library/Homebrew/test/rubocops/text_spec.rb index 39507ba0fb..8485c5c4fe 100644 --- a/Library/Homebrew/test/rubocops/text_spec.rb +++ b/Library/Homebrew/test/rubocops/text_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/text" describe RuboCop::Cop::FormulaAudit::Text do diff --git a/Library/Homebrew/test/rubocops/urls_spec.rb b/Library/Homebrew/test/rubocops/urls_spec.rb index 415ed10a79..90f1603279 100644 --- a/Library/Homebrew/test/rubocops/urls_spec.rb +++ b/Library/Homebrew/test/rubocops/urls_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rubocops/urls" describe RuboCop::Cop::FormulaAudit::Urls do diff --git a/Library/Homebrew/test/sandbox_spec.rb b/Library/Homebrew/test/sandbox_spec.rb index 965646c45d..d2e9694684 100644 --- a/Library/Homebrew/test/sandbox_spec.rb +++ b/Library/Homebrew/test/sandbox_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "sandbox" describe Sandbox do diff --git a/Library/Homebrew/test/search_spec.rb b/Library/Homebrew/test/search_spec.rb index ba44025dd7..0f3bfbe6a6 100644 --- a/Library/Homebrew/test/search_spec.rb +++ b/Library/Homebrew/test/search_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "search" describe Homebrew::Search do diff --git a/Library/Homebrew/test/searchable_spec.rb b/Library/Homebrew/test/searchable_spec.rb index 01f0d00be2..aaf88c2eaf 100644 --- a/Library/Homebrew/test/searchable_spec.rb +++ b/Library/Homebrew/test/searchable_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "searchable" describe Searchable do diff --git a/Library/Homebrew/test/software_spec_spec.rb b/Library/Homebrew/test/software_spec_spec.rb index a4e81f5db6..43293af2fc 100644 --- a/Library/Homebrew/test/software_spec_spec.rb +++ b/Library/Homebrew/test/software_spec_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "software_spec" describe SoftwareSpec do diff --git a/Library/Homebrew/test/spec_helper.rb b/Library/Homebrew/test/spec_helper.rb index 70b2b3d711..c67fd38c20 100644 --- a/Library/Homebrew/test/spec_helper.rb +++ b/Library/Homebrew/test/spec_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if ENV["HOMEBREW_TESTS_COVERAGE"] require "simplecov" diff --git a/Library/Homebrew/test/string_spec.rb b/Library/Homebrew/test/string_spec.rb index d698d35ef6..687cf559b3 100644 --- a/Library/Homebrew/test/string_spec.rb +++ b/Library/Homebrew/test/string_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "extend/string" describe StringInreplaceExtension do diff --git a/Library/Homebrew/test/support/fixtures/failball.rb b/Library/Homebrew/test/support/fixtures/failball.rb index 125452feca..439645df26 100644 --- a/Library/Homebrew/test/support/fixtures/failball.rb +++ b/Library/Homebrew/test/support/fixtures/failball.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Failball < Formula def initialize(name = "failball", path = Pathname.new(__FILE__).expand_path, spec = :stable, alias_path: nil) self.class.instance_eval do diff --git a/Library/Homebrew/test/support/fixtures/testball.rb b/Library/Homebrew/test/support/fixtures/testball.rb index ba725f51e1..c2d4aa2bbc 100644 --- a/Library/Homebrew/test/support/fixtures/testball.rb +++ b/Library/Homebrew/test/support/fixtures/testball.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Testball < Formula def initialize(name = "testball", path = Pathname.new(__FILE__).expand_path, spec = :stable, alias_path: nil) self.class.instance_eval do diff --git a/Library/Homebrew/test/support/fixtures/testball_bottle.rb b/Library/Homebrew/test/support/fixtures/testball_bottle.rb index 5a6be7c5fc..f6268ed4fc 100644 --- a/Library/Homebrew/test/support/fixtures/testball_bottle.rb +++ b/Library/Homebrew/test/support/fixtures/testball_bottle.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class TestballBottle < Formula def initialize(name = "testball_bottle", path = Pathname.new(__FILE__).expand_path, spec = :stable, alias_path: nil) self.class.instance_eval do diff --git a/Library/Homebrew/test/support/helper/cask/fake_system_command.rb b/Library/Homebrew/test/support/helper/cask/fake_system_command.rb index dafb8a6473..2f767ae9c9 100644 --- a/Library/Homebrew/test/support/helper/cask/fake_system_command.rb +++ b/Library/Homebrew/test/support/helper/cask/fake_system_command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + def sudo(*args) ["/usr/bin/sudo", "-E", "--"] + args.flatten end diff --git a/Library/Homebrew/test/support/helper/cask/install_helper.rb b/Library/Homebrew/test/support/helper/cask/install_helper.rb index eb206c0bd8..25ba7ea17a 100644 --- a/Library/Homebrew/test/support/helper/cask/install_helper.rb +++ b/Library/Homebrew/test/support/helper/cask/install_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module InstallHelper module_function diff --git a/Library/Homebrew/test/support/helper/cask/never_sudo_system_command.rb b/Library/Homebrew/test/support/helper/cask/never_sudo_system_command.rb index 7842d4b178..be2570a0c3 100644 --- a/Library/Homebrew/test/support/helper/cask/never_sudo_system_command.rb +++ b/Library/Homebrew/test/support/helper/cask/never_sudo_system_command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "system_command" class NeverSudoSystemCommand < SystemCommand diff --git a/Library/Homebrew/test/support/helper/fixtures.rb b/Library/Homebrew/test/support/helper/fixtures.rb index 460fb4aeff..fc5cf48c8c 100644 --- a/Library/Homebrew/test/support/helper/fixtures.rb +++ b/Library/Homebrew/test/support/helper/fixtures.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Test module Helper module Fixtures diff --git a/Library/Homebrew/test/support/helper/formula.rb b/Library/Homebrew/test/support/helper/formula.rb index 7f55f4b666..36fe7f2807 100644 --- a/Library/Homebrew/test/support/helper/formula.rb +++ b/Library/Homebrew/test/support/helper/formula.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "formulary" module Test diff --git a/Library/Homebrew/test/support/helper/integration_mocks.rb b/Library/Homebrew/test/support/helper/integration_mocks.rb index 6effb0cde1..2e4ec4b266 100644 --- a/Library/Homebrew/test/support/helper/integration_mocks.rb +++ b/Library/Homebrew/test/support/helper/integration_mocks.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Homebrew module Diagnostic class Checks diff --git a/Library/Homebrew/test/support/helper/mktmpdir.rb b/Library/Homebrew/test/support/helper/mktmpdir.rb index 651d08e541..6cb369c414 100644 --- a/Library/Homebrew/test/support/helper/mktmpdir.rb +++ b/Library/Homebrew/test/support/helper/mktmpdir.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Test module Helper module MkTmpDir diff --git a/Library/Homebrew/test/support/helper/output_as_tty.rb b/Library/Homebrew/test/support/helper/output_as_tty.rb index eb5d4c219b..ca7f4ca662 100644 --- a/Library/Homebrew/test/support/helper/output_as_tty.rb +++ b/Library/Homebrew/test/support/helper/output_as_tty.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "delegate" module Test diff --git a/Library/Homebrew/test/support/helper/spec/shared_context/homebrew_cask.rb b/Library/Homebrew/test/support/helper/spec/shared_context/homebrew_cask.rb index 60596a8997..21537b41cf 100644 --- a/Library/Homebrew/test/support/helper/spec/shared_context/homebrew_cask.rb +++ b/Library/Homebrew/test/support/helper/spec/shared_context/homebrew_cask.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cask/all" require "test/support/helper/cask/fake_system_command" diff --git a/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb b/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb index f79df38dd4..25a3dffc84 100644 --- a/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb +++ b/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "open3" require "formula_installer" diff --git a/Library/Homebrew/test/support/lib/config.rb b/Library/Homebrew/test/support/lib/config.rb index 126c66b6cc..b9cb738c95 100644 --- a/Library/Homebrew/test/support/lib/config.rb +++ b/Library/Homebrew/test/support/lib/config.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + raise "HOMEBREW_BREW_FILE was not exported! Please call bin/brew directly!" unless ENV["HOMEBREW_BREW_FILE"] require "pathname" @@ -34,13 +36,13 @@ HOMEBREW_TEMP = (HOMEBREW_PREFIX.parent/"temp").freeze TEST_FIXTURE_DIR = (HOMEBREW_LIBRARY_PATH/"test/support/fixtures").freeze -TESTBALL_SHA256 = "91e3f7930c98d7ccfb288e115ed52d06b0e5bc16fec7dce8bdda86530027067b".freeze -TESTBALL_PATCHES_SHA256 = "799c2d551ac5c3a5759bea7796631a7906a6a24435b52261a317133a0bfb34d9".freeze -PATCH_A_SHA256 = "83404f4936d3257e65f176c4ffb5a5b8d6edd644a21c8d8dcc73e22a6d28fcfa".freeze -PATCH_B_SHA256 = "57958271bb802a59452d0816e0670d16c8b70bdf6530bcf6f78726489ad89b90".freeze +TESTBALL_SHA256 = "91e3f7930c98d7ccfb288e115ed52d06b0e5bc16fec7dce8bdda86530027067b" +TESTBALL_PATCHES_SHA256 = "799c2d551ac5c3a5759bea7796631a7906a6a24435b52261a317133a0bfb34d9" +PATCH_A_SHA256 = "83404f4936d3257e65f176c4ffb5a5b8d6edd644a21c8d8dcc73e22a6d28fcfa" +PATCH_B_SHA256 = "57958271bb802a59452d0816e0670d16c8b70bdf6530bcf6f78726489ad89b90" -TEST_SHA1 = "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef".freeze -TEST_SHA256 = "deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef".freeze +TEST_SHA1 = "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef" +TEST_SHA256 = "deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" # For testing's sake always assume the default prefix module Homebrew diff --git a/Library/Homebrew/test/support/no_seed_progress_formatter.rb b/Library/Homebrew/test/support/no_seed_progress_formatter.rb index e87a58143c..d6199bd9a3 100644 --- a/Library/Homebrew/test/support/no_seed_progress_formatter.rb +++ b/Library/Homebrew/test/support/no_seed_progress_formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rspec/core/formatters/progress_formatter" class NoSeedProgressFormatter < RSpec::Core::Formatters::ProgressFormatter diff --git a/Library/Homebrew/test/system_command_result_spec.rb b/Library/Homebrew/test/system_command_result_spec.rb index 9d48d34258..c76cb5d6fa 100644 --- a/Library/Homebrew/test/system_command_result_spec.rb +++ b/Library/Homebrew/test/system_command_result_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "system_command" describe SystemCommand::Result do diff --git a/Library/Homebrew/test/system_command_spec.rb b/Library/Homebrew/test/system_command_spec.rb index aeef194d4e..56241ac33f 100644 --- a/Library/Homebrew/test/system_command_spec.rb +++ b/Library/Homebrew/test/system_command_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe SystemCommand do describe "#initialize" do subject(:command) { diff --git a/Library/Homebrew/test/tab_spec.rb b/Library/Homebrew/test/tab_spec.rb index b3ae241b88..bcb233ef2a 100644 --- a/Library/Homebrew/test/tab_spec.rb +++ b/Library/Homebrew/test/tab_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "tab" require "formula" diff --git a/Library/Homebrew/test/tap_spec.rb b/Library/Homebrew/test/tap_spec.rb index 56d6fc9a95..699fb52933 100644 --- a/Library/Homebrew/test/tap_spec.rb +++ b/Library/Homebrew/test/tap_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Tap do alias_matcher :have_formula_file, :be_formula_file alias_matcher :have_custom_remote, :be_custom_remote diff --git a/Library/Homebrew/test/unpack_strategy/bazaar_spec.rb b/Library/Homebrew/test/unpack_strategy/bazaar_spec.rb index dac93a05e9..434a76a948 100644 --- a/Library/Homebrew/test/unpack_strategy/bazaar_spec.rb +++ b/Library/Homebrew/test/unpack_strategy/bazaar_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples" describe UnpackStrategy::Bazaar do diff --git a/Library/Homebrew/test/unpack_strategy/bzip2_spec.rb b/Library/Homebrew/test/unpack_strategy/bzip2_spec.rb index 5bb2b5dc83..a81f15bab1 100644 --- a/Library/Homebrew/test/unpack_strategy/bzip2_spec.rb +++ b/Library/Homebrew/test/unpack_strategy/bzip2_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples" describe UnpackStrategy::Bzip2 do diff --git a/Library/Homebrew/test/unpack_strategy/cvs_spec.rb b/Library/Homebrew/test/unpack_strategy/cvs_spec.rb index b3addd4cbf..8eebf17da5 100644 --- a/Library/Homebrew/test/unpack_strategy/cvs_spec.rb +++ b/Library/Homebrew/test/unpack_strategy/cvs_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples" describe UnpackStrategy::Cvs do diff --git a/Library/Homebrew/test/unpack_strategy/directory_spec.rb b/Library/Homebrew/test/unpack_strategy/directory_spec.rb index f7ceedd679..1207454aec 100644 --- a/Library/Homebrew/test/unpack_strategy/directory_spec.rb +++ b/Library/Homebrew/test/unpack_strategy/directory_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples" describe UnpackStrategy::Directory do diff --git a/Library/Homebrew/test/unpack_strategy/dmg_spec.rb b/Library/Homebrew/test/unpack_strategy/dmg_spec.rb index a572ea3a08..8a3594f144 100644 --- a/Library/Homebrew/test/unpack_strategy/dmg_spec.rb +++ b/Library/Homebrew/test/unpack_strategy/dmg_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples" describe UnpackStrategy::Dmg, :needs_macos do diff --git a/Library/Homebrew/test/unpack_strategy/git_spec.rb b/Library/Homebrew/test/unpack_strategy/git_spec.rb index a499c8a796..738146a787 100644 --- a/Library/Homebrew/test/unpack_strategy/git_spec.rb +++ b/Library/Homebrew/test/unpack_strategy/git_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples" describe UnpackStrategy::Git do diff --git a/Library/Homebrew/test/unpack_strategy/gzip_spec.rb b/Library/Homebrew/test/unpack_strategy/gzip_spec.rb index 38d12c1737..ebf4a493bd 100644 --- a/Library/Homebrew/test/unpack_strategy/gzip_spec.rb +++ b/Library/Homebrew/test/unpack_strategy/gzip_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples" describe UnpackStrategy::Gzip do diff --git a/Library/Homebrew/test/unpack_strategy/jar_spec.rb b/Library/Homebrew/test/unpack_strategy/jar_spec.rb index 3b5f36ed97..f6da64b973 100644 --- a/Library/Homebrew/test/unpack_strategy/jar_spec.rb +++ b/Library/Homebrew/test/unpack_strategy/jar_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples" describe UnpackStrategy::Jar, :needs_unzip do diff --git a/Library/Homebrew/test/unpack_strategy/lha_spec.rb b/Library/Homebrew/test/unpack_strategy/lha_spec.rb index 7e70844a85..e24a60a655 100644 --- a/Library/Homebrew/test/unpack_strategy/lha_spec.rb +++ b/Library/Homebrew/test/unpack_strategy/lha_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples" describe UnpackStrategy::Lha do diff --git a/Library/Homebrew/test/unpack_strategy/lzip_spec.rb b/Library/Homebrew/test/unpack_strategy/lzip_spec.rb index 119eb213b2..a74b68add5 100644 --- a/Library/Homebrew/test/unpack_strategy/lzip_spec.rb +++ b/Library/Homebrew/test/unpack_strategy/lzip_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples" describe UnpackStrategy::Lzip do diff --git a/Library/Homebrew/test/unpack_strategy/mercurial_spec.rb b/Library/Homebrew/test/unpack_strategy/mercurial_spec.rb index edd22a5bbc..76a28e27b0 100644 --- a/Library/Homebrew/test/unpack_strategy/mercurial_spec.rb +++ b/Library/Homebrew/test/unpack_strategy/mercurial_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples" describe UnpackStrategy::Mercurial do diff --git a/Library/Homebrew/test/unpack_strategy/p7zip_spec.rb b/Library/Homebrew/test/unpack_strategy/p7zip_spec.rb index 33a56923f2..c612b13f03 100644 --- a/Library/Homebrew/test/unpack_strategy/p7zip_spec.rb +++ b/Library/Homebrew/test/unpack_strategy/p7zip_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples" describe UnpackStrategy::P7Zip do diff --git a/Library/Homebrew/test/unpack_strategy/rar_spec.rb b/Library/Homebrew/test/unpack_strategy/rar_spec.rb index 0f315b1746..5e5e593339 100644 --- a/Library/Homebrew/test/unpack_strategy/rar_spec.rb +++ b/Library/Homebrew/test/unpack_strategy/rar_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples" describe UnpackStrategy::Rar do diff --git a/Library/Homebrew/test/unpack_strategy/shared_examples.rb b/Library/Homebrew/test/unpack_strategy/shared_examples.rb index 285de1c3e2..6f3caa475c 100644 --- a/Library/Homebrew/test/unpack_strategy/shared_examples.rb +++ b/Library/Homebrew/test/unpack_strategy/shared_examples.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "unpack_strategy" shared_examples "UnpackStrategy::detect" do diff --git a/Library/Homebrew/test/unpack_strategy/subversion_spec.rb b/Library/Homebrew/test/unpack_strategy/subversion_spec.rb index cec416a324..dc818221b4 100644 --- a/Library/Homebrew/test/unpack_strategy/subversion_spec.rb +++ b/Library/Homebrew/test/unpack_strategy/subversion_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples" describe UnpackStrategy::Subversion, :needs_svn do diff --git a/Library/Homebrew/test/unpack_strategy/tar_spec.rb b/Library/Homebrew/test/unpack_strategy/tar_spec.rb index 0f748f5d63..ae11929b32 100644 --- a/Library/Homebrew/test/unpack_strategy/tar_spec.rb +++ b/Library/Homebrew/test/unpack_strategy/tar_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples" describe UnpackStrategy::Tar do diff --git a/Library/Homebrew/test/unpack_strategy/uncompressed_spec.rb b/Library/Homebrew/test/unpack_strategy/uncompressed_spec.rb index 9d08257126..8e8c5d9236 100644 --- a/Library/Homebrew/test/unpack_strategy/uncompressed_spec.rb +++ b/Library/Homebrew/test/unpack_strategy/uncompressed_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples" describe UnpackStrategy::Uncompressed do diff --git a/Library/Homebrew/test/unpack_strategy/xar_spec.rb b/Library/Homebrew/test/unpack_strategy/xar_spec.rb index 61257d3492..f4f11389d1 100644 --- a/Library/Homebrew/test/unpack_strategy/xar_spec.rb +++ b/Library/Homebrew/test/unpack_strategy/xar_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples" describe UnpackStrategy::Xar, :needs_macos do diff --git a/Library/Homebrew/test/unpack_strategy/xz_spec.rb b/Library/Homebrew/test/unpack_strategy/xz_spec.rb index 6374833a73..ffc41369ae 100644 --- a/Library/Homebrew/test/unpack_strategy/xz_spec.rb +++ b/Library/Homebrew/test/unpack_strategy/xz_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples" describe UnpackStrategy::Xz do diff --git a/Library/Homebrew/test/unpack_strategy/zip_spec.rb b/Library/Homebrew/test/unpack_strategy/zip_spec.rb index 774cf36fe4..c579fff51c 100644 --- a/Library/Homebrew/test/unpack_strategy/zip_spec.rb +++ b/Library/Homebrew/test/unpack_strategy/zip_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "shared_examples" describe UnpackStrategy::Zip do diff --git a/Library/Homebrew/test/unpack_strategy_spec.rb b/Library/Homebrew/test/unpack_strategy_spec.rb index 62bbc29ea0..bfcbc24216 100644 --- a/Library/Homebrew/test/unpack_strategy_spec.rb +++ b/Library/Homebrew/test/unpack_strategy_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe UnpackStrategy do describe "#extract_nestedly" do subject(:strategy) { described_class.detect(path) } diff --git a/Library/Homebrew/test/utils/analytics_spec.rb b/Library/Homebrew/test/utils/analytics_spec.rb index 29bdd04387..8827c80125 100644 --- a/Library/Homebrew/test/utils/analytics_spec.rb +++ b/Library/Homebrew/test/utils/analytics_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "utils/analytics" require "formula_installer" diff --git a/Library/Homebrew/test/utils/bottles/bintray_spec.rb b/Library/Homebrew/test/utils/bottles/bintray_spec.rb index a7dfc00eab..87a9a7c7ea 100644 --- a/Library/Homebrew/test/utils/bottles/bintray_spec.rb +++ b/Library/Homebrew/test/utils/bottles/bintray_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "utils/bottles" describe Utils::Bottles::Bintray do diff --git a/Library/Homebrew/test/utils/bottles/bottles_spec.rb b/Library/Homebrew/test/utils/bottles/bottles_spec.rb index fcaaa1db52..3cb3e76974 100644 --- a/Library/Homebrew/test/utils/bottles/bottles_spec.rb +++ b/Library/Homebrew/test/utils/bottles/bottles_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "utils/bottles" describe Utils::Bottles do diff --git a/Library/Homebrew/test/utils/bottles/collector_spec.rb b/Library/Homebrew/test/utils/bottles/collector_spec.rb index 98c3532bf9..2efdb01631 100644 --- a/Library/Homebrew/test/utils/bottles/collector_spec.rb +++ b/Library/Homebrew/test/utils/bottles/collector_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "utils/bottles" describe Utils::Bottles::Collector do diff --git a/Library/Homebrew/test/utils/curl_spec.rb b/Library/Homebrew/test/utils/curl_spec.rb index 3f143c638d..a6973aa192 100644 --- a/Library/Homebrew/test/utils/curl_spec.rb +++ b/Library/Homebrew/test/utils/curl_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "utils/curl" describe "curl" do diff --git a/Library/Homebrew/test/utils/fork_spec.rb b/Library/Homebrew/test/utils/fork_spec.rb index 0af9b8f3ae..fa1d27fb30 100644 --- a/Library/Homebrew/test/utils/fork_spec.rb +++ b/Library/Homebrew/test/utils/fork_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "utils/fork" describe Utils do diff --git a/Library/Homebrew/test/utils/git_spec.rb b/Library/Homebrew/test/utils/git_spec.rb index 9cb4206f04..4160c1587b 100644 --- a/Library/Homebrew/test/utils/git_spec.rb +++ b/Library/Homebrew/test/utils/git_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "utils/git" describe Git do diff --git a/Library/Homebrew/test/utils/github_spec.rb b/Library/Homebrew/test/utils/github_spec.rb index 6e4b0cd4b9..936ae03ae6 100644 --- a/Library/Homebrew/test/utils/github_spec.rb +++ b/Library/Homebrew/test/utils/github_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "utils/github" describe GitHub do diff --git a/Library/Homebrew/test/utils/popen_spec.rb b/Library/Homebrew/test/utils/popen_spec.rb index d1ae12d1c9..c3f6027cf7 100644 --- a/Library/Homebrew/test/utils/popen_spec.rb +++ b/Library/Homebrew/test/utils/popen_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "utils/popen" describe Utils do diff --git a/Library/Homebrew/test/utils/shell_spec.rb b/Library/Homebrew/test/utils/shell_spec.rb index f92afd4f26..b3a0ae8f7d 100644 --- a/Library/Homebrew/test/utils/shell_spec.rb +++ b/Library/Homebrew/test/utils/shell_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "utils/shell" describe Utils::Shell do diff --git a/Library/Homebrew/test/utils/svn_spec.rb b/Library/Homebrew/test/utils/svn_spec.rb index 69dd9565a1..af8b287579 100644 --- a/Library/Homebrew/test/utils/svn_spec.rb +++ b/Library/Homebrew/test/utils/svn_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "utils/svn" describe Utils do diff --git a/Library/Homebrew/test/utils/tty_spec.rb b/Library/Homebrew/test/utils/tty_spec.rb index 27d18e2849..32b259e2b8 100644 --- a/Library/Homebrew/test/utils/tty_spec.rb +++ b/Library/Homebrew/test/utils/tty_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Tty do describe "::strip_ansi" do it "removes ANSI escape codes from a string" do diff --git a/Library/Homebrew/test/utils/user_spec.rb b/Library/Homebrew/test/utils/user_spec.rb index 50d7ee42be..c26862dc41 100644 --- a/Library/Homebrew/test/utils/user_spec.rb +++ b/Library/Homebrew/test/utils/user_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "utils/user" describe User do diff --git a/Library/Homebrew/test/utils_spec.rb b/Library/Homebrew/test/utils_spec.rb index 7e6bb9dd2e..d27290ef47 100644 --- a/Library/Homebrew/test/utils_spec.rb +++ b/Library/Homebrew/test/utils_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "globally-scoped helper methods" do let(:dir) { mktmpdir } diff --git a/Library/Homebrew/test/version_spec.rb b/Library/Homebrew/test/version_spec.rb index 9edffeac3b..f5ae3cb65a 100644 --- a/Library/Homebrew/test/version_spec.rb +++ b/Library/Homebrew/test/version_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "version" describe Version do diff --git a/Library/Homebrew/test/x11_requirement_spec.rb b/Library/Homebrew/test/x11_requirement_spec.rb index 342394bb34..c4b9ce8ddd 100644 --- a/Library/Homebrew/test/x11_requirement_spec.rb +++ b/Library/Homebrew/test/x11_requirement_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "requirements/x11_requirement" describe X11Requirement do diff --git a/Library/Homebrew/unpack_strategy.rb b/Library/Homebrew/unpack_strategy.rb index 26c61e1569..8d56e405e3 100644 --- a/Library/Homebrew/unpack_strategy.rb +++ b/Library/Homebrew/unpack_strategy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UnpackStrategy module Magic # length of the longest regex (currently Tar) diff --git a/Library/Homebrew/unpack_strategy/bazaar.rb b/Library/Homebrew/unpack_strategy/bazaar.rb index 684a5cad28..fd3d1bd7a1 100644 --- a/Library/Homebrew/unpack_strategy/bazaar.rb +++ b/Library/Homebrew/unpack_strategy/bazaar.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "directory" module UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/bzip2.rb b/Library/Homebrew/unpack_strategy/bzip2.rb index 0a8e269259..fd9592d78f 100644 --- a/Library/Homebrew/unpack_strategy/bzip2.rb +++ b/Library/Homebrew/unpack_strategy/bzip2.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UnpackStrategy class Bzip2 include UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/cab.rb b/Library/Homebrew/unpack_strategy/cab.rb index f2510d087f..9de498ce03 100644 --- a/Library/Homebrew/unpack_strategy/cab.rb +++ b/Library/Homebrew/unpack_strategy/cab.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UnpackStrategy class Cab include UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/compress.rb b/Library/Homebrew/unpack_strategy/compress.rb index d435b9a599..cf9101f726 100644 --- a/Library/Homebrew/unpack_strategy/compress.rb +++ b/Library/Homebrew/unpack_strategy/compress.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "tar" module UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/cvs.rb b/Library/Homebrew/unpack_strategy/cvs.rb index 4ec2b03c23..7991c674cd 100644 --- a/Library/Homebrew/unpack_strategy/cvs.rb +++ b/Library/Homebrew/unpack_strategy/cvs.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "directory" module UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/directory.rb b/Library/Homebrew/unpack_strategy/directory.rb index cbfc75b54c..66353f279d 100644 --- a/Library/Homebrew/unpack_strategy/directory.rb +++ b/Library/Homebrew/unpack_strategy/directory.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UnpackStrategy class Directory include UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/dmg.rb b/Library/Homebrew/unpack_strategy/dmg.rb index 6130d9b426..085eec6176 100644 --- a/Library/Homebrew/unpack_strategy/dmg.rb +++ b/Library/Homebrew/unpack_strategy/dmg.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "tempfile" module UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/executable.rb b/Library/Homebrew/unpack_strategy/executable.rb index 3378bb6ff1..82a84e1448 100644 --- a/Library/Homebrew/unpack_strategy/executable.rb +++ b/Library/Homebrew/unpack_strategy/executable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "uncompressed" module UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/fossil.rb b/Library/Homebrew/unpack_strategy/fossil.rb index 3bcfbd4725..6b7a5d9310 100644 --- a/Library/Homebrew/unpack_strategy/fossil.rb +++ b/Library/Homebrew/unpack_strategy/fossil.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UnpackStrategy class Fossil include UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/generic_unar.rb b/Library/Homebrew/unpack_strategy/generic_unar.rb index a0c9fe40de..347dd6ac19 100644 --- a/Library/Homebrew/unpack_strategy/generic_unar.rb +++ b/Library/Homebrew/unpack_strategy/generic_unar.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UnpackStrategy class GenericUnar include UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/git.rb b/Library/Homebrew/unpack_strategy/git.rb index 2f5768ca54..4aefb640d3 100644 --- a/Library/Homebrew/unpack_strategy/git.rb +++ b/Library/Homebrew/unpack_strategy/git.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "directory" module UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/gzip.rb b/Library/Homebrew/unpack_strategy/gzip.rb index 930fed4ed0..5db11be724 100644 --- a/Library/Homebrew/unpack_strategy/gzip.rb +++ b/Library/Homebrew/unpack_strategy/gzip.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UnpackStrategy class Gzip include UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/jar.rb b/Library/Homebrew/unpack_strategy/jar.rb index 90d4f6485c..9827cc62c1 100644 --- a/Library/Homebrew/unpack_strategy/jar.rb +++ b/Library/Homebrew/unpack_strategy/jar.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "uncompressed" module UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/lha.rb b/Library/Homebrew/unpack_strategy/lha.rb index 2d92e65544..0527013208 100644 --- a/Library/Homebrew/unpack_strategy/lha.rb +++ b/Library/Homebrew/unpack_strategy/lha.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UnpackStrategy class Lha include UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/lua_rock.rb b/Library/Homebrew/unpack_strategy/lua_rock.rb index fe3d8f130b..70759c981e 100644 --- a/Library/Homebrew/unpack_strategy/lua_rock.rb +++ b/Library/Homebrew/unpack_strategy/lua_rock.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "uncompressed" module UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/lzip.rb b/Library/Homebrew/unpack_strategy/lzip.rb index 2a6792be16..121dea7a77 100644 --- a/Library/Homebrew/unpack_strategy/lzip.rb +++ b/Library/Homebrew/unpack_strategy/lzip.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UnpackStrategy class Lzip include UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/lzma.rb b/Library/Homebrew/unpack_strategy/lzma.rb index a611db87d9..257fb75984 100644 --- a/Library/Homebrew/unpack_strategy/lzma.rb +++ b/Library/Homebrew/unpack_strategy/lzma.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UnpackStrategy class Lzma include UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/mercurial.rb b/Library/Homebrew/unpack_strategy/mercurial.rb index 18088954d8..4799a5e0c1 100644 --- a/Library/Homebrew/unpack_strategy/mercurial.rb +++ b/Library/Homebrew/unpack_strategy/mercurial.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "directory" module UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/microsoft_office_xml.rb b/Library/Homebrew/unpack_strategy/microsoft_office_xml.rb index 50647869e2..869c0debbd 100644 --- a/Library/Homebrew/unpack_strategy/microsoft_office_xml.rb +++ b/Library/Homebrew/unpack_strategy/microsoft_office_xml.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "uncompressed" module UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/otf.rb b/Library/Homebrew/unpack_strategy/otf.rb index a540f7779f..ff4c20662b 100644 --- a/Library/Homebrew/unpack_strategy/otf.rb +++ b/Library/Homebrew/unpack_strategy/otf.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "uncompressed" module UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/p7zip.rb b/Library/Homebrew/unpack_strategy/p7zip.rb index 9241d9dc3e..6110a275bc 100644 --- a/Library/Homebrew/unpack_strategy/p7zip.rb +++ b/Library/Homebrew/unpack_strategy/p7zip.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UnpackStrategy class P7Zip include UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/pax.rb b/Library/Homebrew/unpack_strategy/pax.rb index c4194879f2..bd1fe0d1e7 100644 --- a/Library/Homebrew/unpack_strategy/pax.rb +++ b/Library/Homebrew/unpack_strategy/pax.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UnpackStrategy class Pax include UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/pkg.rb b/Library/Homebrew/unpack_strategy/pkg.rb index f837d4933c..10ae040241 100644 --- a/Library/Homebrew/unpack_strategy/pkg.rb +++ b/Library/Homebrew/unpack_strategy/pkg.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "uncompressed" module UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/rar.rb b/Library/Homebrew/unpack_strategy/rar.rb index 890c04460f..64604792a8 100644 --- a/Library/Homebrew/unpack_strategy/rar.rb +++ b/Library/Homebrew/unpack_strategy/rar.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UnpackStrategy class Rar include UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/self_extracting_executable.rb b/Library/Homebrew/unpack_strategy/self_extracting_executable.rb index a502cce547..298070fde3 100644 --- a/Library/Homebrew/unpack_strategy/self_extracting_executable.rb +++ b/Library/Homebrew/unpack_strategy/self_extracting_executable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "generic_unar" module UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/sit.rb b/Library/Homebrew/unpack_strategy/sit.rb index c719de4a04..9f537d64e8 100644 --- a/Library/Homebrew/unpack_strategy/sit.rb +++ b/Library/Homebrew/unpack_strategy/sit.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "generic_unar" module UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/subversion.rb b/Library/Homebrew/unpack_strategy/subversion.rb index 0a2f922ba9..c9dbfdc644 100644 --- a/Library/Homebrew/unpack_strategy/subversion.rb +++ b/Library/Homebrew/unpack_strategy/subversion.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "directory" module UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/tar.rb b/Library/Homebrew/unpack_strategy/tar.rb index 3ef8fe7b92..70c3198d34 100644 --- a/Library/Homebrew/unpack_strategy/tar.rb +++ b/Library/Homebrew/unpack_strategy/tar.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UnpackStrategy class Tar include UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/ttf.rb b/Library/Homebrew/unpack_strategy/ttf.rb index e5f0540c0b..c3107d6594 100644 --- a/Library/Homebrew/unpack_strategy/ttf.rb +++ b/Library/Homebrew/unpack_strategy/ttf.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "uncompressed" module UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/uncompressed.rb b/Library/Homebrew/unpack_strategy/uncompressed.rb index 4ce44acc3b..be11b25c26 100644 --- a/Library/Homebrew/unpack_strategy/uncompressed.rb +++ b/Library/Homebrew/unpack_strategy/uncompressed.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UnpackStrategy class Uncompressed include UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/xar.rb b/Library/Homebrew/unpack_strategy/xar.rb index ada4386d38..29d0e71783 100644 --- a/Library/Homebrew/unpack_strategy/xar.rb +++ b/Library/Homebrew/unpack_strategy/xar.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UnpackStrategy class Xar include UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/xz.rb b/Library/Homebrew/unpack_strategy/xz.rb index 0ce1a899c3..a0ce3fbc16 100644 --- a/Library/Homebrew/unpack_strategy/xz.rb +++ b/Library/Homebrew/unpack_strategy/xz.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UnpackStrategy class Xz include UnpackStrategy diff --git a/Library/Homebrew/unpack_strategy/zip.rb b/Library/Homebrew/unpack_strategy/zip.rb index 8124199092..f7da620192 100644 --- a/Library/Homebrew/unpack_strategy/zip.rb +++ b/Library/Homebrew/unpack_strategy/zip.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UnpackStrategy class Zip include UnpackStrategy diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 2305367f89..057a2881d2 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "emoji" require "utils/analytics" require "utils/curl" diff --git a/Library/Homebrew/utils/analytics.rb b/Library/Homebrew/utils/analytics.rb index 31174451e1..df025a2ca7 100644 --- a/Library/Homebrew/utils/analytics.rb +++ b/Library/Homebrew/utils/analytics.rb @@ -1,10 +1,12 @@ +# frozen_string_literal: true + require "erb" module Utils module Analytics class << self def custom_prefix_label - "custom-prefix".freeze + "custom-prefix" end def clear_os_prefix_ci diff --git a/Library/Homebrew/utils/bottles.rb b/Library/Homebrew/utils/bottles.rb index 832b815ff4..cb2a789ce2 100644 --- a/Library/Homebrew/utils/bottles.rb +++ b/Library/Homebrew/utils/bottles.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "tab" require "extend/ARGV" diff --git a/Library/Homebrew/utils/curl.rb b/Library/Homebrew/utils/curl.rb index d66fec1dcb..d801dce907 100644 --- a/Library/Homebrew/utils/curl.rb +++ b/Library/Homebrew/utils/curl.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "open3" def curl_executable diff --git a/Library/Homebrew/utils/fork.rb b/Library/Homebrew/utils/fork.rb index a505835de8..df67c7cf48 100644 --- a/Library/Homebrew/utils/fork.rb +++ b/Library/Homebrew/utils/fork.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "fcntl" require "socket" diff --git a/Library/Homebrew/utils/formatter.rb b/Library/Homebrew/utils/formatter.rb index f8d012fb31..9cfb74c8d3 100644 --- a/Library/Homebrew/utils/formatter.rb +++ b/Library/Homebrew/utils/formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "utils/tty" module Formatter diff --git a/Library/Homebrew/utils/gems.rb b/Library/Homebrew/utils/gems.rb index 04beb2c8cb..2e86e4f51f 100644 --- a/Library/Homebrew/utils/gems.rb +++ b/Library/Homebrew/utils/gems.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Never `require` anything in this file (except English). It needs to be able to # work as the first item in `brew.rb` so we can load gems with Bundler when # needed before anything else is loaded (e.g. `json`). @@ -8,12 +10,12 @@ module Homebrew module_function def ruby_bindir - "#{RbConfig::CONFIG["prefix"]}/bin".freeze + "#{RbConfig::CONFIG["prefix"]}/bin" end def gem_user_bindir require "rubygems" - "#{Gem.user_dir}/bin".freeze + "#{Gem.user_dir}/bin" end def ohai_if_defined(message) @@ -88,7 +90,7 @@ module Homebrew ENV["BUNDLE_GEMFILE"] = "#{ENV["HOMEBREW_LIBRARY"]}/Homebrew/Gemfile" @bundle_installed ||= begin - bundle = "#{gem_user_bindir}/bundle".freeze + bundle = "#{gem_user_bindir}/bundle" bundle_check_output = `#{bundle} check 2>&1` bundle_check_failed = !$CHILD_STATUS.exitstatus.zero? diff --git a/Library/Homebrew/utils/git.rb b/Library/Homebrew/utils/git.rb index 875b07dc13..ea479cc79e 100644 --- a/Library/Homebrew/utils/git.rb +++ b/Library/Homebrew/utils/git.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "open3" module Git diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index d12aaa0693..9a4749bd0f 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -1,10 +1,12 @@ +# frozen_string_literal: true + require "uri" require "tempfile" module GitHub module_function - API_URL = "https://api.github.com".freeze + API_URL = "https://api.github.com" CREATE_GIST_SCOPES = ["gist"].freeze CREATE_ISSUE_FORK_OR_PR_SCOPES = ["public_repo"].freeze @@ -12,7 +14,7 @@ module GitHub ALL_SCOPES_URL = Formatter.url( "https://github.com/settings/tokens/new?scopes=#{ALL_SCOPES.join(",")}&description=Homebrew", ).freeze - PR_ENV_KEY = "HOMEBREW_NEW_FORMULA_PULL_REQUEST_URL".freeze + PR_ENV_KEY = "HOMEBREW_NEW_FORMULA_PULL_REQUEST_URL" PR_ENV = ENV[PR_ENV_KEY] class Error < RuntimeError diff --git a/Library/Homebrew/utils/inreplace.rb b/Library/Homebrew/utils/inreplace.rb index 67881953d0..448d08fd8c 100644 --- a/Library/Homebrew/utils/inreplace.rb +++ b/Library/Homebrew/utils/inreplace.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Utils class InreplaceError < RuntimeError def initialize(errors) diff --git a/Library/Homebrew/utils/link.rb b/Library/Homebrew/utils/link.rb index a40467334d..7c24b13b1d 100644 --- a/Library/Homebrew/utils/link.rb +++ b/Library/Homebrew/utils/link.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Utils module Link module_function diff --git a/Library/Homebrew/utils/popen.rb b/Library/Homebrew/utils/popen.rb index fe80042310..f9d189219c 100644 --- a/Library/Homebrew/utils/popen.rb +++ b/Library/Homebrew/utils/popen.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Utils def self.popen_read(*args, **options, &block) popen(args, "rb", options, &block) diff --git a/Library/Homebrew/utils/shell.rb b/Library/Homebrew/utils/shell.rb index 4444f24d4c..abab9eed69 100644 --- a/Library/Homebrew/utils/shell.rb +++ b/Library/Homebrew/utils/shell.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Utils module Shell module_function diff --git a/Library/Homebrew/utils/svn.rb b/Library/Homebrew/utils/svn.rb index 23c9fe13d4..6d5d03885a 100644 --- a/Library/Homebrew/utils/svn.rb +++ b/Library/Homebrew/utils/svn.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Utils def self.clear_svn_version_cache remove_instance_variable(:@svn) if instance_variable_defined?(:@svn) diff --git a/Library/Homebrew/utils/tty.rb b/Library/Homebrew/utils/tty.rb index 6d35584661..76e2867dd9 100644 --- a/Library/Homebrew/utils/tty.rb +++ b/Library/Homebrew/utils/tty.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Tty module_function diff --git a/Library/Homebrew/utils/user.rb b/Library/Homebrew/utils/user.rb index e572a0a8ee..cf93d088d8 100644 --- a/Library/Homebrew/utils/user.rb +++ b/Library/Homebrew/utils/user.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "delegate" require "etc" diff --git a/Library/Homebrew/version.rb b/Library/Homebrew/version.rb index e2af0b3b61..b24d340838 100644 --- a/Library/Homebrew/version.rb +++ b/Library/Homebrew/version.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "version/null" class Version diff --git a/Library/Homebrew/version/null.rb b/Library/Homebrew/version/null.rb index b4e480be13..c8731b0a03 100644 --- a/Library/Homebrew/version/null.rb +++ b/Library/Homebrew/version/null.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Version NULL = Class.new do include Comparable @@ -49,7 +51,7 @@ class Version alias_method :to_str, :to_s def inspect - "#".freeze + "#" end end.new.freeze end From fc6bd2ea1c2a810fa7bdef7e59f7c8ba81c209b2 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 20 Apr 2019 14:07:29 +0900 Subject: [PATCH 3/3] Fixup more frozen string handling. --- Library/Homebrew/cask/artifact/abstract_uninstall.rb | 6 +++--- Library/Homebrew/cask/cmd/abstract_command.rb | 3 +-- Library/Homebrew/cask/cmd/edit.rb | 4 ++-- Library/Homebrew/cask/cmd/info.rb | 4 ++-- Library/Homebrew/cask/installer.rb | 3 ++- Library/Homebrew/caveats.rb | 6 +++--- Library/Homebrew/dev-cmd/bottle.rb | 12 +++++++----- Library/Homebrew/dev-cmd/man.rb | 6 ++++-- Library/Homebrew/diagnostic.rb | 3 ++- Library/Homebrew/exceptions.rb | 4 ++-- Library/Homebrew/formula_installer.rb | 2 +- Library/Homebrew/missing_formula.rb | 4 ++-- Library/Homebrew/test/formula_spec.rb | 2 +- Library/Homebrew/test/inreplace_spec.rb | 2 +- Library/Homebrew/test/string_spec.rb | 2 +- Library/Homebrew/utils.rb | 7 ++++--- Library/Homebrew/utils/inreplace.rb | 4 ++-- 17 files changed, 40 insertions(+), 34 deletions(-) diff --git a/Library/Homebrew/cask/artifact/abstract_uninstall.rb b/Library/Homebrew/cask/artifact/abstract_uninstall.rb index 7261a054f8..82aa4fd467 100644 --- a/Library/Homebrew/cask/artifact/abstract_uninstall.rb +++ b/Library/Homebrew/cask/artifact/abstract_uninstall.rb @@ -94,10 +94,10 @@ module Cask sleep 1 end paths = [ - "/Library/LaunchAgents/#{service}.plist", - "/Library/LaunchDaemons/#{service}.plist", + +"/Library/LaunchAgents/#{service}.plist", + +"/Library/LaunchDaemons/#{service}.plist", ] - paths.each { |elt| elt.prepend(ENV["HOME"]) } unless with_sudo + paths.each { |elt| elt.prepend(ENV["HOME"]).freeze } unless with_sudo paths = paths.map { |elt| Pathname(elt) }.select(&:exist?) paths.each do |path| command.run!("/bin/rm", args: ["-f", "--", path], sudo: with_sudo) diff --git a/Library/Homebrew/cask/cmd/abstract_command.rb b/Library/Homebrew/cask/cmd/abstract_command.rb index faf0dd4edb..b08a3ea897 100644 --- a/Library/Homebrew/cask/cmd/abstract_command.rb +++ b/Library/Homebrew/cask/cmd/abstract_command.rb @@ -61,8 +61,7 @@ module Cask if matches.one? "Did you mean “#{matches.first}”?" elsif !matches.empty? - "Did you mean one of these?\n" - .concat(Formatter.columns(matches.take(20))) + "Did you mean one of these?\n#{Formatter.columns(matches.take(20))}" end end end diff --git a/Library/Homebrew/cask/cmd/edit.rb b/Library/Homebrew/cask/cmd/edit.rb index e7837a477d..7c65b18b27 100644 --- a/Library/Homebrew/cask/cmd/edit.rb +++ b/Library/Homebrew/cask/cmd/edit.rb @@ -12,9 +12,9 @@ module Cask def run exec_editor cask_path rescue CaskUnavailableError => e - reason = e.reason.empty? ? "" : "#{e.reason} " + reason = e.reason.empty? ? +"" : +"#{e.reason} " reason.concat("Run #{Formatter.identifier("brew cask create #{e.token}")} to create a new Cask.") - raise e.class.new(e.token, reason) + raise e.class.new(e.token, reason.freeze) end def cask_path diff --git a/Library/Homebrew/cask/cmd/info.rb b/Library/Homebrew/cask/cmd/info.rb index 0bc8187491..4453889935 100644 --- a/Library/Homebrew/cask/cmd/info.rb +++ b/Library/Homebrew/cask/cmd/info.rb @@ -106,14 +106,14 @@ module Cask end def self.artifact_info(cask) - artifact_output = ohai_title("Artifacts") + artifact_output = ohai_title("Artifacts").dup cask.artifacts.each do |artifact| next unless artifact.respond_to?(:install_phase) next unless DSL::ORDINARY_ARTIFACT_CLASSES.include?(artifact.class) artifact_output << "\n" << artifact.to_s end - artifact_output + artifact_output.freeze end end end diff --git a/Library/Homebrew/cask/installer.rb b/Library/Homebrew/cask/installer.rb index e25af65750..d59d7d3b4f 100644 --- a/Library/Homebrew/cask/installer.rb +++ b/Library/Homebrew/cask/installer.rb @@ -138,9 +138,10 @@ module Cask end def summary - s = "" + s = +"" s << "#{Emoji.install_badge} " if Emoji.enabled? s << "#{@cask} was successfully #{upgrade? ? "upgraded" : "installed"}!" + s.freeze end def download diff --git a/Library/Homebrew/caveats.rb b/Library/Homebrew/caveats.rb index e420867226..620f40dc79 100644 --- a/Library/Homebrew/caveats.rb +++ b/Library/Homebrew/caveats.rb @@ -42,7 +42,7 @@ class Caveats #{f.name} is keg-only, which means it was not symlinked into #{HOMEBREW_PREFIX}, because #{f.keg_only_reason.to_s.chomp}. EOS - end + end.dup if f.bin.directory? || f.sbin.directory? s << <<~EOS @@ -120,10 +120,10 @@ class Caveats #{root_dir}/share/zsh/site-functions EOS when :fish - fish_caveats = "fish #{installed.join(" and ")} have been installed to:" + fish_caveats = +"fish #{installed.join(" and ")} have been installed to:" fish_caveats << "\n #{root_dir}/share/fish/vendor_completions.d" if completion_installed fish_caveats << "\n #{root_dir}/share/fish/vendor_functions.d" if functions_installed - fish_caveats + fish_caveats.freeze end end diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index b5c22b39ef..7ff09281fe 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -1,4 +1,6 @@ -# frozen_string_literal: true +# Uses ERB so can't use Frozen String Literals until >=Ruby 2.4: +# https://bugs.ruby-lang.org/issues/12031 +# frozen_string_literal: false require "formula" require "utils/bottles" @@ -9,7 +11,7 @@ require "cli/parser" require "utils/inreplace" require "erb" -BOTTLE_ERB = <<-EOS +BOTTLE_ERB = <<-EOS.freeze bottle do <% if !["#{HOMEBREW_BOTTLE_DEFAULT_DOMAIN}/bottles", "https://homebrew.bintray.com/bottles"].include?(root_url) %> root_url "<%= root_url %>" @@ -41,7 +43,7 @@ module Homebrew def bottle_args Homebrew::CLI::Parser.new do - usage_banner <<~EOS + usage_banner <<~EOS.freeze `bottle` [] Generate a bottle (binary package) from a formula that was installed with @@ -378,7 +380,7 @@ module Homebrew "#{key}: old: #{old_value}, new: #{value}" end - odie <<~EOS + odie <<~EOS.freeze --keep-old was passed but there are changes in: #{mismatches.join("\n")} EOS @@ -489,7 +491,7 @@ module Homebrew end unless mismatches.empty? - odie <<~EOS + odie <<~EOS.freeze --keep-old was passed but there are changes in: #{mismatches.join("\n")} EOS diff --git a/Library/Homebrew/dev-cmd/man.rb b/Library/Homebrew/dev-cmd/man.rb index b8e871da0d..5e07666f0c 100644 --- a/Library/Homebrew/dev-cmd/man.rb +++ b/Library/Homebrew/dev-cmd/man.rb @@ -1,4 +1,6 @@ -# frozen_string_literal: true +# Uses ERB so can't use Frozen String Literals until >=Ruby 2.4: +# https://bugs.ruby-lang.org/issues/12031 +# frozen_string_literal: false require "formula" require "erb" @@ -16,7 +18,7 @@ module Homebrew def man_args Homebrew::CLI::Parser.new do - usage_banner <<~EOS + usage_banner <<~EOS.freeze `man` [] Generate Homebrew's manpages. diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb index 23bbcfc890..c713faf749 100644 --- a/Library/Homebrew/diagnostic.rb +++ b/Library/Homebrew/diagnostic.rb @@ -71,7 +71,8 @@ module Homebrew end def inject_file_list(list, string) - list.reduce(string) { |acc, elem| acc << " #{elem}\n" } + list.reduce(string.dup) { |acc, elem| acc << " #{elem}\n" } + .freeze end ############# END HELPERS diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index 83bfce4779..5d6ca67cda 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -531,7 +531,7 @@ class ErrorDuringExecution < RuntimeError status end - s = "Failure while executing; `#{cmd.shelljoin.gsub(/\\=/, "=")}` exited with #{exitstatus}." + s = +"Failure while executing; `#{cmd.shelljoin.gsub(/\\=/, "=")}` exited with #{exitstatus}." unless [*output].empty? format_output_line = lambda do |type_line| @@ -548,7 +548,7 @@ class ErrorDuringExecution < RuntimeError s << "\n" unless s.end_with?("\n") end - super s + super s.freeze end def stderr diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 215e45df32..09fd6822b0 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -666,7 +666,7 @@ class FormulaInstaller end def summary - s = "" + s = +"" s << "#{Emoji.install_badge} " if Emoji.enabled? s << "#{formula.prefix.resolved_path}: #{formula.prefix.abv}" s << ", built in #{pretty_duration build_time}" if build_time diff --git a/Library/Homebrew/missing_formula.rb b/Library/Homebrew/missing_formula.rb index b3778677af..7fe246c338 100644 --- a/Library/Homebrew/missing_formula.rb +++ b/Library/Homebrew/missing_formula.rb @@ -200,9 +200,9 @@ module Homebrew return if silent cask = Cask::CaskLoader.load(name) - reason = "Found a cask named \"#{name}\" instead.\n" + reason = +"Found a cask named \"#{name}\" instead.\n" reason << Cask::Cmd::Info.get_info(cask) if show_info - reason + reason.freeze rescue Cask::CaskUnavailableError nil end diff --git a/Library/Homebrew/test/formula_spec.rb b/Library/Homebrew/test/formula_spec.rb index 5e7e885f9a..b762115950 100644 --- a/Library/Homebrew/test/formula_spec.rb +++ b/Library/Homebrew/test/formula_spec.rb @@ -382,7 +382,7 @@ describe Formula do stamps_with_revisions.each do |stamp, revision| version = "HEAD-#{stamp}" - version << "_#{revision}" unless revision.zero? + version = "#{version}_#{revision}" unless revision.zero? prefix = f.rack/version prefix.mkpath diff --git a/Library/Homebrew/test/inreplace_spec.rb b/Library/Homebrew/test/inreplace_spec.rb index 0500e1ca49..2491c8b870 100644 --- a/Library/Homebrew/test/inreplace_spec.rb +++ b/Library/Homebrew/test/inreplace_spec.rb @@ -5,7 +5,7 @@ require "tempfile" require "utils/inreplace" describe StringInreplaceExtension do - subject { string.extend(described_class) } + subject { string.dup.extend(described_class) } describe "#change_make_var!" do context "flag" do diff --git a/Library/Homebrew/test/string_spec.rb b/Library/Homebrew/test/string_spec.rb index 687cf559b3..ed9cdc2deb 100644 --- a/Library/Homebrew/test/string_spec.rb +++ b/Library/Homebrew/test/string_spec.rb @@ -5,7 +5,7 @@ require "extend/string" describe StringInreplaceExtension do subject { string.extend(described_class) } - let(:string) { "foobar" } + let(:string) { +"foobar" } describe "#sub!" do it "adds an error to #errors when no replacement was made" do diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 057a2881d2..e68d561789 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -113,8 +113,9 @@ def odeprecated(method, replacement = nil, disable: false, disable_on: nil, call break end - message = "Calling #{method} is #{verb}! #{replacement_message}" + message = +"Calling #{method} is #{verb}! #{replacement_message}" message << tap_message if tap_message + message.freeze if ARGV.homebrew_developer? || disable || Homebrew.raise_deprecation_exceptions? exception = MethodDeprecatedError.new(message) @@ -152,12 +153,12 @@ end def pretty_duration(s) s = s.to_i - res = "" + res = +"" if s > 59 m = s / 60 s %= 60 - res = "#{m} #{"minute".pluralize(m)}" + res = +"#{m} #{"minute".pluralize(m)}" return res.freeze if s.zero? res << " " diff --git a/Library/Homebrew/utils/inreplace.rb b/Library/Homebrew/utils/inreplace.rb index 448d08fd8c..3bce563f7c 100644 --- a/Library/Homebrew/utils/inreplace.rb +++ b/Library/Homebrew/utils/inreplace.rb @@ -3,10 +3,10 @@ module Utils class InreplaceError < RuntimeError def initialize(errors) - formatted_errors = errors.reduce("inreplace failed\n") do |s, (path, errs)| + formatted_errors = errors.reduce(+"inreplace failed\n") do |s, (path, errs)| s << "#{path}:\n" << errs.map { |e| " #{e}\n" }.join end - super formatted_errors + super formatted_errors.freeze end end