DinnerChoice 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54aefac41c06c280fd0e99308efe7a772b48f1ed6f62f34ecb0aad45e3a08912
4
- data.tar.gz: 1a541c6dbf328af9fca1030ac208bc842813757a87a418a984b7b17d29ab0b96
3
+ metadata.gz: 68532a56489c04b4572b742b913205d0d66637bb49321ab4ff6443362f76ff0f
4
+ data.tar.gz: bae21f7dcb274268730a9c359b33880d8baee0c51273b10563557d28424d4a26
5
5
  SHA512:
6
- metadata.gz: 3453a1a14eee17429bc350a47a32a1380c091a6597eaed079f0d56dddf919eed1be4d211e73470bbb17d08bac6a623455c27a1557090358650f474fe9e5dab9d
7
- data.tar.gz: 47f5dbb152da329d948fc1bfb32124d3bb18a4fc24f2be6a9aeca7b9738f14ee95f138836f05329efec5ca58bc4a773809fe0b00548b4132b6905d612abae231
6
+ metadata.gz: d2ecab8b7b0d43ddb6b35b306b360e5010790cfb820177c34fb92dd1d2725569e84e398e7f2c14d96c1e6c6aee970353a80c1136597214224ba5664feb71ecff
7
+ data.tar.gz: 5ae156b71709d11679682bcde2437e2dac3aeec9ba9e11f839fe65e257e9daf7e0ec0d7a2ff0a669ce2b680250210444a8b4c2b9b033714863d70cb9d46ec827
Binary file
data/DinnerChoice.gemspec CHANGED
@@ -26,4 +26,5 @@ Gem::Specification.new do |spec|
26
26
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
27
  spec.require_paths = ["lib"]
28
28
  spec.add_dependency "colorize", "~> 0.8.1"
29
+ spec.add_dependency "artii", "~> 2.1.2"
29
30
  end
data/README.md CHANGED
@@ -127,7 +127,6 @@ The restaurant is successfully edited!
127
127
  ##### 5. Make a choice!
128
128
  * Once "Make a choice" function is selected, the app will randomly select a restaurant from the current restaurants list. The restaurant will then be displayed with all the information.
129
129
 
130
-
131
130
  ### Diagram of the control flow
132
131
 
133
132
  ![avatar](docs/Plan_UML_Chart.png)
@@ -140,33 +139,101 @@ Please refer to my [Trello board][board].
140
139
 
141
140
  ## Installation
142
141
 
143
- 1. Install ruby:
142
+ #### 1. Install ruby:
143
+
144
+ * Install Homebrew: <br>
145
+ Homebrew is a package manager for Mac. It will allow us to easily install ruby. Run the following command in terminal:
146
+ ```
147
+ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
148
+ ```
144
149
 
145
150
  * You need to install ruby to run this app. To verify you have ruby installed on your machine run:
146
151
  ```
147
152
  ruby -v
148
153
  ```
149
- * if you get no result from this command ruby isn't installed. There are many ways to install ruby but i recommend using rbenv.
154
+ * If you get no result from this command ruby isn't installed. There are many ways to install ruby but i recommend using rbenv.
155
+
156
+ * rbenv is a great Ruby version manager. We will use it to install and manage different versions of ```Ruby```.
157
+
158
+ * Install ```rbenv``` using Homebrew:
159
+ ```
160
+ brew install rbenv
161
+ ```
162
+ * Set up ```rbenv``` in shell by running command below:
163
+ ```
164
+ rbenv init
165
+ ```
166
+ * Close terminal and open a new terminal window
167
+ * Verify that ```rbenv``` is setup properly by running the ```rbenv-doctor``` script
168
+ ```
169
+ curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash
170
+ ```
171
+ * Ruby installation, run the following code:
172
+ ```
173
+ rbenv install 2.7.0
174
+ ```
175
+ * This will install a version of Ruby on your computer.
176
+
177
+ * In order to use ```2.7.0``` globally on your computer, you need to run the following command:
178
+ ```
179
+ rbenv global 2.7.0
180
+ ```
181
+ * Run the following command to check if ruby is installed properly:
182
+ ```
183
+ ruby -v
184
+ ```
185
+ If you see this message (or similar message containing ```2.7.0```) in terminal, you have installed Ruby successfully.
186
+ ```
187
+ ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin18]
188
+ ```
189
+ #### 2. Install Gem
190
+
191
+ * You can find the gem ```DinnerChoice 0.1.1``` on rubygems.org -- see link: [DinnerChoice](https://rubygems.org/gems/DinnerChoice)
150
192
 
151
- 2. ...
152
193
 
153
- Add this line to your application's Gemfile:
194
+ * Add this line to your application's Gemfile:
154
195
 
155
196
  ```ruby
156
197
  gem 'DinnerChoice'
157
198
  ```
158
199
 
159
- And then execute:
200
+ * And then execute:
201
+ ```
202
+ $ bundle install
203
+ ```
204
+ * Or install it yourself as:
205
+ ```
206
+ $ gem install DinnerChoice
207
+ ```
208
+
209
+ #### 3. Listing installed Gems
210
+ * You can use ```gem list``` command to view all the gems that have been installed in the computer.
211
+ ```
212
+ $ gem list
213
+ ```
214
+ * All the gems that you have installed before should appear in terminal window.
160
215
 
161
- $ bundle install
216
+ #### 4. Using Gem
162
217
 
163
- Or install it yourself as:
218
+ * In terminal window, enter into irb by inputing "irb" and press Enter, then require gem:
219
+ ```
220
+ $ irb
221
+ irb(main):001:0> require "DinnerChoice"
222
+ ```
164
223
 
165
- $ gem install DinnerChoice
224
+
225
+ Then you should be able to use the DinnerChoice app!
226
+ #### 4. Uninstall Gem
227
+ * The uninstall command removes the gems you have installed.
228
+ ```
229
+ $ gem uninstall DinnerChoice
230
+ Successfully uninstalled DinnerChoice 0.1.1
231
+ ```
166
232
 
167
233
  ## Usage
168
234
  ### Help documentation
169
235
 
236
+
170
237
  ## Tests
171
238
  I used manual testing to test my app. You can find a spreadsheet in Google file:
172
239
  [Test case spreadsheet](https://docs.google.com/spreadsheets/d/16QYt6_DTL253NrGNKjdTA68KubFQsKqMnZYYm90FH2g/edit?usp=sharing)
@@ -188,4 +255,5 @@ Everyone interacting in the DinnerChoice project's codebases, issue trackers, ch
188
255
  ## Reference
189
256
 
190
257
  * Vector Illustration https://undraw.co/illustrations
191
- * An introduction of decidophobia https://www.bustle.com/articles/157828-5-signs-you-might-have-decidophobia-or-fear-of-making-decisions
258
+ * [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)
data/bin/dinnerchoice ADDED
@@ -0,0 +1,2 @@
1
+ #!/bin/bash
2
+ ruby ../lib/DinnerChoice.rb
data/lib/DinnerChoice.rb CHANGED
@@ -26,4 +26,5 @@ restaurant_controller = Controller.new(restaurant_view, restaurant_repository)
26
26
 
27
27
  puts
28
28
  line_separator()
29
- menu_select(restaurant_controller)
29
+ menu_select(restaurant_controller)
30
+
@@ -0,0 +1,5 @@
1
+ require "artii"
2
+ def artii(string)
3
+ artii = Artii::Base.new
4
+ puts artii.asciify(string)
5
+ end
@@ -1,6 +1,7 @@
1
1
  # require_relative "../utils/menu_list"
2
2
  require_relative "../utils/line_separator"
3
3
  require_relative "../utils/error"
4
+ require_relative "../utils/artii"
4
5
  require_relative "../../DinnerChoice/controllers/DinnerChoiceController"
5
6
 
6
7
  def menu_select(restaurant_controller)
@@ -32,5 +33,6 @@ def menu_select(restaurant_controller)
32
33
  user_selection = restaurant_controller.menu_list
33
34
  end
34
35
  puts 'See you next time!'
36
+ artii('Bye!')
35
37
  exit
36
38
  end
@@ -1,3 +1,3 @@
1
1
  module DinnerChoice
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -62,7 +62,7 @@ class RestaurantViews
62
62
  def menu_list()
63
63
  puts 'main menu'.upcase.colorize(:light_yellow)
64
64
  puts '1. Create a new restaurant entry'
65
- puts '2. Display or search restaurants by key words'
65
+ puts '2. Display restaurants list'
66
66
  puts '3. Delete an existing entry'
67
67
  puts '4. Update info of an existing entry'
68
68
  puts '5. Make a choice! (random generator)'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: DinnerChoice
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lanzhou Jiang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-12 00:00:00.000000000 Z
11
+ date: 2020-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.8.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: artii
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 2.1.2
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 2.1.2
27
41
  description: make dinner/lunch decisions easily
28
42
  email:
29
43
  - lzjiang99@gmail.com
@@ -36,12 +50,14 @@ files:
36
50
  - ".rspec"
37
51
  - ".travis.yml"
38
52
  - CODE_OF_CONDUCT.md
53
+ - DinnerChoice-0.1.1.gem
39
54
  - DinnerChoice.gemspec
40
55
  - Gemfile
41
56
  - Gemfile.lock
42
57
  - README.md
43
58
  - Rakefile
44
59
  - bin/console
60
+ - bin/dinnerchoice
45
61
  - bin/setup
46
62
  - docs/.DS_Store
47
63
  - docs/Activity_Diagram.png
@@ -53,6 +69,7 @@ files:
53
69
  - lib/DinnerChoice/controllers/DinnerChoiceController.rb
54
70
  - lib/DinnerChoice/models/Restaurants.rb
55
71
  - lib/DinnerChoice/repositories/RestaurantRepository.rb
72
+ - lib/DinnerChoice/utils/artii.rb
56
73
  - lib/DinnerChoice/utils/capitalize.rb
57
74
  - lib/DinnerChoice/utils/dice_roller.rb
58
75
  - lib/DinnerChoice/utils/error.rb