cocktail_library 0.1.0
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 +7 -0
- data/.gitignore +50 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +21 -0
- data/README.md +44 -0
- data/Rakefile +6 -0
- data/bin/cocktail_library +5 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/cocktail_library.gemspec +28 -0
- data/lib/cocktail_library.rb +11 -0
- data/lib/cocktail_library/cli.rb +131 -0
- data/lib/cocktail_library/cocktail_db.rb +47 -0
- data/lib/cocktail_library/drink.rb +13 -0
- data/lib/cocktail_library/version.rb +3 -0
- data/notes +39 -0
- data/spec.md +7 -0
- metadata +106 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d7de58c05a4bb5e5de33a8f785d06e3e79634584
|
4
|
+
data.tar.gz: 40821b20b7f62cec71e5cc52f282a26cd5de0210
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 975f9b6a594202e6cf988393e459f87f35eb80555aabe44aea08a6850f80fdc99d66813392a5dd42b058b8eb33616da28c1834bb2ee26a8eba57c50a1837b44e
|
7
|
+
data.tar.gz: 67b3d20314cd3a0eecafbe25c1125dc2830a4306e5c270492b867673e812945a5262ff6bb398a1b20551662e358839d7aea139f0d364c48f1e6884e53901a487
|
data/.gitignore
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/spec/examples.txt
|
9
|
+
/test/tmp/
|
10
|
+
/test/version_tmp/
|
11
|
+
/tmp/
|
12
|
+
|
13
|
+
# Used by dotenv library to load environment variables.
|
14
|
+
# .env
|
15
|
+
|
16
|
+
## Specific to RubyMotion:
|
17
|
+
.dat*
|
18
|
+
.repl_history
|
19
|
+
build/
|
20
|
+
*.bridgesupport
|
21
|
+
build-iPhoneOS/
|
22
|
+
build-iPhoneSimulator/
|
23
|
+
|
24
|
+
## Specific to RubyMotion (use of CocoaPods):
|
25
|
+
#
|
26
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
27
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
28
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
29
|
+
#
|
30
|
+
# vendor/Pods/
|
31
|
+
|
32
|
+
## Documentation cache and generated files:
|
33
|
+
/.yardoc/
|
34
|
+
/_yardoc/
|
35
|
+
/doc/
|
36
|
+
/rdoc/
|
37
|
+
|
38
|
+
## Environment normalization:
|
39
|
+
/.bundle/
|
40
|
+
/vendor/bundle
|
41
|
+
/lib/bundler/man/
|
42
|
+
|
43
|
+
# for a library or gem, you might want to ignore these files since the code is
|
44
|
+
# intended to run in multiple environments; otherwise, check them in:
|
45
|
+
# Gemfile.lock
|
46
|
+
# .ruby-version
|
47
|
+
# .ruby-gemset
|
48
|
+
|
49
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
50
|
+
.rvmrc
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at Lita.Stephenson@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Lita Stephenson
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# CocktailLibrary
|
2
|
+
Welcome to Tiki's Cocktail Library!
|
3
|
+
|
4
|
+
Enter your liquor of choice and receive a list of cocktails that you can make. Select your cocktail and see ingredientes and instructions for making your drink.
|
5
|
+
|
6
|
+
Cocktails are sourced from the Cocktail Database: http://www.thecocktaildb.com/api.php
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Add this line to your application's Gemfile:
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
gem 'cocktail_library'
|
14
|
+
```
|
15
|
+
|
16
|
+
And then execute:
|
17
|
+
|
18
|
+
$ bundle
|
19
|
+
|
20
|
+
Or install it yourself as:
|
21
|
+
|
22
|
+
$ gem install cocktail_library
|
23
|
+
|
24
|
+
## Usage
|
25
|
+
|
26
|
+
To run this app and receive mediocre cocktail recipes delivered by a cute dog, type 'cocktail_library' into your command line.
|
27
|
+
|
28
|
+
Follow Tiki's directions to select a liquor, and drink of choice.
|
29
|
+
|
30
|
+
You will receive a recipe to make your drink.
|
31
|
+
|
32
|
+
## Development
|
33
|
+
|
34
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
35
|
+
|
36
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
37
|
+
|
38
|
+
## License
|
39
|
+
|
40
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
|
+
|
42
|
+
## Code of Conduct
|
43
|
+
|
44
|
+
Everyone interacting in the CocktailLibrary project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/cocktail_library/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "cocktail_library"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
require "pry"
|
11
|
+
Pry.start
|
12
|
+
|
13
|
+
# require "irb"
|
14
|
+
# IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "cocktail_library/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "cocktail_library"
|
8
|
+
spec.version = CocktailLibrary::VERSION
|
9
|
+
spec.authors = ["Lita Stephenson"]
|
10
|
+
spec.email = ["Lita.Stephenson@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{returns a cocktail recipe from the cocktail db based on a liquor selection}
|
13
|
+
spec.description = %q{Enter your liquor of choice and receive a list of cocktails that you can make. Select your cocktail and see ingredientes and instructions for making your drink. Cocktails are sourced from the Cocktail Database: http://www.thecocktaildb.com/api.php.}
|
14
|
+
spec.homepage = "https://github.com/fuzzylita/cocktail_library"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = "bin"
|
21
|
+
#spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.executables = "cocktail_library"
|
23
|
+
spec.require_paths = ["lib"]
|
24
|
+
|
25
|
+
spec.add_development_dependency "bundler", "~> 1.15"
|
26
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
27
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
28
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module CocktailLibrary
|
2
|
+
BASES = ["Whiskey", "Bourbon", "Scotch", "Applejack", "Cognac", "Rum", "Gin", "Tequila", "Brandy", "Apricot Brandy", "Apple Brandy", "Dark Rum"].sort!
|
3
|
+
end
|
4
|
+
|
5
|
+
require 'open-uri'
|
6
|
+
require 'json'
|
7
|
+
require_relative './cocktail_library/version'
|
8
|
+
require_relative './cocktail_library/cli'
|
9
|
+
require_relative './cocktail_library/cocktail_db'
|
10
|
+
require_relative './cocktail_library/drink.rb'
|
11
|
+
|
@@ -0,0 +1,131 @@
|
|
1
|
+
require 'pry'
|
2
|
+
|
3
|
+
class CocktailLibrary::CLI
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@bases = CocktailLibrary::BASES
|
7
|
+
@cocktail_db = CocktailLibrary::CocktailDB.new
|
8
|
+
end
|
9
|
+
|
10
|
+
def run
|
11
|
+
greeting
|
12
|
+
base_selection
|
13
|
+
drinks_available
|
14
|
+
drink_directions
|
15
|
+
end
|
16
|
+
|
17
|
+
def greeting
|
18
|
+
|
19
|
+
puts <<~DOC
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
/| /|
|
24
|
+
// ( `""-
|
25
|
+
\\| / .\\___
|
26
|
+
/ . 4
|
27
|
+
/ _ /
|
28
|
+
/ .--'
|
29
|
+
( \\
|
30
|
+
/ \\ \\
|
31
|
+
/ \\ \\ \\
|
32
|
+
, / \\ \\ \\
|
33
|
+
)\\ / \\ \\
|
34
|
+
\\/ | .'` _ \\ \\_____ _/_/
|
35
|
+
\\. / .' '. ,\\ \\/ \\ (o)/
|
36
|
+
\\' / / \\ ; | / \\ ' /
|
37
|
+
\\' \\ | | | | ' \\ /
|
38
|
+
\\, `" | / .| | | ||
|
39
|
+
''-..-\\ _.;.._ '| |.;-. ||
|
40
|
+
\\ <`.._ )) | .;-. )) / \\
|
41
|
+
(__. ` ))-' \\_ ))' ++++++
|
42
|
+
`'--"` `"""`
|
43
|
+
|
44
|
+
Hello there, I am Tiki, your very floofy bartender!
|
45
|
+
I'm going to give you a list of drinks based on whatever liquor you have on hand.
|
46
|
+
|
47
|
+
What would you like to use for your drink?
|
48
|
+
|
49
|
+
DOC
|
50
|
+
end
|
51
|
+
|
52
|
+
def base_selection
|
53
|
+
@bases.each_with_index do |base, index|
|
54
|
+
puts "#{index + 1}. #{base}"
|
55
|
+
end
|
56
|
+
|
57
|
+
puts ""
|
58
|
+
puts "Please enter the number of the base you'd like to use, or enter exit to quit."
|
59
|
+
|
60
|
+
#this is all escapes for incorrect entries or exit
|
61
|
+
@base_choice = gets.chomp.downcase
|
62
|
+
if @base_choice == "exit"
|
63
|
+
puts ""
|
64
|
+
puts ""
|
65
|
+
puts "Perhaps the smoothie place down the road would be more to your liking."
|
66
|
+
exit
|
67
|
+
elsif !@bases.include?(@bases[@base_choice.to_i-1]) || @base_choice.to_i < 1
|
68
|
+
puts "Ehmm... Our menu is a little limited.. sorry."
|
69
|
+
puts "Do you have anything on hand from these options?"
|
70
|
+
base_selection
|
71
|
+
else
|
72
|
+
#this is defining the search object
|
73
|
+
@base_type = @bases[@base_choice.to_i-1].downcase
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
def drinks_available
|
78
|
+
#this calls the search
|
79
|
+
@drinks_list = @cocktail_db.search_by_base(@base_type)
|
80
|
+
|
81
|
+
#escape for incorrect entry
|
82
|
+
if @drinks_list == nil
|
83
|
+
puts "I'm sorry, we have no idea how to make drinks with #{@base_type.gsub(/\w+/) {|word| word.capitalize}}."
|
84
|
+
puts "Here is a beer."
|
85
|
+
exit(0)
|
86
|
+
else
|
87
|
+
puts "Here are the drinks you can make with #{@base_type.gsub(/\w+/) {|word| word.capitalize}}:"
|
88
|
+
|
89
|
+
puts @drinks_list
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
def drink_directions
|
94
|
+
puts ""
|
95
|
+
puts "Which of these would you like to make?"
|
96
|
+
puts ""
|
97
|
+
puts "Please enter the drink name, or enter exit if you'd like to leave:"
|
98
|
+
puts ""
|
99
|
+
|
100
|
+
drink_selection = gets.chomp.downcase
|
101
|
+
#escape if not interested
|
102
|
+
if drink_selection == "exit"
|
103
|
+
puts ""
|
104
|
+
puts "Sorry we couldn't find something you were interested in."
|
105
|
+
exit
|
106
|
+
#escape if invalid entry
|
107
|
+
elsif drink_selection.class != String || @drinks_list.include?(drink_selection) == nil
|
108
|
+
puts ""
|
109
|
+
puts "Hmm, not sure how to make that one... Sorry about that!"
|
110
|
+
puts ""
|
111
|
+
drink_directions
|
112
|
+
else
|
113
|
+
#take drink selection and push it into the API
|
114
|
+
drink = @cocktail_db.drink_components(drink_selection)
|
115
|
+
|
116
|
+
puts "One second, let me grab that recipe for you!"
|
117
|
+
sleep(1)
|
118
|
+
|
119
|
+
puts ""
|
120
|
+
puts "Ok, here how to make your #{drink.name.gsub(/\w+/) {|word| word.capitalize}}: "
|
121
|
+
|
122
|
+
drink.ingredients.each_with_index do |ing, idx|
|
123
|
+
puts "#{drink.measurements[idx]}: #{ing}"
|
124
|
+
end
|
125
|
+
|
126
|
+
puts "#{drink.instructions}"
|
127
|
+
puts ""
|
128
|
+
puts "Hope you enjoy it!"
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
|
2
|
+
class CocktailLibrary::CocktailDB
|
3
|
+
#this method will use the base selection and return the cocktails made with that base from the DB
|
4
|
+
|
5
|
+
def search_by_base(base)
|
6
|
+
#this code returns an object which contains all of the drinks using that base
|
7
|
+
base_results = open("http://www.thecocktaildb.com/api/json/v1/1/filter.php?i=#{base}")
|
8
|
+
|
9
|
+
#this code breaks that object (StringIO) into a parsable hash
|
10
|
+
#and then it returns a list of the names of the drinks
|
11
|
+
drink_names = []
|
12
|
+
|
13
|
+
JSON.load(base_results)['drinks'].each do |k,v|
|
14
|
+
k.each do |k, v|
|
15
|
+
if k == "strDrink"
|
16
|
+
drink_names << v
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
drink_names
|
21
|
+
end
|
22
|
+
|
23
|
+
def drink_components(drink)
|
24
|
+
drink_results = open("http://www.thecocktaildb.com/api/json/v1/1/search.php?s=#{drink}")
|
25
|
+
|
26
|
+
drink_details = JSON.load(drink_results)["drinks"].first.reject do |k,v|
|
27
|
+
v == "" || v == " " || v == nil
|
28
|
+
end
|
29
|
+
|
30
|
+
instructions = drink_details["strInstructions"]
|
31
|
+
ingredients = []
|
32
|
+
measurements = []
|
33
|
+
|
34
|
+
drink_details.each do |k,v|
|
35
|
+
#the API returns the ingredients and measurements ordered to match the other, so we can be confident that
|
36
|
+
#when we add them to an array in order, they will be returned properly
|
37
|
+
if k.include?("Ingredient")
|
38
|
+
ingredients << v
|
39
|
+
end
|
40
|
+
|
41
|
+
if k.include?("Measure")
|
42
|
+
measurements << v
|
43
|
+
end
|
44
|
+
end
|
45
|
+
CocktailLibrary::Drink.new(drink, instructions, ingredients, measurements)
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#will use drink_details from cli.rb
|
2
|
+
|
3
|
+
class CocktailLibrary::Drink
|
4
|
+
attr_accessor :name, :instructions, :ingredients, :measurements
|
5
|
+
|
6
|
+
def initialize(name, instructions, ingredients, measurements)
|
7
|
+
@name = name
|
8
|
+
@instructions = instructions
|
9
|
+
@ingredients = ingredients
|
10
|
+
@measurements = measurements
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
data/notes
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
Building the cocktail library
|
2
|
+
|
3
|
+
1. Plan gem and interface - done!
|
4
|
+
2. Create the project structure (through bundle gem <name>) - done!
|
5
|
+
3. build the entry point, the file run
|
6
|
+
4. make sure that it successfully runs the CLI interface
|
7
|
+
4. build out the CLI interface with hard coded data
|
8
|
+
5. build out the object classes for cocktail db and cocktail with fake data
|
9
|
+
6. make sure they interact correctly
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
Test hash:
|
17
|
+
|
18
|
+
# @@drinks = {
|
19
|
+
# "whiskey" => {
|
20
|
+
# "manhattan" => {
|
21
|
+
# "ingredients" => ["Whiskey", "Vermouth", "Bitters"],
|
22
|
+
# "instructions" => ["measure out correct portions and stir, garnish"],
|
23
|
+
# },
|
24
|
+
# "vieux carre" => {
|
25
|
+
# "ingredients" => ["Whiskey", "Brandy", "Vermouth", "Bitters", "Benedictine"],
|
26
|
+
# "instructions" => ["measure out correct portions and stir, garnish"],
|
27
|
+
# },
|
28
|
+
# },
|
29
|
+
# "rum" => {
|
30
|
+
# "daiquiri" => {
|
31
|
+
# "ingredients" => ["Rum", "Lime", "Sweet shit, not too much tho"],
|
32
|
+
# "instructions" => ["measure out correct portions and shake, garnish"],
|
33
|
+
# },
|
34
|
+
# "rum and honey" => {
|
35
|
+
# "ingredients" => ["Rum", "Honey Syrup", "Orange Bitters"],
|
36
|
+
# "instructions" => ["measure out correct portions and stir, garnish"],
|
37
|
+
# },
|
38
|
+
# },
|
39
|
+
# }
|
data/spec.md
ADDED
metadata
ADDED
@@ -0,0 +1,106 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cocktail_library
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Lita Stephenson
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-09-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.15'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.15'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
description: 'Enter your liquor of choice and receive a list of cocktails that you
|
56
|
+
can make. Select your cocktail and see ingredientes and instructions for making
|
57
|
+
your drink. Cocktails are sourced from the Cocktail Database: http://www.thecocktaildb.com/api.php.'
|
58
|
+
email:
|
59
|
+
- Lita.Stephenson@gmail.com
|
60
|
+
executables:
|
61
|
+
- cocktail_library
|
62
|
+
extensions: []
|
63
|
+
extra_rdoc_files: []
|
64
|
+
files:
|
65
|
+
- ".gitignore"
|
66
|
+
- CODE_OF_CONDUCT.md
|
67
|
+
- Gemfile
|
68
|
+
- LICENSE.txt
|
69
|
+
- README.md
|
70
|
+
- Rakefile
|
71
|
+
- bin/cocktail_library
|
72
|
+
- bin/console
|
73
|
+
- bin/setup
|
74
|
+
- cocktail_library.gemspec
|
75
|
+
- lib/cocktail_library.rb
|
76
|
+
- lib/cocktail_library/cli.rb
|
77
|
+
- lib/cocktail_library/cocktail_db.rb
|
78
|
+
- lib/cocktail_library/drink.rb
|
79
|
+
- lib/cocktail_library/version.rb
|
80
|
+
- notes
|
81
|
+
- spec.md
|
82
|
+
homepage: https://github.com/fuzzylita/cocktail_library
|
83
|
+
licenses:
|
84
|
+
- MIT
|
85
|
+
metadata: {}
|
86
|
+
post_install_message:
|
87
|
+
rdoc_options: []
|
88
|
+
require_paths:
|
89
|
+
- lib
|
90
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0'
|
95
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
requirements: []
|
101
|
+
rubyforge_project:
|
102
|
+
rubygems_version: 2.6.12
|
103
|
+
signing_key:
|
104
|
+
specification_version: 4
|
105
|
+
summary: returns a cocktail recipe from the cocktail db based on a liquor selection
|
106
|
+
test_files: []
|