8000 so 0.3.6 (new formula) by samtay · Pull Request #57520 · Homebrew/homebrew-core · GitHub
[go: up one dir, main page]

Skip to content

so 0.3.6 (new formula) #57520

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

Closed
wants to merge 1 commit into from
Closed

so 0.3.6 (new formula) #57520

wants to merge 1 commit into from

Conversation

samtay
Copy link
Contributor
@samtay samtay commented Jul 6, 2020
  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

Adds a formula for so v0.3.6.

@chenrui333 chenrui333 added new formula PR adds a new formula to Homebrew/homebrew-core rust Rust use is a significant feature of the PR or issue labels Jul 6, 2020
Formula/so.rb Outdated
end

test do
system "#{bin}/so", "--help"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a test that exercises the some of the functionality of the app. Version checks or usage checks (foo --version or foo --help) are not sufficient, as explained in the formula cookbook.

In most cases, a good test would involve running a simple test case: run #{bin}/foo input.txt.

  • Then you can check that the output is as expected (with assert_equal or assert_match on the output of shell_output)
  • You can also check that an output file was created, if that is expected: assert_predicate testpath/"output.txt", :exist?

Some advice for specific cases:

  • If the formula is a library, compile and run some simple code that links against it. It could be taken from upstream's documentation / source examples.
  • If the formula is for a GUI program, try to find some function that runs as command-line only, like a format conversion, reading or displaying a config file, etc.
  • If the software cannot function without credentials, a test could be to try to connect with invalid credentials (or without credentials) and confirm that it fails as expected.
  • Same if the software requires a virtual machine, docker instance, etc. to be running.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @SMillerDev. I've updated the PR with a more substantial test of the typical usage.

@dawidd6 dawidd6 added the almost there PR is nearly ready to merge label Jul 6, 2020
@samtay
Copy link
Contributor Author
samtay commented Jul 6, 2020

Huh that's weird. That failed test on 5e7cb17 isn't running on the updated code... perhaps a caching issue? It still thinks line 25 is 120 characters long... and brew style passes locally just fine. I guess I'll try a force push to get it to rebuild.

@SMillerDev
Copy link
Member

Could you rename your commit to the PR title please

@samtay
Copy link
Contributor Author
samtay commented Jul 8, 2020

You mean rebase it so that all the changes are a single commit with message so 0.3.6 (new formula)?

@SMillerDev
Copy link
Member

Yes please

Copy link
Member
@SMillerDev SMillerDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @samtay ! Without contributions like yours it'd be impossible to keep homebrew going with the high standards that users have come to expect from the project. You can feel good knowing that you've made the world a tiny bit better for homebrew users around the world! 👍 🎉

@BrewTestBot
Copy link
Member

:shipit: @SMillerDev has triggered a merge.

@samtay samtay deleted the add-so-formula branch July 9, 2020 16:58
@chenrui333 chenrui333 removed the almost there PR is nearly ready to merge label Jul 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new formula PR adds a new formula to Homebrew/homebrew-core rust Rust use is a significant feature of the PR or issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0