Skip to content

Commit 1811c3d

Browse files
committed
Added more information on README.md;
Added includes on devices_controller#show;
1 parent 1aaf198 commit 1811c3d

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

README.md

+26-5
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,38 @@ Water Reservoir API
55
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/34f4e5be07944695b8319d09e481faf1)](https://www.codacy.com/app/fredw/senac-tcs-api)
66
[![Run in Postman](https://img.shields.io/badge/postman-ok-orange.svg)](https://app.getpostman.com/run-collection/eb9c2fad329aaf3e792b)
77

8-
Tests
8+
RESTful API for water reservoir control developed for the **Semester Completion Work** for the **Systems Analysis and Development** course at the **SENAC Blumenau**.
9+
The proposal is to develop a prototype for water control of a reservoirs (cisterns, water tanks, etc.) in condominiums.
10+
This repository contains only the business layer of the solution, in which it is consumed through the [interface layer](https://github.com/fredw/senac-tcs-web).
11+
12+
13+
Commands
914
------------------------------------------------------------
10-
rspec
15+
``` bash
16+
# Install dependencies
17+
bundle
18+
19+
# Launch web server
20+
rails s
21+
22+
# Console
23+
rails c
1124

25+
# Generate ...
26+
rails g ...
1227

13-
Ideas
28+
# Tests
29+
rspec
30+
```
31+
32+
33+
TODO and Improvements
1434
------------------------------------------------------------
15-
- Notify users by email when reservoir reaches a certain level
35+
- [ ] Notify users by email when reservoir reaches a certain level
36+
- [ ] Separate this solution in multiple services (following concepts of micro services)
37+
- [ ] Improve data structure to prevent problems with reservoirs and sensors settings update (considering data already sent)
1638

1739

1840
Credits
1941
------------------------------------------------------------
20-
2142
* Frederico Wuerges Becker <[email protected]>

app/controllers/v1/devices_controller.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def index
1212

1313
# GET /devices/1
1414
def show
15-
render json: @device
15+
render json: @device, include: %w(reservoir, flow_sensors, rulers, rulers.level_sensors)
1616
end
1717

1818
# POST /devices

0 commit comments

Comments
 (0)