aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils
diff options
context:
space:
mode:
authorMike McQuaid2016-09-18 13:28:15 +0100
committerGitHub2016-09-18 13:28:15 +0100
commit59b7f16bfd9c1968aae0a2f1cd9a43d3d160d99f (patch)
tree17d2adec882cdeef36a8fd40d891fe7fe4021572 /Library/Homebrew/utils
parent56541001a45ea58c54096bc42584c17d72b1415a (diff)
parent1bdbb0f462e4c3557bbcba0b203696bdcf025bb4 (diff)
downloadbrew-59b7f16bfd9c1968aae0a2f1cd9a43d3d160d99f.tar.bz2
Merge pull request #989 from MikeMcQuaid/rubocop-final
Rubocop: apply auto-corrections and don't use hash-rockets
Diffstat (limited to 'Library/Homebrew/utils')
-rw-r--r--Library/Homebrew/utils/analytics.rb14
-rw-r--r--Library/Homebrew/utils/github.rb8
-rw-r--r--Library/Homebrew/utils/shell.rb14
3 files changed, 18 insertions, 18 deletions
diff --git a/Library/Homebrew/utils/analytics.rb b/Library/Homebrew/utils/analytics.rb
index a72850655..e176f0566 100644
--- a/Library/Homebrew/utils/analytics.rb
+++ b/Library/Homebrew/utils/analytics.rb
@@ -55,10 +55,10 @@ module Utils
def report_event(category, action, label = os_prefix_ci, value = nil)
report(:event,
- :ec => category,
- :ea => action,
- :el => label,
- :ev => value)
+ ec: category,
+ ea: action,
+ el: label,
+ ev: value)
end
def report_exception(exception, options = {})
@@ -69,12 +69,12 @@ module Utils
fatal = options.fetch(:fatal, true) ? "1" : "0"
report(:exception,
- :exd => exception.class.name,
- :exf => fatal)
+ exd: exception.class.name,
+ exf: fatal)
end
def report_screenview(screen_name)
- report(:screenview, :cd => screen_name)
+ report(:screenview, cd: screen_name)
end
end
end
diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb
index d3f304122..9431fa15f 100644
--- a/Library/Homebrew/utils/github.rb
+++ b/Library/Homebrew/utils/github.rb
@@ -235,8 +235,8 @@ module GitHub
def build_search_qualifier_string(qualifiers)
{
- :repo => "Homebrew/homebrew-core",
- :in => "title",
+ repo: "Homebrew/homebrew-core",
+ in: "title",
}.update(qualifiers).map do |qualifier, value|
"#{qualifier}:#{value}"
end.join("+")
@@ -253,14 +253,14 @@ module GitHub
def issues_for_formula(name, options = {})
tap = options[:tap] || CoreTap.instance
- issues_matching(name, :state => "open", :repo => "#{tap.user}/homebrew-#{tap.repo}")
+ issues_matching(name, state: "open", repo: "#{tap.user}/homebrew-#{tap.repo}")
end
def print_pull_requests_matching(query)
return [] if ENV["HOMEBREW_NO_GITHUB_API"]
ohai "Searching pull requests..."
- open_or_closed_prs = issues_matching(query, :type => "pr")
+ open_or_closed_prs = issues_matching(query, type: "pr")
open_prs = open_or_closed_prs.select { |i| i["state"] == "open" }
if !open_prs.empty?
diff --git a/Library/Homebrew/utils/shell.rb b/Library/Homebrew/utils/shell.rb
index 7f749186f..302167d47 100644
--- a/Library/Homebrew/utils/shell.rb
+++ b/Library/Homebrew/utils/shell.rb
@@ -1,12 +1,12 @@
module Utils
SHELL_PROFILE_MAP = {
- :bash => "~/.bash_profile",
- :csh => "~/.cshrc",
- :fish => "~/.config/fish/config.fish",
- :ksh => "~/.kshrc",
- :sh => "~/.bash_profile",
- :tcsh => "~/.tcshrc",
- :zsh => "~/.zshrc",
+ bash: "~/.bash_profile",
+ csh: "~/.cshrc",
+ fish: "~/.config/fish/config.fish",
+ ksh: "~/.kshrc",
+ sh: "~/.bash_profile",
+ tcsh: "~/.tcshrc",
+ zsh: "~/.zshrc",
}.freeze
module Shell