There are a couple ways you can help improve microformats-ruby:
- Fix an existing issue and submit a pull request.
- Review open pull requests.
- Report a new issue. Only do this after you've made sure the behavior or problem you're observing isn't already documented in an open issue.
microformats-ruby is tested against Ruby 2.7 and later versions (https://github.com/microformats/microformats-ruby/actions)
Before making changes to microformats-ruby, you'll want to install Ruby 2.7.1. It's recommended that you use a Ruby version managment tool like rbenv, chruby, or rvm. Once you've installed Ruby 2.7.1 using your method of choice, install the project's gems by running:
bundle install
- Fork and clone the project's repo.
- Install development dependencies as outlined above.
- Create a feature branch for the code changes you're looking to make:
git checkout -b my-new-feature
. - Write some code!
- If your changes would benefit from testing, add the necessary tests and verify everything passes by running
bundle exec rspec
. - Commit your changes:
git commit -am 'Add some new feature or fix some issue'
. (See this excellent article for tips on writing useful Git commit messages.) - Push the branch to your fork:
git push -u origen my-new-feature
. - Create a new pull request and we'll review your changes.
We use the following tools to evaluate code quality and verify behavior:
- The test suite uses RSpec (
bundle exec rspec
). - Static code analysis uses RuboCop (
bundle exec rubocop
).
Before submitting a pull request, use the above tools to verify your changes.
You may also test your code interactively by running:
bundle console
First, check out the latest code from GitHub:
git pull origen main
Following the Semantic Versioning conventions, update the gem version throughout the project (but most importantly in lib/microformats/version.rb
).
Confirm that the gem builds correctly:
bundle exec rake build
If that works, install the new version of the gem locally:
bundle exec rake install
If that works, uninstall the gem.
gem uninstall microformats
Clean up any mess made from testing.
bundle exec rake clean
bundle exec rake clobber
Assuming you're one of the gem owners and have release privileges, release the gem!
bundle exec rake release
If that works, you’ve just released a new version of the gem! Yay! You can see it at: https://rubygems.org/gems/microformats
If rake release
failed because of an error with your authentication to RubyGems.org, follow the instructions in the error message then repeat the rake release
step.
If any other errors occurred along the way and you're stuck, get in touch via IRC (#microformats on freenode) or the #microformats channel in the IndieWebCamp Slack for help.
Code formatting conventions are defined in the .editorconfig
file which uses the EditorConfig syntax. There are plugins for a variety of editors that utilize the settings in the .editorconfig
file. We recommended you install the EditorConfig plugin for your editor of choice.
Your bug fix or feature addition won't be rejected if it runs afoul of any (or all) of these guidelines, but following the guidelines will definitely make everyone's lives a little easier.