Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/caioagiani/task-manager-api
API only in Ruby on Rails
https://github.com/caioagiani/task-manager-api
api json-api mysql ruby-on-rails
Last synced: about 2 months ago
JSON representation
API only in Ruby on Rails
- Host: GitHub
- URL: https://github.com/caioagiani/task-manager-api
- Owner: caioagiani
- Created: 2020-08-26T16:13:45.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-28T04:47:32.000Z (almost 3 years ago)
- Last Synced: 2024-05-01T16:30:38.228Z (8 months ago)
- Topics: api, json-api, mysql, ruby-on-rails
- Language: Ruby
- Homepage:
- Size: 115 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ruby on Rails API only
Commands to download dependencies and start the application:
### v1
1. `sudo -- sh -c -e "echo '127.0.0.1 api.task-manager.test' >> /etc/hosts";`
2. `bundle install`
3. `rails db:create db:migrate`
4. `rails s`Commands used to create the application:
1. `rails g rspec:install`
2. `rails g devise:install`
3. `rails g devise user`
4. `rspec`
- `spring rspec`
- `spring rspec /.rb --format=d`
5. `rails g controller api/v1/users`
6. `rails c`
- `User.create(email: "[email protected]", password: "123123", password_confirmation: "123123")`
- `User.all`
- `User.count`
7. `rails g migration add_auth_token_to_users auth_token:string`
8. `rails db:test:prepare`
9. `rails g controller api/v1/sessions --no-test-framework`
10. `rails g model task title:string description:text done:boolean deadline:datetime user:references`
11. `rails g controller api/v1/tasks --no-test-framework`### v2
1. `rails g serializer api/v2/task`
- `spring stop`
## Test
```javascript
caio-agiani in task-manager-api on master [!] ❯ spring rspec
Running via Spring preloader in process 59317Randomized with seed 1991
..............................................................Finished in 1.41 seconds (files took 0.16575 seconds to load)
62 examples, 0 failuresRandomized with seed 1991
```