Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

raws/ralph

Repository files navigation

Ralph

Ralph is the LevelUp Platform team's lovable Zulip chat bot.

Usage

You'll need to set the following environment variables:

Name Description Example
BOT_NAME The name to which your bot will respond. Ralph
ZULIP_API_KEY Your Zulip bot's API key. 443e78ed81c758c6ebcbcfea
ZULIP_EMAIL Your Zulip bot's email. ralph-bot@zulipchat.com
ZULIP_HOST Your Zulip server's hostname. example.zulipchat.com

These environment variables are required in a non-development environment:

Name Description Example
DATABASE_URL PostgreSQL connection URI. postgres://user:pass@host:port/database

These environment variables are optional:

Name Description Default
DB_STATEMENT_TIMEOUT PostgreSQL statement timeout. 30s
RALPH_ENV Ralph's environment. There must be a matching environment config file at config/environments/${RALPH_ENV}.rb. development

Then, install dependencies and start Ralph.

bundle install
bin/ralph

Contributing

Contributions are welcome!

To get started, create a .env file for your development environment and set your own Zulip credentials, and install gem dependencies.

cp example.env .env
bundle install

Create a development database and load the current schema.

bin/rake db:create
bin/rake db:schema:load

To run Ralph, use bin/ralph.

bin/ralph
# Connecting to example.zulipchat.com as ralph-bot@zulipchat.com...

Before submitting a pull request, ensure your changes have adequate test coverage and adhere to the style guide.

bin/rspec
bin/rubocop

Console

You can open a Pry REPL with Ralph's application environment loaded, similar to Ruby on Rails' console.

bin/console

Database Migrations

To generate a new database migration, use the generate:migration Rake task.

bin/rake generate:migration[name_of_migration]
# Created db/migrations/20200510233313_name_of_migration.rb

See bin/rake -T for a list of other database Rake tasks, including db:migrate, db:migrate:status and db:rollback.

License

MIT

About

LevelUp's lovable Zulip chat bot

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published