👍🎉 First off, thanks for taking the time to contribute! 🎉👍
Our README describes the project, its purpose, and is necessary reading for contributors.
This project adheres to a code of conduct. By participating, you are expected to uphold this code.
Contributions to this project are made under the MIT License.
Browse open issues to see current requests.
Open an issue to tell us about a bug. You may also open a pull request to propose specific changes, but it's always OK to start with an issue.
Help with translating the website into other languages.
You'll need to:
- Install PostgreSQL and start it
- Execute
createuser --createdb postgres
to create the standard development database user - Create a GitHub OAuth app - set the callback URL to
http://localhost:4000/auth/callback
- Copy
.env.example
to.env
and set theGITHUB_CLIENT_ID
andGITHUB_CLIENT_SECRET
values to the ones obtained from the application in the previous step - Run
script/setup
This project follows the GitHub "scripts to rule them all" pattern. The contents of the scripts
directory are scripts that cover all common tasks:
script/setup
— Performs first-time setupscript/update
— Performs periodic updatingscript/test
— Runs automated tests, format and linter checksscript/server
— Launches the local development web serverscript/console
— Opens the development consolescript/db-console
— Opens the database console for the development databasescript/docs
— Generates developer documentationscript/translate
— Extract and merge new message strings inpriv/gettext
See the documentation at the top of each script for more information about what each one does and is capable of.
Other scripts that are available but not intended to be used directly by developers:
script/bootstrap
— Used to do a one-time install of all prerequisites for a development machinescript/cibuild
— Used to run automated tests in the CI environment
Heroku restricts us to 20 simultaneous database connections. We divide them like this:
- 14 connections for serving normal traffic
- 2 for scheduled tasks
- 2 for manual maintenance (see Executing Scripts)
- 2 reserved for future use
Occasionally, certain maintenance will need to be executed on staging or production. This is best achieved by the means of Elixir scripts. This way, they can be tested locally before we potentially screw up production. To execute a script in a Heroku environment, execute:
heroku run "POOL_SIZE=2 mix run path/to/script.exs"
The POOL_SIZE
environment variable restricts the number of database connections that the task can utilize, since Heroku restricts us to 20 simultaneous database connections.
- Controller specs should verify:
- HTTP Status
- Redirects
- Assigns
- Session values
- Controller specs should not verify content
- View specs should verify that given the expected assigns, the right content is displayed
If you would like to help with translating Atom Tweaks into languages other than US English, you can:
- Create a new directory under
priv/gettext
that is the name of the locale for which you will be providing a translation (for example, to provide a translation for Brazilian Portuguese, it would bepriv/gettext/pt_BR
) - Run the
script/translate
script to extract and merge the latest version of the strings - Add your translations to the
.po
files under your new directory - Submit a PR with your changes
See the Gettext documentation for information about the file format.