|
1 | | -## How to contribute to LINE Bot SDK for Ruby project |
| 1 | +# How to contribute to LINE Bot SDK for Ruby project |
2 | 2 |
|
3 | | -First of all, thank you so much for taking your time to contribute! LINE Bot SDK for Ruby is not very different from any other open |
4 | | -source projects you are aware of. It will be amazing if you could help us by doing any of the following: |
| 3 | +First of all, thank you so much for taking your time to contribute! |
| 4 | +LINE Bot SDK for Ruby is not very different from any other open source projects you are aware of. |
| 5 | +It will be amazing if you could help us by doing any of the following: |
5 | 6 |
|
6 | | -- File an issue in [the issue tracker](https://github.com/line/line-bot-sdk-ruby/issues) to report bugs and propose new features and |
7 | | - improvements. |
| 7 | +- File an issue in [the issue tracker](https://github.com/line/line-bot-sdk-ruby/issues) to report bugs and propose new features and improvements. |
8 | 8 | - Ask a question using [the issue tracker](https://github.com/line/line-bot-sdk-ruby/issues). |
9 | 9 | - Contribute your work by sending [a pull request](https://github.com/line/line-bot-sdk-ruby/pulls). |
10 | 10 |
|
| 11 | +## Development |
| 12 | + |
| 13 | +### YARD |
| 14 | + |
| 15 | +We use [YARD](https://yardoc.org) to generate and maintain our code documentation. |
| 16 | +**Please make sure your new or modified code is also covered by proper YARD doc comments.** |
| 17 | +Good documentation ensures that contributors and users can easily read and understand how the methods and classes work. |
| 18 | + |
| 19 | +#### How to generate and view documentation locally |
| 20 | + |
| 21 | +##### 1. **Start a local documentation server** |
| 22 | + |
| 23 | +Run the following command to start a local YARD server that will automatically reload when files change: |
| 24 | + |
| 25 | +```bash |
| 26 | +bundle exec yard server --reload |
| 27 | +``` |
| 28 | + |
| 29 | +Then open the printed URL in your browser (e.g., http://localhost:8808). |
| 30 | + |
| 31 | +##### 2. **Validate your documentation** |
| 32 | + |
| 33 | +Before pushing your changes, run the following command to check YARD documentation coverage and warnings: |
| 34 | +```bash |
| 35 | +bundle exec yard stats ./lib/line/bot/v2 --fail-on-warning |
| 36 | +``` |
| 37 | +This will fail if there are missing doc comments or any YARD-specific warnings. |
| 38 | +Make sure to fix any issues before creating a pull request. |
| 39 | + |
| 40 | +For more details on how to write YARD doc comments, refer to YARD’s official [Getting Started guide](https://rubydoc.info/gems/yard/file/docs/GettingStarted.md). |
| 41 | + |
11 | 42 | ### Contributor license agreement |
12 | 43 |
|
13 | | -When you are sending a pull request and it's a non-trivial change beyond fixing typos, please make sure to sign |
14 | | -[the ICLA (individual contributor license agreement)](https://cla-assistant.io/line/line-bot-sdk-ruby). Please |
15 | | -[contact us](mailto:dl_oss_dev@linecorp.com) if you need the CCLA (corporate contributor license agreement). |
| 44 | +When you are sending a pull request and it's a non-trivial change beyond fixing typos, please make sure to sign [the ICLA (individual contributor license agreement)](https://cla-assistant.io/line/line-bot-sdk-ruby). |
| 45 | +Please [contact us](mailto:dl_oss_dev@linecorp.com) if you need the CCLA (corporate contributor license agreement). |
0 commit comments