Donut Project
This is a Sinatra application that uses the Starter Slack Template from Donut.
Running the App
Install Bundler:
gem install bundler
Install all the required gems:
bundle install
Start the server using Rack to be able to intercept
binding.pry
breakpoint.
Run the app:
rackup config.ru -p 4567
Project Donut setup
I created a task controller for this project to be able to process all requests
made to the /tasks
endpoint.
The slack bot is configured to make requests to the following endpoint: http://d1d261e01fd3.ngrok.io/tasks
NOTE: This endpoing can changed and is provided by ngrok. For more information check the ngrok documentation
Challenges
It seems that the design for this project followed an RPC architecture since the requests were being made to a single endpoint. Althought I often follow the RESTful style I think I was able to handle this correctly. I created a Handler class to encapsulate the requirements for processing the requests made by the Slack API.
Beta-2.0.0
With more time I will improve the following:
- Create tests
- Improve error handling using rescue and creating descriptive error classes.