开发者

What files except LICENSE is a good practice to add to your gem repo?

开发者 https://www.devze.com 2023-03-28 21:46 出处:网络
I wrote gem and published it to github (ex - https://github.com/randx/six) I added LICENSE f开发者_StackOverflow社区ile.

I wrote gem and published it to github (ex - https://github.com/randx/six)

I added LICENSE f开发者_StackOverflow社区ile.

I often see VERSION file in other repo - whats the goal?

Any other files should I add?


Chapter 8 of "Ruby Best Practices" by Greg Brown exclusively deals with properly maintaining Ruby projects, including directory layout, files you should include etc. The book is legally available online here:

http://majesticseacreature.com/rbp-book/pdfs/rbp_1-0.pdf


I always love a good README. It's much easier to read a well explained README than browse the automatically generated RDoc manual. The README should explain what the gem does and how to use it, with example code and even some advanced examples can be included towards the end of the README.

Another essential file is a history or CHANGES file. This file should contain an explanation of the major changes between releases. It does not need to include nitty gritty details, but should include enough information so that someone upgrading from version x to version y can quickly see what's new (so you can asses the benefits of upgrading) and what has changed (so you can asses the potential impacts an upgrade has on your current code).

Too many times I see projects where the CHANGES file is missing, and you're left pretty much in the dark about what has changed when you run an upgrade.


From my perspective each GitHub project (based on your question you have a repo there) should have:

  1. Integration with CI servers (Travis CI, Circle CI, etc)
  2. .github folder with issue/pull requests templates (example https://github.com/zold-io/zold/tree/master/.github)
  3. .gitingore to avoid accidentally committed temporal/local files
  4. .gitattributes for custom Git repo configuration (more https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes and https://git-scm.com/docs/gitattributes)
  5. .rubycop.yml
  6. Add the following badges to your readme.md
  • What files except LICENSE is a good practice to add to your gem repo?

    version of your ruby gem
  • What files except LICENSE is a good practice to add to your gem repo?

    license details
  • What files except LICENSE is a good practice to add to your gem repo?

    commit activity per year to hightlight the status of the project
  • Hits-of-Code More about HoC here https://www.yegor256.com/2014/11/14/hits-of-code.html
  • Build Status

    What files except LICENSE is a good practice to add to your gem repo?

    the status of the latest builds
  • What files except LICENSE is a good practice to add to your gem repo?

    the status of dependencies (obsolte or not)
  • What files except LICENSE is a good practice to add to your gem repo?

    show the vulnurabilities count(if any) for the dependencies
  • Maintainability Rating Codebeat Codacy Badge SQ coverage Codecov

    What files except LICENSE is a good practice to add to your gem repo?

    as code quality badges

Projects from the examples above:

  • https://github.com/dgroup/docker-unittests (java)
  • https://github.com/mattbrictson/gem (ruby)
0

精彩评论

暂无评论...
验证码 换一张
取 消