What’s your excuse?
devexcuses-api
provides a modern, RESTful, scalable solution to developers’
common problem of finding an excuse to justify their sloppy work.
Visit https://api.devexcus.es/ to get your random excuse!
The API is currently available in the following languages:
- English (default)
- French
To get a random excuse in a specific language, use a locale
query parameter:
curl "https://api.devexcus.es/?locale=fr"
bundle install
# SSL support in development, defaults to port 9292
brew install mkcert
brew install nss
mkcert -install
mkcert localhost
rails server
bundle exec rspec
To add new excuses:
-
Fork the repository into your account
-
Branch into a feature branch
feature/your-excuse
-
Add excuses at the bottom of
data/excuses.yml
using the following format:- id: 55 text_en: "I’m not getting any error codes." # …
-
Push to your fork and submit a PR.
To add a new language:
-
Fork the repository into your account
-
Branch into a feature branch, e.g.
i8n/it
-
Add a new locale in
config/application.rb
config.i18n.available_locales = %i[en fr it]
-
Add translated excuses in
data/excuses.yml
using the following format:- id: 55 text_en: "I’m not getting any error codes." # … text_it: "Non ricevo alcun codice di errore."
-
Edit
models/excuse.rb
to add afield
for the new language:field :text_it
-
Push to your fork and submit a PR.
All contributions are very welcome.