Skip to content

navarionek/props

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

758 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Props

Deploy

General info

This app is called PROPS. The idea behind it is to express saying 'thank you!' in a geeky way.

Technologies

Setup

Copy database settings:

cp config/database.yml.sample config/database.yml

Create DB user:

createuser -s -r props

Setup database:

bin/rake db:setup

Setup config file for your environment:

cp config/secrets.yml.sample config/secrets.yml

Create slack application by going to Your Apps. It is important to set the redirect url for your application to be like https://yourdomain/auth/slack/callback. You'll also need to select Permission Scopes to be as follows:

  • identity.avatar
  • identity.basic
  • identity.email
  • identity.team
  • chat:write:bot
  • team:read
  • users.profile:read
  • users:read
  • users:read.email

Development endpoints:

When you have the credentials, put them in the config/secrets.yml file under omniauth_provider_key and omniauth_provider_secret values.

Auth0 integration:

  1. Create non-interactive auth0 client and use AUTH0_API_CLIENT_ID and AUTH0_API_CLIENT_SECRET from that client
  2. Go to your auth0 account settings, advanced tab, and turn on 'Enable APIs Section' for be able to see API's view
  3. Under API section, create click button for creating api and after that you will receive AUTH0_API_AUDIENCE
  4. Don't forget to connect and authorise api in Auth0 Management API (non-interactive-clients tab), with your new ni-client, created in point 1

Slack feature:

In order to post props notifications and recieve thumbs-ups, you need to set slack.default_channel value (must be valid channel name, e.g. general) in your secrets.

Note: If you're going to use Heroku Free Dynos, please be aware that you app will sleep at least 6h a day - and because of that you may not receive all reactions from Slack.

Install node dependencies:

$ npm install

Generate react-bundle for the first time:

$ npm build

Development

  • run rails server.
  • run webpack in watch mode:
    $ npm start
    

Tests

We use RSpec 3 for testing backend and Mocha + Karma to test React components. We are using Chrome launcher.

Running components test:

  • run npm run test-dev to run tests.
  • run npm run test-live to run tests in watch mode.

Notes

Please follow Ruby style guide available here.

Contributing

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.

License

MIT. See LICENSE.

About

PropsApp: say thank you in a geeky way!

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Ruby 52.7%
  • JavaScript 29.0%
  • CoffeeScript 11.6%
  • HTML 4.9%
  • CSS 1.7%
  • Shell 0.1%