TeaLI 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/teaLI.rb +8 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '058401081b5bed7164b1f22db49aa7533c552a73ad2ec6dc298bbcd173098997'
4
- data.tar.gz: 6e755df9c2baa820b11627204a75da8099fab163e1b9f433c20c1867b8f49f12
3
+ metadata.gz: 268972304df881d47b9e74dd51162eb103dbf2281318e45e838f309a107c017a
4
+ data.tar.gz: ac6a687d4ee786b9bcdb4d184fc561c1d2d90362ac96405ddda4ebb684ff3992
5
5
  SHA512:
6
- metadata.gz: 8d7ea8766dce8e50f0e5d840bd5f06560f1026c02f28209ac11849650b5f9007ac66280dfd10a4ddcc1857787df258cf748f8efd4619b9c268c10ced2ed5bfe1
7
- data.tar.gz: 63dccf2c4eb44d93011aff6af0c62d53f2191f935ba496b44fe59343ef1fbfb04512d3dd2e955f115cbbc3af42938380e2f871bb6f319f3b5dc8969c2298d50b
6
+ metadata.gz: 3c2c49efa27acd811f0c5fafd1331cc2fdf73a2c8aa3dba719ac88b0673879037967b94797f309e14d44d68811f359238d453c1cf97530a24b9b32849a5ed453
7
+ data.tar.gz: 18397b9445964947325a4c9529bab248180ff73cfd1e2d52a9e06f617c91ecce90829622dd3faae3631db90eeed1b5226844517d5fb8d0c8ac3246ec69895878
@@ -163,7 +163,13 @@ class TeaLI
163
163
  if user_input == 'back'
164
164
  run_ingredient_search
165
165
  else
166
- display_tea_info(user_input)
166
+ tea = Tea.find_by_name(user_input)
167
+ if tea == nil
168
+ puts "Sorry, it looks like that's not a valid tea choice, try again!"
169
+ run_ingredient_search
170
+ else
171
+ display_tea_info(user_input)
172
+ end
167
173
  end
168
174
  else
169
175
  puts "Sorry, it looks like we don't carry any teas with that ingredient"
@@ -202,4 +208,5 @@ class TeaLI
202
208
 
203
209
  end
204
210
 
211
+ TeaLI.new.call
205
212
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: TeaLI
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
  - Emily Harber
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-01 00:00:00.000000000 Z
11
+ date: 2019-11-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple CLI application to scrape and search for teas using the Adagio
14
14
  Teas website