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
633f29af
Commit
633f29af
authored
10 years ago
by
Jack Nagel
Browse files
Options
Downloads
Patches
Plain Diff
Remove duplicated logic from FromUrlLoader
parent
2bf1f937
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Library/Homebrew/formulary.rb
+4
-17
4 additions, 17 deletions
Library/Homebrew/formulary.rb
with
4 additions
and
17 deletions
Library/Homebrew/formulary.rb
+
4
−
17
View file @
633f29af
...
...
@@ -143,23 +143,10 @@ class Formulary
super
formula
,
HOMEBREW_CACHE_FORMULA
/
File
.
basename
(
uri
.
path
)
end
# Downloads the formula's .rb file
def
fetch
begin
have_klass
=
Formulary
.
formula_class_defined?
class_name
rescue
NameError
raise
FormulaUnavailableError
.
new
(
name
)
end
unless
have_klass
HOMEBREW_CACHE_FORMULA
.
mkpath
FileUtils
.
rm
path
.
to_s
,
:force
=>
true
curl
url
,
'-o'
,
path
.
to_s
end
end
def
get_formula
(
spec
)
fetch
def
load_file
HOMEBREW_CACHE_FORMULA
.
mkpath
FileUtils
.
rm_f
(
path
)
curl
url
,
"-o"
,
path
super
end
end
...
...
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