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
4f95f7ff84eb6a65b4b6d08af90d1e40e2ccb4fe.json
tests: add cmd/irb integration test (#501)
Library/Homebrew/test/test_integration_cmds.rb
@@ -690,4 +690,20 @@ def test_unlink cmd("install", "testball") assert_match "Would remove", cmd("unlink", "--dry-run", "testball") end + + def test_irb + assert_match "'v8'.f # => instance of the v8 formula", + cmd("irb", "--examples") + + setup_test_formula "testball" + + irb_test = HOMEBR...
false
Other
Homebrew
brew
5768e32ad20208e8c5c1029ef2c9b47abd2caa2d.json
test-bot: fix coverage on Travis CI Make sure to call `brew tests` only once with `--coverage` to avoid expensive multiple runs and to prevent later runs from overwriting previously sent results to Coveralls. (The previous setup overwrote the results from a regular run with results from the `--generic` run.) The `--n...
Library/Homebrew/dev-cmd/test-bot.rb
@@ -659,14 +659,15 @@ def homebrew if @tap.nil? tests_args = [] + tests_args_coverage = [] if RUBY_TWO tests_args << "--official-cmd-taps" - tests_args << "--coverage" if ENV["TRAVIS"] + tests_args_coverage << "--coverage" if ENV["TRAVIS"] end ...
false
Other
Homebrew
brew
d7ee54129310de2b8b4989e6a47607fd1fb7db6c.json
reinstall: handle new options Since we are loading options as Formula#build from tab, we will have to explicitly read options from ARGV as well. Fixes #3066. Closes #537. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/cmd/reinstall.rb
@@ -11,7 +11,8 @@ def reinstall end def reinstall_formula(f) - options = f.build.used_options + options = BuildOptions.new(Options.create(ARGV.flags_only), f.options).used_options + options |= f.build.used_options notice = "Reinstalling #{f.full_name}" notice += " with #{options * ", "}" u...
false
Other
Homebrew
brew
820b6347b8731faed631e4cef8e4e90a52d33501.json
remove unnecessary `Tab.for_formula` We already loaded tab in ARGV.resolved_formulae or Formulary.from_rack
Library/Homebrew/cmd/leaves.rb
@@ -12,11 +12,10 @@ def leaves installed.each do |f| deps = [] - tab = Tab.for_formula(f) f.deps.each do |dep| if dep.optional? || dep.recommended? - deps << dep.to_formula.full_name if tab.with?(dep) + deps << dep.to_formula.full_name if f.build.with?(dep) ...
true
Other
Homebrew
brew
820b6347b8731faed631e4cef8e4e90a52d33501.json
remove unnecessary `Tab.for_formula` We already loaded tab in ARGV.resolved_formulae or Formulary.from_rack
Library/Homebrew/cmd/reinstall.rb
@@ -11,8 +11,7 @@ def reinstall end def reinstall_formula(f) - tab = Tab.for_formula(f) - options = tab.used_options | f.build.used_options + options = f.build.used_options notice = "Reinstalling #{f.full_name}" notice += " with #{options * ", "}" unless options.empty? @@ -25,7 +24,7 @@ de...
true
Other
Homebrew
brew
820b6347b8731faed631e4cef8e4e90a52d33501.json
remove unnecessary `Tab.for_formula` We already loaded tab in ARGV.resolved_formulae or Formulary.from_rack
Library/Homebrew/cmd/upgrade.rb
@@ -66,11 +66,10 @@ def upgrade_pinned? def upgrade_formula(f) outdated_keg = Keg.new(f.linked_keg.resolved_path) if f.linked_keg.directory? - tab = Tab.for_formula(f) fi = FormulaInstaller.new(f) - fi.options = tab.used_options - fi.build_bottle = ARGV.build_bottle? || (!f....
true
Other
Homebrew
brew
91a47a9ed6d85c1bf8f507cdfef4462a07f61831.json
LinkageChecker: simplify logic (#538) BuiltOptions#without? already handles the option_names for dependencies. Also check disabled recommended deps.
Library/Homebrew/os/mac/linkage_checker.rb
@@ -53,7 +53,8 @@ def check_dylibs def check_undeclared_deps filter_out = proc do |dep| next true if dep.build? - dep.optional? && !dep.option_names.any? { |n| formula.build.with?(n) } + next false unless dep.optional? || dep.recommended? + formula.build.without?(dep) end ...
false
Other
Homebrew
brew
a59d346fcff9245db811f8d30f1871d0dc0e549e.json
xcode: track prerelease releases
Library/Homebrew/os/mac/xcode.rb
@@ -27,6 +27,11 @@ def latest_version end end + def prerelease? + # TODO: bump to version >= "8.1" after Xcode 8.0 is stable. + version > "7.3.1" + end + def outdated? version < latest_version end
false
Other
Homebrew
brew
2633f888d40314dee794dfba614c6e42f97f8c8a.json
extend/ARGV: avoid assignment in argument list Aside from being bad style, this also assigns to an unused variable.
Library/Homebrew/extend/ARGV.rb
@@ -29,14 +29,14 @@ def resolved_formulae f = Formulary.factory(name, spec) if f.any_version_installed? tab = Tab.for_formula(f) - resolved_spec = spec(default=nil) || tab.spec + resolved_spec = spec(nil) || tab.spec f.set_active_spec(resolved_spec) if f.send(re...
false
Other
Homebrew
brew
b51283424321cb996d0a587e9a62a070d21f3342.json
audit: prevent crash from nil exitstatus (#532) If rubocop invocation from brew audit exits with nil exitstatus, brew audit fails with 'undefined method `>' for nil:NilClass'.
Library/Homebrew/cmd/style.rb
@@ -63,8 +63,10 @@ def check_style_impl(files, output_type, options = {}) !$?.success? when :json json = Utils.popen_read_text("rubocop", "--format", "json", *args) - # exit status of 1 just means violations were found; others are errors - raise "Error while running rubocop" if $?.exitstatu...
false
Other
Homebrew
brew
242508fca4d2b167cef3c355722f3471594d7b4b.json
software_spec: use version dups for resources (#534) Also prevent the commit of formula's HeadVersion from passing to the resource. This is a fix of #531
Library/Homebrew/software_spec.rb
@@ -53,7 +53,7 @@ def owner=(owner) @resource.owner = self resources.each_value do |r| r.owner = self - r.version ||= version + r.version ||= (version.head? ? Version.create("HEAD") : version.dup) end patches.each { |p| p.owner = self } end
false
Other
Homebrew
brew
3fb5d70a729472a7d7f2a5d0d7b84248921fb583.json
Unify Version.create usage Substitue each Version.new and HeadVersion.new with Version.create to unify Version and HeadVersion instantiation among core code. Note that this does not relate to Mac::OS::Version class.
Library/Homebrew/cmd/audit.rb
@@ -606,7 +606,7 @@ def audit_specs case stable && stable.url when %r{download\.gnome\.org/sources}, %r{ftp\.gnome\.org/pub/GNOME/sources}i version = Version.parse(stable.url) - if version >= Version.new("1.0") + if version >= Version.create("1.0") minor_version = version.to_s.split(...
true
Other
Homebrew
brew
3fb5d70a729472a7d7f2a5d0d7b84248921fb583.json
Unify Version.create usage Substitue each Version.new and HeadVersion.new with Version.create to unify Version and HeadVersion instantiation among core code. Note that this does not relate to Mac::OS::Version class.
Library/Homebrew/cmd/create.rb
@@ -116,7 +116,7 @@ def url=(url) end update_path if @version - @version = Version.new(@version) + @version = Version.create(@version) else @version = Pathname.new(url).version end
true
Other
Homebrew
brew
3fb5d70a729472a7d7f2a5d0d7b84248921fb583.json
Unify Version.create usage Substitue each Version.new and HeadVersion.new with Version.create to unify Version and HeadVersion instantiation among core code. Note that this does not relate to Mac::OS::Version class.
Library/Homebrew/cmd/pull.rb
@@ -441,7 +441,7 @@ def any_bottle_tag def version(spec_type) version_str = info["versions"][spec_type.to_s] - version_str && Version.new(version_str) + version_str && Version.create(version_str) end def pkg_version(spec_type = :stable)
true
Other
Homebrew
brew
3fb5d70a729472a7d7f2a5d0d7b84248921fb583.json
Unify Version.create usage Substitue each Version.new and HeadVersion.new with Version.create to unify Version and HeadVersion instantiation among core code. Note that this does not relate to Mac::OS::Version class.
Library/Homebrew/diagnostic.rb
@@ -761,7 +761,7 @@ def check_filesystem_case_sensitive def check_git_version # https://help.github.com/articles/https-cloning-errors return unless Utils.git_available? - return unless Version.new(Utils.git_version) < Version.new("1.7.10") + return unless Version.create(Utils.git_...
true
Other
Homebrew
brew
3fb5d70a729472a7d7f2a5d0d7b84248921fb583.json
Unify Version.create usage Substitue each Version.new and HeadVersion.new with Version.create to unify Version and HeadVersion instantiation among core code. Note that this does not relate to Mac::OS::Version class.
Library/Homebrew/extend/ENV/shared.rb
@@ -325,6 +325,6 @@ def check_for_compiler_universal_support def gcc_with_cxx11_support?(cc) version = cc[/^gcc-(\d+(?:\.\d+)?)$/, 1] - version && Version.new(version) >= Version.new("4.8") + version && Version.create(version) >= Version.create("4.8") end end
true
Other
Homebrew
brew
3fb5d70a729472a7d7f2a5d0d7b84248921fb583.json
Unify Version.create usage Substitue each Version.new and HeadVersion.new with Version.create to unify Version and HeadVersion instantiation among core code. Note that this does not relate to Mac::OS::Version class.
Library/Homebrew/extend/os/mac/diagnostic.rb
@@ -287,8 +287,8 @@ def check_for_latest_xquartz return unless MacOS::XQuartz.version return if MacOS::XQuartz.provided_by_apple? - installed_version = Version.new(MacOS::XQuartz.version) - latest_version = Version.new(MacOS::XQuartz.latest_version) + installed_version = Version...
true
Other
Homebrew
brew
3fb5d70a729472a7d7f2a5d0d7b84248921fb583.json
Unify Version.create usage Substitue each Version.new and HeadVersion.new with Version.create to unify Version and HeadVersion instantiation among core code. Note that this does not relate to Mac::OS::Version class.
Library/Homebrew/formula.rb
@@ -1326,7 +1326,7 @@ def to_hash } end - hsh["installed"] = hsh["installed"].sort_by { |i| Version.new(i["version"]) } + hsh["installed"] = hsh["installed"].sort_by { |i| Version.create(i["version"]) } hsh end
true
Other
Homebrew
brew
3fb5d70a729472a7d7f2a5d0d7b84248921fb583.json
Unify Version.create usage Substitue each Version.new and HeadVersion.new with Version.create to unify Version and HeadVersion instantiation among core code. Note that this does not relate to Mac::OS::Version class.
Library/Homebrew/language/python.rb
@@ -5,7 +5,7 @@ module Python def self.major_minor_version(python) version = /\d\.\d/.match `#{python} --version 2>&1` return unless version - Version.new(version.to_s) + Version.create(version.to_s) end def self.homebrew_site_packages(version = "2.7")
true
Other
Homebrew
brew
3fb5d70a729472a7d7f2a5d0d7b84248921fb583.json
Unify Version.create usage Substitue each Version.new and HeadVersion.new with Version.create to unify Version and HeadVersion instantiation among core code. Note that this does not relate to Mac::OS::Version class.
Library/Homebrew/requirements/emacs_requirement.rb
@@ -11,7 +11,7 @@ def initialize(tags) next false unless which "emacs" next true unless @version emacs_version = Utils.popen_read("emacs", "--batch", "--eval", "(princ emacs-version)") - Version.new(emacs_version) >= Version.new(@version) + Version.create(emacs_version) >= Version.create(@version) ...
true
Other
Homebrew
brew
3fb5d70a729472a7d7f2a5d0d7b84248921fb583.json
Unify Version.create usage Substitue each Version.new and HeadVersion.new with Version.create to unify Version and HeadVersion instantiation among core code. Note that this does not relate to Mac::OS::Version class.
Library/Homebrew/requirements/perl_requirement.rb
@@ -12,7 +12,7 @@ def initialize(tags) which_all("perl").detect do |perl| perl_version = Utils.popen_read(perl, "--version")[/\(v(\d+\.\d+)(?:\.\d+)?\)/, 1] next unless perl_version - Version.new(perl_version.to_s) >= Version.new(@version) + Version.create(perl_version.to_s) >= Version.crea...
true
Other
Homebrew
brew
3fb5d70a729472a7d7f2a5d0d7b84248921fb583.json
Unify Version.create usage Substitue each Version.new and HeadVersion.new with Version.create to unify Version and HeadVersion instantiation among core code. Note that this does not relate to Mac::OS::Version class.
Library/Homebrew/requirements/python_requirement.rb
@@ -11,16 +11,16 @@ class PythonRequirement < Requirement version = python_short_version next unless version # Always use Python 2.7 for consistency on older versions of OSX. - version == Version.new("2.7") + version == Version.create("2.7") end env do short_version = python_short_vers...
true
Other
Homebrew
brew
3fb5d70a729472a7d7f2a5d0d7b84248921fb583.json
Unify Version.create usage Substitue each Version.new and HeadVersion.new with Version.create to unify Version and HeadVersion instantiation among core code. Note that this does not relate to Mac::OS::Version class.
Library/Homebrew/requirements/ruby_requirement.rb
@@ -12,7 +12,7 @@ def initialize(tags) which_all("ruby").detect do |ruby| version = /\d\.\d/.match Utils.popen_read(ruby, "--version") next unless version - Version.new(version.to_s) >= Version.new(@version) + Version.create(version.to_s) >= Version.create(@version) end end
true
Other
Homebrew
brew
3fb5d70a729472a7d7f2a5d0d7b84248921fb583.json
Unify Version.create usage Substitue each Version.new and HeadVersion.new with Version.create to unify Version and HeadVersion instantiation among core code. Note that this does not relate to Mac::OS::Version class.
Library/Homebrew/requirements/x11_requirement.rb
@@ -13,17 +13,17 @@ class X11Requirement < Requirement def initialize(name = "x11", tags = []) @name = name if /(\d\.)+\d/ === tags.first - @min_version = Version.new(tags.shift) + @min_version = Version.create(tags.shift) @min_version_string = " #{@min_version}" else - @min_vers...
true
Other
Homebrew
brew
3fb5d70a729472a7d7f2a5d0d7b84248921fb583.json
Unify Version.create usage Substitue each Version.new and HeadVersion.new with Version.create to unify Version and HeadVersion instantiation among core code. Note that this does not relate to Mac::OS::Version class.
Library/Homebrew/software_spec.rb
@@ -204,7 +204,7 @@ def add_dep_option(dep) class HeadSoftwareSpec < SoftwareSpec def initialize super - @resource.version = HeadVersion.new("HEAD") + @resource.version = Version.create("HEAD") end def verify_download_integrity(_fn)
true
Other
Homebrew
brew
3fb5d70a729472a7d7f2a5d0d7b84248921fb583.json
Unify Version.create usage Substitue each Version.new and HeadVersion.new with Version.create to unify Version and HeadVersion instantiation among core code. Note that this does not relate to Mac::OS::Version class.
Library/Homebrew/test/test_pkg_version.rb
@@ -7,12 +7,12 @@ def v(version) end def test_parse - assert_equal PkgVersion.new(Version.new("1.0"), 1), PkgVersion.parse("1.0_1") - assert_equal PkgVersion.new(Version.new("1.0"), 1), PkgVersion.parse("1.0_1") - assert_equal PkgVersion.new(Version.new("1.0"), 0), PkgVersion.parse("1.0") - assert_e...
true
Other
Homebrew
brew
3fb5d70a729472a7d7f2a5d0d7b84248921fb583.json
Unify Version.create usage Substitue each Version.new and HeadVersion.new with Version.create to unify Version and HeadVersion instantiation among core code. Note that this does not relate to Mac::OS::Version class.
Library/Homebrew/test/test_version_subclasses.rb
@@ -34,10 +34,10 @@ def test_compare_with_string end def test_compare_with_version - assert_operator @v, :>, Version.new("10.6") - assert_operator @v, :==, Version.new("10.7") - assert_operator @v, :===, Version.new("10.7") - assert_operator @v, :<, Version.new("10.8") + assert_operator @v, :>, V...
true
Other
Homebrew
brew
3fb5d70a729472a7d7f2a5d0d7b84248921fb583.json
Unify Version.create usage Substitue each Version.new and HeadVersion.new with Version.create to unify Version and HeadVersion instantiation among core code. Note that this does not relate to Mac::OS::Version class.
Library/Homebrew/test/test_versions.rb
@@ -4,17 +4,17 @@ class VersionTests < Homebrew::TestCase def test_accepts_objects_responding_to_to_str value = stub(:to_str => "0.1") - assert_equal "0.1", Version.new(value).to_s + assert_equal "0.1", Version.create(value).to_s end def test_raises_for_non_string_objects - assert_raises(TypeE...
true
Other
Homebrew
brew
3fb5d70a729472a7d7f2a5d0d7b84248921fb583.json
Unify Version.create usage Substitue each Version.new and HeadVersion.new with Version.create to unify Version and HeadVersion instantiation among core code. Note that this does not relate to Mac::OS::Version class.
Library/Homebrew/test/testing_env.rb
@@ -27,7 +27,7 @@ def version(v) end def assert_version_equal(expected, actual) - assert_equal Version.new(expected), actual + assert_equal Version.create(expected), actual end def assert_version_detected(expected, url, specs={})
true
Other
Homebrew
brew
454003c4c1ea43f4fd84db96017636fc4c50b318.json
test_formula: test new HEAD methods * Test `Formula#update_head_version` * Test `Formula#latest_head_prefix`
Library/Homebrew/test/test_formula.rb
@@ -158,6 +158,29 @@ def test_installed_prefix_devel assert_equal prefix, f.installed_prefix end + def test_latest_head_prefix + f = Testball.new + + stamps_with_revisions = [[111111, 1], [222222, 1], [222222, 2], [222222, 0]] + + stamps_with_revisions.each do |stamp, revision| + version = "HEA...
false
Other
Homebrew
brew
458f9a008cc5316de9ec18ebae3b0f3990583540.json
Apply tests to new HEAD format
Library/Homebrew/test/test_formula.rb
@@ -272,14 +272,14 @@ def test_version_with_revision assert_equal PkgVersion.parse("1.0_1"), f.pkg_version end - def test_head_ignores_revisions + def test_head_uses_revisions f = formula("test", Pathname.new(__FILE__).expand_path, :head) do url "foo-1.0.bar" revision 1 head "foo" ...
true
Other
Homebrew
brew
458f9a008cc5316de9ec18ebae3b0f3990583540.json
Apply tests to new HEAD format
Library/Homebrew/test/test_pkg_version.rb
@@ -35,7 +35,8 @@ def test_to_s assert_equal "1.0_1", PkgVersion.new(Version.new("1.0"), 1).to_s assert_equal "1.0", PkgVersion.new(Version.new("1.0"), 0).to_s assert_equal "1.0", PkgVersion.new(Version.new("1.0"), 0).to_s - assert_equal "HEAD", PkgVersion.new(Version.new("HEAD"), 1).to_s + assert_...
true
Other
Homebrew
brew
00cdd5f481d409b1874b95c7f149c717ffb0259f.json
Add HeadVersion tests
Library/Homebrew/test/test_versions.rb
@@ -55,7 +55,11 @@ def test_comparing_regular_versions def test_HEAD assert_operator version("HEAD"), :>, version("1.2.3") + assert_operator version("HEAD-abcdef"), :>, version("1.2.3") assert_operator version("1.2.3"), :<, version("HEAD") + assert_operator version("1.2.3"), :<, version("HEAD-fedcb...
true
Other
Homebrew
brew
00cdd5f481d409b1874b95c7f149c717ffb0259f.json
Add HeadVersion tests
Library/Homebrew/test/testing_env.rb
@@ -23,7 +23,7 @@ module Homebrew module VersionAssertions def version(v) - Version.new(v) + Version.create(v) end def assert_version_equal(expected, actual)
true
Other
Homebrew
brew
2e916110e4c561b3e4175da099fc795e85ddb822.json
Use HeadVersion for install/reinstall
Library/Homebrew/download_strategy.rb
@@ -135,6 +135,8 @@ def fetch clone_repo end + version.update_commit(last_commit) if head? + if @ref_type == :tag && @revision && current_revision unless current_revision == @revision raise <<-EOS.undent
true
Other
Homebrew
brew
2e916110e4c561b3e4175da099fc795e85ddb822.json
Use HeadVersion for install/reinstall
Library/Homebrew/formula.rb
@@ -287,6 +287,14 @@ def version active_spec.version end + def update_head_version + return unless head? + return unless head.downloader.is_a?(VCSDownloadStrategy) + return unless head.downloader.cached_location.exist? + + head.version.update_commit(head.downloader.last_commit) + end + # The ...
true
Other
Homebrew
brew
2e916110e4c561b3e4175da099fc795e85ddb822.json
Use HeadVersion for install/reinstall
Library/Homebrew/formula_installer.rb
@@ -586,13 +586,16 @@ def build end end + formula.update_head_version + if !formula.prefix.directory? || Keg.new(formula.prefix).empty_installation? raise "Empty installation" end rescue Exception ignore_interrupts do # any exceptions must leave us with nothing install...
true
Other
Homebrew
brew
2e916110e4c561b3e4175da099fc795e85ddb822.json
Use HeadVersion for install/reinstall
Library/Homebrew/pkg_version.rb
@@ -5,6 +5,8 @@ class PkgVersion RX = /\A(.+?)(?:_(\d+))?\z/ + attr_reader :version, :revision + def self.parse(path) _, version, revision = *path.match(RX) version = Version.create(version) @@ -38,8 +40,4 @@ def <=>(other) def hash version.hash ^ revision.hash end - - protected - - at...
true
Other
Homebrew
brew
2e916110e4c561b3e4175da099fc795e85ddb822.json
Use HeadVersion for install/reinstall
Library/Homebrew/software_spec.rb
@@ -29,6 +29,7 @@ class SoftwareSpec def_delegators :@resource, :cached_download, :clear_cache def_delegators :@resource, :checksum, :mirrors, :specs, :using def_delegators :@resource, :version, :mirror, *Checksum::TYPES + def_delegators :@resource, :downloader def initialize @resource = Resource.ne...
true
Other
Homebrew
brew
8a968a0b60dbc78f9f48be76762c9f050fa6416d.json
resource: detect HEAD versions
Library/Homebrew/resource.rb
@@ -159,7 +159,7 @@ def detect_version(val) case val when nil then Version.detect(url, specs) - when String then Version.new(val) + when String then Version.create(val) when Version then val else raise TypeError, "version '#{val.inspect}' should be a string"
false
Other
Homebrew
brew
2b078be186dec5d56ef11e1fcca4927506756704.json
test-bot: remove Jenkins Git debugging.
Library/Homebrew/dev-cmd/test-bot.rb
@@ -262,7 +262,6 @@ def safe_formula_canonical_name(formula_name) end def git(*args) - puts "#{@repository}: git #{args.join " "}" if ENV["JENKINS_HOME"] @repository.cd { Utils.popen_read("git", *args) } end
false
Other
Homebrew
brew
b62a2c7e7f9fc7f45931b61d7a534a6d6b02f391.json
add more test Closes #514. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/test/test_formulary.rb
@@ -90,12 +90,17 @@ def test_factory_from_alias alias_dir.rmtree end - def test_factory_from_rack + def test_factory_from_rack_and_from_keg formula = Formulary.factory(@path) installer = FormulaInstaller.new(formula) shutup { installer.install } keg = Keg.new(formula.prefix) - assert_...
true
Other
Homebrew
brew
b62a2c7e7f9fc7f45931b61d7a534a6d6b02f391.json
add more test Closes #514. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/test/test_tab.rb
@@ -29,6 +29,9 @@ def test_defaults assert_empty tab.used_options refute_predicate tab, :built_as_bottle refute_predicate tab, :poured_from_bottle + assert_predicate tab, :stable? + refute_predicate tab, :devel? + refute_predicate tab, :head? assert_nil tab.tap assert_nil tab.time ...
true
Other
Homebrew
brew
30bbb93f2189be88c799bfdb257216909bcd3fde.json
tab: add missing methods This makes `Tab` compatible with `BuildOptions`.
Library/Homebrew/tab.rb
@@ -179,6 +179,18 @@ def build_32_bit? include?("32-bit") end + def head? + spec == :head + end + + def devel? + spec == :devel + end + + def stable? + spec == :stable + end + def used_options Options.create(super) end
false
Other
Homebrew
brew
706e7e71a07784f14abbdf5f019428e04afcfae6.json
mac/super: restore definition of effective_sysroot In https://github.com/Homebrew/brew/commit/0d189fae57bad6c209b471eba9e0b254a2b40886 we completely removed `effective_sysroot`, which consequently left all the `effective_sysroot`/usr/include calls pointing at `/usr/include`. This is wildly problematic on systems where...
Library/Homebrew/extend/os/mac/extend/ENV/super.rb
@@ -7,6 +7,10 @@ def self.bin bin.realpath unless bin.nil? end + def effective_sysroot + MacOS::Xcode.without_clt? ? MacOS.sdk_path.to_s : nil + end + def homebrew_extra_paths paths = [] # On 10.9, there are shims for all tools in /usr/bin.
false
Other
Homebrew
brew
2a61c84be38866c5be788eebea932510608ba805.json
test-bot: handle inconsistent Jenkins GIT_URLs.
Library/Homebrew/dev-cmd/test-bot.rb
@@ -307,7 +307,7 @@ def diff_formulae(start_revision, end_revision, path, filter) elsif ENV["GIT_BRANCH"] && ENV["GIT_URL"] %r{origin/pr/(\d+)/(merge|head)} =~ ENV["GIT_BRANCH"] pr = $1 - @url = "#{ENV["GIT_URL"]}/pull/#{pr}" + @url = "#{ENV["GIT_URL"].chomp("/")}/pull/#{pr}" ...
false
Other
Homebrew
brew
b3ed00b791b5e95519b3a59a578a09dd084c44ab.json
test-bot: use another method to find Jenkins PR.
Library/Homebrew/dev-cmd/test-bot.rb
@@ -304,6 +304,11 @@ def diff_formulae(start_revision, end_revision, path, filter) @url = ENV["ghprbPullLink"] @hash = nil test "git", "checkout", "origin/master" + elsif ENV["GIT_BRANCH"] && ENV["GIT_URL"] + %r{origin/pr/(\d+)/(merge|head)} =~ ENV["GIT_BRANCH"] + pr = $1 +...
false
Other
Homebrew
brew
13730a9dadde8570e41cf5599b4f5c940014f190.json
move LinkageChecker to standalone file
Library/Homebrew/dev-cmd/linkage.rb
@@ -12,126 +12,21 @@ # --reverse - For each dylib the keg references, print the dylib followed by the # binaries which link to it. -require "set" -require "keg" -require "formula" +require "os/mac/linkage_checker" module Homebrew def linkage - found_broken_dylibs = false ARGV.kegs.ea...
true
Other
Homebrew
brew
13730a9dadde8570e41cf5599b4f5c940014f190.json
move LinkageChecker to standalone file
Library/Homebrew/os/mac/linkage_checker.rb
@@ -0,0 +1,113 @@ +require "set" +require "keg" +require "formula" + +class LinkageChecker + attr_reader :keg + attr_reader :brewed_dylibs, :system_dylibs, :broken_dylibs, :variable_dylibs + attr_reader :undeclared_deps, :reverse_links + + def initialize(keg) + @keg = keg + @brewed_dylibs = Hash.new { |h, k| ...
true
Other
Homebrew
brew
12c505c093523089710930ac2f393dcb2ac1ca6d.json
audit: avoid unnecessary regex Regex is way slower than normal String#include? and String#start_with?. Also, we often forget to proper escape them. So avoid using them if it is not necessary. Closes #503. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/cmd/audit.rb
@@ -114,6 +114,10 @@ def =~(regex) regex =~ @text end + def include?(s) + @text.include? s + end + def line_number(regex) index = @lines.index { |line| line =~ regex } index ? index + 1 : nil @@ -458,13 +462,13 @@ def audit_homepage # Check for http:// GitHub homepage urls, https:// i...
false
Other
Homebrew
brew
cdf4f42ab951214fb7fac0781091783552415944.json
cleaner: fix generic executable handling. (#498) Don't unset things that are already set as executable for the generic path. OS X overrides this behaviour and detects if it's an MachO executable but there's no cross-OS generic equivalent so just fall back to whatever the build system has set.
Library/Homebrew/cleaner.rb
@@ -67,7 +67,7 @@ def prune end def executable_path?(path) - path.text_executable? + path.text_executable? || path.executable? end # Clean a top-level (bin, sbin, lib) directory, recursively, by fixing file
false
Other
Homebrew
brew
23306ab434afc185e22a0f357a27e8da687620af.json
github: produce better curl error messages. (#441) * global: add RUBY_TWO global variable. * test-bot: use RUBY_TWO global variable. * github: produce better curl error messages. If we don't know why curl has failed then ensure that the error messages that it produced are included as part of the user output.
Library/Homebrew/dev-cmd/test-bot.rb
@@ -647,11 +647,9 @@ def homebrew @category = __method__ return if @skip_homebrew - ruby_two = RUBY_VERSION.split(".").first.to_i >= 2 - if @tap.nil? tests_args = [] - if ruby_two + if RUBY_TWO tests_args << "--official-cmd-taps" tests_args << "--...
true
Other
Homebrew
brew
23306ab434afc185e22a0f357a27e8da687620af.json
github: produce better curl error messages. (#441) * global: add RUBY_TWO global variable. * test-bot: use RUBY_TWO global variable. * github: produce better curl error messages. If we don't know why curl has failed then ensure that the error messages that it produced are included as part of the user output.
Library/Homebrew/global.rb
@@ -30,6 +30,7 @@ ) end RUBY_BIN = RUBY_PATH.dirname +RUBY_TWO = RUBY_VERSION.split(".").first.to_i >= 2 HOMEBREW_USER_AGENT_CURL = ENV["HOMEBREW_USER_AGENT_CURL"] HOMEBREW_USER_AGENT_RUBY = "#{ENV["HOMEBREW_USER_AGENT"]} ruby/#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"
true
Other
Homebrew
brew
23306ab434afc185e22a0f357a27e8da687620af.json
github: produce better curl error messages. (#441) * global: add RUBY_TWO global variable. * test-bot: use RUBY_TWO global variable. * github: produce better curl error messages. If we don't know why curl has failed then ensure that the error messages that it produced are included as part of the user output.
Library/Homebrew/utils/curl.rb
@@ -1,4 +1,5 @@ require "pathname" +require "open3" def curl_args(extra_args=[]) curl = Pathname.new ENV["HOMEBREW_CURL"] @@ -19,6 +20,15 @@ def curl(*args) end def curl_output(*args) - curl_args = curl_args(args) - ["--fail"] - Utils.popen_read_text(*curl_args) + curl_args = curl_args(args) + curl_args ...
true
Other
Homebrew
brew
23306ab434afc185e22a0f357a27e8da687620af.json
github: produce better curl error messages. (#441) * global: add RUBY_TWO global variable. * test-bot: use RUBY_TWO global variable. * github: produce better curl error messages. If we don't know why curl has failed then ensure that the error messages that it produced are included as part of the user output.
Library/Homebrew/utils/github.rb
@@ -146,7 +146,8 @@ def open(url, data=nil) args += ["--dump-header", "#{headers_tmpfile.path}"] - output, _, http_code = curl_output(url.to_s, *args).rpartition("\n") + output, errors, status = curl_output(url.to_s, *args) + output, _, http_code = output.rpartition("\n") output, _, htt...
true
Other
Homebrew
brew
ed1d1e51da6bf464d6e461f5214e49f17b1f1842.json
update.sh: improve verbose output and readability. (#486) Would have made it easier to debug https://github.com/Homebrew/homebrew-core/issues/2804 where wasn't clear which directory was causing the issue.
Library/Homebrew/cmd/update.sh
@@ -107,9 +107,8 @@ pop_stash() { [[ -z "$STASHED" ]] && return if [[ -n "$HOMEBREW_VERBOSE" ]] then + echo "Restoring your stashed changes to $DIR..." git stash pop - echo "Restoring your stashed changes to $DIR:" - git status --short --untracked-files else git stash pop "${QUIET_ARGS[@]...
false
Other
Homebrew
brew
768ba34b1428782a2df6c6d0b4d49241d257439e.json
style: use RuboCop 0.41.2, adjust defaults (#489) Changes to our style configuration: - Consolidate all rules related to Ruby 1.8 compatibility in one place. - Codify our de-facto preference for `alias_method` over `alias` (drops offense count by 54 after turning this on). - Drop `Style/SignalException` as `on...
Library/.rubocop.yml
@@ -3,9 +3,13 @@ AllCops: - 'Homebrew/vendor/**/*' - 'Homebrew/test/vendor/**/*' -# 1.8-style hash keys +# Ruby 1.8 compatibility +Style/DotPosition: + EnforcedStyle: trailing Style/HashSyntax: EnforcedStyle: hash_rockets +Style/TrailingCommaInArguments: + EnforcedStyleForMultiline: no_comma # ruby...
true
Other
Homebrew
brew
768ba34b1428782a2df6c6d0b4d49241d257439e.json
style: use RuboCop 0.41.2, adjust defaults (#489) Changes to our style configuration: - Consolidate all rules related to Ruby 1.8 compatibility in one place. - Codify our de-facto preference for `alias_method` over `alias` (drops offense count by 54 after turning this on). - Drop `Style/SignalException` as `on...
Library/Homebrew/cmd/style.rb
@@ -47,7 +47,7 @@ def check_style_json(files, options = {}) def check_style_impl(files, output_type, options = {}) fix = options[:fix] - Homebrew.install_gem_setup_path! "rubocop", "0.41.1" + Homebrew.install_gem_setup_path! "rubocop", "0.41.2" args = %W[ --force-exclusion
true
Other
Homebrew
brew
fe3915237ef0c530ce1260cf7d2d0ca0d9d0eed1.json
config: show homebrew ruby for all system (#492)
Library/Homebrew/extend/os/mac/system_config.rb
@@ -28,14 +28,8 @@ def describe_xquartz "#{MacOS::XQuartz.version} => #{describe_path(MacOS::XQuartz.prefix)}" end - def describe_system_ruby - s = "" - case RUBY_VERSION - when /^1\.[89]/, /^2\.0/ - s << "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}" - else - s << RUBY_VERSION...
true
Other
Homebrew
brew
fe3915237ef0c530ce1260cf7d2d0ca0d9d0eed1.json
config: show homebrew ruby for all system (#492)
Library/Homebrew/system_config.rb
@@ -85,6 +85,19 @@ def describe_ruby end end + def describe_homebrew_ruby_version + case RUBY_VERSION + when /^1\.[89]/, /^2\.0/ + "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}" + else + RUBY_VERSION + end + end + + def describe_homebrew_ruby + "#{describe_homebrew_r...
true
Other
Homebrew
brew
dff6bfde9a2b841b0b30eb5d54bee351b4594a89.json
ruby.sh: add test flag
Library/Homebrew/utils/ruby.sh
@@ -1,4 +1,33 @@ +origin-setup-ruby-path() { + if [[ -z "$HOMEBREW_DEVELOPER" ]] + then + unset HOMEBREW_RUBY_PATH + fi + + if [[ -z "$HOMEBREW_RUBY_PATH" ]] + then + if [[ -n "$HOMEBREW_OSX" ]] + then + HOMEBREW_RUBY_PATH="/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby" + ...
false
Other
Homebrew
brew
8f178187c0910864c9d811ed00ca93f0ad208d55.json
add file directory for vendor Ruby The vendor Ruby will be put inside `Library/Homebrew/vendor/portable-ruby/<version>`, with a symlink `Library/Homebrew/vendor/portable-ruby/current` pointed to it. In addition, a `Library/Homebrew/vendor/portable-ruby-version` will track the latest version of vendor binaries. This ...
.gitignore
@@ -20,6 +20,9 @@ /Library/PinnedTaps /Library/Taps +# Ignore vendored files within `Library` +/Library/Homebrew/vendor/portable-ruby/* + # Ignore `bin` contents (again). /bin
true
Other
Homebrew
brew
8f178187c0910864c9d811ed00ca93f0ad208d55.json
add file directory for vendor Ruby The vendor Ruby will be put inside `Library/Homebrew/vendor/portable-ruby/<version>`, with a symlink `Library/Homebrew/vendor/portable-ruby/current` pointed to it. In addition, a `Library/Homebrew/vendor/portable-ruby-version` will track the latest version of vendor binaries. This ...
Library/Homebrew/vendor/portable-ruby-version
@@ -0,0 +1 @@ +2.0.0-p648
true
Other
Homebrew
brew
a00995fa090f905a5fbba97a8c9270246e788a39.json
osxfuse_requirement: remove formula reference. We’re just supporting the Cask now.
Library/Homebrew/requirements/osxfuse_requirement.rb
@@ -2,11 +2,10 @@ class OsxfuseRequirement < Requirement fatal true - default_formula "osxfuse" cask "osxfuse" download "https://osxfuse.github.io/" - satisfy(:build_env => false) { Formula["osxfuse"].installed? || self.class.binary_osxfuse_installed? } + satisfy(:build_env => false) { self.class.binar...
false
Other
Homebrew
brew
f950261b99f130b536fa6881959c0a8b8682aff4.json
tuntap_requirement: remove formula reference. We’re just supporting the Cask now.
Library/Homebrew/requirements/tuntap_requirement.rb
@@ -2,9 +2,8 @@ class TuntapRequirement < Requirement fatal true - default_formula "tuntap" cask "tuntap" - satisfy(:build_env => false) { self.class.binary_tuntap_installed? || Formula["tuntap"].installed? } + satisfy(:build_env => false) { self.class.binary_tuntap_installed? } def self.binary_tuntap_...
false
Other
Homebrew
brew
5413ddcb6557f1ceb3fbc9bcf28b4cf65ca1c218.json
tuntap_requirement: fix binary logic. Previously this was only using the last line.
Library/Homebrew/requirements/tuntap_requirement.rb
@@ -7,8 +7,11 @@ class TuntapRequirement < Requirement satisfy(:build_env => false) { self.class.binary_tuntap_installed? || Formula["tuntap"].installed? } def self.binary_tuntap_installed? - File.exist?("/Library/Extensions/tun.kext") && File.exist?("/Library/Extensions/tap.kext") - File.exist?("/Library...
false
Other
Homebrew
brew
88793ba798cd2dbe3ce44972be912f8f5d892c5e.json
tap-info: improve Bash completion Closes #482. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
etc/bash_completion.d/brew
@@ -460,6 +460,18 @@ _brew_style () __brew_complete_formulae } +_brew_tap_info () +{ + local cur="${COMP_WORDS[COMP_CWORD]}" + case "$cur" in + --*) + __brewcomp "--installed --json=v1" + return + ;; + esac + __brew_complete_tapped +} + _brew_tap_readme () { local cur=...
false
Other
Homebrew
brew
df4982ed0810fac1b58aedeb6653ca908dccbd51.json
audit.rb: require https for download.savannah.gnu.org (#438) and download-mirror.savannah.gnu.org
Library/Homebrew/cmd/audit.rb
@@ -1150,6 +1150,8 @@ def audit_urls case p when %r{^http://ftp\.gnu\.org/}, %r{^http://ftpmirror\.gnu\.org/}, + %r{^http://download\.savannah\.gnu\.org/}, + %r{^http://download-mirror\.savannah\.gnu\.org/}, %r{^http://[^/]*\.apache\.org/}, %r{^http:...
false
Other
Homebrew
brew
832a08abcdf2256c140d9f81d8753d8bddd323c2.json
extend/os/mac/keg_relocate: fix weird omission
Library/Homebrew/extend/os/mac/keg_relocate.rb
@@ -126,7 +126,7 @@ def mach_o_files def self.file_linked_libraries(file, string) # Check dynamic library linkage. Importantly, do not run otool on static # libraries, which will falsely report "linkage" to themselves. - if file.mach_o_executable? || file.dylib? || file.mach_o_bund + if file.mach_o_e...
false
Other
Homebrew
brew
a5ec0aa2598d702b68300e7400fad48e8a392527.json
emoji: extract logic into generic OS classes. (#450)
Library/Homebrew/emoji.rb
@@ -0,0 +1,24 @@ +module Emoji + class << self + def tick + # necessary for 1.8.7 unicode handling since many installs are on 1.8.7 + @tick ||= ["2714".hex].pack("U*") + end + + def cross + # necessary for 1.8.7 unicode handling since many installs are on 1.8.7 + @cross ||= ["2718".hex].pa...
true
Other
Homebrew
brew
a5ec0aa2598d702b68300e7400fad48e8a392527.json
emoji: extract logic into generic OS classes. (#450)
Library/Homebrew/extend/os/emoji.rb
@@ -0,0 +1,6 @@ +require "os" +require "emoji" + +if OS.mac? + require "extend/os/mac/emoji" +end
true
Other
Homebrew
brew
a5ec0aa2598d702b68300e7400fad48e8a392527.json
emoji: extract logic into generic OS classes. (#450)
Library/Homebrew/extend/os/mac/emoji.rb
@@ -0,0 +1,7 @@ +module Emoji + class << self + def enabled? + generic_enabled? && MacOS.version >= :lion + end + end +end
true
Other
Homebrew
brew
a5ec0aa2598d702b68300e7400fad48e8a392527.json
emoji: extract logic into generic OS classes. (#450)
Library/Homebrew/formula_installer.rb
@@ -13,6 +13,7 @@ require "debrew" require "sandbox" require "requirements/cctools_requirement" +require "emoji" class FormulaInstaller include FormulaCellarChecks @@ -492,13 +493,9 @@ def finish unlock end - def emoji - ENV["HOMEBREW_INSTALL_BADGE"] || "\xf0\x9f\x8d\xba" - end - def summary ...
true
Other
Homebrew
brew
a5ec0aa2598d702b68300e7400fad48e8a392527.json
emoji: extract logic into generic OS classes. (#450)
Library/Homebrew/utils.rb
@@ -1,4 +1,5 @@ require "pathname" +require "emoji" require "exceptions" require "utils/hash" require "utils/json" @@ -12,16 +13,6 @@ class Tty class << self - def tick - # necessary for 1.8.7 unicode handling since many installs are on 1.8.7 - @tick ||= ["2714".hex].pack("U*") - end - - de...
true
Other
Homebrew
brew
4da990587f723a563e602a665403393f67fc8e70.json
tap: run readall when tapping. (#396) * readall: move readall logic to new class. * tap: run readall when tapping. This will prevent tapping an tap with syntax errors from causing issues for users. Fixes #58.
Library/Homebrew/cmd/readall.rb
@@ -3,14 +3,12 @@ # when making significant changes to formula.rb, # or to determine if any current formulae have Ruby issues -require "formula" -require "tap" -require "thread" +require "readall" module Homebrew def readall - if ARGV.delete("--syntax") - ruby_files = Queue.new + if ARGV.include?("...
true
Other
Homebrew
brew
4da990587f723a563e602a665403393f67fc8e70.json
tap: run readall when tapping. (#396) * readall: move readall logic to new class. * tap: run readall when tapping. This will prevent tapping an tap with syntax errors from causing issues for users. Fixes #58.
Library/Homebrew/readall.rb
@@ -0,0 +1,81 @@ +require "formula" +require "tap" +require "thread" +require "readall" + +module Readall + class << self + def valid_ruby_syntax?(ruby_files) + ruby_files_queue = Queue.new + ruby_files.each { |f| ruby_files_queue << f } + failed = false + workers = (0...Hardware::CPU.cores).map...
true
Other
Homebrew
brew
4da990587f723a563e602a665403393f67fc8e70.json
tap: run readall when tapping. (#396) * readall: move readall logic to new class. * tap: run readall when tapping. This will prevent tapping an tap with syntax errors from causing issues for users. Fixes #58.
Library/Homebrew/tap.rb
@@ -1,4 +1,5 @@ require "extend/string" +require "readall" # a {Tap} is used to extend the formulae provided by Homebrew core. # Usually, it's synced with a remote git repository. And it's likely @@ -211,9 +212,14 @@ def install(options = {}) begin safe_system "git", *args - rescue Interrupt, Erro...
true
Other
Homebrew
brew
4da990587f723a563e602a665403393f67fc8e70.json
tap: run readall when tapping. (#396) * readall: move readall logic to new class. * tap: run readall when tapping. This will prevent tapping an tap with syntax errors from causing issues for users. Fixes #58.
Library/Homebrew/test/test_tap.rb
@@ -135,7 +135,7 @@ def test_remote end refute_predicate version_tap, :private? ensure - version_tap.path.rmtree + version_tap.path.rmtree if version_tap end def test_remote_not_git_repo @@ -220,7 +220,7 @@ def test_install_and_uninstall refute_predicate HOMEBREW_PREFIX/"share/man/man1/b...
true
Other
Homebrew
brew
4f2e31b3e3ef3ab4758e3ac3c22dafd190652d5d.json
language/python: fix bogus require Including the extension is not an error, but we don't normally do this.
Library/Homebrew/language/python.rb
@@ -1,4 +1,4 @@ -require "utils.rb" +require "utils" module Language module Python
false
Other
Homebrew
brew
51025a9fa2b5a762179b5c78b1c603a4a65c13ba.json
brew.sh: enable autoupdate for Homebrew developers (#429) Autoupdate has been working well for me/opt-in folks for a while so lets enable it for Homebrew developers to test before we enable it for everyone.
Library/brew.sh
@@ -230,7 +230,7 @@ setup-analytics report-analytics-screenview-command update-preinstall() { - [[ -n "$HOMEBREW_AUTO_UPDATE" ]] || return + [[ -n "$HOMEBREW_DEVELOPER" ]] || return [[ -z "$HOMEBREW_NO_AUTO_UPDATE" ]] || return [[ -z "$HOMEBREW_UPDATE_PREINSTALL" ]] || return
false
Other
Homebrew
brew
b55250c44eacd49646407b26a73753965d4d36d0.json
test_integration_cmds: use a single teardown. (#475) Instead of writing a custom ensure for every test let's just nuke all the files every time. This may be something we might want to use for other unit tests too. It leans heavily on the fact that a `FileUtils.rm_rf` on files that don't exist is very quick and thin...
Library/Homebrew/test/test_integration_cmds.rb
@@ -6,15 +6,33 @@ class IntegrationCommandTests < Homebrew::TestCase def setup - @formula_files = [] @cmd_id_index = 0 # Assign unique IDs to invocations of `cmd_output`. (HOMEBREW_PREFIX/"bin").mkpath FileUtils.touch HOMEBREW_PREFIX/"bin/brew" end def teardown - (HOMEBREW_PREFIX/"bin...
false
Other
Homebrew
brew
454645263d3380dfa8d699bd1c42fa907076645f.json
Revert "linkage: check undeclared dependencies for `--test`" This reverts commit 080ddd8804be14f4b18f9558b58270456ff313c2.
Library/Homebrew/dev-cmd/linkage.rb
@@ -18,34 +18,34 @@ module Homebrew def linkage + found_broken_dylibs = false ARGV.kegs.each do |keg| ohai "Checking #{keg.name} linkage" if ARGV.kegs.size > 1 result = LinkageChecker.new(keg) if ARGV.include?("--test") result.display_test_output - if result.broken_dyl...
false
Other
Homebrew
brew
68bbe6ee5fc723f154d4a2372997d5bd9682a554.json
Use GitRepositoryExtension for 'path' in Tap Closes #464. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
Library/Homebrew/tap.rb
@@ -62,6 +62,7 @@ def initialize(user, repo) @repo = repo @name = "#{@user}/#{@repo}".downcase @path = TAP_DIRECTORY/"#{@user}/homebrew-#{@repo}".downcase + @path.extend(GitRepositoryExtension) end # clear internal cache @@ -84,15 +85,8 @@ def clear_cache # The remote path to this {Tap}. ...
false
Other
Homebrew
brew
77dd9d56ff39f77391d2f429a9ff25e65a362ba2.json
Use GitRepositoryExtension for HOMEBREW_REPOSITORY
Library/Homebrew/diagnostic.rb
@@ -805,7 +805,7 @@ def check_git_newline_settings def check_git_origin return if !Utils.git_available? || !(HOMEBREW_REPOSITORY/".git").exist? - origin = Homebrew.git_origin + origin = HOMEBREW_REPOSITORY.git_origin if origin.nil? <<-EOS.undent
true
Other
Homebrew
brew
77dd9d56ff39f77391d2f429a9ff25e65a362ba2.json
Use GitRepositoryExtension for HOMEBREW_REPOSITORY
Library/Homebrew/formula_installer.rb
@@ -761,7 +761,7 @@ def pour tab.tap = formula.tap tab.poured_from_bottle = true tab.time = Time.now.to_i - tab.head = Homebrew.git_head + tab.head = HOMEBREW_REPOSITORY.git_head tab.write end
true
Other
Homebrew
brew
77dd9d56ff39f77391d2f429a9ff25e65a362ba2.json
Use GitRepositoryExtension for HOMEBREW_REPOSITORY
Library/Homebrew/global.rb
@@ -20,6 +20,8 @@ require "config" +HOMEBREW_REPOSITORY.extend(GitRepositoryExtension) + if RbConfig.respond_to?(:ruby) RUBY_PATH = Pathname.new(RbConfig.ruby) else
true
Other
Homebrew
brew
77dd9d56ff39f77391d2f429a9ff25e65a362ba2.json
Use GitRepositoryExtension for HOMEBREW_REPOSITORY
Library/Homebrew/system_config.rb
@@ -23,15 +23,15 @@ def clang_build end def head - Homebrew.git_head || "(none)" + HOMEBREW_REPOSITORY.git_head || "(none)" end def last_commit - Homebrew.git_last_commit || "never" + HOMEBREW_REPOSITORY.git_last_commit || "never" end def origin - Homebrew.gi...
true
Other
Homebrew
brew
77dd9d56ff39f77391d2f429a9ff25e65a362ba2.json
Use GitRepositoryExtension for HOMEBREW_REPOSITORY
Library/Homebrew/tab.rb
@@ -24,7 +24,7 @@ def self.create(formula, compiler, stdlib, build, source_modified_time) "poured_from_bottle" => false, "time" => Time.now.to_i, "source_modified_time" => source_modified_time.to_i, - "HEAD" => Homebrew.git_head, + "HEAD" => HOMEBREW_REPOSITORY.git_head, "compiler"...
true
Other
Homebrew
brew
77dd9d56ff39f77391d2f429a9ff25e65a362ba2.json
Use GitRepositoryExtension for HOMEBREW_REPOSITORY
Library/Homebrew/utils.rb
@@ -198,34 +198,9 @@ def self.system(cmd, *args) _system(cmd, *args) end - def self.git_origin - return unless Utils.git_available? - HOMEBREW_REPOSITORY.cd { `git config --get remote.origin.url 2>/dev/null`.chuzzle } - end - - def self.git_head - return unless Utils.git_available? - HOMEBREW_R...
true
Other
Homebrew
brew
ec75ca7e42b35ae2932ca3feacfd97e2aab5d278.json
extend/os/mac/diagnostic: remove redundant method Remove an exact duplicate from further up in the same file. (It was accidentally added in 8a582f2bd976ce7044c3b2dc6eef701f94b9ace5.)
Library/Homebrew/extend/os/mac/diagnostic.rb
@@ -271,21 +271,6 @@ def check_for_unsupported_curl_vars EOS end - def check_for_other_package_managers - ponk = MacOS.macports_or_fink - return if ponk.empty? - - <<-EOS.undent - You have MacPorts or Fink installed: - #{ponk.join(", ")} - - This ...
false
Other
Homebrew
brew
11624b9a7da00448e660f1454121a63b3d401729.json
hardware: move generic logic from linux. (#454)
Library/Homebrew/extend/os/linux/hardware/cpu.rb
@@ -1,25 +1,6 @@ module Hardware class CPU class << self - - OPTIMIZATION_FLAGS = { - :penryn => "-march=core2 -msse4.1", - :core2 => "-march=core2", - :core => "-march=prescott" - }.freeze - def optimization_flags - OPTIMIZATION_FLAGS - end - - # Linux supp...
true
Other
Homebrew
brew
11624b9a7da00448e660f1454121a63b3d401729.json
hardware: move generic logic from linux. (#454)
Library/Homebrew/extend/os/mac/hardware/cpu.rb
@@ -3,19 +3,15 @@ module Hardware class CPU class << self - - OPTIMIZATION_FLAGS = { - :penryn => "-march=core2 -msse4.1", - :core2 => "-march=core2", - :core => "-march=prescott", + PPC_OPTIMIZATION_FLAGS = { :g3 => "-mcpu=750", :g4 => "-mcpu=7400", :g...
true
Other
Homebrew
brew
11624b9a7da00448e660f1454121a63b3d401729.json
hardware: move generic logic from linux. (#454)
Library/Homebrew/hardware.rb
@@ -8,6 +8,25 @@ class CPU PPC_64BIT_ARCHS = [:ppc64].freeze class << self + OPTIMIZATION_FLAGS = { + :penryn => "-march=core2 -msse4.1", + :core2 => "-march=core2", + :core => "-march=prescott", + :dunno => "", + }.freeze + + def optimization_flags + OPTI...
true
Other
Homebrew
brew
45b3bfd11ac1d9d12d0e885576702eab2acc60cb.json
download_strategy: use short hash for git last_commit Closes #460. Signed-off-by: Xu Cheng <xucheng@me.com>
Library/Homebrew/download_strategy.rb
@@ -592,7 +592,7 @@ def source_modified_time end def last_commit - Utils.popen_read("git", "--git-dir", git_dir ,"rev-parse", "HEAD").chomp + Utils.popen_read("git", "--git-dir", git_dir ,"rev-parse", "--short", "HEAD").chomp end private
false
Other
Homebrew
brew
0b2cc5c20db30f5d0046091f8c2318752f7b0659.json
test_download_strategies: add git tests
Library/Homebrew/test/test_download_strategies.rb
@@ -60,6 +60,69 @@ def cache_tag end end +class GitDownloadStrategyTests < Homebrew::TestCase + include FileUtils + + def setup + resource = ResourceDouble.new("https://github.com/homebrew/foo") + @commit_id = 1 + @strategy = GitDownloadStrategy.new("baz", resource) + @cached_location = @strategy.ca...
false
Other
Homebrew
brew
2f5f352baa95ce9cc6b4e0007ee2fc028ffc2a1a.json
VCSDownloadStrategy: add last_commit method Implement: * VCSDownloadStrategy#last_commit Use last modified file timestamp * SubversionDownloadStrategy#last_commit Use `svn info --show-item revision` * GitDownloadStrategy#last_commit Use `git rev-parse HEAD` * MercurialDownloadStrategy#last_commit ...
Library/Homebrew/download_strategy.rb
@@ -153,6 +153,12 @@ def head? version.head? end + # Return last commit's unique identifier for the repository. + # Return most recent modified timestamp unless overridden. + def last_commit + source_modified_time.to_i.to_s + end + private def cache_tag @@ -501,6 +507,10 @@ def source_modified_...
false
Other
Homebrew
brew
61ffa47fd9dc179ddff792db1dc6f55464f6c16b.json
test-bot: fix ruby_has_encoding call regression
Library/Homebrew/dev-cmd/test-bot.rb
@@ -177,7 +177,7 @@ def run verbose = ARGV.verbose? # Step may produce arbitrary output and we read it bytewise, so must # buffer it as binary and convert to UTF-8 once complete - output = Homebrew.ruby_has_encoding? ? "".encode!("BINARY") : "" + output = ruby_has_encoding? ? "".encode!("...
false
Other
Homebrew
brew
a1b0ef1300ff8ac07ef904479b0321a2a5fc0368.json
Remove unnecessary official command tapping.
Library/Homebrew/cmd/tests.rb
@@ -7,21 +7,16 @@ module Homebrew def tests - ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = "1" - - if ARGV.include? "--official-cmd-taps" - ENV["HOMEBREW_TEST_OFFICIAL_CMD_TAPS"] = "1" - OFFICIAL_CMD_TAPS.each do |tap, _| - tap = Tap.fetch tap - tap.install unless tap.installed? - en...
true
Other
Homebrew
brew
a1b0ef1300ff8ac07ef904479b0321a2a5fc0368.json
Remove unnecessary official command tapping.
Library/Homebrew/dev-cmd/test-bot.rb
@@ -656,9 +656,6 @@ def homebrew if @tap.nil? tests_args = [] if ruby_two - test "brew", "tap", "caskroom/cask" - test "brew", "tap", "homebrew/bundle" - test "brew", "tap", "homebrew/services" tests_args << "--official-cmd-taps" tests_args << "-...
true
Other
Homebrew
brew
a1b0ef1300ff8ac07ef904479b0321a2a5fc0368.json
Remove unnecessary official command tapping.
Library/Homebrew/test/test_integration_cmds.rb
@@ -130,6 +130,12 @@ class #{Formulary.class_s(name)} < Formula formula_path end + def setup_remote_tap(name) + tap = Tap.fetch name + tap.install(:full_clone => false, :quiet => true) unless tap.installed? + tap + end + def testball "#{File.expand_path("..", __FILE__)}/testball.rb" end ...
true