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 | 65fdfefc99e2308a406e57eb55cd2e32f107717f.json | Add `language_eval` method. | Library/Homebrew/cask/lib/hbc/cask.rb | @@ -11,7 +11,10 @@ def initialize(token, sourcefile_path: nil, dsl: nil, &block)
@token = token
@sourcefile_path = sourcefile_path
@dsl = dsl || DSL.new(@token)
- @dsl.instance_eval(&block) if block_given?
+ if block_given?
+ @dsl.instance_eval(&block)
+ @dsl.language_eval
+... | true |
Other | Homebrew | brew | 65fdfefc99e2308a406e57eb55cd2e32f107717f.json | Add `language_eval` method. | Library/Homebrew/cask/lib/hbc/dsl.rb | @@ -100,30 +100,31 @@ def homepage(homepage = nil)
end
def language(*args, &block)
- @language ||= {}
-
if !args.empty? && block_given?
args.each do |arg|
MacOS.languages.each_with_index do |l, index|
string_or_regex = arg == :default ? %r{^en} : arg
... | true |
Other | Homebrew | brew | 929c594f41437f3a0a6d13fed2d596a0ba60435b.json | Add test for `MacOS.languages`. | Library/Homebrew/test/test_os_mac_language.rb | @@ -2,7 +2,15 @@
require "os/mac"
class OSMacLanguageTests < Homebrew::TestCase
+ LANGUAGE_REGEX = /\A[a-z]{2}(-[A-Z]{2})?(-[A-Z][a-z]{3})?\Z/
+
+ def test_languages_format
+ OS::Mac.languages.each do |language|
+ assert_match LANGUAGE_REGEX, language
+ end
+ end
+
def test_language_format
- ass... | false |
Other | Homebrew | brew | e4da2dfb9f49349251b51e80be57d2a70c979321.json | Make test for “cask already installed” less strict. | Library/Homebrew/cask/test/cask/cli/install_test.rb | @@ -29,7 +29,7 @@
TestHelper.must_output(self, lambda {
Hbc::CLI::Install.run("local-transmission", "")
- }, %r{Warning: A Cask for local-transmission is already installed. Add the "--force" option to force re-install.})
+ }, %r{Warning: A Cask for local-transmission is already installed.})
end
... | false |
Other | Homebrew | brew | 4f1ef16cbf09fc1b98143ff672859dcefda00e1b.json | Fix indentation of CaskCommandFailedError. | Library/Homebrew/cask/lib/hbc/exceptions.rb | @@ -65,21 +65,19 @@ def initialize(cmd, stdout, stderr, status)
end
def to_s
- <<-EOS
- Command failed to execute!
-
- ==> Failed command:
- #{@cmd}
-
- ==> Standard Output of failed command:
- #{@stdout}
-
- ==> Standard Error of failed command:
- #{@stderr}
-
- ==> Exit status of failed comma... | false |
Other | Homebrew | brew | 8eac5314f68cbe3f99ed92a2dc6472f7546b188c.json | Add official external commands to manpage.
These are the ones that are auto-installed without tapping and it makes
sense to make them more prominent in our documentation as we've
offloaded various functionality over the years to each of them. | Library/Homebrew/manpages/brew.1.md.erb | @@ -54,7 +54,21 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
<%= developer_commands.join("\n") %>
-## EXTERNAL COMMANDS
+## OFFICIAL EXTERNAL COMMANDS
+
+ * `bundle`:
+ Bundler for non-Ruby dependencies from Homebrew:
+ <https://github.com/Homebrew/homebrew-bundle>
+
+ ... | true |
Other | Homebrew | brew | 8eac5314f68cbe3f99ed92a2dc6472f7546b188c.json | Add official external commands to manpage.
These are the ones that are auto-installed without tapping and it makes
sense to make them more prominent in our documentation as we've
offloaded various functionality over the years to each of them. | docs/brew.1.html | @@ -601,7 +601,19 @@ <h2 id="DEVELOPER-COMMANDS">DEVELOPER COMMANDS</h2>
</dl>
-<h2 id="EXTERNAL-COMMANDS">EXTERNAL COMMANDS</h2>
+<h2 id="OFFICIAL-EXTERNAL-COMMANDS">OFFICIAL EXTERNAL COMMANDS</h2>
+
+<dl>
+<dt class="flush"><code>bundle</code></dt><dd><p>Bundler for non-Ruby dependencies from Homebrew:
+<a href=... | true |
Other | Homebrew | brew | 8eac5314f68cbe3f99ed92a2dc6472f7546b188c.json | Add official external commands to manpage.
These are the ones that are auto-installed without tapping and it makes
sense to make them more prominent in our documentation as we've
offloaded various functionality over the years to each of them. | manpages/brew.1 | @@ -801,7 +801,21 @@ If \fB\-\-to\-tag\fR is passed, set HOMEBREW_UPDATE_TO_TAG to test updating betw
.IP
If \fB\-\-keep\-tmp\fR is passed, retain the temporary directory containing the new repository clone\.
.
-.SH "EXTERNAL COMMANDS"
+.SH "OFFICIAL EXTERNAL COMMANDS"
+.
+.TP
+\fBbundle\fR
+Bundler for non\-Ruby de... | true |
Other | Homebrew | brew | db478fb7b2d8047403b71208af73b400bcf7a3e2.json | list: fix exit code for --verbose and --pinned
`brew list --verbose <formulae>` lists only those kegs that
are installed and exits with 0 if all <formulae> installed.
If one or more formulae from <formulae> are not installed, the
command lists only installed versions and exits with 1.
`brew --pinned formula` exits wi... | Library/Homebrew/cmd/list.rb | @@ -106,7 +106,11 @@ def filtered_list
names = if ARGV.named.empty?
Formula.racks
else
- ARGV.named.map { |n| HOMEBREW_CELLAR+n }.select(&:exist?)
+ racks = ARGV.named.map { |n| HOMEBREW_CELLAR+n }
+ racks.select do |rack|
+ Homebrew.failed = true unless rack.exist?
+ rack.... | false |
Other | Homebrew | brew | acaee035dfddd1fd90b883f19cb2c9f52852c2f3.json | Add compatibility layer for `module Homebrew`. | Library/Homebrew/compat.rb | @@ -2,6 +2,7 @@
require "compat/tap"
require "compat/formula"
require "compat/formula_specialties"
+require "compat/global"
require "compat/hardware"
require "compat/macos"
require "compat/md5" | true |
Other | Homebrew | brew | acaee035dfddd1fd90b883f19cb2c9f52852c2f3.json | Add compatibility layer for `module Homebrew`. | Library/Homebrew/compat/global.rb | @@ -0,0 +1,16 @@
+module Homebrew
+ module_function
+
+ def method_missing(method, *args, &block)
+ if instance_methods.include?(method)
+ # odeprecated "#{self}##{method}", "'module_function' or 'def self.#{method}' to convert it to a class method"
+ return instance_method(method).bind(self).call(*args,... | true |
Other | Homebrew | brew | 884b26850615d5624e09762e1ae8bc5b104a934a.json | Use Formatter for all URLs. | Library/Homebrew/blacklist.rb | @@ -16,15 +16,15 @@ def blacklisted?(name)
Homebrew provides pip via: `brew install python`. However you will then
have two Pythons installed on your Mac, so alternatively you can install
pip via the instructions at:
- https://pip.readthedocs.io/en/stable/installing/
+ #{Formatter.url("https://... | true |
Other | Homebrew | brew | 884b26850615d5624e09762e1ae8bc5b104a934a.json | Use Formatter for all URLs. | Library/Homebrew/cask/lib/hbc/dsl/caveats.rb | @@ -102,12 +102,12 @@ def malware(radar_number)
A report has been made to Apple about this app. Their certificate will hopefully be revoked.
See the public report at
- https://openradar.appspot.com/#{radar_number}
+ #{Formatter.url("https://openradar.appspot.com/#{radar_number}")}
... | true |
Other | Homebrew | brew | 884b26850615d5624e09762e1ae8bc5b104a934a.json | Use Formatter for all URLs. | Library/Homebrew/cmd/help.rb | @@ -78,11 +78,12 @@ def command_help(path)
HOMEBREW_HELP
else
help_lines.map do |line|
- line.slice(2..-1).
- sub(/^ \* /, "#{Tty.bold}brew#{Tty.reset} ").
- gsub(/`(.*?)`/, "#{Tty.bold}\\1#{Tty.reset}").
- gsub(/<(.*?)>/, "#{Tty.underline}\\1#{Tty.reset}").
- ... | true |
Other | Homebrew | brew | 884b26850615d5624e09762e1ae8bc5b104a934a.json | Use Formatter for all URLs. | Library/Homebrew/cmd/update-report.rb | @@ -288,7 +288,7 @@ def migrate_legacy_repository_if_necessary
Please try to resolve this error yourself and then run `brew update` again to
complete the migration. If you need help please +1 an existing error or comment
with your new error in issue:
- #{Tty.em}https://github.com/Homebrew/br... | true |
Other | Homebrew | brew | 884b26850615d5624e09762e1ae8bc5b104a934a.json | Use Formatter for all URLs. | Library/Homebrew/diagnostic.rb | @@ -473,7 +473,7 @@ def check_user_curlrc
If you have trouble downloading packages with Homebrew, then maybe this
is the problem? If the following command doesn't work, then try removing
your curlrc:
- curl https://github.com
+ curl #{Formatter.url("https://github.... | true |
Other | Homebrew | brew | 884b26850615d5624e09762e1ae8bc5b104a934a.json | Use Formatter for all URLs. | Library/Homebrew/exceptions.rb | @@ -318,7 +318,7 @@ def fetch_issues
def dump
if !ARGV.verbose?
puts
- puts Formatter.error("READ THIS: #{Formatter.url(OS::ISSUES_URL)}")
+ puts Formatter.error(Formatter.url(OS::ISSUES_URL), label: "READ THIS")
if formula.tap
case formula.tap.name
when "homebrew/boney... | true |
Other | Homebrew | brew | 884b26850615d5624e09762e1ae8bc5b104a934a.json | Use Formatter for all URLs. | Library/Homebrew/requirements.rb | @@ -44,7 +44,7 @@ def message
EOS
else
message + <<-EOS.undent
- Xcode can be installed from https://developer.apple.com/xcode/downloads/
+ Xcode can be installed from #{Formatter.url("https://developer.apple.com/xcode/downloads/")}
EOS
end
end | true |
Other | Homebrew | brew | 884b26850615d5624e09762e1ae8bc5b104a934a.json | Use Formatter for all URLs. | Library/Homebrew/utils/github.rb | @@ -106,14 +106,14 @@ def api_credentials_error_message(response_headers)
onoe <<-EOS.undent
Your macOS keychain GitHub credentials do not have sufficient scope!
Scopes they have: #{credentials_scopes}
- Create a personal access token: https://github.com/settings/tokens
+... | true |
Other | Homebrew | brew | 75e8b59aad4814112a53119f68ed629d60b3f97b.json | Add `Formatter` module. | Library/Homebrew/brew.rb | @@ -147,8 +147,8 @@ def require?(path)
Utils::Analytics.report_exception(e)
onoe e
if internal_cmd && defined?(OS::ISSUES_URL)
- $stderr.puts "Please report this bug:"
- $stderr.puts " #{Tty.underline}#{OS::ISSUES_URL}#{Tty.reset}"
+ $stderr.puts "#{Tty.bold}Please report this bug:#{Tty.reset}"
+ ... | true |
Other | Homebrew | brew | 75e8b59aad4814112a53119f68ed629d60b3f97b.json | Add `Formatter` module. | Library/Homebrew/cask/lib/hbc/artifact/moved.rb | @@ -79,12 +79,10 @@ def summarize_artifact(artifact_spec)
load_specification artifact_spec
if target.exist?
- target_abv = " (#{target.abv})"
+ "#{printable_target} (#{target.abv})"
else
- error = "#{Tty.red}Missing #{self.class.artifact_english_name}:#{Tty.reset}... | true |
Other | Homebrew | brew | 75e8b59aad4814112a53119f68ed629d60b3f97b.json | Add `Formatter` module. | Library/Homebrew/cask/lib/hbc/artifact/symlinked.rb | @@ -57,12 +57,17 @@ def create_filesystem_link(source, target)
def summarize_artifact(artifact_spec)
load_specification artifact_spec
- return unless self.class.islink?(target)
-
- link_description = "#{Tty.red}Broken Link#{Tty.reset}: " unless target.exist?
- target_readlink_abv ... | true |
Other | Homebrew | brew | 75e8b59aad4814112a53119f68ed629d60b3f97b.json | Add `Formatter` module. | Library/Homebrew/cask/lib/hbc/checkable.rb | @@ -28,23 +28,23 @@ def warnings?
def result
if errors?
- "#{Tty.red}failed#{Tty.reset}"
+ Formatter.error("failed")
elsif warnings?
- "#{Tty.yellow}warning#{Tty.reset}"
+ Formatter.warning("warning")
else
- "#{Tty.green}passed#{Tty.reset}"
+ Formatt... | true |
Other | Homebrew | brew | 75e8b59aad4814112a53119f68ed629d60b3f97b.json | Add `Formatter` module. | Library/Homebrew/cask/lib/hbc/cli/doctor.rb | @@ -122,11 +122,11 @@ def self.legacy_tap_pattern
end
def self.notfound_string
- "#{Tty.red}Not Found - Unknown Error#{Tty.reset}"
+ Formatter.error("Not Found - Unknown Error")
end
def self.error_string(string = "Error")
- "#{Tty.red}(#{string})#{Tty.reset}"
+ ... | true |
Other | Homebrew | brew | 75e8b59aad4814112a53119f68ed629d60b3f97b.json | Add `Formatter` module. | Library/Homebrew/cask/lib/hbc/cli/info.rb | @@ -18,9 +18,9 @@ def self.help
def self.info(cask)
puts "#{cask.token}: #{cask.version}"
- puts formatted_url(cask.homepage) if cask.homepage
+ puts Formatter.url(cask.homepage) if cask.homepage
installation_info(cask)
- puts "From: #{formatted_url(github_info(cask))}" i... | true |
Other | Homebrew | brew | 75e8b59aad4814112a53119f68ed629d60b3f97b.json | Add `Formatter` module. | Library/Homebrew/cask/lib/hbc/installer.rb | @@ -87,7 +87,7 @@ def summary
s = if MacOS.version >= :lion && !ENV["HOMEBREW_NO_EMOJI"]
(ENV["HOMEBREW_INSTALL_BADGE"] || "\xf0\x9f\x8d\xba") + " "
else
- "#{Tty.blue}==>#{Tty.reset} #{Tty.bold}Success!#{Tty.reset} "
+ Formatter.headline("Success! ", color: :blue)
... | true |
Other | Homebrew | brew | 75e8b59aad4814112a53119f68ed629d60b3f97b.json | Add `Formatter` module. | Library/Homebrew/cask/lib/hbc/utils.rb | @@ -32,7 +32,7 @@ def tty?
def odebug(title, *sput)
return unless Hbc.respond_to?(:debug)
return unless Hbc.debug
- puts "#{Tty.magenta}==>#{Tty.reset} #{Tty.white}#{title}#{Tty.reset}"
+ puts Formatter.headline(title, color: :magenta)
puts sput unless sput.empty?
end
@@ -146,12 +146,10 @@ def self.path_... | true |
Other | Homebrew | brew | 75e8b59aad4814112a53119f68ed629d60b3f97b.json | Add `Formatter` module. | Library/Homebrew/cmd/doctor.rb | @@ -42,9 +42,9 @@ def doctor
next if out.nil? || out.empty?
if first_warning
$stderr.puts <<-EOS.undent
- #{Tty.bold}Please note that these warnings are just used to help the Homebrew maintainers
- with debugging if you file an issue. If everything you use Homebrew for is
- ... | true |
Other | Homebrew | brew | 75e8b59aad4814112a53119f68ed629d60b3f97b.json | Add `Formatter` module. | Library/Homebrew/cmd/info.rb | @@ -117,7 +117,7 @@ def info_formula(f)
puts "#{f.full_name}: #{specs * ", "}#{" [#{attrs * ", "}]" unless attrs.empty?}"
puts f.desc if f.desc
- puts "#{Tty.underline}#{f.homepage}#{Tty.reset}" if f.homepage
+ puts Formatter.url(f.homepage) if f.homepage
conflicts = f.conflicts.map(&:name).sor... | true |
Other | Homebrew | brew | 75e8b59aad4814112a53119f68ed629d60b3f97b.json | Add `Formatter` module. | Library/Homebrew/descriptions.rb | @@ -119,7 +119,7 @@ def initialize(descriptions)
# Take search results -- a hash mapping formula names to descriptions -- and
# print them.
def print
- blank = "#{Tty.yellow}[no description]#{Tty.reset}"
+ blank = Formatter.warning("[no description]")
@descriptions.keys.sort.each do |full_name|
... | true |
Other | Homebrew | brew | 75e8b59aad4814112a53119f68ed629d60b3f97b.json | Add `Formatter` module. | Library/Homebrew/dev-cmd/bottle.rb | @@ -54,7 +54,7 @@ def print_filename(string, filename)
return if @put_filenames.include? filename
- puts "#{Tty.red}#{filename}#{Tty.reset}"
+ puts Formatter.error(filename.to_s)
@put_filenames << filename
end
| true |
Other | Homebrew | brew | 75e8b59aad4814112a53119f68ed629d60b3f97b.json | Add `Formatter` module. | Library/Homebrew/exceptions.rb | @@ -318,7 +318,7 @@ def fetch_issues
def dump
if !ARGV.verbose?
puts
- puts "#{Tty.red.underline}READ THIS#{Tty.reset.red}:#{Tty.reset} #{Tty.underline}#{OS::ISSUES_URL}#{Tty.reset}"
+ puts Formatter.error("READ THIS: #{Formatter.url(OS::ISSUES_URL)}")
if formula.tap
case formul... | true |
Other | Homebrew | brew | 75e8b59aad4814112a53119f68ed629d60b3f97b.json | Add `Formatter` module. | Library/Homebrew/formula_installer.rb | @@ -214,7 +214,7 @@ def install
opoo "#{formula.full_name}: #{old_flag} was deprecated; using #{new_flag} instead!"
end
- oh1 "Installing #{Tty.green}#{formula.full_name}#{Tty.reset}" if show_header?
+ oh1 "Installing #{Formatter.identifier(formula.full_name)}" if show_header?
if formula.tap ... | true |
Other | Homebrew | brew | 75e8b59aad4814112a53119f68ed629d60b3f97b.json | Add `Formatter` module. | Library/Homebrew/migrator.rb | @@ -153,7 +153,7 @@ def migrate
end
begin
- oh1 "Migrating #{Tty.green}#{oldname}#{Tty.reset} to #{Tty.green.bold}#{newname}#{Tty.reset}"
+ oh1 "Migrating #{Formatter.identifier(oldname)} to #{Formatter.identifier(newname)}"
lock
unlink_oldname
move_to_new_directory
@@ -200,15... | true |
Other | Homebrew | brew | 75e8b59aad4814112a53119f68ed629d60b3f97b.json | Add `Formatter` module. | Library/Homebrew/utils.rb | @@ -1,6 +1,7 @@
require "pathname"
require "emoji"
require "exceptions"
+require "utils/formatter"
require "utils/hash"
require "utils/json"
require "utils/inreplace"
@@ -14,24 +15,24 @@
def ohai(title, *sput)
title = Tty.truncate(title) if $stdout.tty? && !ARGV.verbose?
- puts "#{Tty.blue}==>#{Tty.reset} ... | true |
Other | Homebrew | brew | 75e8b59aad4814112a53119f68ed629d60b3f97b.json | Add `Formatter` module. | Library/Homebrew/utils/formatter.rb | @@ -0,0 +1,52 @@
+require "utils/tty"
+
+module Formatter
+ module_function
+
+ def arrow(string, color: nil)
+ prefix("==>", string, color)
+ end
+
+ def headline(string, color: nil)
+ arrow("#{Tty.bold}#{string}#{Tty.reset}", color: color)
+ end
+
+ def identifier(string)
+ "#{Tty.green}#{string}#{Tty.... | true |
Other | Homebrew | brew | 75e8b59aad4814112a53119f68ed629d60b3f97b.json | Add `Formatter` module. | Library/Homebrew/utils/github.rb | @@ -14,7 +14,7 @@ def initialize(reset, error)
super <<-EOS.undent
GitHub API Error: #{error}
Try again in #{pretty_ratelimit_reset(reset)}, or create a personal access token:
- #{Tty.underline}https://github.com/settings/tokens/new?scopes=&description=Homebrew#{Tty.reset}
+ #... | true |
Other | Homebrew | brew | d2cc9179601103dcb23606eb39dffb7e1e80023c.json | Fix migrate formula link. | docs/Migrate-A-Formula-To-Multiple-Versions.md | @@ -21,7 +21,7 @@ In separate pull-requests:
In separate pull-requests:
-1. [Migrate the formula](Migrating-A-Formula-To-A-Tap) from Homebrew/homebrew-versions to Homebrew/homebrew-core with the same, old name e.g. `boost160.rb`.
+1. [Migrate the formula](Migrating-A-Formula-To-A-Tap.md) from Homebrew/homebrew-ver... | false |
Other | Homebrew | brew | f17a55b2690777ba67700a09a8eea623bd9ba98a.json | upgrade: tell people that --all is a no-op.
Apparently this is still run by people so let's tell them to save
some typing. | Library/Homebrew/cmd/upgrade.rb | @@ -23,6 +23,14 @@ def upgrade
Homebrew.perform_preinstall_checks
+ if ARGV.include?("--all")
+ opoo <<-EOS.undent
+ We decided to not change the behaviour of `brew upgrade` so
+ `brew upgrade --all` is equivalent to `brew upgrade` without any other
+ arguments (so the `--all` is a... | false |
Other | Homebrew | brew | 5b31507fdac6ae12141b3e84f70115610a7ae00c.json | Use Library/.rubocop.yml file.
This allows having a shared style that’s use for Homebrew/brew and taps
which can be overridden by Homebrew/brew. | Library/.rubocop.yml | @@ -73,6 +73,15 @@ Style/EmptyLineBetweenDefs:
Style/FileName:
Regex: !ruby/regexp /^[\w\@\-\+\.]+(\.rb)?$/
+Style/GuardClause:
+ Enabled: false
+
+Style/HashSyntax:
+ EnforcedStyle: hash_rockets
+
+Style/IfUnlessModifier:
+ Enabled: false
+
Style/IndentArray:
EnforcedStyle: special_inside_parentheses
| true |
Other | Homebrew | brew | 5b31507fdac6ae12141b3e84f70115610a7ae00c.json | Use Library/.rubocop.yml file.
This allows having a shared style that’s use for Homebrew/brew and taps
which can be overridden by Homebrew/brew. | Library/Homebrew/.rubocop.yml | @@ -1,5 +1,5 @@
inherit_from:
- - ../.rubocop_common.yml
+ - ../.rubocop.yml
- .rubocop_todo.yml
AllCops: | true |
Other | Homebrew | brew | 5b31507fdac6ae12141b3e84f70115610a7ae00c.json | Use Library/.rubocop.yml file.
This allows having a shared style that’s use for Homebrew/brew and taps
which can be overridden by Homebrew/brew. | Library/Homebrew/cmd/style.rb | @@ -56,7 +56,7 @@ def check_style_impl(files, output_type, options = {})
args << "--config" << HOMEBREW_LIBRARY_PATH/".rubocop.yml"
args += [HOMEBREW_LIBRARY_PATH]
else
- args << "--config" << Tap::TAP_DIRECTORY/".rubocop.yml"
+ args << "--config" << HOMEBREW_LIBRARY/".rubocop.yml"
a... | true |
Other | Homebrew | brew | d843f70a3501e05d81777ef9d0e8612fcaa1a659.json | remove assertion, leave command | Library/Homebrew/test/test_tap.rb | @@ -25,7 +25,7 @@ def test_tap
assert_match "Unpinned homebrew/foo", cmd("tap-unpin", "homebrew/foo")
assert_match "Tapped", cmd("tap", "homebrew/bar", path/".git")
assert_match "Untapped", cmd("untap", "homebrew/bar")
- assert_match /.*/, cmd("tap", "homebrew/bar", path/".git", "-q", "--full")
+ c... | false |
Other | Homebrew | brew | 0b293c44e8a9e8d67839fee9149debde27cb6f7b.json | fix remaining tap test failures | Library/Homebrew/test/test_tap.rb | @@ -25,7 +25,7 @@ def test_tap
assert_match "Unpinned homebrew/foo", cmd("tap-unpin", "homebrew/foo")
assert_match "Tapped", cmd("tap", "homebrew/bar", path/".git")
assert_match "Untapped", cmd("untap", "homebrew/bar")
- assert_equal "", cmd("tap", "homebrew/bar", path/".git", "-q", "--full")
+ ass... | false |
Other | Homebrew | brew | 779833a0c3c89076a683e82391894825693e25f6.json | Update man pages | docs/brew.1.html | @@ -467,7 +467,8 @@ <h2 id="DEVELOPER-COMMANDS">DEVELOPER COMMANDS</h2>
<dt><code>bump-formula-pr</code> [<code>--devel</code>] [<code>--dry-run</code>] [<code>--audit</code>|<code>--strict</code>] <code>--tag=</code><var>tag</var> <code>--revision=</code><var>revision</var> <var>formula</var></dt><dd><p>Creates a pul... | true |
Other | Homebrew | brew | 779833a0c3c89076a683e82391894825693e25f6.json | Update man pages | manpages/brew.1 | @@ -656,7 +656,7 @@ Generate a bottle (binary package) from a formula installed with \fB\-\-build\-b
Creates a pull request to update the formula with a new url or a new tag\.
.
.IP
-If a \fIurl\fR is specified, the \fIsha\-256\fR checksum of the new download must also be specified\.
+If a \fIurl\fR is specified, th... | true |
Other | Homebrew | brew | b197cd88393d5e30022d69bf819e36e6a993face.json | fix Formula path, support macOS | docs/Formula-Cookbook.md | @@ -5,11 +5,11 @@ A formula is a package definition written in Ruby. It can be created with `brew
| Term | Description | Example |
|----------------|------------------------------------------------------... | false |
Other | Homebrew | brew | d4311fd49fe298513d71b269763f33e4f8069ba3.json | update.sh: use sort instead of git tag --sort.
Older versions of Git don't have this flag and we don't want to block
updates for them when there's a (relatively) simple workaround. | Library/Homebrew/cmd/update.sh | @@ -217,7 +217,8 @@ merge_or_rebase() {
if [[ "$DIR" = "$HOMEBREW_REPOSITORY" && -n "$HOMEBREW_UPDATE_TO_TAG" ]]
then
- UPSTREAM_TAG="$(git tag --list --sort=-version:refname |
+ UPSTREAM_TAG="$(git tag --list |
+ sort --field-separator=. --key=1,1nr -k 2,2nr -k 3,3nr |
... | false |
Other | Homebrew | brew | 09c04aa7155ee567f58e2b2285868bb81ce973c9.json | completion: Avoid aliases with `command ls`
If the user has an alias overriding the `ls` command that modifies the
output (e.g. `alias ls='ls -F'`), it will cause unexpected characters to
appear in completions. Using `command ls` forces the shell to use the
command directly, without alias expansion.
This also blackho... | completions/bash/brew | @@ -52,7 +52,7 @@ __brew_complete_formulae() {
__brew_complete_installed() {
local cur="${COMP_WORDS[COMP_CWORD]}"
- local inst="$(ls "$(brew --cellar)")"
+ local inst="$(command ls "$(brew --cellar)" 2>/dev/null)"
COMPREPLY=($(compgen -W "$inst" -- "$cur"))
}
@@ -71,7 +71,7 @@ __brew_complete_versions() ... | false |
Other | Homebrew | brew | 2c50f762ce5cf84dcb1540af78a303ca36f6a941.json | update.sh: hide GITHUB_HEADERS missing output.
Will only happen once but could be confusing anyway. | Library/Homebrew/cmd/update.sh | @@ -477,7 +477,7 @@ EOS
then
# Only try to `git fetch` when the upstream tags have changed
# (so the API does not return 304: unmodified).
- GITHUB_API_ETAG="$(sed -n 's/^ETag: "\([a-f0-9]\{32\}\)".*/\1/p' ".git/GITHUB_HEADERS")"
+ GITHUB_API_ETAG="$(sed -n 's/^ETag: "\(... | false |
Other | Homebrew | brew | cbae10a732f18bd8b96edd114a5aa7904cdbb433.json | test/test_custom_command: fix rubocop style. | Library/Homebrew/test/test_custom_command.rb | @@ -6,7 +6,9 @@ def test_custom_command
cmd = "int-test-#{rand}"
file = "#{path}/brew-#{cmd}"
- File.open(file, "w") { |f| f.write "#!/bin/sh\necho 'I am #{cmd}'\n" }
+ File.open(file, "w") do |f|
+ f.write "#!/bin/sh\necho 'I am #{cmd}'\n"
+ end
FileUtils.chmod 0777, file
... | false |
Other | Homebrew | brew | 0c472ea6d9a5f96775c52d484064dddb871043e7.json | test/test_create: fix rubocop style. | Library/Homebrew/test/test_create.rb | @@ -7,6 +7,6 @@ def test_create
formula_file = CoreTap.new.formula_dir/"testball.rb"
assert formula_file.exist?, "The formula source should have been created"
- assert_match %(sha256 "#{TESTBALL_SHA256}"), formula_file.read
+ assert_match %Q(sha256 "#{TESTBALL_SHA256}"), formula_file.read
end
end | false |
Other | Homebrew | brew | 776785459be67096efd0331c2d69f6133ab18dff.json | test/test_audit: fix rubocop style. | Library/Homebrew/test/test_audit.rb | @@ -67,7 +67,9 @@ def teardown
def formula_auditor(name, text, options = {})
path = Pathname.new "#{@dir}/#{name}.rb"
- path.open("w") { |f| f.write text }
+ path.open("w") do |f|
+ f.write text
+ end
FormulaAuditor.new Formulary.factory(path), options
end
| false |
Other | Homebrew | brew | 47fe231552c56989fa1f530b1817aafa4c31dff3.json | test/helper/integration_command_test_case: fix rubocop style. | Library/Homebrew/test/helper/integration_command_test_case.rb | @@ -76,7 +76,9 @@ def cmd_output(*args)
ENV["HOMEBREW_BREW_FILE"] = HOMEBREW_PREFIX/"bin/brew"
ENV["HOMEBREW_INTEGRATION_TEST"] = cmd_id_from_args(args)
ENV["HOMEBREW_TEST_TMPDIR"] = TEST_TMPDIR
- env.each_pair { |k, v| ENV[k] = v }
+ env.each_pair do |k, v|
+ ENV[k] = v
+ end... | false |
Other | Homebrew | brew | 394b0884ebd037ac69e44a6bab23d6e2341fb49c.json | bump-formula-pr: handle gnu mirrors
and add explicit version when not preexisting | Library/Homebrew/dev-cmd/bump-formula-pr.rb | @@ -109,7 +109,13 @@ def bump_formula_pr
elsif !hash_type
odie "#{formula}: no tag/revision specified!"
else
- rsrc = Resource.new { @url = new_url }
+ rsrc_url = if requested_spec != :devel && new_url =~ /.*ftpmirror.gnu.*/
+ new_mirror = new_url.sub "ftpmirror.gnu.org", "ftp.gnu.org/... | false |
Other | Homebrew | brew | a9a62972bdce95a2b94db1be2e732480d88e17eb.json | bump-formula-pr: handle explicit version DSL
--version=1.2.3 option to set `version "1.2.3"`
Note that --version=0 will remove a no-longer-needed explicit version | Library/Homebrew/dev-cmd/bump-formula-pr.rb | @@ -101,6 +101,7 @@ def bump_formula_pr
new_tag = ARGV.value("tag")
new_revision = ARGV.value("revision")
new_mirror = ARGV.value("mirror")
+ forced_version = ARGV.value("version")
new_url_hash = if new_url && new_hash
true
elsif new_tag && new_revision
@@ -155,6 +156,11 @@ def bump_f... | false |
Other | Homebrew | brew | 30779c32838bdcad3d6bb5ecb6833962cbde6657.json | add pcmpl-homebrew for homebrew emacs plugin | docs/Tips-N'-Tricks.md | @@ -137,6 +137,9 @@ inline patches in Vim.
highlighting for inline patches as well as a number of helper functions
for editing formula files.
+[pcmpl-homebrew](https://github.com/hiddenlotus/pcmpl-homebrew) provides completion
+for emacs shell-mode and eshell-mode.
+
### Atom
[language-homebrew-formula](https:/... | false |
Other | Homebrew | brew | 8995d8b9e5ccaf3c56aceff655c51f924737a11e.json | Fix documentation for --caskroom default | Library/Homebrew/manpages/brew-cask.1.md | @@ -138,7 +138,7 @@ in a future version.
Abort Cask installation if the Cask does not have a checksum defined.
* `--caskroom=<path>`:
- Location of the Caskroom, where all binaries are stored. The default value is: `$(brew --repository)/Caskroom`.
+ Location of the Caskroom, where all binaries are store... | true |
Other | Homebrew | brew | 8995d8b9e5ccaf3c56aceff655c51f924737a11e.json | Fix documentation for --caskroom default | manpages/brew-cask.1 | @@ -139,7 +139,7 @@ Abort Cask installation if the Cask does not have a checksum defined\.
.
.TP
\fB\-\-caskroom=<path>\fR
-Location of the Caskroom, where all binaries are stored\. The default value is: \fB$(brew \-\-repository)/Caskroom\fR\.
+Location of the Caskroom, where all binaries are stored\. The default va... | true |
Other | Homebrew | brew | 50b635e276bb61b770e8437830785d86247c5342.json | Add test for `search_tap`. | Library/Homebrew/test/test_search_remote_tap.rb | @@ -0,0 +1,19 @@
+require "testing_env"
+require "cmd/search"
+
+class SearchRemoteTapTests < Homebrew::TestCase
+ def test_search_remote_tap
+ json_response = {
+ "tree" => [
+ {
+ "path" => "Formula/not-a-formula.rb",
+ "type" => "blob",
+ },
+ ],
+ }
+
+ GitHub.stu... | false |
Other | Homebrew | brew | 87cf4f7f7a5e69d9e0ba2271f7bde2b8bf7e5c1e.json | update.sh: use GitHub tags API.
Otherwise if we've committed to `master` and someone `brew update`s
before we cut the tag then they won't be updated to the latest version. | Library/Homebrew/cmd/update.sh | @@ -217,7 +217,8 @@ merge_or_rebase() {
if [[ "$DIR" = "$HOMEBREW_REPOSITORY" && -z "$HOMEBREW_NO_UPDATE_CLEANUP" ]]
then
- UPSTREAM_TAG="$(git tag --list --sort=-version:refname | grep '^[0-9]*\.[0-9]*\.[0-9]*$' | head -n1)"
+ UPSTREAM_TAG="$(git tag --list --sort=-version:refname |
+ ... | false |
Other | Homebrew | brew | 2d804ae43661ee1ef608b0d0ac1a3fd68ac124f5.json | brew.sh: change directory for HOMEBREW_VERSION.
This stops `-dirty` showing up whenever you aren't in
`HOMEBREW_REPOSITORY`.
Fixes #1108. | Library/Homebrew/brew.sh | @@ -1,4 +1,4 @@
-HOMEBREW_VERSION="$(GIT_DIR="$HOMEBREW_REPOSITORY/.git" git describe --tags --dirty 2>/dev/null)"
+HOMEBREW_VERSION="$(git -C "$HOMEBREW_REPOSITORY" describe --tags --dirty 2>/dev/null)"
if [[ -z "$HOMEBREW_VERSION" ]]
then
HOMEBREW_VERSION=">1.0.0 (no git repository)" | false |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/.rubocop.yml | @@ -86,7 +86,7 @@ Style/BlockDelimiters:
- proc
Style/ClassAndModuleChildren:
- EnforcedStyle: compact
+ EnforcedStyle: nested
Style/Documentation:
Enabled: false | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc.rb | @@ -40,22 +40,22 @@ module Hbc; end
require "vendor/plist/plist"
module Hbc
- include Hbc::Locations
- include Hbc::Scopes
- include Hbc::Options
- include Hbc::Utils
+ include Locations
+ include Scopes
+ include Options
+ include Utils
def self.init
- Hbc::Cache.ensure_cache_exists
- Hbc::Cache... | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact.rb | @@ -1,5 +1,3 @@
-module Hbc::Artifact; end
-
require "hbc/artifact/app"
require "hbc/artifact/artifact" # generic 'artifact' stanza
require "hbc/artifact/binary"
@@ -24,42 +22,44 @@ module Hbc::Artifact; end
require "hbc/artifact/uninstall"
require "hbc/artifact/zap"
-module Hbc::Artifact
- # NOTE: order is imp... | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/abstract_flight_block.rb | @@ -1,36 +1,40 @@
require "hbc/artifact/base"
-class Hbc::Artifact::AbstractFlightBlock < Hbc::Artifact::Base
- def self.artifact_dsl_key
- super.to_s.sub(%r{_block$}, "").to_sym
- end
-
- def self.uninstall_artifact_dsl_key
- artifact_dsl_key.to_s.prepend("uninstall_").to_sym
- end
-
- def self.class_for... | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/app.rb | @@ -1,4 +1,8 @@
require "hbc/artifact/moved"
-class Hbc::Artifact::App < Hbc::Artifact::Moved
+module Hbc
+ module Artifact
+ class App < Moved
+ end
+ end
end | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/artifact.rb | @@ -1,20 +1,24 @@
require "hbc/artifact/moved"
-class Hbc::Artifact::Artifact < Hbc::Artifact::Moved
- def self.artifact_english_name
- "Generic Artifact"
- end
+module Hbc
+ module Artifact
+ class Artifact < Moved
+ def self.artifact_english_name
+ "Generic Artifact"
+ end
- def self.a... | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/audio_unit_plugin.rb | @@ -1,4 +1,8 @@
require "hbc/artifact/moved"
-class Hbc::Artifact::AudioUnitPlugin < Hbc::Artifact::Moved
+module Hbc
+ module Artifact
+ class AudioUnitPlugin < Moved
+ end
+ end
end | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/base.rb | @@ -1,79 +1,83 @@
-class Hbc::Artifact::Base
- def self.artifact_name
- @artifact_name ||= name.sub(%r{^.*:}, "").gsub(%r{(.)([A-Z])}, '\1_\2').downcase
- end
-
- def self.artifact_english_name
- @artifact_english_name ||= name.sub(%r{^.*:}, "").gsub(%r{(.)([A-Z])}, '\1 \2')
- end
-
- def self.artifact_engli... | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/binary.rb | @@ -1,7 +1,11 @@
require "hbc/artifact/symlinked"
-class Hbc::Artifact::Binary < Hbc::Artifact::Symlinked
- def install_phase
- super unless Hbc.no_binaries
+module Hbc
+ module Artifact
+ class Binary < Symlinked
+ def install_phase
+ super unless Hbc.no_binaries
+ end
+ end
end
end | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/colorpicker.rb | @@ -1,4 +1,8 @@
require "hbc/artifact/moved"
-class Hbc::Artifact::Colorpicker < Hbc::Artifact::Moved
+module Hbc
+ module Artifact
+ class Colorpicker < Moved
+ end
+ end
end | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/font.rb | @@ -1,4 +1,8 @@
require "hbc/artifact/moved"
-class Hbc::Artifact::Font < Hbc::Artifact::Moved
+module Hbc
+ module Artifact
+ class Font < Moved
+ end
+ end
end | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/input_method.rb | @@ -1,4 +1,8 @@
require "hbc/artifact/moved"
-class Hbc::Artifact::InputMethod < Hbc::Artifact::Moved
+module Hbc
+ module Artifact
+ class InputMethod < Moved
+ end
+ end
end | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/installer.rb | @@ -1,41 +1,45 @@
require "hbc/artifact/base"
-class Hbc::Artifact::Installer < Hbc::Artifact::Base
- # TODO: for backward compatibility, removeme
- def install
- install_phase
- end
+module Hbc
+ module Artifact
+ class Installer < Base
+ # TODO: for backward compatibility, removeme
+ def instal... | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/internet_plugin.rb | @@ -1,4 +1,8 @@
require "hbc/artifact/moved"
-class Hbc::Artifact::InternetPlugin < Hbc::Artifact::Moved
+module Hbc
+ module Artifact
+ class InternetPlugin < Moved
+ end
+ end
end | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/moved.rb | @@ -1,88 +1,92 @@
require "hbc/artifact/relocated"
-class Hbc::Artifact::Moved < Hbc::Artifact::Relocated
- def self.english_description
- "#{artifact_english_name}s"
- end
+module Hbc
+ module Artifact
+ class Moved < Relocated
+ def self.english_description
+ "#{artifact_english_name}s"
+ ... | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/nested_container.rb | @@ -1,24 +1,28 @@
require "hbc/artifact/base"
-class Hbc::Artifact::NestedContainer < Hbc::Artifact::Base
- def install_phase
- @cask.artifacts[:nested_container].each { |container| extract(container) }
- end
+module Hbc
+ module Artifact
+ class NestedContainer < Base
+ def install_phase
+ @cas... | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/pkg.rb | @@ -1,53 +1,57 @@
require "hbc/artifact/base"
-class Hbc::Artifact::Pkg < Hbc::Artifact::Base
- attr_reader :pkg_relative_path
+module Hbc
+ module Artifact
+ class Pkg < Base
+ attr_reader :pkg_relative_path
- def self.artifact_dsl_key
- :pkg
- end
+ def self.artifact_dsl_key
+ :pkg
+ ... | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/postflight_block.rb | @@ -1,4 +1,8 @@
require "hbc/artifact/abstract_flight_block"
-class Hbc::Artifact::PostflightBlock < Hbc::Artifact::AbstractFlightBlock
+module Hbc
+ module Artifact
+ class PostflightBlock < AbstractFlightBlock
+ end
+ end
end | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/preflight_block.rb | @@ -1,4 +1,8 @@
require "hbc/artifact/abstract_flight_block"
-class Hbc::Artifact::PreflightBlock < Hbc::Artifact::AbstractFlightBlock
+module Hbc
+ module Artifact
+ class PreflightBlock < AbstractFlightBlock
+ end
+ end
end | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/prefpane.rb | @@ -1,7 +1,11 @@
require "hbc/artifact/moved"
-class Hbc::Artifact::Prefpane < Hbc::Artifact::Moved
- def self.artifact_english_name
- "Preference Pane"
+module Hbc
+ module Artifact
+ class Prefpane < Moved
+ def self.artifact_english_name
+ "Preference Pane"
+ end
+ end
end
end | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/qlplugin.rb | @@ -1,21 +1,25 @@
require "hbc/artifact/moved"
-class Hbc::Artifact::Qlplugin < Hbc::Artifact::Moved
- def self.artifact_english_name
- "QuickLook Plugin"
- end
+module Hbc
+ module Artifact
+ class Qlplugin < Moved
+ def self.artifact_english_name
+ "QuickLook Plugin"
+ end
- def instal... | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/relocated.rb | @@ -1,53 +1,57 @@
require "hbc/artifact/base"
-class Hbc::Artifact::Relocated < Hbc::Artifact::Base
- def summary
- {
- english_description: self.class.english_description,
- contents: @cask.artifacts[self.class.artifact_dsl_key].map(&method(:summarize_artifact)).compact,
- }
- end
-
- ... | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/screen_saver.rb | @@ -1,4 +1,8 @@
require "hbc/artifact/moved"
-class Hbc::Artifact::ScreenSaver < Hbc::Artifact::Moved
+module Hbc
+ module Artifact
+ class ScreenSaver < Moved
+ end
+ end
end | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/service.rb | @@ -1,4 +1,8 @@
require "hbc/artifact/moved"
-class Hbc::Artifact::Service < Hbc::Artifact::Moved
+module Hbc
+ module Artifact
+ class Service < Moved
+ end
+ end
end | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/stage_only.rb | @@ -1,15 +1,19 @@
require "hbc/artifact/base"
-class Hbc::Artifact::StageOnly < Hbc::Artifact::Base
- def self.artifact_dsl_key
- :stage_only
- end
+module Hbc
+ module Artifact
+ class StageOnly < Base
+ def self.artifact_dsl_key
+ :stage_only
+ end
- def install_phase
- # do nothing... | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/suite.rb | @@ -1,11 +1,15 @@
require "hbc/artifact/moved"
-class Hbc::Artifact::Suite < Hbc::Artifact::Moved
- def self.artifact_english_name
- "App Suite"
- end
+module Hbc
+ module Artifact
+ class Suite < Moved
+ def self.artifact_english_name
+ "App Suite"
+ end
- def self.artifact_dirmethod
- ... | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/symlinked.rb | @@ -1,65 +1,69 @@
require "hbc/artifact/relocated"
-class Hbc::Artifact::Symlinked < Hbc::Artifact::Relocated
- def self.link_type_english_name
- "Symlink"
- end
+module Hbc
+ module Artifact
+ class Symlinked < Relocated
+ def self.link_type_english_name
+ "Symlink"
+ end
- def self.eng... | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/uninstall.rb | @@ -1,4 +1,8 @@
require "hbc/artifact/uninstall_base"
-class Hbc::Artifact::Uninstall < Hbc::Artifact::UninstallBase
+module Hbc
+ module Artifact
+ class Uninstall < UninstallBase
+ end
+ end
end | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/uninstall_base.rb | @@ -2,248 +2,252 @@
require "hbc/artifact/base"
-class Hbc::Artifact::UninstallBase < Hbc::Artifact::Base
- # TODO: 500 is also hardcoded in cask/pkg.rb, but much of
- # that logic is probably in the wrong location
-
- PATH_ARG_SLICE_SIZE = 500
-
- ORDERED_DIRECTIVES = [
- :early_... | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/vst3_plugin.rb | @@ -1,4 +1,8 @@
require "hbc/artifact/moved"
-class Hbc::Artifact::Vst3Plugin < Hbc::Artifact::Moved
+module Hbc
+ module Artifact
+ class Vst3Plugin < Moved
+ end
+ end
end | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/vst_plugin.rb | @@ -1,4 +1,8 @@
require "hbc/artifact/moved"
-class Hbc::Artifact::VstPlugin < Hbc::Artifact::Moved
+module Hbc
+ module Artifact
+ class VstPlugin < Moved
+ end
+ end
end | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/artifact/zap.rb | @@ -1,16 +1,20 @@
require "hbc/artifact/uninstall_base"
-class Hbc::Artifact::Zap < Hbc::Artifact::UninstallBase
- def install_phase
- odebug "Nothing to do. The zap artifact has no install phase."
- end
+module Hbc
+ module Artifact
+ class Zap < UninstallBase
+ def install_phase
+ odebug "Noth... | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/audit.rb | @@ -2,215 +2,217 @@
require "hbc/download"
require "digest"
-class Hbc::Audit
- include Hbc::Checkable
+module Hbc
+ class Audit
+ include Checkable
- attr_reader :cask, :download
+ attr_reader :cask, :download
- def initialize(cask, download: false, check_token_conflicts: false, command: Hbc::SystemC... | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/auditor.rb | @@ -1,10 +1,12 @@
-class Hbc::Auditor
- def self.audit(cask, audit_download: false, check_token_conflicts: false)
- download = audit_download && Hbc::Download.new(cask)
- audit = Hbc::Audit.new(cask, download: download,
- check_token_conflicts: check_token_conflicts)
... | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/cache.rb | @@ -1,34 +1,36 @@
-module Hbc::Cache
- module_function
+module Hbc
+ module Cache
+ module_function
- def ensure_cache_exists
- return if Hbc.cache.exist?
+ def ensure_cache_exists
+ return if Hbc.cache.exist?
- odebug "Creating Cache at #{Hbc.cache}"
- Hbc.cache.mkpath
- end
+ odebug "... | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/cask.rb | @@ -2,114 +2,116 @@
require "hbc/dsl"
-class Hbc::Cask
- extend Forwardable
+module Hbc
+ class Cask
+ extend Forwardable
- attr_reader :token, :sourcefile_path
- def initialize(token, sourcefile_path: nil, dsl: nil, &block)
- @token = token
- @sourcefile_path = sourcefile_path
- @dsl = dsl || Hb... | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/cask_dependencies.rb | @@ -1,33 +1,35 @@
require "hbc/topological_hash"
-class Hbc::CaskDependencies
- attr_reader :cask, :graph, :sorted
+module Hbc
+ class CaskDependencies
+ attr_reader :cask, :graph, :sorted
- def initialize(cask)
- @cask = cask
- @graph = graph_dependencies
- @sorted = sort
- end
+ def initialize... | true |
Other | Homebrew | brew | b86c8efb79b3ed835d552c4d7416640ef10caf21.json | Cask: Use nested classes and modules. | Library/Homebrew/cask/lib/hbc/caskroom.rb | @@ -1,41 +1,43 @@
-module Hbc::Caskroom
- module_function
+module Hbc
+ module Caskroom
+ module_function
- def migrate_caskroom_from_repo_to_prefix
- repo_caskroom = Hbc.homebrew_repository.join("Caskroom")
- return if Hbc.caskroom.exist?
- return unless repo_caskroom.directory?
+ def migrate_caskr... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.