Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michelegera/devexcuses-api
🤷‍♂️ An API for lazy coders’ excuses
https://github.com/michelegera/devexcuses-api
api developers excuses funny
Last synced: 18 days ago
JSON representation
🤷‍♂️ An API for lazy coders’ excuses
- Host: GitHub
- URL: https://github.com/michelegera/devexcuses-api
- Owner: michelegera
- License: gpl-3.0
- Created: 2017-11-29T10:31:22.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2024-10-28T08:02:05.000Z (18 days ago)
- Last Synced: 2024-10-28T09:26:42.643Z (18 days ago)
- Topics: api, developers, excuses, funny
- Language: Ruby
- Homepage: https://api.devexcus.es
- Size: 31.4 MB
- Stars: 19
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# devexcuses-api
[![Build status](https://github.com/michelegera/devexcuses-api/actions/workflows/build.yml/badge.svg)](https://github.com/michelegera/devexcuses-api/actions/workflows/build.yml)
> 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!
## Translations
The API is currently available in the following languages:
- English (default)
- FrenchTo get a random excuse in a specific language, use a `locale` query parameter:
```bash
curl "https://api.devexcus.es/?locale=fr"
```## Installation
bundle install
# SSL support in development, defaults to port 9292
brew install mkcert
brew install nss
mkcert -install
mkcert localhost## Run
rails server
## Test
bundle exec rspec
## Contributing
To add new excuses:
1. Fork the repository into your account
2. Branch into a feature branch `feature/your-excuse`
3. Add excuses at the bottom of `data/excuses.yml` using the following format:```yaml
- id: 55
text_en: "I’m not getting any error codes."
# …
```4. Push to your fork and submit a PR.
To add a new language:
1. Fork the repository into your account
2. Branch into a feature branch, e.g. `i8n/it`
3. Add a new locale in `config/application.rb````ruby
config.i18n.available_locales = %i[en fr it]
```4. Add translated excuses in `data/excuses.yml` using the following format:
```yaml
- id: 55
text_en: "I’m not getting any error codes."
# …
text_it: "Non ricevo alcun codice di errore."
```5. Edit `models/excuse.rb` to add a `field` for the new language:
```ruby
field :text_it
```6. Push to your fork and submit a PR.
All contributions are very welcome.
[wasp]: https://wasp-lang.dev/docs/tutorials/dev-excuses-app