language
stringclasses
1 value
owner
stringlengths
2
15
repo
stringlengths
2
21
sha
stringlengths
45
45
message
stringlengths
7
36.3k
path
stringlengths
1
199
patch
stringlengths
15
102k
is_multipart
bool
2 classes
Other
Homebrew
brew
1d7aa1fe0b430a4415cb976a2b2c3041f4269b55.json
superenv: help Autotools with 10.12 SDK on 10.11 The GNU Autotools tests for whether a given symbol is defined are reliably coming to incorrect conclusions on 10.11 with the 10.12 SDK in Xcode 8. This overrides its decisions by forcing the right answer in superenv using ac_cv_func_* environment variables and setting t...
Library/Homebrew/extend/os/mac/extend/ENV/super.rb
@@ -94,6 +94,15 @@ def setup_build_environment(formula = nil) self["SDKROOT"] = MacOS.sdk_path end + # Filter out symbols known not to be defined on 10.11 since GNU Autotools + # can't reliably figure this out with Xcode 8 on its own yet. + if MacOS.version == "10.11" && MacOS::Xcode.installed? &...
false
Other
Homebrew
brew
842d6ce8bdc2296869c41c5866bbf5f046ac6eb8.json
keg: add ALL_TOP_LEVEL_DIRECTORIES constant. This is used in diagnostic (and will be used in other places later) rather than hard-coding other directories later.
Library/Homebrew/diagnostic.rb
@@ -308,8 +308,7 @@ def check_access_homebrew_repository def check_access_prefix_directories not_writable_dirs = [] - extra_dirs = ["lib/pkgconfig", "share/locale", "share/man", "opt"] - (Keg::TOP_LEVEL_DIRECTORIES + extra_dirs).each do |dir| + Keg::ALL_TOP_LEVEL_DIRECTORIES.each ...
true
Other
Homebrew
brew
842d6ce8bdc2296869c41c5866bbf5f046ac6eb8.json
keg: add ALL_TOP_LEVEL_DIRECTORIES constant. This is used in diagnostic (and will be used in other places later) rather than hard-coding other directories later.
Library/Homebrew/keg.rb
@@ -65,6 +65,7 @@ def to_s; <<-EOS.undent LOCALEDIR_RX = /(locale|man)\/([a-z]{2}|C|POSIX)(_[A-Z]{2})?(\.[a-zA-Z\-0-9]+(@.+)?)?/ INFOFILE_RX = %r{info/([^.].*?\.info|dir)$} TOP_LEVEL_DIRECTORIES = %w[bin etc include lib sbin share var Frameworks] + ALL_TOP_LEVEL_DIRECTORIES = (TOP_LEVEL_DIRECTORIES + %w[lib/p...
true
Other
Homebrew
brew
49e9be1970ae7f58d9ed64ac2dad5187a3ea6d5d.json
Formula-Cookbook: note audit --new-formula for new formula
share/doc/homebrew/Formula-Cookbook.md
@@ -306,7 +306,7 @@ Add aliases by creating symlinks in an `Aliases` directory in the tap root. You can run `brew audit --strict --online` to test formulae for adherence to Homebrew house style. The `audit` command includes warnings for trailing whitespace, preferred URLs for certain source hosts, and a lot of other...
false
Other
Homebrew
brew
e4f607e4c8a4368a506edfcbbecfe6d24abc7f34.json
Custom-GCC-and-cross-compilers: remove dead taps
share/doc/homebrew/Custom-GCC-and-cross-compilers.md
@@ -9,7 +9,4 @@ Rather than merging in brews for either of these cases at this time, we're listi * Homebrew provides a `gcc` formula for use with Xcode 4.2+ or when needing C++11 support on earlier versions. * [Homebrew-versions](https://github.com/homebrew/homebrew-versions) provides an up to date GCC duplicates e...
false
Other
Homebrew
brew
4cec6f5dd0aed2ece19b5d3e755d7da7d4178b13.json
Teach brew to recognize gcc-HEAD as valid compiler Building gcc with --HEAD results in most of the executables not having a version suffix, e.g. Building/installing gcc 6 would result in gcc-6, g++-6, etc. being installed, while building/installing gcc --HEAD would result in gcc-, g++-, etc. being installed. The lack...
Library/Homebrew/compilers.rb
@@ -1,7 +1,7 @@ # @private module CompilerConstants - GNU_GCC_VERSIONS = %w[4.3 4.4 4.5 4.6 4.7 4.8 4.9 5 6] - GNU_GCC_REGEXP = /^gcc-(4\.[3-9]|[5-6])$/ + GNU_GCC_VERSIONS = %w[4.3 4.4 4.5 4.6 4.7 4.8 4.9 5 6 7] + GNU_GCC_REGEXP = /^gcc-(4\.[3-9]|[5-7])$/ COMPILER_SYMBOL_MAP = { "gcc-4.0" => :gcc_4_0, ...
false
Other
Homebrew
brew
b42f646cec2f8d2ced09e98e9cd37375a183f94d.json
extend/pathname: fix Rubocop warnings.
Library/Homebrew/extend/pathname.rb
@@ -20,7 +20,7 @@ def abv out = "" compute_disk_usage out << "#{number_readable(@file_count)} files, " if @file_count > 1 - out << "#{disk_usage_readable(@disk_usage)}" + out << disk_usage_readable(@disk_usage).to_s end private @@ -153,7 +153,7 @@ def binwrite(contents, *open_args) end u...
false
Other
Homebrew
brew
6a81782753d660eb3a9b6b2f303015205177c518.json
extend/os/mac/development_tools: fix Rubocop warnings.
Library/Homebrew/extend/os/mac/development_tools.rb
@@ -24,10 +24,10 @@ def installed? def installation_instructions if MacOS.version >= "10.9" - <<-EOS.undent - Install the Command Line Tools: - xcode-select --install - EOS + <<-EOS.undent + Install the Command Line Tools: + xcode-select --install + ...
false
Other
Homebrew
brew
df5605fa01cea58928d39bf12b27912c39c3f646.json
extend/fileutils: fix Rubocop warnings.
Library/Homebrew/extend/fileutils.rb
@@ -60,10 +60,10 @@ def run # > When a new file is created, it is given the group of the directory which # contains it. group_id = if HOMEBREW_BREW_FILE.grpowned? - HOMEBREW_BREW_FILE.stat.gid - else - Process.gid - end + HO...
false
Other
Homebrew
brew
fb3bec8d70d375a97554d4c3fed82ad2332b2191.json
extend/ENV/super: fix Rubocop warnings.
Library/Homebrew/extend/ENV/super.rb
@@ -183,7 +183,7 @@ def determine_library_paths end def determine_dependencies - deps.map {|d| d.name}.join(",") + deps.map(&:name).join(",") end def determine_cmake_prefix_path
false
Other
Homebrew
brew
c3dab72e3726c3519b39ce1ef5baa31b24198d41.json
extend/ENV/std: fix Rubocop warnings.
Library/Homebrew/extend/ENV/std.rb
@@ -7,8 +7,8 @@ module Stdenv include SharedEnvExtension # @private - SAFE_CFLAGS_FLAGS = "-w -pipe" - DEFAULT_FLAGS = "-march=core2 -msse4" + SAFE_CFLAGS_FLAGS = "-w -pipe".freeze + DEFAULT_FLAGS = "-march=core2 -msse4".freeze def self.extended(base) unless ORIGINAL_PATHS.include? HOMEBREW_PREFIX...
false
Other
Homebrew
brew
fe661a809c8ec497c8096ec062908ddcb2c84a03.json
extend/ENV/shared: fix Rubocop warnings.
Library/Homebrew/extend/ENV/shared.rb
@@ -12,9 +12,9 @@ module SharedEnvExtension include CompilerConstants # @private - CC_FLAG_VARS = %w[CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS] + CC_FLAG_VARS = %w[CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS].freeze # @private - FC_FLAG_VARS = %w[FCFLAGS FFLAGS] + FC_FLAG_VARS = %w[FCFLAGS FFLAGS].freeze # @pri...
false
Other
Homebrew
brew
17a7c2388193de0c7aed556df92ca955ffec2753.json
extend/ARGV: fix Rubocop warnings.
Library/Homebrew/extend/ARGV.rb
@@ -57,7 +57,7 @@ def kegs dirs = rack.directory? ? rack.subdirs : [] - raise NoSuchKegError.new(rack.basename) if dirs.empty? + raise NoSuchKegError, rack.basename if dirs.empty? linked_keg_ref = HOMEBREW_LIBRARY.join("LinkedKegs", rack.basename) opt_prefix = HOMEBREW_PREFIX.join("...
false
Other
Homebrew
brew
793a75f3f3e5b46639683df610cc819d796cbba8.json
test-bot: fix bottling non-testing jobs. Need to handle when the `BOT_PARAMS` are `nil`.
Library/Homebrew/dev-cmd/test-bot.rb
@@ -912,7 +912,7 @@ def test_ci_upload(tap) safe_system "brew", "pull", "--clean", pull_pr end - if ENV["UPSTREAM_BOTTLE_KEEP_OLD"] || ENV["BOT_PARAMS"].include?("--keep-old") + if ENV["UPSTREAM_BOTTLE_KEEP_OLD"] || ENV["BOT_PARAMS"].to_s.include?("--keep-old") system "brew", "bottle", "--mer...
false
Other
Homebrew
brew
debc202d1e1e819d9263c85c80669252b3dd650c.json
bottle: remove debug statements.
Library/Homebrew/dev-cmd/bottle.rb
@@ -287,9 +287,6 @@ def bottle_formula(f) bottle.sha256 sha256 => Utils::Bottles.tag old_spec = f.bottle_specification - p root_url - p old_spec.root_url(root_url) - p bottle.root_url(root_url) if ARGV.include?("--keep-old") && !old_spec.checksums.empty? mismatches = [:root_url, :prefix...
false
Other
Homebrew
brew
e4ef1f062e7af00db859e205043b127afe33272f.json
test-bot: fix regex placement.
Library/Homebrew/dev-cmd/test-bot.rb
@@ -403,7 +403,7 @@ def diff_formulae(start_revision, end_revision, path, filter) @short_url = @url.gsub("https://github.com/", "") if @short_url.include? "/commit/" # 7 characters should be enough for a commit (not 40). - @short_url.gsub!(%r{(commit/\w{7}).*/, '\1'}) + @s...
false
Other
Homebrew
brew
e24a890e593d665e8f4bad2588879602e3918a87.json
test/test_tab: fix Rubocop warnings.
Library/Homebrew/test/test_tab.rb
@@ -24,7 +24,7 @@ def setup "stable" => "0.10", "devel" => "0.14", "head" => "HEAD-1111111", - } + }, }) end
false
Other
Homebrew
brew
d937f239324380c839fae6e7ebf9ab97f31e370f.json
test/test_shell: fix Rubocop warnings.
Library/Homebrew/test/test_shell.rb
@@ -2,7 +2,7 @@ require "utils/shell" class ShellSmokeTest < Homebrew::TestCase - def test_path_to_shell() + def test_path_to_shell # raw command name assert_equal :bash, Utils::Shell.path_to_shell("bash") # full path @@ -13,21 +13,21 @@ def test_path_to_shell() assert_equal :zsh, Utils::Shell...
false
Other
Homebrew
brew
fc7ac2f07b93a4037652df673cafce6619598f6b.json
test/test_resource: fix Rubocop warnings.
Library/Homebrew/test/test_resource.rb
@@ -100,8 +100,8 @@ def test_checksum_setters def test_download_strategy strategy = Object.new - DownloadStrategyDetector. - expects(:detect).with("foo", nil).returns(strategy) + DownloadStrategyDetector + .expects(:detect).with("foo", nil).returns(strategy) @resource.url("foo") asse...
false
Other
Homebrew
brew
501774e3bc73d5dd367054b954893d9561bf00d2.json
test/test_os_mac_language: fix Rubocop warnings.
Library/Homebrew/test/test_os_mac_language.rb
@@ -3,6 +3,6 @@ class OSMacLanguageTests < Homebrew::TestCase def test_language_format - assert_match %r{\A[a-z]{2}(-[A-Z]{2})?\Z}, OS::Mac.language + assert_match(/\A[a-z]{2}(-[A-Z]{2})?\Z/, OS::Mac.language) end end
false
Other
Homebrew
brew
e89de3351f69a99bdc5d528c7abe3f771ae47b56.json
test/test_integration_cmds: fix Rubocop warnings.
Library/Homebrew/test/test_integration_cmds.rb
@@ -99,15 +99,15 @@ def cmd_output(*args) def cmd(*args) output = cmd_output(*args) status = $?.exitstatus - puts "\n#{output}" if status != 0 + puts "\n#{output}" if status.nonzero? assert_equal 0, status output end def cmd_fail(*args) output = cmd_output(*args) status = ...
false
Other
Homebrew
brew
2cf6184735050319a78063111b6f464f2320e2b7.json
test/test_formula_installer: fix Rubocop warnings.
Library/Homebrew/test/test_formula_installer.rb
@@ -110,7 +110,7 @@ class #{Formulary.class_s(dep_name)} < Formula dependent = formula do url "foo" version "0.5" - depends_on "#{dependency.name}" + depends_on dependency.name.to_s end dependency.prefix("0.1").join("bin/a").mkpath
false
Other
Homebrew
brew
0f09674fe61f58572190f263d9173422d4e417d8.json
test/test_formula: fix Rubocop warnings.
Library/Homebrew/test/test_formula.rb
@@ -574,7 +574,7 @@ def test_pour_bottle_dsl url "foo-1.0" pour_bottle? do reason "true reason" - satisfy { var == var } + satisfy { true } end end assert f_true.pour_bottle? @@ -586,7 +586,10 @@ class OutdatedVersionsTests < Homebrew::TestCase attr_reader :f ...
false
Other
Homebrew
brew
219c373115dea67d7753ab51e1e95f5f41e8e9f8.json
test/test_dependency_collector: fix Rubocop warnings.
Library/Homebrew/test/test_dependency_collector.rb
@@ -7,7 +7,7 @@ def find_dependency(name) end def find_requirement(klass) - @d.requirements.find { |req| klass === req } + @d.requirements.find { |req| req.is_a? klass } end def setup
false
Other
Homebrew
brew
df1f9806a4e82d3a4f2a2a793f5ac8b6778344c1.json
test-bot: handle more Jenkins configurations. Used in trying to use a `Jenkinsfile`.
Library/Homebrew/dev-cmd/test-bot.rb
@@ -883,11 +883,12 @@ def test_ci_upload(tap) job = ENV["UPSTREAM_JOB_NAME"] id = ENV["UPSTREAM_BUILD_ID"] raise "Missing Jenkins variables!" if !jenkins || !job || !id + bottles = Dir["#{jenkins}/jobs/#{job}/configurations/axis-version/*/builds/#{id}/archive/*.bottle*.*"] return if b...
false
Other
Homebrew
brew
51bda9c90efe3c3fbc197b6c1db793575444a711.json
dev-cmd/test-bot: fix Rubocop warnings.
Library/Homebrew/dev-cmd/test-bot.rb
@@ -120,7 +120,7 @@ def resolve_test_tap if git_url = ENV["UPSTREAM_GIT_URL"] || ENV["GIT_URL"] # Also can get tap from Jenkins GIT_URL. - url_path = git_url.sub(%r{^https?://github\.com/}, "").chomp("/").sub(%r{\.git$}, "") + url_path = git_url.sub(%r{^https?://github\.com/}, "").chomp("/").sub...
false
Other
Homebrew
brew
f1c64f1cdce6f2ce1d45d93e553ae2629c2e419f.json
dev-cmd/pull: fix Rubocop warnings.
Library/Homebrew/dev-cmd/pull.rb
@@ -237,7 +237,7 @@ def force_utf8!(str) private - def publish_changed_formula_bottles(tap, changed_formulae_names) + def publish_changed_formula_bottles(_tap, changed_formulae_names) if ENV["HOMEBREW_DISABLE_LOAD_FORMULA"] raise "Need to load formulae to publish them!" end @@ -360,7 +360,13 @...
false
Other
Homebrew
brew
71fd2bb4b0b30b03fbb7b19c53d008b1780006bb.json
dev-cmd/man: fix Rubocop warnings.
Library/Homebrew/dev-cmd/man.rb
@@ -34,15 +34,15 @@ def regenerate_man_pages end def path_glob_commands(glob) - Pathname.glob(glob). - sort_by { |source_file| sort_key_for_path(source_file) }. - map { |source_file| - source_file.read.lines. - grep(/^#:/). - map { |line| line.slice(2..-1) }. - joi...
false
Other
Homebrew
brew
e6b057ea76756fa02ee059febf779aec7759f3e3.json
dev-cmd/edit: fix Rubocop warnings.
Library/Homebrew/dev-cmd/edit.rb
@@ -44,7 +44,9 @@ def edit def library_folders Dir["#{HOMEBREW_LIBRARY}/*"].reject do |d| - case File.basename(d) when "LinkedKegs", "Aliases" then true end + case File.basename(d) + when "LinkedKegs", "Aliases" then true + end end end end
false
Other
Homebrew
brew
d01993da82bcb106aeac349ed5e66a445a40d1d2.json
dev-cmd/create: fix Rubocop warnings.
Library/Homebrew/dev-cmd/create.rb
@@ -91,7 +91,7 @@ def create def __gets gots = $stdin.gets.chomp - if gots.empty? then nil else gots end + gots.empty? ? nil : gots end end
false
Other
Homebrew
brew
bba6a59c0c491eab7fdf3141a9810f86a2ed9ae0.json
dev-cmd/bump-formula-pr: fix Rubocop warnings.
Library/Homebrew/dev-cmd/bump-formula-pr.rb
@@ -101,7 +101,7 @@ def bump_formula_pr old_formula_version = formula_version(formula, requested_spec) replacement_pairs = [] - if requested_spec == :stable && formula.revision != 0 + if requested_spec == :stable && formula.revision.nonzero? replacement_pairs << [/^ revision \d+\n(\n( head ")...
false
Other
Homebrew
brew
9b5c45a7df6a9a170389d6045bf06803fe4bc78b.json
dev-cmd/bottle: fix Rubocop warnings.
Library/Homebrew/dev-cmd/bottle.rb
@@ -13,7 +13,7 @@ require "erb" require "extend/pathname" -BOTTLE_ERB = <<-EOS +BOTTLE_ERB = <<-EOS.freeze bottle do <% if !root_url.start_with?(BottleSpecification::DEFAULT_DOMAIN) %> root_url "<%= root_url %>" @@ -89,15 +89,14 @@ def print_filename(string, filename) end end - i...
false
Other
Homebrew
brew
264afb67dfe275d6bc82f4d8ea700f770513a5b1.json
dev-cmd/audit: fix Rubocop warnings.
Library/Homebrew/dev-cmd/audit.rb
@@ -101,20 +101,20 @@ def without_patch @text.split("\n__END__").first end - def has_DATA? + def data? /^[^#]*\bDATA\b/ =~ @text end - def has_END? + def end? /^__END__$/ =~ @text end - def has_trailing_newline? + def trailing_newline? /\Z\n/ =~ @text end - def =~(regex) -...
true
Other
Homebrew
brew
264afb67dfe275d6bc82f4d8ea700f770513a5b1.json
dev-cmd/audit: fix Rubocop warnings.
Library/Homebrew/test/test_cmd_audit.rb
@@ -29,9 +29,9 @@ class #{Formulary.class_s(name)} < Formula def test_simple_valid_formula ft = formula_text "valid", 'url "http://www.example.com/valid-1.0.tar.gz"' - refute ft.has_DATA?, "The formula should not have DATA" - refute ft.has_END?, "The formula should not have __END__" - assert ft.has_t...
true
Other
Homebrew
brew
aa3d53f249a7afcaa76fc7652380dfc4099c66bf.json
utils/shell: fix Rubocop warnings.
Library/Homebrew/utils/shell.rb
@@ -10,7 +10,7 @@ module Utils }.freeze module Shell - UNSAFE_SHELL_CHAR = /([^A-Za-z0-9_\-.,:\/@\n])/ + UNSAFE_SHELL_CHAR = %r{([^A-Za-z0-9_\-.,:\/@\n])} # take a path and heuristically convert it # to a shell name, return nil if there's no match @@ -45,7 +45,7 @@ def csh_quote(str) st...
false
Other
Homebrew
brew
ecf46b841b24fe650504a7388f25d1093189a09d.json
utils/inreplace: fix Rubocop warnings.
Library/Homebrew/utils/inreplace.rb
@@ -1,9 +1,9 @@ module Utils class InreplaceError < RuntimeError def initialize(errors) - super errors.inject("inreplace failed\n") { |s, (path, errs)| + super errors.inject("inreplace failed\n") do |s, (path, errs)| s << "#{path}:\n" << errs.map { |e| " #{e}\n" }.join - } + end ...
false
Other
Homebrew
brew
1f2abbdd6e960399b50f35e3e34261d13b9cf893.json
utils/hash: fix Rubocop warnings.
Library/Homebrew/utils/hash.rb
@@ -1,6 +1,6 @@ def deep_merge_hashes(hash1, hash2) - merger = proc do |key, v1, v2| - if Hash === v1 && Hash === v2 + merger = proc do |_key, v1, v2| + if v1.is_a?(Hash) && v2.is_a?(Hash) v1.merge v2, &merger else v2
false
Other
Homebrew
brew
6cfb84152464097901a9b9a437b37cc8c5aeb45c.json
utils/github: fix Rubocop warnings.
Library/Homebrew/utils/github.rb
@@ -121,7 +121,7 @@ def api_credentials_error_message(response_headers) end end - def open(url, data=nil) + def open(url, data = nil) # This is a no-op if the user is opting out of using the GitHub API. return if ENV["HOMEBREW_NO_GITHUB_API"] @@ -154,7 +154,7 @@ def open(url, data=nil) ...
false
Other
Homebrew
brew
3bf5e779ab04bf399963183eb59f815b5df77c5d.json
utils/curl: fix Rubocop warnings.
Library/Homebrew/utils/curl.rb
@@ -1,15 +1,15 @@ require "pathname" require "open3" -def curl_args(extra_args=[]) +def curl_args(extra_args = []) curl = Pathname.new ENV["HOMEBREW_CURL"] curl = Pathname.new "/usr/bin/curl" unless curl.exist? raise "#{curl} is not executable" unless curl.exist? && curl.executable? flags = HOMEBREW_C...
false
Other
Homebrew
brew
56b6c43686be4710af7ddfeee06d456abc3aa0cf.json
utils: fix Rubocop warnings.
Library/Homebrew/utils.rb
@@ -138,11 +138,10 @@ def odeprecated(method, replacement = nil, options = {}) backtrace = options.fetch(:caller, caller) tap_message = nil caller_message = backtrace.detect do |line| - if line =~ %r{^#{Regexp.escape HOMEBREW_LIBRARY}/Taps/([^/]+/[^/]+)/} - tap = Tap.fetch $1 - tap_message = "\nPl...
false
Other
Homebrew
brew
90d16a8f8667bc54cb134a46470492e371970538.json
dev-cmd/aspell-dictionaries: fix Rubocop warnings.
Library/Homebrew/dev-cmd/aspell-dictionaries.rb
@@ -14,8 +14,8 @@ def aspell_dictionaries open("#{dict_url}/0index.html") do |content| content.each_line do |line| - break if %r{^</table} === line - next unless /^<tr><td><a/ === line + break if %r{^</table} =~ line + next unless /^<tr><td><a/ =~ line fields = line....
false
Other
Homebrew
brew
1174264d47b03bbcdb6900896b2a512c05686549.json
cmd/uses: fix Rubocop warnings.
Library/Homebrew/cmd/uses.rb
@@ -27,7 +27,7 @@ def uses raise FormulaUnspecifiedError if ARGV.named.empty? used_formulae = ARGV.formulae - formulae = (ARGV.include? "--installed") ? Formula.installed : Formula + formulae = ARGV.include?("--installed") ? Formula.installed : Formula recursive = ARGV.flag? "--recursive" in...
false
Other
Homebrew
brew
2c5beb0effd113bd0342f052d735d697e3e5af95.json
cmd/upgrade: fix Rubocop warnings.
Library/Homebrew/cmd/upgrade.rb
@@ -35,7 +35,7 @@ def upgrade end (ARGV.resolved_formulae - outdated).each do |f| - versions = f.installed_kegs.map { |keg| keg.version } + versions = f.installed_kegs.map(&:version) if versions.empty? onoe "#{f.full_name} not installed" else @@ -51,11 +51,11 @...
false
Other
Homebrew
brew
cc526601cfe14861260b76359f6f1a2ec5fa33d2.json
cmd/update-report: fix Rubocop warnings.
Library/Homebrew/cmd/update-report.rb
@@ -134,13 +134,13 @@ def migrate_legacy_cache_if_necessary world_writable = legacy_cache.stat.mode & 0777 == 0777 return if world_writable return if legacy_cache.symlink? - return if !legacy_cache.owned? && legacy_cache.lstat.uid != 0 + return if !legacy_cache.owned? && legacy_cache.lstat.uid.nonz...
false
Other
Homebrew
brew
49e009df296d64edbd48a9b8ec657b735f02e89b.json
cmd/unpack: fix Rubocop warnings.
Library/Homebrew/cmd/unpack.rb
@@ -43,13 +43,12 @@ def unpack end ENV["VERBOSE"] = nil - if ARGV.git? - ohai "Setting up git repository" - cd stage_dir - system "git", "init", "-q" - system "git", "add", "-A" - system "git", "commit", "-q", "-m", "brew-unpack" - end + next unless ARGV...
false
Other
Homebrew
brew
7b41ccd2ea842f81929c747d3a558123f98834be.json
cmd/unlinkapps: fix Rubocop warnings.
Library/Homebrew/cmd/unlinkapps.rb
@@ -65,7 +65,7 @@ def unlinkapps_from_dir(target_dir, opts = {}) def unlinkapps_unlink?(target_app, opts = {}) # Skip non-symlinks and symlinks that don't point into the Homebrew prefix. - app = "#{target_app.readlink}" if target_app.symlink? + app = target_app.readlink.to_s if target_app.symlink? ...
false
Other
Homebrew
brew
56fc1c725a752ef411e8f56aafe2602f2bb47592.json
cmd/uninstall: fix Rubocop warnings.
Library/Homebrew/cmd/uninstall.rb
@@ -60,6 +60,8 @@ def uninstall end def rm_pin(rack) - Formulary.from_rack(rack).unpin rescue nil + Formulary.from_rack(rack).unpin + rescue + nil end end
false
Other
Homebrew
brew
a0c29eb1af9abe25a29616bdcdd6aa19348e7eb3.json
cmd/tap-info: fix Rubocop warnings.
Library/Homebrew/cmd/tap-info.rb
@@ -59,7 +59,7 @@ def print_tap_info(taps) puts info else taps.each_with_index do |tap, i| - puts unless i == 0 + puts unless i.zero? info = "#{tap}: " if tap.installed? info += tap.pinned? ? "pinned" : "unpinned" @@ -70,7 +70,7 @@ def print_tap_info(taps) ...
false
Other
Homebrew
brew
b9b07fc082f72dd0c3a886735cbcffe7f7244733.json
cmd/search: fix Rubocop warnings.
Library/Homebrew/cmd/search.rb
@@ -71,7 +71,7 @@ def search puts end puts msg - elsif count == 0 + elsif count.zero? puts "No formula found for #{query.inspect}." begin GitHub.print_pull_requests_matching(query) @@ -100,7 +100,7 @@ def search SEARCHABLE_TAPS = O...
false
Other
Homebrew
brew
f9c621304da00c0645950506a4d7eddab70ccbdf.json
cmd/prune: fix Rubocop warnings.
Library/Homebrew/cmd/prune.rb
@@ -47,14 +47,16 @@ def prune end end - if ObserverPathnameExtension.total.zero? - puts "Nothing pruned" if ARGV.verbose? - else - n, d = ObserverPathnameExtension.counts - print "Pruned #{n} symbolic links " - print "and #{d} directories " if d > 0 - puts "from #{HOMEBREW_P...
false
Other
Homebrew
brew
ae43b79ca2b4e9ad595fbc70854423e214206102.json
cmd/missing: fix Rubocop warnings.
Library/Homebrew/cmd/missing.rb
@@ -18,7 +18,7 @@ def missing Diagnostic.missing_deps(ff) do |name, missing| print "#{name}: " if ff.size > 1 - puts "#{missing * " "}" + puts (missing * " ").to_s end end end
false
Other
Homebrew
brew
4e090530b11bbd61c13024bbdb1ef82387b5fb86.json
cmd/log: fix Rubocop warnings.
Library/Homebrew/cmd/log.rb
@@ -18,7 +18,7 @@ def log private - def git_log(path=nil) + def git_log(path = nil) if File.exist? "#{`git rev-parse --show-toplevel`.chomp}/.git/shallow" opoo <<-EOS.undent The git repository is a shallow clone therefore the filtering may be incorrect.
false
Other
Homebrew
brew
9d782454abc21787e26885a5aa17114c60312919.json
cmd/list: fix Rubocop warnings.
Library/Homebrew/cmd/list.rb
@@ -29,7 +29,7 @@ def list # Unbrewed uses the PREFIX, which will exist # Things below use the CELLAR, which doesn't until the first formula is installed. unless HOMEBREW_CELLAR.exist? - raise NoSuchKegError.new(ARGV.named.first) unless ARGV.named.empty? + raise NoSuchKegError, ARGV.named.first...
false
Other
Homebrew
brew
5d761f651abf13cc461398c6d542d495a1766a48.json
cmd/install: fix Rubocop warnings.
Library/Homebrew/cmd/install.rb
@@ -71,13 +71,16 @@ def install raise "Specify `--HEAD` in uppercase to build from trunk." end - ARGV.named.each do |name| - if !File.exist?(name) && - (name =~ HOMEBREW_TAP_FORMULA_REGEX || name =~ HOMEBREW_CASK_TAP_FORMULA_REGEX) + unless ARGV.force? + ARGV.named.each do |name| +...
false
Other
Homebrew
brew
990ee4f36c1d65f712c3ff05ba011cf8d92cba32.json
cmd/info: fix Rubocop warnings.
Library/Homebrew/cmd/info.rb
@@ -45,7 +45,7 @@ def print_info end else ARGV.named.each_with_index do |f, i| - puts unless i == 0 + puts unless i.zero? begin if f.include?("/") || File.exist?(f) info_formula Formulary.factory(f)
false
Other
Homebrew
brew
d9b8d0f6b11a7928dd997efb8905a9019ec6a6e9.json
cmd/help: fix Rubocop warnings.
Library/Homebrew/cmd/help.rb
@@ -1,4 +1,4 @@ -HOMEBREW_HELP = <<-EOS +HOMEBREW_HELP = <<-EOS.freeze Example usage: brew search [TEXT|/REGEX/] brew (info|home|options) [FORMULA...] @@ -78,11 +78,11 @@ def command_help(path) HOMEBREW_HELP else help_lines.map do |line| - line.slice(2..-1). - sub(/^ \* /, "#{...
false
Other
Homebrew
brew
c8084b17437cff4aa28997246860cdba591e2f52.json
cmd/fetch: fix Rubocop warnings.
Library/Homebrew/cmd/fetch.rb
@@ -56,11 +56,10 @@ def fetch end end - unless fetched_bottle - fetch_formula(f) - f.resources.each { |r| fetch_resource(r) } - f.patchlist.each { |p| fetch_patch(p) if p.external? } - end + next if fetched_bottle + fetch_formula(f) + f.resources.each { |r...
false
Other
Homebrew
brew
c45e36ffde1805ec7706fa28895b120909f69de7.json
cmd/doctor: fix Rubocop warnings.
Library/Homebrew/cmd/doctor.rb
@@ -40,20 +40,19 @@ def doctor end out = checks.send(method) - unless out.nil? || out.empty? - if first_warning - $stderr.puts <<-EOS.undent + next if out.nil? || out.empty? + if first_warning + $stderr.puts <<-EOS.undent #{Tty.white}Please note that th...
false
Other
Homebrew
brew
5e0c22202955243e07ab18a56ea8019b3dd200c6.json
cmd/desc: fix Rubocop warnings.
Library/Homebrew/cmd/desc.rb
@@ -26,14 +26,12 @@ def desc results.print elsif search_type.size > 1 odie "Pick one, and only one, of -s/--search, -n/--name, or -d/--description." + elsif arg = ARGV.named.first + regex = Homebrew.query_regexp(arg) + results = Descriptions.search(regex, search_type.first) + result...
false
Other
Homebrew
brew
128729988ed8feadbdac31d4edd613c5afa64d24.json
cmd/commands: fix Rubocop warnings.
Library/Homebrew/cmd/commands.rb
@@ -41,22 +41,20 @@ def internal_developer_commands end def external_commands - paths.reduce([]) do |cmds, path| + paths.each_with_object([]) do |path, cmds| Dir["#{path}/brew-*"].each do |file| next unless File.executable?(file) cmd = File.basename(file, ".rb")[5..-1] cm...
false
Other
Homebrew
brew
caecead7a7157e51b4ff3989604816e087707895.json
os/mac/xquartz: fix Rubocop warnings.
Library/Homebrew/os/mac/xquartz.rb
@@ -5,9 +5,9 @@ module Mac module XQuartz extend self - FORGE_BUNDLE_ID = "org.macosforge.xquartz.X11" - APPLE_BUNDLE_ID = "org.x.X11" - FORGE_PKG_ID = "org.macosforge.xquartz.pkg" + FORGE_BUNDLE_ID = "org.macosforge.xquartz.X11".freeze + APPLE_BUNDLE_ID = "org.x.X11".freeze + ...
false
Other
Homebrew
brew
8271e357867692edfddf3d70328dd568bd7eebf2.json
os/mac/xcode: fix Rubocop warnings.
Library/Homebrew/os/mac/xcode.rb
@@ -3,8 +3,8 @@ module Mac module Xcode extend self - V4_BUNDLE_ID = "com.apple.dt.Xcode" - V3_BUNDLE_ID = "com.apple.Xcode" + V4_BUNDLE_ID = "com.apple.dt.Xcode".freeze + V3_BUNDLE_ID = "com.apple.Xcode".freeze def latest_version case MacOS.version @@ -104,18 +104,17...
false
Other
Homebrew
brew
00f5aa81f2b2e5c29d6afdeb7a4025a4620e7df7.json
os/mac/version: fix Rubocop warnings.
Library/Homebrew/os/mac/version.rb
@@ -12,8 +12,8 @@ class Version < ::Version :lion => "10.7", :snow_leopard => "10.6", :leopard => "10.5", - :tiger => "10.4" - } + :tiger => "10.4", + }.freeze def self.from_symbol(sym) str = SYMBOLS.fetch(sym) do
false
Other
Homebrew
brew
f421374af1c70880e8e3abf0362f3efb55f62baf.json
os/mac/sdk: fix Rubocop warnings.
Library/Homebrew/os/mac/sdk.rb
@@ -24,7 +24,7 @@ def sdk_for(v) def latest_sdk return if sdk_paths.empty? - v, path = sdk_paths.max {|a, b| OS::Mac::Version.new(a[0]) <=> OS::Mac::Version.new(b[0])} + v, path = sdk_paths.max { |a, b| OS::Mac::Version.new(a[0]) <=> OS::Mac::Version.new(b[0]) } SDK.new v, path ...
false
Other
Homebrew
brew
ecda1c9c54bce43803236fdf1d92ce452905e9be.json
os/mac/linkage_checker: fix Rubocop warnings.
Library/Homebrew/os/mac/linkage_checker.rb
@@ -51,28 +51,28 @@ def check_dylibs end def check_undeclared_deps - filter_out = proc do |dep| - next true if dep.build? - next false unless dep.optional? || dep.recommended? - formula.build.without?(dep) - end - declared_deps = formula.deps.reject { |dep| filter_out.call(de...
false
Other
Homebrew
brew
6d1d3ff013dbf8e6bedbb9710fa15f4749fcc4e3.json
os/mac/cctools_mach: fix Rubocop warnings.
Library/Homebrew/os/mac/cctools_mach.rb
@@ -73,7 +73,7 @@ def parse_otool_L_output id = libs.shift[OTOOL_RX, 1] if path.dylib? libs.map! { |lib| lib[OTOOL_RX, 1] }.compact! - return id, libs + [id, libs] end end
false
Other
Homebrew
brew
d1191c8bb0a60baf14f78cf7c5e903aa363ce53e.json
os/mac/architecture_list: fix Rubocop warnings.
Library/Homebrew/os/mac/architecture_list.rb
@@ -28,7 +28,7 @@ def universal? end def ppc? - (Hardware::CPU::PPC_32BIT_ARCHS+Hardware::CPU::PPC_64BIT_ARCHS).any? { |a| self.include? a } + (Hardware::CPU::PPC_32BIT_ARCHS+Hardware::CPU::PPC_64BIT_ARCHS).any? { |a| include? a } end # @private @@ -48,7 +48,7 @@ def as_cmake_arch_flags def i...
false
Other
Homebrew
brew
cefaef75e1f7f8a4332ad5bd7468be7b3eead104.json
os/mac: fix Rubocop warnings.
Library/Homebrew/os/mac.rb
@@ -200,7 +200,7 @@ def preferred_arch "7.3" => { :clang => "7.3", :clang_build => 703 }, "7.3.1" => { :clang => "7.3", :clang_build => 703 }, "8.0" => { :clang => "8.0", :clang_build => 800 }, - } + }.freeze def compilers_standard? STANDARD_COMPILERS.fetch(Xcode.version.to_...
false
Other
Homebrew
brew
5cba530eef15ece440be63adb4d625018c97badc.json
requirements/x11_requirement: fix Rubocop warnings.
Library/Homebrew/requirements/x11_requirement.rb
@@ -12,7 +12,7 @@ class X11Requirement < Requirement def initialize(name = "x11", tags = []) @name = name - if /(\d\.)+\d/ === tags.first + if /(\d\.)+\d/ =~ tags.first @min_version = Version.create(tags.shift) @min_version_string = " #{@min_version}" else @@ -33,7 +33,7 @@ def messag...
false
Other
Homebrew
brew
784e804fc23bbfa83a0104bb138f4802f8397d8a.json
requirements/ruby_requirement: fix Rubocop warnings.
Library/Homebrew/requirements/ruby_requirement.rb
@@ -3,7 +3,7 @@ class RubyRequirement < Requirement default_formula "ruby" def initialize(tags) - @version = tags.shift if /(\d\.)+\d/ === tags.first + @version = tags.shift if /(\d\.)+\d/ =~ tags.first raise "RubyRequirement requires a version!" unless @version super end
false
Other
Homebrew
brew
dab681e71563b8d633d290f2f381a2101b56a3d8.json
requirements/perl_requirement: fix Rubocop warnings.
Library/Homebrew/requirements/perl_requirement.rb
@@ -3,7 +3,7 @@ class PerlRequirement < Requirement default_formula "perl" def initialize(tags) - @version = tags.shift if /^\d+\.\d+$/ === tags.first + @version = tags.shift if /^\d+\.\d+$/ =~ tags.first raise "PerlRequirement requires a version!" unless @version super end
false
Other
Homebrew
brew
fb0e121686fa5212362d701b1d0dfb705c56c5d6.json
requirements/java_requirement: fix Rubocop warnings.
Library/Homebrew/requirements/java_requirement.rb
@@ -9,7 +9,7 @@ class JavaRequirement < Requirement next false unless File.executable? "/usr/libexec/java_home" args = %w[--failfast] - args << "--version" << "#{@version}" if @version + args << "--version" << @version.to_s if @version @java_home = Utils.popen_read("/usr/libexec/java_home", *args...
false
Other
Homebrew
brew
7e42c5d08003fd38addbcd84af17df84e14a69b2.json
requirements/emacs_requirement: fix Rubocop warnings.
Library/Homebrew/requirements/emacs_requirement.rb
@@ -3,7 +3,7 @@ class EmacsRequirement < Requirement default_formula "emacs" def initialize(tags) - @version = tags.shift if /\d+\.*\d*/ === tags.first + @version = tags.shift if /\d+\.*\d*/ =~ tags.first super end
false
Other
Homebrew
brew
d0c33b370528ce57bfc049a3b939cada1481cc96.json
bottle: use key/value rather than field. Consistent naming is good.
Library/Homebrew/dev-cmd/bottle.rb
@@ -289,17 +289,17 @@ def bottle_formula(f) old_spec = f.bottle_specification if ARGV.include?("--keep-old") && !old_spec.checksums.empty? - mismatches = [:root_url, :prefix, :cellar, :rebuild].select do |field| - old_spec.send(field) != bottle.send(field) + mismatches = [:root_url, :prefix...
false
Other
Homebrew
brew
ba852444131d021b1190cb670b038b78818229fb.json
language/python_virtualenv_constants: fix Rubocop warnings.
Library/Homebrew/language/python_virtualenv_constants.rb
@@ -1,2 +1,2 @@ -PYTHON_VIRTUALENV_URL = "https://files.pythonhosted.org/packages/5c/79/5dae7494b9f5ed061cff9a8ab8d6e1f02db352f3facf907d9eb614fb80e9/virtualenv-15.0.2.tar.gz" -PYTHON_VIRTUALENV_SHA256 = "fab40f32d9ad298fba04a260f3073505a16d52539a84843cf8c8369d4fd17167" +PYTHON_VIRTUALENV_URL = "https://files.pythonhost...
false
Other
Homebrew
brew
16be0f105ed3eef07133cdd09e48e562b85b7697.json
language/python: fix Rubocop warnings.
Library/Homebrew/language/python.rb
@@ -187,12 +187,11 @@ def create # Robustify symlinks to survive python3 patch upgrades @venv_root.find do |f| next unless f.symlink? - if (rp = f.realpath.to_s).start_with? HOMEBREW_CELLAR - python = rp.include?("python3") ? "python3" : "python" - ...
false
Other
Homebrew
brew
bde8d69d6e1129530fa2bbe1e88cf88e350521af.json
language/node: fix Rubocop warnings.
Library/Homebrew/language/node.rb
@@ -21,7 +21,7 @@ def self.std_npm_install_args(libexec) setup_npm_environment # tell npm to not install .brew_home by adding it to the .npmignore file # (or creating a new one if no .npmignore file already exists) - open(".npmignore", "a") { |f| f.write( "\n.brew_home\n") } + open(".npmi...
false
Other
Homebrew
brew
78603a24f687b75e5487953f9212667e14cba8d2.json
language/haskell: fix Rubocop warnings.
Library/Homebrew/language/haskell.rb
@@ -72,7 +72,7 @@ def cabal_install_tools(*tools) end def install_cabal_package(*args) - options = if args[-1].kind_of?(Hash) then args.pop else {} end + options = args[-1].is_a?(Hash) ? args.pop : {} cabal_sandbox do cabal_install_tools(*options[:using]) if options[:...
false
Other
Homebrew
brew
30fd4f3fe5d13f4fce9ba273580073327e17cf35.json
diagnostic: remove duplicate checks.
Library/Homebrew/diagnostic.rb
@@ -283,35 +283,16 @@ def check_for_broken_symlinks EOS end - def __check_subdir_access(base) - target = HOMEBREW_PREFIX+base - return unless target.exist? - - cant_read = [] - target.find do |d| - next unless d.directory? - cant_read << d unless d.wr...
true
Other
Homebrew
brew
30fd4f3fe5d13f4fce9ba273580073327e17cf35.json
diagnostic: remove duplicate checks.
Library/Homebrew/test/test_diagnostic.rb
@@ -83,17 +83,6 @@ def test_check_access_cellar HOMEBREW_CELLAR.chmod mod end - def test_check_access_prefix_opt - opt = HOMEBREW_PREFIX.join("opt") - opt.mkpath - opt.chmod 0555 - - assert_match "#{opt} isn't writable.", - @checks.check_access_prefix_opt - ensure - opt.unlink - end - ...
true
Other
Homebrew
brew
ae57057afae0a714143de090a62ea772b097569c.json
help: use Commands module.
Library/Homebrew/cmd/help.rb
@@ -31,12 +31,14 @@ # NOTE Keep lines less than 80 characters! Wrapping is just not cricket. # NOTE The reason the string is at the top is so 25 lines is easy to measure! +require "commands" + module Homebrew def help(cmd = nil, flags = {}) # Resolve command aliases and find file containing the implementat...
false
Other
Homebrew
brew
49dcbee99c46d92d65e9132a555ed3fc2865c1e6.json
command: use Commands module.
Library/Homebrew/cmd/command.rb
@@ -1,27 +1,20 @@ #: * `command` <cmd>: #: Display the path to the file which is used when invoking `brew` <cmd>. +require "commands" + module Homebrew def command abort "This command requires a command argument" if ARGV.empty? cmd = ARGV.first cmd = HOMEBREW_INTERNAL_COMMAND_ALIASES.fetch(cm...
false
Other
Homebrew
brew
0bb7fda143f3a609fdfed27e84422ff55f85db02.json
commands: add commands module for path lookup.
Library/Homebrew/commands.rb
@@ -0,0 +1,13 @@ +module Commands + def self.path(cmd) + if File.exist?(HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.sh") + HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.sh" + elsif File.exist?(HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.sh") + HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.sh" + elsif File.exist?(HOMEBREW_LIBRARY_PATH/...
true
Other
Homebrew
brew
0bb7fda143f3a609fdfed27e84422ff55f85db02.json
commands: add commands module for path lookup.
Library/Homebrew/test/test_commands.rb
@@ -63,16 +63,16 @@ def test_external_commands def test_internal_command_path assert_equal HOMEBREW_LIBRARY_PATH/"cmd/rbcmd.rb", - Homebrew.send(:internal_command_path, "rbcmd") + Commands.path("rbcmd") assert_equal HOMEBREW_LIBRARY_PATH/"cmd/shcmd.sh", - H...
true
Other
Homebrew
brew
71881fd7a66227738a654d98f04647d412c11980.json
Add DEVELOPER COMMANDS to manpage.
Library/Homebrew/dev-cmd/man.rb
@@ -33,11 +33,8 @@ def regenerate_man_pages convert_man_page(cask_markup, TARGET_MAN_PATH/"brew-cask.1") end - def build_man_page - template = (SOURCE_PATH/"brew.1.md.erb").read - variables = OpenStruct.new - - variables[:commands] = Pathname.glob("#{HOMEBREW_LIBRARY_PATH}/cmd/*.{rb,sh}"). + def pa...
true
Other
Homebrew
brew
71881fd7a66227738a654d98f04647d412c11980.json
Add DEVELOPER COMMANDS to manpage.
Library/Homebrew/manpages/brew.1.md.erb
@@ -50,6 +50,10 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note <%= commands.join("\n") %> +## DEVELOPER COMMANDS + +<%= developer_commands.join("\n") %> + ## EXTERNAL COMMANDS Homebrew, like `git`(1), supports external commands. These are executable
true
Other
Homebrew
brew
71881fd7a66227738a654d98f04647d412c11980.json
Add DEVELOPER COMMANDS to manpage.
share/doc/homebrew/brew.1.html
@@ -39,29 +39,6 @@ <h2 id="COMMANDS">COMMANDS</h2> Read more at <a href="https://git.io/brew-analytics" data-bare-link="true">https://git.io/brew-analytics</a>.</p></dd> <dt><code>analytics</code> (<code>on</code>|<code>off</code>)</dt><dd><p>Turn on/off Homebrew's analytics.</p></dd> <dt><code>analytics</code> <cod...
true
Other
Homebrew
brew
71881fd7a66227738a654d98f04647d412c11980.json
Add DEVELOPER COMMANDS to manpage.
share/man/man1/brew.1
@@ -56,31 +56,6 @@ Turn on/off Homebrew\'s analytics\. Regenerate UUID used in Homebrew\'s analytics\. . .TP -\fBaudit\fR [\fB\-\-strict\fR] [\fB\-\-online\fR] [\fB\-\-new\-formula\fR] [\fB\-\-display\-cop\-names\fR] [\fB\-\-display\-filename\fR] [\fIformulae\fR] -Check \fIformulae\fR for Homebrew coding style viola...
true
Other
Homebrew
brew
4f1d47bc156253ab0eabf6b7aba1fcfa46d80633.json
Test source.path on Tab.create and .for_formula
Library/Homebrew/test/test_tab.rb
@@ -121,6 +121,40 @@ def test_from_file assert_equal source_path, tab.source["path"] end + def test_create + f = formula { url "foo-1.0" } + compiler = DevelopmentTools.default_compiler + stdlib = :libcxx + tab = Tab.create(f, compiler, stdlib) + + assert_equal f.path.to_s, tab.source["path"] ...
true
Other
Homebrew
brew
4f1d47bc156253ab0eabf6b7aba1fcfa46d80633.json
Test source.path on Tab.create and .for_formula
Library/Homebrew/test/testing_env.rb
@@ -72,8 +72,8 @@ class TestCase < ::Minitest::Test TEST_SHA1 = "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef".freeze TEST_SHA256 = "deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef".freeze - def formula(name = "formula_name", path = Formulary.core_path(name), spec = :stable, &block) - ...
true
Other
Homebrew
brew
f9e16ee2e04b7b23b273bfa683ab54a85ed40660.json
Combine Tab alias_path with source.path
Library/Homebrew/tab.rb
@@ -27,11 +27,10 @@ def self.create(formula, compiler, stdlib) "time" => Time.now.to_i, "source_modified_time" => formula.source_modified_time.to_i, "HEAD" => HOMEBREW_REPOSITORY.git_head, - "alias_path" => formula.alias_path.to_s, "compiler" => compiler, "stdlib" => stdlib, ...
true
Other
Homebrew
brew
f9e16ee2e04b7b23b273bfa683ab54a85ed40660.json
Combine Tab alias_path with source.path
Library/Homebrew/test/test_tab.rb
@@ -43,9 +43,9 @@ def test_defaults assert_nil tab.stable_version assert_nil tab.devel_version assert_nil tab.head_version - assert_nil tab.alias_path assert_equal DevelopmentTools.default_compiler, tab.cxxstdlib.compiler assert_nil tab.cxxstdlib.type + assert_nil tab.source["path"] en...
true
Other
Homebrew
brew
159ba9b012415ec5bd1c446c66a02702a7909225.json
test-bot: put exception, retry on missing formula. This will be useful in debugging (and recovering from) the situation where sometimes formulae can't be found when specifying multiple on the command-line.
Library/Homebrew/dev-cmd/test-bot.rb
@@ -247,11 +247,13 @@ def no_args? def safe_formula_canonical_name(formula_name) Formulary.factory(formula_name).full_name - rescue TapFormulaUnavailableError => e + rescue TapFormulaUnavailableError, FormulaUnavailableError => e raise if e.tap.installed? test "brew", "tap", e.tap.name...
false
Other
Homebrew
brew
2498d99a143d0e50e92a0aa60316d47c9ea83edc.json
Implement opoo in bash
Library/Homebrew/brew.sh
@@ -1,20 +1,35 @@ HOMEBREW_VERSION="0.9.9" -onoe() { - if [[ -t 2 ]] # check whether stderr is a tty. +o() { + if [[ $# -eq 0 ]] then - echo -ne "\033[4;31mError\033[0m: " >&2 # highlight Error with underline and red color + /bin/cat else - echo -n "Error: " >&2 + echo "$*" fi - if [[ $# -eq ...
false
Other
Homebrew
brew
d8a2a90daccfb23705ef9eada2f49b800ec2c9ee.json
test-bot: add missing @tap check.
Library/Homebrew/dev-cmd/test-bot.rb
@@ -671,7 +671,7 @@ def homebrew # test no-op update from current commit (to current commit, a no-op). test "brew", "update-test", "--commit=HEAD" end - else + elsif @tap test "brew", "readall", "--aliases", @tap.name end end
false
Other
Homebrew
brew
0ef3e1e0dcbcd5aa55408fe81d23613e1c2c5e79.json
Preserve alias when installing formulae Part of #567
Library/Homebrew/formula.rb
@@ -58,6 +58,11 @@ class Formula # e.g. `this-formula` attr_reader :name + # The name specified when installing this {Formula}. + # Could be the name of the {Formula}, or an alias. + # e.g. `another-name-for-this-formula` + attr_reader :install_name + # The fully-qualified name of this {Formula}. # Fo...
true
Other
Homebrew
brew
0ef3e1e0dcbcd5aa55408fe81d23613e1c2c5e79.json
Preserve alias when installing formulae Part of #567
Library/Homebrew/formula_installer.rb
@@ -589,7 +589,7 @@ def build -I #{HOMEBREW_LOAD_PATH} -- #{HOMEBREW_LIBRARY_PATH}/build.rb - #{formula.path} + #{formula.install_ref} ].concat(build_argv) Sandbox.print_sandbox_message if Sandbox.formula?(formula)
true
Other
Homebrew
brew
0ef3e1e0dcbcd5aa55408fe81d23613e1c2c5e79.json
Preserve alias when installing formulae Part of #567
Library/Homebrew/formulary.rb
@@ -68,15 +68,18 @@ class FormulaLoader attr_reader :name # The formula's ruby file's path or filename attr_reader :path + # The name used to install the formula + attr_reader :install_name def initialize(name, path) @name = name @path = path.resolved_path + @install_name ...
true
Other
Homebrew
brew
0ef3e1e0dcbcd5aa55408fe81d23613e1c2c5e79.json
Preserve alias when installing formulae Part of #567
Library/Homebrew/tab.rb
@@ -27,6 +27,7 @@ def self.create(formula, compiler, stdlib) "time" => Time.now.to_i, "source_modified_time" => formula.source_modified_time.to_i, "HEAD" => HOMEBREW_REPOSITORY.git_head, + "install_name" => formula.install_name, "compiler" => compiler, "stdlib" => stdlib, ...
true
Other
Homebrew
brew
0ef3e1e0dcbcd5aa55408fe81d23613e1c2c5e79.json
Preserve alias when installing formulae Part of #567
Library/Homebrew/test/fixtures/receipt.json
@@ -11,6 +11,7 @@ "poured_from_bottle": true, "time": 1403827774, "HEAD": "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef", + "install_name": "test-formula", "stdlib": "libcxx", "compiler": "clang", "source": {
true