https://github.com/opensourceame/brighter-api
Brighter API tech assignment
https://github.com/opensourceame/brighter-api
Last synced: 11 days ago
JSON representation
Brighter API tech assignment
- Host: GitHub
- URL: https://github.com/opensourceame/brighter-api
- Owner: opensourceame
- Created: 2016-11-14T12:02:44.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T14:27:54.000Z (over 3 years ago)
- Last Synced: 2025-12-26T12:45:23.875Z (5 months ago)
- Language: Ruby
- Size: 11.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Brighter API assignment
## Installation
```
bundle install
./migrate.rb --recreate
unicorn / rackup / (other rack server)
```
## Testing
From the root directory:
```
./migrate.rb --recreate
rspec
```
For a more long-term permanent project I would include automatic recreation of the db, and the option to use a different DB for testing
## Notes
I chose to give the subscription (UserPlan class) a status field rather than deleting a record from a database when the user unsubscribes as I believe it's important to keep historical records for this kind of thing.