Skip to content

Latest commit

 

History

History
49 lines (32 loc) · 2.32 KB

CONTRIBUTING.md

File metadata and controls

49 lines (32 loc) · 2.32 KB

Contributing

Rules

  1. Test everything you add or fix. Functionality that is not tested is a headache to the future.
  2. Document everything you add, even an small option. If the functionality is hidden in the code, it is not useful. In general, we add a brief in the README.md and we extend the information in a file inside /docs.
  3. Avoid making Pull Requests with multiple changes. If you intend to add/fix several things, please make a PR for each one.
  4. Ask before attempting to add new features. In Platanus, we open the code of this gem to spread the happiness but we don't want to maintain things that are not useful for the company. Remember that you can always fork this gem and modify it according to your needs.
  5. Respect the style rules. We use rubocop, stylelint and eslint. Te rules are in the root of this gem.

Dummy App

The gem is a Rails engine. So you have a dummy app for testing. To run the application quickly, you can execute in the root of the gem the following command:

bin/setup

This command loads the dummy app with test data and an admin user with:

To navigate the application you can run, inside the /spec/dummy directory:

rails s

It is a good idea to add to the dummy app any new functionality. See for example the file: /spec/dummy/app/admin/invoices.rb

Testing

The gem is tested using rspec, capybara and selenium-webdriver. So, you need to have Firefox installed.

To run the tests you can do, in the root of the gem,

bundle exec rspec
  • The addons specs we put them inside /spec/features.
  • The helper classes specs we put them inside /spec/lib.

Style rules

We use Hound to check the style rules against pull requests. So, you don't need to install the code analyzers or linters if you don't want. But, don't make commits named "style fix" when the hound attacks you, or do it but use git rebase.