Skip to content

Commit

Permalink
Extract contributing guideline into a CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
st0012 committed Dec 28, 2024
1 parent d2b73cb commit 4300692
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 25 deletions.
52 changes: 52 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Contributing to IRB

Bug reports and pull requests are welcome on GitHub at [https://github.com/ruby/irb](https://github.com/ruby/irb).

## Set up the environment

1. Fork the project to your GitHub account
2. Clone the fork with `git clone [email protected]:[your_username]/irb.git`
3. Run `bundle install`
4. Run `bundle exec rake` to make sure tests pass locally

### Run integration tests

If your changes affect component rendering, such as the autocompletion's dialog/dropdown, you may need to run IRB's integration tests, known as `yamatanooroti`.

Before running these tests, ensure that you have `libvterm` installed. If you're using Homebrew, you can install it by running:

```bash
brew install libvterm
```

After installing `libvterm`, you can run the integration tests using the following commands:

```bash
WITH_VTERM=1 bundle install
WITH_VTERM=1 bundle exec rake test test_yamatanooroti
```

### Update documentation

IRB's documentation is generated by [RDoc](https://ruby.github.io/rdoc/) and published to [ruby.github.io/irb](https://ruby.github.io/irb/). Most of the documentation source lives under the `doc/` directory.

Run the following command to generate the documentation site locally.

```bash
bundle exec rake rdoc
bundle exec rake rerdoc # to force regeneration
```

Follow the output message to open the documentation site in your browser.

> [!Note]
>
> Please ensure that the changes are rendered correctly on the documentation site.
> RDoc's Markdown support is limited, so the rendered result on GitHub might differ from what’s rendered on [https://ruby.github.io/irb](https://ruby.github.io/irb).
We welcome any improvements to the documentation, including:

- Fixing typos and grammatical errors
- Adding missing documentation for features
- Adding missing documentation for configuration options
- Adding demo images/gifs for features
26 changes: 1 addition & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,31 +117,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/irb.

### Set up the environment

1. Fork the project to your GithHub account
2. Clone the fork with `git clone [email protected]:[your_username]/irb.git`
3. Run `bundle install`
4. Run `bundle exec rake` to make sure tests pass locally

### Run integration tests

If your changes affect component rendering, such as the autocompletion's dialog/dropdown, you may need to run IRB's integration tests, known as `yamatanooroti`.

Before running these tests, ensure that you have `libvterm` installed. If you're using Homebrew, you can install it by running:

```bash
brew install libvterm
```

After installing `libvterm`, you can run the integration tests using the following commands:

```bash
WITH_VTERM=1 bundle install
WITH_VTERM=1 bundle exec rake test test_yamatanooroti
```
See [CONTRIBUTING.md](./CONTRIBUTING.md) for more information.

## Releasing

Expand Down
4 changes: 4 additions & 0 deletions doc/Index.md
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,10 @@ Command-line option `-E *ex*[:*in*]` sets initial external (ex) and internal (in

Command-line option `-U` sets both to UTF-8.

## Contributing

See [CONTRIBUTING.md](https://github.com/ruby/irb/blob/main/CONTRIBUTING.md) for more information.

## Extending \IRB

\IRB `v1.13.0` and later versions allow users/libraries to extend its functionality through official APIs.
Expand Down

0 comments on commit 4300692

Please sign in to comment.