This app is called PROPS. The idea behind it is to express saying 'thank you!' in a geeky way.
- Ruby on Rails 4.2
- Ruby 2.3.1
- Postgres
- React with react_webpack_rails
bin/setupInstall Node.js dependencies:
$ npm installGenerate react-bundle for the first time:
$ npm build- Create slack application by going to Your Apps.
- Under "OAuth & Permissions" tab (
https://api.slack.com/apps/APP_ID/oauth) add new redirect URL, looking like this:https://YOUR_DOMAIN/auth/slack/callback. - Under "OAuth & Permissions" tab (
https://api.slack.com/apps/APP_ID/oauth) add following permission scopes:
chat:write:botteam:readusers.profile:readusers:readusers:read.email
- Under "Slash Commands" tab (
https://api.slack.com/apps/APP_ID/slack-commands) add slash command of your liking, remembering to set following settings:
- "Request URL":
https://YOUR_DOMAIN/api/v1/slack_commands/kudos. - "Escape channels, users, and links sent to your app" - YES (checkbox).
- Under "Basic Information" tab - install app to your workspace.
- Under "Basic Information" tab - read Client ID, Client Secret values available under App Credentials section and set them as
SLACK_CLIENT_ID,SLACK_CLIENT_SECRETenvironment variables available to your Props application. - Under "Basic Information" tab - read Verification Token available under App Credentials section and add it to Props application database by running Rails command line (
rails c) and executing following command:
EasyTokens::Token.create(value: 'VERIFICATION_TOKEN', description: 'Slack command verification token')- In order to post Slack notifications about new Kudos and handle Slack reactions added to them, you need to set Slack channel for your organisation in Settings after signing into your Props application. If not set, default Slack channel is
general.
- run rails server.
- run webpack in watch mode:
$ npm startWe use RSpec 3 for testing backend and Mocha + Karma to test React components. We are using Chrome launcher.
- run
npm run test-devto run tests. - run
npm run test-liveto run tests in watch mode.
Please follow Ruby style guide available here.
If you make improvements to this application, please share with others.
- Fork the project on GitHub.
- Make your feature addition or bug fix.
- Commit with Git.
- Send the author a pull request.
If you add functionality to this application, create an alternative implementation, or build an application that is similar, please contact me and I’ll add a note to the README so that others can find your work.
MIT. See LICENSE.
