We welcome code changes that improve this library or fix a problem, please make sure to follow all best practices and add tests if applicable before submitting a Pull Request on Github. We are very happy to merge your code in the official repository. Make sure to sign our Contributor License Agreement (CLA) first. See our license file for more details.
$ bundle install --path vendor/bundle
$ STREAM_KEY=my_api_key STREAM_SECRET=my_api_secret bundle exec rspec spec
Add :focus tag on target test:
it 'can mark messages as read', :focus do
# test something
end
And then run as following:
$ STREAM_KEY=myapi_key STREAM_SECRET=my_secret STREAM_CHAT_URL=http://127.0.0.1:3030 bundle exec rspec spec --tag focus
We use Rubocop for linting and Sorbet for type checking.
To run them:
$ bundle exec rake rubocop
$ bundle exec srb tc
These linters can be easily integrated into IDEs such as RubyMine or VS Code.
For VS Code, just install the basic Ruby extension which handles Rubocop (rebornix.ruby
) and the official Sorbet one (sorbet.sorbet-vscode-extension
).
Recommended settings:
{
"editor.formatOnSave": true,
"ruby.useBundler": true,
"ruby.lint": {
"rubocop": {
"useBundler": true, // enable rubocop via bundler
}
},
"ruby.format": "rubocop",
"ruby.useLanguageServer": true,
"sorbet.enabled": true
}
This repository follows a commit message convention in order to automatically generate the CHANGELOG. Make sure you follow the rules of conventional commits when opening a pull request.
In order to release new version you need to be a maintainer of the library.
- Kick off a job called
initiate_release
(link).
The job creates a pull request with the changelog. Check if it looks good.
- Merge the pull request.
Once the PR is merged, it automatically kicks off another job which will upload the Gem to RubyGems.org and creates a GitHub release.