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
8529cf65
Unverified
Commit
8529cf65
authored
5 years ago
by
Mike McQuaid
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #6218 from xu-cheng/java_requirement
java_requirement: set cask attribute
parents
c95cf90e
2bd9b277
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Library/Homebrew/requirements/java_requirement.rb
+1
-0
1 addition, 0 deletions
Library/Homebrew/requirements/java_requirement.rb
Library/Homebrew/test/java_requirement_spec.rb
+21
-0
21 additions, 0 deletions
Library/Homebrew/test/java_requirement_spec.rb
with
22 additions
and
0 deletions
Library/Homebrew/requirements/java_requirement.rb
+
1
−
0
View file @
8529cf65
...
...
@@ -30,6 +30,7 @@ class JavaRequirement < Requirement
def
initialize
(
tags
=
[])
@version
=
tags
.
shift
if
/^\d/
=~
tags
.
first
super
(
tags
)
@cask
=
suggestion
.
token
end
def
message
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/test/java_requirement_spec.rb
+
21
−
0
View file @
8529cf65
...
...
@@ -105,4 +105,25 @@ describe JavaRequirement do
end
end
end
describe
"#suggestion"
do
context
"without specific version"
do
its
(
:suggestion
)
{
is_expected
.
to
match
(
/brew cask install adoptopenjdk/
)
}
its
(
:cask
)
{
is_expected
.
to
eq
(
"adoptopenjdk"
)
}
end
context
"with version 1.8"
do
subject
{
described_class
.
new
(
%w[1.8]
)
}
its
(
:suggestion
)
{
is_expected
.
to
match
(
%r{brew cask install homebrew/cask-versions/adoptopenjdk8}
)
}
its
(
:cask
)
{
is_expected
.
to
eq
(
"homebrew/cask-versions/adoptopenjdk8"
)
}
end
context
"with version 1.8+"
do
subject
{
described_class
.
new
(
%w[1.8+]
)
}
its
(
:suggestion
)
{
is_expected
.
to
match
(
/brew cask install adoptopenjdk/
)
}
its
(
:cask
)
{
is_expected
.
to
eq
(
"adoptopenjdk"
)
}
end
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