Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
5ce561c4
Commit
5ce561c4
authored
4 years ago
by
Jonathan Chang
Browse files
Options
Downloads
Patches
Plain Diff
rubocop: fix Naming/MemoizedInstanceVariableName
parent
05d7821c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Library/.rubocop.yml
+5
-0
5 additions, 0 deletions
Library/.rubocop.yml
Library/Homebrew/cask/dsl.rb
+4
-4
4 additions, 4 deletions
Library/Homebrew/cask/dsl.rb
Library/Homebrew/download_strategy.rb
+6
-2
6 additions, 2 deletions
Library/Homebrew/download_strategy.rb
with
15 additions
and
6 deletions
Library/.rubocop.yml
+
5
−
0
View file @
5ce561c4
...
...
@@ -197,6 +197,11 @@ Layout/RescueEnsureAlignment:
Lint/AmbiguousBlockAssociation
:
Enabled
:
false
# needed for lazy_object magic
Naming/MemoizedInstanceVariableName
:
Exclude
:
-
'
Homebrew/lazy_object.rb'
# so many of these in formulae and can't be autocorrected
# TODO: fix these as `ruby -w` complains about them.
Lint/AmbiguousRegexpLiteral
:
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/cask/dsl.rb
+
4
−
4
View file @
5ce561c4
...
...
@@ -142,9 +142,9 @@ module Cask
end
def
language_eval
return
@language
if
defined?
(
@language
)
return
@language
_eval
if
defined?
(
@language
_eval
)
return
@language
=
nil
if
@language_blocks
.
nil?
||
@language_blocks
.
empty?
return
@language
_eval
=
nil
if
@language_blocks
.
nil?
||
@language_blocks
.
empty?
raise
CaskInvalidError
.
new
(
cask
,
"No default language specified."
)
if
@language_blocks
.
default
.
nil?
...
...
@@ -161,10 +161,10 @@ module Cask
next
if
key
.
nil?
return
@language
=
@language_blocks
[
key
].
call
return
@language
_eval
=
@language_blocks
[
key
].
call
end
@language
=
@language_blocks
.
default
.
call
@language
_eval
=
@language_blocks
.
default
.
call
end
def
languages
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/download_strategy.rb
+
6
−
2
View file @
5ce561c4
...
...
@@ -509,6 +509,12 @@ end
# @api public
class
CurlApacheMirrorDownloadStrategy
<
CurlDownloadStrategy
def
mirrors
combined_mirrors
end
private
def
combined_mirrors
return
@combined_mirrors
if
defined?
(
@combined_mirrors
)
backup_mirrors
=
apache_mirrors
.
fetch
(
"backup"
,
[])
...
...
@@ -517,8 +523,6 @@ class CurlApacheMirrorDownloadStrategy < CurlDownloadStrategy
@combined_mirrors
=
[
*
@mirrors
,
*
backup_mirrors
]
end
private
def
resolve_url_basename_time
(
url
)
if
url
==
self
.
url
super
(
"
#{
apache_mirrors
[
"preferred"
]
}#{
apache_mirrors
[
"path_info"
]
}
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment