DinnerChoice 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/DinnerChoice-0.1.2.gem +0 -0
- data/README.md +52 -11
- data/docs/.DS_Store +0 -0
- data/docs/Trello_board.png +0 -0
- data/lib/DinnerChoice/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b08f85a9d45ba4586c31cd74a09ee3a95872d3931aad55f7b3bab1dde49f07d7
|
4
|
+
data.tar.gz: a353614f5c060cd6030ea7d42711a4de92d2675e7155933016e04bc544ad5b73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d51b1918ed4e5cd13321c2f701443d633130e91b1de8eef00a2e1ea97be4988f9777ff5bd58ec01d5df5fe36893c4f4a5fa02f99a46160161193da89ed1db02
|
7
|
+
data.tar.gz: bb162729a84d41a043b574b8ac57749be0b0cb3d90054ef165a8d955ed33af9249ff7fb48720159b3035885d592426f45ef8d6c5a4a570d604cd65f293722ca9
|
data/.DS_Store
CHANGED
Binary file
|
Binary file
|
data/README.md
CHANGED
@@ -38,7 +38,7 @@ Users can delete any entry from the existing restaurants list. The ID of the res
|
|
38
38
|
|
39
39
|
### Outline of user interaction and experience
|
40
40
|
|
41
|
-
* The user will find out how to interact with the terminal app by reading the contents of "<font color="#dddd00">MAIN MENU</font>". Then users can select from the main menu (input number, select from 1 to 6). By doing so, they can choose to use each feature. After executing a function, the main menu list will display again and ask the user to select again. User can leave the app by inputing '6' (or '6.', 'exit')
|
41
|
+
* The user will find out how to interact with the terminal app by reading the contents of "<font color="#dddd00">MAIN MENU</font>". Then users can select from the main menu (input number, select from 1 to 6). By doing so, they can choose to use each feature. After executing a function, the main menu list will display again and ask the user to select again. User can leave the app by inputing '6' (or '6.', 'exit').<br>
|
42
42
|
|
43
43
|
```
|
44
44
|
MAIN MENU
|
@@ -54,9 +54,22 @@ Please select from the MAIN MENU (select numbers 1 to 6):
|
|
54
54
|
See you next time!
|
55
55
|
```
|
56
56
|
|
57
|
-
* Error handling:
|
57
|
+
* Error handling: When selecting functions from <font color="#dddd00">MAIN MENU</font>, if users input wrong selection (e.g. '7', '9' or other numbers/letters), the app will output an error message an ask the user to select from the menu again.<br>
|
58
58
|
```
|
59
|
-
|
59
|
+
? ? ? ? ? ? ? ?
|
60
|
+
Sorry I don't understand...
|
61
|
+
Please select from 1 to 6, or input 'exit'.
|
62
|
+
```
|
63
|
+
* Error handling: Similarly, if users input wrong ID number to delete or update a restaurant entry, the app will output an error message and give users advice:<br>
|
64
|
+
```
|
65
|
+
? ? ? ? ? ? ? ?
|
66
|
+
Sorry I don't understand...
|
67
|
+
Please select ID from the existing restaurants list.
|
68
|
+
```
|
69
|
+
|
70
|
+
* Error handling: If users select delete or update function but the restaurants list is empty, the app will tell the user that the list is empty:<br>
|
71
|
+
```
|
72
|
+
List is empty, nothing to delete.
|
60
73
|
```
|
61
74
|
|
62
75
|
##### 1. Create new entry:
|
@@ -71,13 +84,14 @@ How do you like this restaurant? please rate on a scale of 1-5, 1 being the lowe
|
|
71
84
|
How much do you usually spend in this restaurant?
|
72
85
|
>
|
73
86
|
```
|
74
|
-
* After adding a new restaurant, the app will calculate if the list count has increased by 1, if yes, then output a message telling users that the new entry has been successfully added
|
87
|
+
* After adding a new restaurant, the app will calculate if the list count has increased by 1, if yes, then output a message telling users that the new entry has been successfully added.<br>
|
75
88
|
```
|
76
89
|
> > > > > > > > > > > > > > > > > >
|
77
90
|
New restaurant is successfully added!
|
78
91
|
```
|
79
92
|
##### 2. Display restaurants
|
80
|
-
* If nothing is added to the default restaurants list, the default restaurants list will be displayed as below
|
93
|
+
* If nothing is added to the default restaurants list, the default restaurants list will be displayed as below:<bt>
|
94
|
+
|
81
95
|
```
|
82
96
|
-------------------------
|
83
97
|
ID: 1
|
@@ -101,18 +115,18 @@ Average Price: $17
|
|
101
115
|
```
|
102
116
|
|
103
117
|
##### 3. Delete an existing entry
|
104
|
-
* The app will ask the user to select which restaurant to delete from the list (by selecting their ID)
|
118
|
+
* The app will ask the user to select which restaurant to delete from the list (by selecting their ID).<br>
|
105
119
|
```
|
106
120
|
Which restaurant do you want to delete from the list? Please input the ID number:
|
107
121
|
>
|
108
122
|
```
|
109
|
-
* After deleting an existing entry, the app will calculate if the list count has decreased by 1, if yes, then output a message telling users that the entry has been successfully deleted
|
123
|
+
* After deleting an existing entry, the app will calculate if the list count has decreased by 1, if yes, then output a message telling users that the entry has been successfully deleted:<bt>
|
110
124
|
```
|
111
125
|
> > > > > > > > > > > > > > > > > >
|
112
126
|
The restaurant is successfully deleted!
|
113
127
|
```
|
114
128
|
##### 4. Update info
|
115
|
-
* The app will interact with users by asking which restaurant do they want to edit
|
129
|
+
* The app will interact with users by asking which restaurant do they want to edit:<br>
|
116
130
|
```
|
117
131
|
Which restaurant do you want to edit? Please input the ID number:
|
118
132
|
> 2
|
@@ -132,6 +146,7 @@ The restaurant is successfully edited!
|
|
132
146
|
![avatar](docs/Plan_UML_Chart.png)
|
133
147
|
|
134
148
|
### Implementation plan
|
149
|
+
![avatar](docs/Trello_board.png)
|
135
150
|
Please refer to my [Trello board][board].
|
136
151
|
|
137
152
|
[board]: https://trello.com/b/sG3Qx1Wr/dinnerchoiceterminal-app "Trello board"
|
@@ -141,7 +156,7 @@ Please refer to my [Trello board][board].
|
|
141
156
|
|
142
157
|
#### 1. Install ruby:
|
143
158
|
|
144
|
-
* Install Homebrew: <br>
|
159
|
+
* Install Homebrew (for MacOS users): <br>
|
145
160
|
Homebrew is a package manager for Mac. It will allow us to easily install ruby. Run the following command in terminal:
|
146
161
|
```
|
147
162
|
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
@@ -186,6 +201,8 @@ If you see this message (or similar message containing ```2.7.0```) in terminal,
|
|
186
201
|
```
|
187
202
|
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin18]
|
188
203
|
```
|
204
|
+
|
205
|
+
REQUIRED RUBY VERSION: ```>= 2.3.0```
|
189
206
|
#### 2. Install Gem
|
190
207
|
|
191
208
|
* You can find the gem ```DinnerChoice 0.1.1``` on rubygems.org -- see link: [DinnerChoice](https://rubygems.org/gems/DinnerChoice)
|
@@ -223,16 +240,37 @@ irb(main):001:0> require "DinnerChoice"
|
|
223
240
|
|
224
241
|
|
225
242
|
Then you should be able to use the DinnerChoice app!
|
226
|
-
####
|
243
|
+
#### 5. Uninstall Gem
|
227
244
|
* The uninstall command removes the gems you have installed.
|
228
245
|
```
|
229
246
|
$ gem uninstall DinnerChoice
|
230
247
|
Successfully uninstalled DinnerChoice 0.1.1
|
231
248
|
```
|
249
|
+
#### 5. For Linux and windows users
|
250
|
+
* For Linux users, please follow [this guide](https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-18-04) to install ```rbenv```. Other steps are similar to the steps mentioned above.
|
251
|
+
|
252
|
+
* For windows users, you need to use a virtual machine to run [Ubuntu](https://ubuntu.com/), you can use some software called [VMware Workstation](https://www.vmware.com/products/workstation-pro.html). This will allow you to run the Ubuntu OS virtually. Once succeeded, follow the previous guide to install rbenv and Gem.
|
232
253
|
|
233
254
|
## Usage
|
234
255
|
### Help documentation
|
256
|
+
Please also see the "Outline of user interaction and experience" section.
|
257
|
+
|
258
|
+
In order to use it users need to select the options displayed in <font color="#dddd00">MAIN MENU</font> (select number from 1 to 6, or input "exit" to leave the app).
|
259
|
+
|
260
|
+
1. Create new restaurant entry:<br>
|
261
|
+
In order to create a new restaurant, users need to input "1", and then add name, address, rating and average meal price. If the entry is successfully added, a message will tell the user that a new entry is successfully added.
|
262
|
+
|
263
|
+
2. Display restaurants list: <br>
|
264
|
+
If users select "2", the default restaurants list will appear on screen which allow the users to review and compare the restaurants.
|
265
|
+
|
266
|
+
3. Delete an existing restaurant entry:<br>
|
267
|
+
In order to delete an entry, users need to input the ID of the restaurant that needs to be deleted. If nothing is in the list, the app will tell the user that nothing is in the list.
|
268
|
+
|
269
|
+
4. Update an existing restaurant entry:<br>
|
270
|
+
When selected the "Update info" selection (number 4) in <font color="#dddd00">MAIN MENU</font>, the app will ask the users to input the ID of the restaurant that needs to be updated and input the specific attribute, new content of the attribute in order to update information.
|
235
271
|
|
272
|
+
5. Make a choice from the existing restaurants list:<br>
|
273
|
+
Once "Make a choice" function is selected, the app will display a randomly selected item from the current restaurants list.
|
236
274
|
|
237
275
|
## Tests
|
238
276
|
I used manual testing to test my app. You can find a spreadsheet in Google file:
|
@@ -256,4 +294,7 @@ Everyone interacting in the DinnerChoice project's codebases, issue trackers, ch
|
|
256
294
|
|
257
295
|
* Vector Illustration https://undraw.co/illustrations
|
258
296
|
* [Restaurants near Southern Cross station](https://www.zomato.com/melbourne/fast-food?group_id=31153)
|
259
|
-
* [An introduction of decidophobia](https://www.bustle.com/articles/157828-5-signs-you-might-have-decidophobia-or-fear-of-making-decisions)
|
297
|
+
* [An introduction of decidophobia](https://www.bustle.com/articles/157828-5-signs-you-might-have-decidophobia-or-fear-of-making-decisions)
|
298
|
+
* [How To Install Ruby on Rails with rbenv on Ubuntu](https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-18-04)
|
299
|
+
* [Ubuntu](https://ubuntu.com/)
|
300
|
+
* [vmware](https://www.vmware.com/products/workstation-pro.html)
|
data/docs/.DS_Store
CHANGED
Binary file
|
Binary file
|
data/lib/DinnerChoice/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: DinnerChoice
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lanzhou Jiang
|
@@ -51,6 +51,7 @@ files:
|
|
51
51
|
- ".travis.yml"
|
52
52
|
- CODE_OF_CONDUCT.md
|
53
53
|
- DinnerChoice-0.1.1.gem
|
54
|
+
- DinnerChoice-0.1.2.gem
|
54
55
|
- DinnerChoice.gemspec
|
55
56
|
- Gemfile
|
56
57
|
- Gemfile.lock
|
@@ -64,6 +65,7 @@ files:
|
|
64
65
|
- docs/Ascii_art_banner.png
|
65
66
|
- docs/Dinner_choice.png
|
66
67
|
- docs/Plan_UML_Chart.png
|
68
|
+
- docs/Trello_board.png
|
67
69
|
- lib/.DS_Store
|
68
70
|
- lib/DinnerChoice.rb
|
69
71
|
- lib/DinnerChoice/controllers/DinnerChoiceController.rb
|