cocktail_library 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cac0a6b6040d69dd526b83c2a4b7b4c2d020af84
4
- data.tar.gz: d53a798e65c580f9ab6351391704f5e33f8934ee
3
+ metadata.gz: e1f321433788b63f1a8bcf1c50c9a98accd79f01
4
+ data.tar.gz: 343469e35068dcf4b8cb11c37eed70a08011b30f
5
5
  SHA512:
6
- metadata.gz: d961d71a7e181880e6a746ce665ebe1124362d1020882e0cf4d7ba5cda54fd5507d5d3c0cf59223f43be39bb30ca4c47d2e450548c65878945bef59978c55151
7
- data.tar.gz: b0414f57e0da37c4682868216329e313666df207146c6b7eca024ef55ac910a81a268bcae6bd47fdda3428263f69fd12d443536fd4318073bfc0e966a0f08c03
6
+ metadata.gz: ad5cd3dab9efed6e4a9331bde30caa1edf323878f2a4679212d96c90672d04f81a591766e454d4678b0c8281694f959369e62af381b4f17b203df1539d2c87eb
7
+ data.tar.gz: 12866a68bac57ba401f6c76908e1685f90d6623a4989bb9a44a79c2ac1d8d6de415d9b9666027d6ed7c9d7daf8bcdca0637017a62b581bd3df45ac7ca10d3fc5
@@ -96,18 +96,22 @@ class CocktailLibrary::CLI
96
96
  puts "Please enter the drink name, or enter exit if you'd like to leave:"
97
97
  puts ""
98
98
 
99
+ @search_list = @drinks_list.map {|el| el.downcase}
100
+
99
101
  drink_selection = gets.chomp.downcase
100
102
  #escape if not interested
101
103
  if drink_selection == "exit"
102
104
  puts ""
103
105
  puts "Sorry we couldn't find something you were interested in."
104
106
  exit
107
+
105
108
  #escape if invalid entry
106
- elsif drink_selection.class != String || @drinks_list.include?(drink_selection) == nil
109
+ elsif !@search_list.include?(drink_selection)
107
110
  puts ""
108
111
  puts "Hmm, not sure how to make that one... Sorry about that!"
109
112
  puts ""
110
113
  drink_directions
114
+
111
115
  else
112
116
  #take drink selection and push it into the API
113
117
  drink = @cocktail_db.drink_components(drink_selection)
@@ -1,3 +1,3 @@
1
1
  module CocktailLibrary
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocktail_library
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lita Stephenson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-17 00:00:00.000000000 Z
11
+ date: 2017-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler