-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
add available languages to cask info command #3220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add available languages to cask info command #3220
Conversation
reitermarkus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great if you could add a small test for this. Thanks!
|
Absolutely. If you don't mind, I'd like to bounce my thoughts off you before I tackle it. Testing takes a little for me to wrap my head around what is a good test. By changing For For |
|
Yes, these sound exactly like the tests we'd need. 👍 |
add language tests for dsl add fixtures, tests for languages info output add extra lines
|
Tests added, brew tests on my machine passed, TravisCI tests looked to have passed to. I think that should be everything :) |
reitermarkus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some stylistic changes, other than that 👍 .
| expect(cask.call.url.to_s).to eq("https://example.org/en-US.zip") | ||
| end | ||
|
|
||
| it "returns empty array if no languages specified" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an empty array … are specified
| EOS | ||
| end | ||
|
|
||
| it 'should not print "Languages" section divider if the languages block has no output' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does not print
| EOS | ||
| end | ||
|
|
||
| it "should print languages if the Cask provided any" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prints languages specified in the Cask
| @@ -0,0 +1,9 @@ | |||
| cask 'with-conditional-languages' do | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without-languages
|
Great work, @yzguy! |
|
Thank you! |
brew testswith your changes locally?This is first ever OSS pull request to a real project, I figured it was a relatively small easy one.
This adds a new method to the DSL parsing to expose the languages specified in a cask, and a new section in the info output for available languages
The section does not show up if there are no languages specified in the cask
Fixes Homebrew/homebrew-cask#31128
I'm absolutely open to any help, suggestions, criticism.