diff options
| author | Xu Cheng | 2015-08-06 15:45:52 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-08-06 17:23:56 +0800 |
| commit | b121e5fd7be1b1984e51caa6a369dd8faf70a57a (patch) | |
| tree | 7bf8eb9f259479e8c445e2d991bec251a2cc5324 /Library/Homebrew/cmd | |
| parent | 3f8ce5f1a95307a2a836afbbf51565d890ff676f (diff) | |
| download | brew-b121e5fd7be1b1984e51caa6a369dd8faf70a57a.tar.bz2 | |
more core file style updated by rubocop
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/aspell-dictionaries.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/list.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/test-bot.rb | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/aspell-dictionaries.rb b/Library/Homebrew/cmd/aspell-dictionaries.rb index f610ecfbd..754b6614e 100644 --- a/Library/Homebrew/cmd/aspell-dictionaries.rb +++ b/Library/Homebrew/cmd/aspell-dictionaries.rb @@ -16,7 +16,7 @@ module Homebrew fields = line.split('"') lang = fields[1] path = fields[3] - lang.gsub!("-", "_") + lang.tr!("-", "_") languages[lang] = path end end diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 7390b8a86..84a93859f 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -360,7 +360,7 @@ class FormulaAuditor EOS end - if desc =~ %r[([Cc]ommand ?line)] + if desc =~ /([Cc]ommand ?line)/ problem "Description should use \"command-line\" instead of \"#{$1}\"" end end diff --git a/Library/Homebrew/cmd/list.rb b/Library/Homebrew/cmd/list.rb index 53985d113..068f26835 100644 --- a/Library/Homebrew/cmd/list.rb +++ b/Library/Homebrew/cmd/list.rb @@ -136,7 +136,7 @@ class PrettyListing root.children.sort.each do |pn| if pn.directory? dirs << pn - elsif block_given? and yield pn + elsif block_given? && yield(pn) puts pn other = "other " else diff --git a/Library/Homebrew/cmd/test-bot.rb b/Library/Homebrew/cmd/test-bot.rb index 8e9e3c239..6dcd301aa 100644 --- a/Library/Homebrew/cmd/test-bot.rb +++ b/Library/Homebrew/cmd/test-bot.rb @@ -793,7 +793,7 @@ module Homebrew bottle_args << "--tap=#{tap}" if tap safe_system "brew", "bottle", *bottle_args - remote_repo = tap ? tap.gsub("/", "-") : "homebrew" + remote_repo = tap ? tap.tr("/", "-") : "homebrew" remote = "git@github.com:BrewTestBot/#{remote_repo}.git" tag = pr ? "pr-#{pr}" : "testing-#{number}" |
