Skip to content
This repository has been archived by the owner on Dec 23, 2019. It is now read-only.

Latest commit

 

History

History
52 lines (35 loc) · 3.15 KB

CONTRIBUTING.md

File metadata and controls

52 lines (35 loc) · 3.15 KB

Contributing to uswds-rails

Anyone is welcome to contribute code changes and additions to this project. If you'd like your changes merged into the master branch, please read the following document before opening a pull request.

There are several ways in which you can help improve this project:

  1. Fix an existing issue and submit a pull request.
  2. Review open pull requests.
  3. 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.

Table of Contents

Getting Started

uswds-rails is written in Ruby (version 2.5.5) and development dependencies are managed using the Bundler gem. Travis CI builds use Ruby 2.2.9, 2.3.8, 2.4.6, and 2.5.5.

I manage Ruby versions with rbenv. I'd recommend you do the same or use a similar Ruby version manager (chruby or RVM come to mind). Once you've installed Ruby 2.5.5 using your method of choice, install the project's gems by running:

bundle install

…from the root of the project.

Making Changes

  1. Fork and clone the project's repo.
  2. Install development dependencies as outlined above.
  3. Create a feature branch for the code changes you're looking to make: git checkout -b your-descriptive-branch-name origin/master.
  4. Write some code!
  5. Build (bin/rake build) and install (bin/rake install) your updated code.
  6. If your changes would benefit from testing, add the necessary tests and verify everything passes by running bin/rake spec.
  7. 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.)
  8. Push the branch to your fork: git push -u origin your-descriptive-branch-name.
  9. Create a new pull request and we'll review your changes.

Code Style

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. It is recommended that you install the EditorConfig plugin for your editor of choice.

Additionally, Rubocop can be used to help identify possible trouble areas in your code. Run bin/rubocop to generate Rubocop's static code analysis report.

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.