https://github.com/riboseinc/oss-guides
Contains development style guide for open source Ruby projects at Ribose
https://github.com/riboseinc/oss-guides
guide
Last synced: about 1 month ago
JSON representation
Contains development style guide for open source Ruby projects at Ribose
- Host: GitHub
- URL: https://github.com/riboseinc/oss-guides
- Owner: riboseinc
- License: mit
- Created: 2017-07-03T06:47:33.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2025-03-23T11:05:40.000Z (about 2 months ago)
- Last Synced: 2025-04-05T23:32:29.089Z (about 2 months ago)
- Topics: guide
- Language: Ruby
- Size: 99.6 KB
- Stars: 3
- Watchers: 6
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= Ribose Open Source Software Guidelines
This guide reflects our current development practices we have adopted
for all of our open source projects. This is the
https://github.com/riboseinc/guides[Ribose fork] of the
https://github.com/thoughtbot/guides[thoughtbot guide].
It is mostly similar with some minor adjustments.If you are contributing to any of our open source projects then it's
highly expected that you follow this guidelines, but if you have some
different opinion about any of the rules then please open
https://github.com/riboseinc/oss-ruby-contribution-guide/issues[an Issue] for
detailed discussion.High level guidelines:
* Be consistent.
* Don't rewrite existing code to follow this guide.
* Don't violate a guideline without a good reason.
* A reason is good when you can convince a teammate.== General
* https://github.com/thoughtbot/guides/tree/master/best-practices[Best Practices]
* https://github.com/thoughtbot/guides/tree/master/protocol/git[Git Protocol]
* https://github.com/thoughtbot/guides/tree/master/code-review[Code Review]== Ruby Development
For Ruby-based development, we use
https://github.com/thoughtbot/guides/tree/master/style/ruby[ruby-style-guide],
which is based on the
https://github.com/bbatsov/ruby-style-guide[bbatsov-guide]
with some customized preferences.Once you start a new project, please copy the contents of
link:for_new_projects/ruby[for_new_projects/ruby] directory to your project
root. Particularly, this directory contains:* link:for_new_projects/ruby/.rubocop.yml[Rubocop config]
* link:for_new_projects/ruby/.hound.yml[Hound CI config]
* link:for_new_projects/ruby/.editorconfig[Editor config]Once everything is setup, https://houndci.com[Hound CI]
should comment on each of the Pull Requests whenever there is a
violations, and please resolve before merging.=== Updating guides
==== Ruby Development
Source guides for Ruby are kept in `src/rubocop`.
Whenever you update any of those,
please run `bundle exec rake build:rubocop` and commit the generated changes.==== Development in Other Languages
Source guides for other languages should be kept under `src/${language}`.
To maintainers of this guide:
please update this README accordingly when guides for other languages are added.=== Automatic Checks
We use several tools to measure and maintain code quality in our projects.
The typical setup is:Code Climate::
Performs additional code quality analysis (complexity etc). Optionally,
Code Climate is capable of running Rubocop too, however it is strongly
discouraged to enable that. Due to frequent breaking changes, style guide must
be written for specific Rubocop version, and our style guide is meant to be
compatible with Hound. See
https://github.com/riboseinc/oss-guides/pull/3#issuecomment-351883526[this]
for respective discussion. Moreover, Code Climate is capable of measuring test
coverage, however we prefer CodeCov for that.
CodeCov::
Measures test coverage.
Hound CI::
Runs Rubocop, that is validates code against our style guide.
GitHub Actions::
Continuous integration.=== Propagating guides to sister organizations
This repository is mirrored in every GitHub organization that Ribose Inc.
manages in order to workaround Hound CI limitation that organization-wide style
guide must be kept in a repository within that organization.
Mirrors are synchronized via GitHub Actions, specifically `propagate` workflow
defined in this very repository.In order to set up another mirror, following steps should be performed:
. Create a mirror repository on Github, e.g. `new_organization/oss-guides`.
. Add the mirror repository to the `matrix:` key in the `propagate.yml` workflow.
. Add the "ribose-ci" user to the `new_organization/oss-guides` repository with write access.== Credits
This guide is maintained by https://www.ribose.com[Ribose Inc.]