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
4cf74bc9
Commit
4cf74bc9
authored
13 years ago
by
at@an-ti.eu
Committed by
Adam Vandenberg
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
List all local installed packages in brew server
Signed-off-by:
Adam Vandenberg
<
flangy@gmail.com
>
parent
be9d91b2
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/Contributions/examples/brew-server
+34
-0
34 additions, 0 deletions
Library/Contributions/examples/brew-server
with
34 additions
and
0 deletions
Library/Contributions/examples/brew-server
+
34
−
0
View file @
4cf74bc9
...
...
@@ -50,6 +50,7 @@ def html_page
<div
id=
"header"
>
<h1><a
href=
"./"
>
Homebrew
</a></h1>
<p
id=
"subtitle"
><strong>
The missing package manager for OS X
</strong></p>
<p
id=
"installed"
><a
href=
"/installed"
>
Show installed packages
</a></p>
</div>
<div
id=
"informations"
>
...
...
@@ -171,4 +172,37 @@ get '/formula/:name' do
return s
end
def installed_formulas
Formula.all.select{|formula| formula.installed?}
end
get '/installed' do
s =
<
<
-HTML
<
html
>
<head>
<title>
Installed Formulas
</title>
#{css_style}
</head>
<body>
<h1>
Installed Fomulas
</h1>
<ul>
HTML
installed_formulas.each do |formula|
s
<
<
"<
li
>
#{link_to_formula(formula.name)}
</li>
"
end
s +=
<
<
-HTML
</
ul
>
<div>
←
<a
href=
"/"
>
Back to menu
</a></div>
</body>
</html>
HTML
return s
end
puts "View our tasting menu at http://localhost:4567/\nUse \"Control-C\" to exit.\n\n"
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