Recipes_app 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 46c8b76286388cf37cca85a667afe7e60dbf52c26a0713ddcb3e24a700fafc8d
4
+ data.tar.gz: 1618d1382a2207c563a6e8d63a833c4ff566e092019e306753ba392d87dc8151
5
+ SHA512:
6
+ metadata.gz: e35f43990d8f0bec59076356abdf3417aeb7c667ebfb90fb043f4e7cc2c715e3f800809cb31768de747d958ee36eda92f391b1c94c87c820b8542503075b422b
7
+ data.tar.gz: 7854ce6d372d66030cbe19b03c794912c620877fd11703f96d603eb0b95c8e17e44eb8a719ec61e67f2655d8983b0d27c86b9302004718791e591a425a1b2b10
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # gems
4
+ require 'terminal-table'
5
+ require 'colorize'
6
+ require 'json'
7
+ require 'optparse'
8
+ # files
9
+ require_relative '../lib/api'
10
+ require_relative '../lib/menu'
11
+ require_relative '../lib/recipe_card'
12
+
13
+ VERSION = '1.0.0'
14
+
15
+ if ARGV[0] == "-h" || ARGV[0] == '--help'
16
+ puts 'welcome to Recipe Finder 2000! Usage: app [options]'
17
+ puts "if you've deleted the recipes.json file run the --init or -i option to make a new file and get the app running again warning running this command will also overwrite all your saved data."
18
+ puts "when you start the app use the arrow keys and enter to navigate, once you select a recipe scroll up to see the full recipe"
19
+ exit
20
+ end
21
+ if ARGV[0] == '-v' ||ARGV[0] == "--version"
22
+ puts "You are on Version #{VERSION}"
23
+
24
+ exit
25
+ end
26
+
27
+ if ARGV[0] == '-i' ||ARGV[0] == '--init'
28
+ reset = Api.new
29
+ reset.reset
30
+ end
31
+
32
+ if ARGV.empty?
33
+ menu = Menu.new
34
+ menu.choices
35
+ end
@@ -0,0 +1,120 @@
1
+ require 'faraday'
2
+ require 'json'
3
+ require 'tty-prompt'
4
+ require 'byebug'
5
+ require_relative 'recipe_card'
6
+ require_relative 'recipehelper'
7
+
8
+
9
+ class Api
10
+ attr_reader :results
11
+ include Faraday
12
+ include RecipeHelper
13
+ # API key and root for visibilty change api key value should you wish to create your own account at www.spoonacular.com
14
+ @@api_root = "https://api.spoonacular.com"
15
+ @@api_key = "?apiKey=945916246cc3460dbfe56c71616e4d96"
16
+
17
+ def initialze
18
+ @recipebook = read_recipes
19
+ end
20
+ def search_random_recipe
21
+ content = JSON.parse(Faraday.get("#{@@api_root}/recipes/random#{@@api_key}").body)["recipes"]
22
+ convert_api_data(content)
23
+ end
24
+ # converts the parsed data from the faraday response into a workable object for the app to read and write
25
+ def convert_api_data(data)
26
+ @results = {}
27
+ @results[:name] = data[0]["title"] # returns string
28
+ @results[:serves] = data[0]['servings']
29
+ @results[:description] = data[0]['summary'].gsub(/<\/?[^>]+>/, '')
30
+ @results[:ingredients] = data[0]["extendedIngredients"].map{|s|s["originalString"]}
31
+ @results[:recipe] = data[0]["instructions"].gsub(/<\/?[^>]+>/, '').gsub("\n", '') # returns string
32
+ @results[:time_to_cook] = data[0]["readyInMinutes"] # returns integer, turn to stirng if needed?
33
+ @results[:url] = data[0]['sourceUrl']
34
+ @results
35
+ end
36
+ # makes ingredients into an array so they are displayed when the user wants to view a recipe
37
+ def split_ingredients(ingredients)
38
+ ingredients.split(' ')
39
+ end
40
+ # method for user recipe to be writen to recipe book then saved
41
+ def get_user_recipe
42
+ recipe = RecipeCard.user_recipe
43
+ recipebook = read_recipes
44
+ recipebook << RecipeCard.new(
45
+ recipe[:name],
46
+ recipe[:serves],
47
+ recipe[:description],
48
+ recipe[:recipe],
49
+ recipe[:ingredients],
50
+ recipe[:time_to_cook],
51
+ recipe[:url]
52
+ )
53
+
54
+ file = read_recipes
55
+ recipe[:ingredients] = recipe[:ingredients].split(' ')
56
+ recipe.each_value do |value| if value.length < 1
57
+ puts 'Recipe not saved, you need to enter something for each input'
58
+ end
59
+ end
60
+ file << recipe
61
+ File.write(RECIPES_PATH, JSON.pretty_generate(file))
62
+ end
63
+ # method for writing the users recipe
64
+ def write_user_recipe
65
+ data = @recipebook.map do |card|
66
+ {
67
+ name: card.name,
68
+ serves: card.serves,
69
+ description: card.description,
70
+ ingredients: card.ingredients,
71
+ recipe: card.recipe,
72
+ time_to_cook: card.time_to_cook,
73
+ url: card.url
74
+ }
75
+ end
76
+ file = read_recipes
77
+ file << data
78
+ File.write(RECIPES_PATH, JSON.pretty_generate(file))
79
+ end
80
+ # writes api recipes into JSON file
81
+ def write_recipes
82
+ @file = read_recipes
83
+ @file << @results
84
+ File.write(RECIPES_PATH, JSON.pretty_generate(@file))
85
+ end
86
+ # parses JSON file and reads them so the app can generate the recipes onto the screen
87
+ def read_recipes
88
+ file_hash = JSON.parse(File.read(RECIPES_PATH))
89
+ file_hash
90
+
91
+ end
92
+ # displays temporary recipe afterwards user is prompted to save or not recipe only exists in app memory at this point
93
+ def show_last_recipe(last_recipe)
94
+ res = @results
95
+ rows = []
96
+ rows << [res[:name]]
97
+ table = Terminal::Table.new headings: header = ['name'], rows: rows
98
+ puts table
99
+ puts res[:ingredients].map{|item|item}
100
+ puts "
101
+ ".colorize( :background => :red)
102
+ puts "Description"
103
+ puts res[:description]
104
+ puts "
105
+ ".colorize( :background => :red)
106
+ puts 'Recipe'
107
+ puts res[:recipe]
108
+ puts "
109
+ ".colorize( :background => :red)
110
+ puts res[:url]
111
+ end
112
+ # fix if the user deletes all recipes or deletes recipe.json file
113
+ def reset
114
+ content = JSON.parse(Faraday.get("#{@@api_root}/recipes/random#{@@api_key}").body)["recipes"]
115
+ reset_book = convert_api_data(content)
116
+ file = []
117
+ file << reset_book
118
+ File.write(RECIPES_PATH, JSON.pretty_generate(file))
119
+ end
120
+ end
@@ -0,0 +1,211 @@
1
+ require_relative 'recipe_card'
2
+ require_relative 'api'
3
+ require 'terminal-table'
4
+ require 'colorize'
5
+ require_relative 'recipehelper'
6
+ require 'faraday'
7
+ # menu, access data and extract the data then display the data in a readable format
8
+ class Menu
9
+ include RecipeHelper
10
+ def initialize
11
+ @recipebook = JSON.parse(File.read(RECIPES_PATH))
12
+ @new_recipe = Api.new
13
+
14
+ end
15
+ # menu where user choses what to do, is refreshed through choices every time the user completes a loop
16
+ def display_menu
17
+ faraday_return = Faraday.get('https://api.spoonacular.com/food/jokes/random?apiKey=945916246cc3460dbfe56c71616e4d96')
18
+ query_counter = faraday_return.headers["x-api-quota-used"]
19
+ query_use = faraday_return.headers["x-api-quota-request"]
20
+ joke =JSON.parse(faraday_return.body)['text']
21
+ puts "
22
+ ".colorize( :background => :white)
23
+ PROMPT.select("#{joke}
24
+ your counter is at #{query_counter} out of 150 for the day, this search used #{query_use},
25
+ just remember each recipe takes about 1 point and refreshing this menu takes 1 point, you get 150 a day so you should be fine.") do |menu|
26
+ menu.choice({name:'View saved recipes', value:'1'})
27
+ menu.choice({name:'Find a random recipe! Live a little! Cremebrulee for dinner?', value:'2'})
28
+ menu.choice({name:'Write your own recipe', value:'3'})
29
+ menu.choice({name:"Can't decide but have food in the house? filter your saved recipes based on what you've got!", value:'4'})
30
+ menu.choice({name:'Exit', value:'5'})
31
+ end
32
+ end
33
+ #######################
34
+ ##saved recipes route##
35
+ #######################
36
+ # displays recipes in table format
37
+ def terminal_table_lander(list)
38
+ header = ['number' , 'name', 'serves']
39
+ i = 1
40
+
41
+ rows = []
42
+ list.each do |recipe|
43
+ rows << [i] + [ recipe["name"]] + [recipe["serves"] ]
44
+ i += 1
45
+ end
46
+ table = Terminal::Table.new headings: header, rows: rows, :style => {:width => 80}
47
+ puts table
48
+ if PROMPT.yes?('do you want to delete a recipe?')
49
+ delete_saved_recipe(list)
50
+ else
51
+ choose_recipe(list)
52
+ end
53
+ end
54
+ # user is prompted to delete a recipe or not, this was the simplest implementation of this so it occurs before they make a selection to view a recipe
55
+ def delete_saved_recipe(arr)
56
+ puts 'please enter the recipe number'
57
+ print ' >'
58
+ num = gets.chomp.to_i
59
+ if num - 1 > arr.length
60
+ puts "no recipe found"
61
+ choices
62
+ end
63
+ arr.delete_at(num-1)
64
+ File.write(RECIPES_PATH, JSON.pretty_generate(arr))
65
+ choices
66
+ end
67
+ # user is prompted to chose a recipe based on index -1 formula to display recipe
68
+ def choose_recipe(arr)
69
+ puts 'please select a recipe by number to display'
70
+ print 'number? '
71
+ number = gets.chomp.to_i
72
+ display_recipe(number,arr)
73
+ end
74
+ # user choses a recipe based on the index value +1 stored in i which is displayed beside the recipes on the table
75
+ def display_recipe(num, list)
76
+
77
+ terminal_key = list[num-1]
78
+ rows = []
79
+ rows << [terminal_key['name']]
80
+ table = Terminal::Table.new headings: header = ['name'], rows: rows
81
+ puts table
82
+ puts 'Ingredients'.colorize(:color => :white, :background => :red)
83
+ puts terminal_key['ingredients'].map{|item|item}
84
+ puts "
85
+ ".colorize( :background => :red)
86
+ puts "Description".colorize(:color => :white, :background => :red)
87
+ puts terminal_key['description']
88
+ puts "
89
+ ".colorize( :background => :red)
90
+ puts 'Recipe'.colorize(:color => :white, :background => :red)
91
+ puts terminal_key['recipe']
92
+ puts "
93
+ ".colorize( :background => :red)
94
+ puts terminal_key['url']
95
+ end
96
+ ######################
97
+ ###new recipe route###
98
+ ######################
99
+ # uses api to display random recipe
100
+ def search_new_recipe
101
+ @new_recipe.search_random_recipe
102
+ terminal_table_new_recipe(@new_recipe.results)
103
+ end
104
+ #filters saved recipes based on a search term, returns a message if there is no recipe with that term
105
+
106
+ def search_targeted_recipe
107
+ puts 'what do you feel like? This search can take things like say "fish pasta eggs or even bagels!" just dont go entering numbers or anything and you\'re golden'
108
+ terminal_table_lander(filtered_results)
109
+ end
110
+ # takes the search term and stores the result in an array so that it can be displayed in a table format
111
+ def filtered_results
112
+ search_para = gets.chomp
113
+ result = []
114
+ unless letter_check(search_para)
115
+ puts 'it seems like you entered a number or a symbol, dont do that..'
116
+ search_targeted_recipe
117
+ end
118
+ @new_recipe.read_recipes.each do|recipe|
119
+ if recipe['ingredients'].join(' ').downcase!.include? search_para
120
+ result << recipe
121
+ end
122
+ end
123
+ if result.empty?
124
+ puts "Sorry you don't have any recipes with those items, please try again."
125
+ choices
126
+ end
127
+ result
128
+ end
129
+
130
+
131
+
132
+ #######################
133
+ ##checking user input##
134
+ #######################
135
+ #basically an if check that returns true if there is only letters used in filtered results
136
+ def letter_check(str)
137
+ str[/[a-z]+/] == str
138
+ end
139
+ # stores the recipe in app memory before prompting the user to view
140
+ def terminal_table_new_recipe(api_recipe)
141
+ header = ['name', 'serves']
142
+ rows = [[api_recipe[:name]] + [api_recipe[:serves]]]
143
+
144
+ table = Terminal::Table.new headings: header, rows: rows
145
+ puts table
146
+ view_recipe_choice
147
+ end
148
+ # where the user can choose to view the new recipe or search again after viewwing the user can decide if they want to save it at that point to the recipes.JSON file
149
+ def view_recipe
150
+ PROMPT.select('want to see the recipe?') do |menu|
151
+ menu.choice({name:'yes', value:'1'})
152
+ menu.choice({name:'no, search again', value:'2'})
153
+ menu.choice({name:'no, quit', value:'3'})
154
+ end
155
+ end
156
+ # router to either view or search again, user may exitt at this point as well
157
+ def view_recipe_choice
158
+ case view_recipe
159
+ when '1'
160
+ @new_recipe.show_last_recipe(@new_recipe.read_recipes)
161
+ save_random_recipe
162
+ when '2'
163
+ search_new_recipe
164
+ when '3'
165
+ exit
166
+ end
167
+ end
168
+ # user is prompted to save the new recipe
169
+ def save_random_recipe
170
+ if PROMPT.yes?('Do you want to save this recipe?')
171
+ @new_recipe.write_recipes
172
+
173
+ else
174
+ choices
175
+ end
176
+ end
177
+ #this takes the return of the view recipe choice and acts accordingly
178
+ def save_recipe
179
+ case view_recipe_choice
180
+ when '1'
181
+
182
+ @new_recipe.write_recipes
183
+ when '2'
184
+ search_new_recipe
185
+ when '3'
186
+ exit
187
+ end
188
+ end
189
+
190
+ # apps main logic router
191
+ def choices
192
+ loop do
193
+ case display_menu
194
+ when '1'
195
+ terminal_table_lander(@new_recipe.read_recipes)
196
+ when '2'
197
+ search_new_recipe
198
+ when '3'
199
+ @new_recipe.get_user_recipe
200
+ when '4'
201
+ search_targeted_recipe
202
+ when '5'
203
+ exit
204
+ end
205
+ end
206
+
207
+ end
208
+ end
209
+
210
+
211
+
@@ -0,0 +1,34 @@
1
+ require_relative 'recipehelper'
2
+ require 'tty-prompt'
3
+ class RecipeCard
4
+ include RecipeHelper
5
+ attr_reader :name, :serves, :description, :ingredients, :recipe, :time_to_cook, :url
6
+ def initialize(name, serves, description, ingredients, recipe, time_to_cook, url)
7
+ @name = name
8
+ @serves = serves
9
+ @description = description
10
+ @ingredients = ingredients
11
+ @recipe = recipe
12
+ @time_to_cook = time_to_cook
13
+ @url = url
14
+ end
15
+ def split_ingredients(ingredients)
16
+ ingredients.split(' ')
17
+ end
18
+ def to_a
19
+ [@name, @serves, @description, @ingredients, @recipe, @time_to_cook, @url]
20
+ end
21
+ def self.user_recipe
22
+ recipe = {}
23
+ HEADERS.each do |input|
24
+ puts "Type out your ingredients separated with commas eg. banana, shrimp, taco meat" if input == :ingredients
25
+ puts "You need to enter a url it might be nice for inspiration?" if input == :url
26
+ puts "Whats the #{input}?"
27
+ print '> '
28
+
29
+ recipe[input] = gets.chomp
30
+ end
31
+
32
+ recipe
33
+ end
34
+ end
@@ -0,0 +1,9 @@
1
+ require 'tty-prompt'
2
+
3
+ module RecipeHelper
4
+ path = File.dirname(__FILE__).split("/")
5
+ path.pop
6
+ RECIPES_PATH = "#{path.join("/")}/public/recipes.json"
7
+ PROMPT = TTY::Prompt.new
8
+ HEADERS = %i[name serves description ingredients recipe time_to_cook url]
9
+ end
@@ -0,0 +1,244 @@
1
+ [
2
+ {
3
+ "name": "Beef Tenderloin With Creamy Alouette® Mushroom Sauce",
4
+ "serves": 2,
5
+ "description": "You can never have too many side dish recipes, so give Beef Tenderloin With Creamy Alouette® Mushroom Sauce a try. Watching your figure? This gluten free and primal recipe has 371 calories, 11g of protein, and 33g of fat per serving. This recipe serves 2 and costs $1.74 per serving. 40 people have tried and liked this recipe. If you have beef tenderloin steaks, milk, shallot, and a few other ingredients on hand, you can make it. From preparation to the plate, this recipe takes approximately 45 minutes. All things considered, we decided this recipe deserves a spoonacular score of 51%. This score is solid. Try Beef Tenderloin with Mushroom Sauce, Beef Tenderloin in Mushroom Sauce, and Beef Tenderloin with Mushroom-Red Wine Sauce for similar recipes.",
6
+ "ingredients": [
7
+ "2 cups sliced baby Portobello mushrooms",
8
+ "2 ounces beef tenderloin steaks, 11/2 inches thick (6 to 8 ounes each)",
9
+ "1/4 cup butter",
10
+ "3 teaspoons extra virgin olive oil, divided",
11
+ "1 teaspoon minced fresh parsley, if desired",
12
+ "1/2 cup milk",
13
+ "1/2 large shallot, thinly slivered",
14
+ "1/4 cup Alouette® Garlic & Herbs, or Alouette® Savory Vegetable"
15
+ ],
16
+ "recipe": "Heat broiler.Coat all sides of tenderloin with 1 tsp. of the olive oil. Place on broiler pan. Season to taste with salt and pepper. Broil 4 inches from heat for 6 minutes or until well-browned. Turn. Broil 6 to 8 minutes or until desired doneness.Meanwhile, heat remaining olive oil and the butter in small skillet over medium heat.Add shallot; cook 1 minute.Add mushrooms. Cook 2 to 3 minutes or until tender, stirring frequently.Stir in Alouette, adding milk to desired consistency. Heat just until warm.Spoon sauce over tenderloins. Sprinkle with parsley.",
17
+ "time_to_cook": 45,
18
+ "url": "http://www.foodista.com/recipe/6JNVQ85J/beef-tenderloin-with-creamy-alouette-mushroom-sauce"
19
+ },
20
+ {
21
+ "name": "Crispy Buttermilk Fried Chicken",
22
+ "serves": 6,
23
+ "description": "Forget going out to eat or ordering takeout every time you crave Southern food. Try making Crispy Buttermilk Fried Chicken at home. One portion of this dish contains roughly 16g of protein, 15g of fat, and a total of 260 calories. For 62 cents per serving, this recipe covers 9% of your daily requirements of vitamins and minerals. This recipe serves 6. 53 people found this recipe to be delicious and satisfying. This recipe from Foodista requires vegetable oil, buttermilk, salt, and paprika. It works best as a main course, and is done in roughly around 45 minutes. Taking all factors into account, this recipe earns a spoonacular score of 38%, which is rather bad. Users who liked this recipe also liked Crispy Buttermilk Fried Chicken, Crispy Buttermilk Fried Chicken, and Crispy Oven Fried Buttermilk Chicken.",
24
+ "ingredients": [
25
+ "2 pounds chicken",
26
+ "3/4 cup flour",
27
+ "2 teaspoons salt",
28
+ "1 teaspoon paprika",
29
+ "1 teaspoon pepper",
30
+ "1 cup buttermilk",
31
+ "Vegetable oil (enough to cover chicken), about 1 quart"
32
+ ],
33
+ "recipe": "Mix flour, salt, paprika and pepper. Dip chicken in buttermilk and then into flour mixture. Cook chicken in oil, starting on medium-high heat, then, when chicken is browned, reduce heat to medium and cook an additional 30 to 35 minutes until chicken is done (approx 150-155 degrees F internal), turning occasionally.",
34
+ "time_to_cook": 45,
35
+ "url": "https://www.foodista.com/recipe/G2QDD6GF/crispy-buttermilk-fried-chicken"
36
+ },
37
+ {
38
+ "name": "Sterling Cooper Blini with Caviar",
39
+ "serves": 16,
40
+ "description": "Sterling Cooper Blini with Caviar might be just the morn meal you are searching for. For 25 cents per serving, this recipe covers 2% of your daily requirements of vitamins and minerals. Watching your figure? This pescatarian recipe has 84 calories, 1g of protein, and 7g of fat per serving. A few people made this recipe, and 22 would say it hit the spot. This recipe is typical of Eastern European cuisine. A mixture of cream, sugar, caviar, and a handful of other ingredients are all it takes to make this recipe so yummy. From preparation to the plate, this recipe takes around 45 minutes. All things considered, we decided this recipe deserves a spoonacular score of 11%. This score is not so amazing. Similar recipes include Sterling Cooper Sling Cocktail, Vichyssoise of Kumumoto Oysters and Royal Sterling Caviar, and Potato Blini with Caviar.",
41
+ "ingredients": [
42
+ "1/2 teaspoon baking powder",
43
+ "1/2 cup butter",
44
+ "Caviar, for topping",
45
+ "1 egg",
46
+ "1/2 cup sifted all-purpose flour",
47
+ "¾ cup milk",
48
+ "3 tablespoons sour cream, plus additional for topping blini",
49
+ "1/2 teaspoon sugar"
50
+ ],
51
+ "recipe": "In a large bowl, sift the flour and baking powder together. Add the milk, sugar and 2 tablespoons sour cream. Beat the egg until frothy, add to batter and stir well. Let batter stand for 20 minutes.Melt butter on a griddle or large skillet. Fry small (2-3 inch) pancakes in very hot butter. Drain on paper towels. Top each blini with sour cream and caviar before serving.",
52
+ "time_to_cook": 45,
53
+ "url": "http://www.foodista.com/recipe/FR7746PB/sterling-cooper-blini-with-caviar"
54
+ },
55
+ {
56
+ "name": "Paneer Makhani",
57
+ "serves": 4,
58
+ "description": "Need a gluten free and lacto ovo vegetarian side dish? Paneer Makhani could be an outstanding recipe to try. One serving contains 295 calories, 9g of protein, and 26g of fat. For $2.05 per serving, this recipe covers 4% of your daily requirements of vitamins and minerals. This recipe serves 4. This recipe from Foodista has 10 fans. Head to the store and pick up paneer, salt, cumin powder, and a few other things to make it today. From preparation to the plate, this recipe takes approximately approximately 45 minutes. Taking all factors into account, this recipe earns a spoonacular score of 12%, which is not so awesome. Try paneer makhani , how to make paneer makhani | paneer s, Paneer Makhani (Paneer Butter Masala) (Restaurant Style), and Paneer Makhani for similar recipes.",
59
+ "ingredients": [
60
+ "1 cup cubed paneer ( Indian Cottage cheese)",
61
+ "1 medium onion, skinless",
62
+ "1 clove garlic",
63
+ "1 teaspoon grated ginger",
64
+ "1/2 teaspoon turmeric powder",
65
+ "1 teaspoon coriander powder",
66
+ "1 teaspoon cumin powder",
67
+ "2 teaspoons Tomato Paste, mixed thoroughly in a cup of water",
68
+ "2 teaspoons kasuri methi ( dried fenugreek leaves)",
69
+ "1/2 cup heavy whipping cream",
70
+ "salt to taste",
71
+ "1/2 teaspoon sugar",
72
+ "1 teaspoon canola oil",
73
+ "2 teaspoons Kashmiri mirch ( Kashmiri Red Chilli Powder)"
74
+ ],
75
+ "recipe": "Heat the oil in a pan. Grate the onion and the garlic into it. Add the grated ginger as well. Let it saut for 2 mins. Add in the turmeric powder, coriander powder, cumin powder and kashmiri mirch and saut for a couple more minutes. Add the kasuri methi and the tomato paste mixed in water. Add some more water if required. When it starts to boil, add the salt and paneer cubes. Let it cook in the gravy for a couple of minutes. Add the cream and sugar and mix well. Dont let it boil after you have added the cream, just simmer for 15 minutes or so.",
76
+ "time_to_cook": 45,
77
+ "url": "https://www.foodista.com/recipe/ZVKR6J5M/paneer-makhani"
78
+ },
79
+ {
80
+ "name": "Rum Raisin Carrot Cake with Cream Cheese Frosting",
81
+ "serves": 8,
82
+ "description": "One serving contains 1147 calories, 13g of protein, and 63g of fat. This recipe serves 8 and costs $2.8 per serving. 60 people were impressed by this recipe. It will be a hit at your Easter event. From preparation to the plate, this recipe takes roughly 45 minutes. A mixture of baking powder, vanillan extract, pecans, and a handful of other ingredients are all it takes to make this recipe so tasty. It is a good option if you're following a vegetarian diet. All things considered, we decided this recipe deserves a spoonacular score of 59%. This score is good. Try Carrot Cake With Cream Cheese Frosting, Carrot Cake with Cream Cheese Frosting, and Raw Carrot Cake With Cream Cheese Frosting for similar recipes.",
83
+ "ingredients": [
84
+ "2 teaspoons baking powder",
85
+ "2 teaspoons baking soda",
86
+ "1/2 cup buttermilk",
87
+ "1 pound carrots, peeled and coarsely shredded",
88
+ "1 teaspoon cinnamon",
89
+ "2 cups confectioners' sugar",
90
+ "2 8-ounces packages cream cheese, softened",
91
+ "1/2 cup dark rum",
92
+ "4 large eggs",
93
+ "2 cups all-purpose flour",
94
+ "Zest of 1 orange",
95
+ "1/2 cup chopped pecans (optional)",
96
+ "1 cup 1 pecans (4 ounces)",
97
+ "1 cup raisins",
98
+ "1 teaspoon salt",
99
+ "2 cups sugar",
100
+ "2 sticks unsalted butter, softened",
101
+ "1 tablespoon pure vanilla extract",
102
+ "1 1/2 teaspoons pure vanilla extract",
103
+ "1 cup vegetable oil"
104
+ ],
105
+ "recipe": "Soak raisins in rum, preferably overnight, until raisins are nice and plump.Preheat the oven to 325. Butter two 9-inch cake pans; line the bottoms with parchment. Butter the paper and flour the pans.For the cake:Spread the pecans on a baking sheet and toast for 8 minutes, until fragrant. Cool and finely chop.In a bowl, whisk the flour, baking powder, baking soda, cinnamon and salt.In a small bowl, whisk the oil, buttermilk and vanilla.In a large bowl, using an electric mixer, beat the eggs and sugar at high speed until pale, 5 minutes.Beat in the liquid ingredients, then beat in the dry ingredients just until moistened.Stir in the carrots, pecans and raisins.Divide the batter between the pans and bake the cakes for 55 minutes to 1 hour, until springy and golden.Let the cakes cool on a rack for 30 minutes, then unmold the cakes and let cool completely.For the Frosting:In a large bowl, using an electric mixer, beat the butter and cream cheese at high speed until light, about 5 minutes.Beat in the vanilla and orange zest, then the confectioners' sugar; beat at low speed until incorporated. Increase the speed to high and beat until light and fluffy, about 3 minutes.Peel off the parchment paper and invert one cake layer onto a plate. Spread with a slightly rounded cup of the frosting. Top with the second cake layer, right side up. Spread the top and sides with the remaining frosting and refrigerate the cake until chilled, about 1 hour.",
106
+ "time_to_cook": 45,
107
+ "url": "http://www.foodista.com/recipe/FDQ45DLN/rum-raisin-carrot-cake-with-cream-cheese-frosting"
108
+ },
109
+ {
110
+ "name": "Asparagus and Pea Soup: Real Convenience Food",
111
+ "serves": 2,
112
+ "description": "You can never have too many soup recipes, so give Asparagus and Pea Soup: Real Convenience Food a try. For $3.24 per serving, this recipe covers 25% of your daily requirements of vitamins and minerals. One serving contains 240 calories, 11g of protein, and 8g of fat. This recipe from fullbellysisters.blogspot.com has 204 fans. From preparation to the plate, this recipe takes about 20 minutes. It will be a hit at your Autumn event. If you have onion, peas, a couple of garlic cloves, and a few other ingredients on hand, you can make it. It is a good option if you're following a caveman, gluten free, primal, and vegan diet. All things considered, we decided this recipe deserves a spoonacular score of 96%. This score is spectacular. Try Butternut Squash & Pear Soup: Real Convenience Food, Tomato, Cucumber & Onion Salad with Feta Cheese: Real Convenience Food, and Everyday Granola from Real Food, Real Simple for similar recipes.",
113
+ "ingredients": [
114
+ "1 bag of frozen organic asparagus (preferably thawed)",
115
+ "1T EVOO (extra virgin olive oil)",
116
+ "a couple of garlic cloves",
117
+ "1/2 onion",
118
+ "2-3c of frozen organic peas",
119
+ "1 box low-sodium vegetable broth"
120
+ ],
121
+ "recipe": "Chop the garlic and onions.Saute the onions in the EVOO, adding the garlic after a couple of minutes; cook until the onions are translucent. Add the whole bag of asparagus and cover everything with the broth. Season with salt and pepper and a pinch of red pepper flakes, if using.Simmer until the asparagus is bright green and tender (if you've thawed the asparagus it will only take a couple of minutes). Turn off the heat and puree using an immersion blender.Add peas (the heat of the soup will quickly thaw them) and puree until smooth; add more until it reaches the thickness you like.Top with chives and a small dollop of creme fraiche or sour cream or greek yogurt.",
122
+ "time_to_cook": 20,
123
+ "url": "http://fullbellysisters.blogspot.com/2011/03/asparagus-and-pea-soup-real-convenience.html"
124
+ },
125
+ {
126
+ "name": "Pork Chops with Garlic Cream",
127
+ "serves": 4,
128
+ "description": "You can never have too many main course recipes, so give Pork Chops with Garlic Cream a try. This recipe makes 4 servings with 712 calories, 51g of protein, and 51g of fat each. For $3.5 per serving, this recipe covers 31% of your daily requirements of vitamins and minerals. A couple people made this recipe, and 13 would say it hit the spot. A mixture of pork chops, shallot, heavy cream, and a handful of other ingredients are all it takes to make this recipe so yummy. To use up the salt you could follow this main course with the Apple Turnovers Recipe as a dessert. From preparation to the plate, this recipe takes about 45 minutes. All things considered, we decided this recipe deserves a spoonacular score of 80%. This score is solid. Try Pork Chops with Wine and Garlic, Honey-Garlic Pork Chops, and Honey-Garlic Pork Chops for similar recipes.",
129
+ "ingredients": [
130
+ "2 tablespoon butter",
131
+ "1/3 cup buttermilk",
132
+ "1/3 cup dry white wine",
133
+ "3 sprigs Fresh thyme",
134
+ "1 cup heavy cream",
135
+ "pepper",
136
+ "900 grams pork chops",
137
+ "salt",
138
+ "1 medium shallot, minced",
139
+ "2 tablespoon vegetable oil",
140
+ "12 large garlic cloves, all about the same size, and peeled but left whole"
141
+ ],
142
+ "recipe": "In a small sauce pan melt the butter over medium-low heat and cook the shallots until softened, about 5 minutes.Add the wine, thyme and a generous teaspoon salt. Raise the heat to medium and simmer until the liquid is reduced to 2 tablespoons. Stir in the heavy cream and the buttermilk and all the garlic cloves.Return to a bare simmer and cook, stirring occasionally, until the garlic is completely tender, 40 to 45 minutes.Transfer the garlic mixture to a blender and puree until very smooth, about 1 minute. Return the garlic sauce to the saucepan. It should be thick enough to cover the back of a wooden spoon but easy to pour. Set aside covered to keep warm.Preheat oven to 375.Salt and pepper generously the pork chops. In a large skillet over medium high heat add the oil. When hot add the chops and sear them on each side. 2minutes each sides.Remove from the stove and place in the hot oven. Cook for 3 minutes at 375 then lower the heat to 300 for another 5 minutes. The chops need to be springy to the touch and golden brown on the outside.",
143
+ "time_to_cook": 45,
144
+ "url": "http://www.foodista.com/recipe/MMSZLRHM/pork-chops-with-garlic-cream"
145
+ },
146
+ {
147
+ "name": "Rice and Peas with Coconut Curry Mackerel",
148
+ "serves": 4,
149
+ "description": "Rice and Peas with Coconut Curry Mackerel might be just the Indian recipe you are searching for. One serving contains 624 calories, 31g of protein, and 34g of fat. This gluten free, dairy free, and pescatarian recipe serves 4 and costs $2.42 per serving. This recipe from Afrolems has 26 fans. It works well as a budget friendly main course. From preparation to the plate, this recipe takes roughly 45 minutes. If you have seasoning cubes, mackerel, curry powder, and a few other ingredients on hand, you can make it. To use up the curry powder you could follow this main course with the Curry Ice Cream with Mango and Pistachio as a dessert. All things considered, we decided this recipe deserves a spoonacular score of 95%. This score is amazing. Similar recipes include Coconut Chicken Curry with Snow Peas and Rice, Black Eyed Peas Curry (With Coconut) (Lobia Curry), and Skillet Chicken with Snap Peas, Mushrooms, and Coconut Curry.",
150
+ "ingredients": [
151
+ "2 cups of coconut milk",
152
+ "1 tablespoon of corn starch",
153
+ "2 tablespoons of curry powder",
154
+ "1 clove of garlic (chopped)",
155
+ "Seasoning cubes",
156
+ "1 medium piece of Mackerel (chopped in 4 pieces)",
157
+ "1/2 bulb of onion",
158
+ "1/2 cup of red kidney beans",
159
+ "1 cup of Rice",
160
+ "3 scotch bonnet peppers"
161
+ ],
162
+ "recipe": "Pour 1 cup of coconut milk in a pot with 1 seasoning cube and allow to boil for a minute.Pour in your rice and peas in the boiling coconut milk and pour 2 cups of water and leave to boil till the rice and peas are soft on low heat.In a separate pot, season and bring the mackerel to boil in the rest of the coconut milk, curry powder and some water.Toss in the chopped onion, scotch bonnet peppers and garlic and allow to simmer on medium heat.Once the fish is cooked, add the corn starch to thicken the sauce and allow to simmer for 4 minutes on low heat.Serve with the rice and peas",
163
+ "time_to_cook": 45,
164
+ "url": "http://www.afrolems.com/2014/10/31/rice-and-peas-with-coconut-curry-mackerel/"
165
+ },
166
+ {
167
+ "name": "Banana Foster Bread Pudding",
168
+ "serves": 8,
169
+ "description": "Banana Foster Bread Pudding requires roughly roughly 45 minutes from start to finish. This recipe serves 8 and costs $1.75 per serving. Watching your figure? This lacto ovo vegetarian recipe has 1040 calories, 12g of protein, and 45g of fat per serving. A couple people made this recipe, and 27 would say it hit the spot. This recipe from Foodista requires bananas, bananas, milk, and heavy cream. It works well as a dessert. Overall, this recipe earns a solid spoonacular score of 44%. Users who liked this recipe also liked Bananas Foster Banana Pudding, Bananas Foster Bread Pudding, and Bananas Foster Bread Pudding.",
170
+ "ingredients": [
171
+ "1/2 C. - Butter (room temp)",
172
+ "1 1/2 C. - Brown Sugar",
173
+ "3 - Eggs",
174
+ "1 lb. - Bread (I used a brioche roll)",
175
+ "2 C. - Heavy Cream",
176
+ "1 1/2 C. - Milk",
177
+ "1 C. - Cream De Banana Liqueur",
178
+ "2 Tsp. - Ground Cinnamon",
179
+ "1 Tsp. - Vanilla",
180
+ "6 - Bananas (sliced)",
181
+ "2 - Bananas (sliced)",
182
+ "1/4 C. - Butter",
183
+ "1 C. - Brown Sugar"
184
+ ],
185
+ "recipe": "Preheat oven to 325 degrees. In a large bowl, cream together the butter and sugar. Beat in eggs then stir in the cream, milk, liqueur, cinnamon, vanilla and bread. Once well combined fold in the sliced bananas carefully. Pour into a 13x9 baking dish and cook for 90 minutes or until completely set. This can be served hot, room temp or cold. It can be topped with vanilla ice cream, whipped cream or as I did with the following topping.In a sauce pan over medium high heat melt the butter then add the brown sugar. Once melted add the banana slices and stir gently, cook until the syrup has reduced and the bananas have caramelized. This will take about 5-10 minutes, be careful to not let your sugar burn. When ready ladle some of this hot sauce over each serving of bread pudding.",
186
+ "time_to_cook": 45,
187
+ "url": "https://www.foodista.com/recipe/4RYKKRMV/banana-foster-bread-pudding"
188
+ },
189
+ {
190
+ "name": "Brown Rice Mushroom Pilaf",
191
+ "serves": 4,
192
+ "description": "Brown Rice Mushroom Pilaf is a side dish that serves 4. One serving contains 224 calories, 5g of protein, and 5g of fat. For 42 cents per serving, this recipe covers 11% of your daily requirements of vitamins and minerals. 15 people have tried and liked this recipe. It is brought to you by Foodista. Head to the store and pick up unrefined sunflower oil, ground pepper, water, and a few other things to make it today. From preparation to the plate, this recipe takes approximately approximately 45 minutes. It is a good option if you're following a gluten free, dairy free, lacto ovo vegetarian, and vegan diet. Overall, this recipe earns a tremendous spoonacular score of 93%. Brown Rice-Mushroom Pilaf, Quick Brown Rice and Mushroom Pilaf, and Brown Rice Pilaf are very similar to this recipe.",
193
+ "ingredients": [
194
+ "1 large onion, chopped",
195
+ "1 cup brown rice",
196
+ "1 cup sliced fresh mushrooms (I used small-size champignons; don't use canned mushrooms because they're absolutely tasteless.)",
197
+ "1 tbsp unrefined sunflower oil",
198
+ "2 cups water",
199
+ "sea salt, to taste",
200
+ "1/3 tsp ground pepper"
201
+ ],
202
+ "recipe": "Heat oil in a large saucepan over medium heat. Saut chopped onion and sliced mushrooms for 5 minutes.Add brown rice and stir to coat in oil.Add water.Bring to a boil, then simmer for 30 minutes. Remove from heat and cover with a lid. Let it rest until all liquid is absorbed.",
203
+ "time_to_cook": 45,
204
+ "url": "https://www.foodista.com/recipe/S4DB57DW/brown-rice-mushroom-pilaf"
205
+ },
206
+ {
207
+ "name": "Jalapeno Cheese Quick Bread",
208
+ "serves": 12,
209
+ "description": "The recipe Jalapeno Cheese Quick Bread can be made in around around 45 minutes. This breakfast has 114 calories, 5g of protein, and 5g of fat per serving. This recipe serves 12 and costs 22 cents per serving. 36 people were impressed by this recipe. This recipe from Foodista requires pickled jalapenos, egg, olive oil, and cheddar cheese. It is a good option if you're following a lacto ovo vegetarian diet. Overall, this recipe earns a solid spoonacular score of 47%. If you like this recipe, you might also like recipes such as Jalapeño-Corn-Beer Quick Bread, Jalapeño Summer Squash Quick Bread for #BreadBakers, and Jalapeno Cheese Bread for Bread Machine.",
210
+ "ingredients": [
211
+ "3/4 cup unbleached all purpose flour",
212
+ "3/4 cup whole-wheat flour",
213
+ "1 tbsp baking powder",
214
+ "1/2 tsp. salt",
215
+ "1 tbsp light olive oil",
216
+ "1 egg, lightly beaten",
217
+ "3/4 cup non-fat milk",
218
+ "1 cup light cheddar cheese (I used a light Mexican blend)",
219
+ "1/4 cups pickled jalapenos, drained, diced"
220
+ ],
221
+ "recipe": "Heat oven to 350Lightly grease loaf pan, 9x5x3 or two mini muffin pans with cooking spray.Stir together flour, cheese, baking powder, and salt in medium bowl. Add olive oil, egg and milk, stir till combined. Fold in jalapenos.Pour into panBake 30 to 45 minutes or until golden brown and toothpick inserted in center comes out clean. Cool 5 minutes; run knife around edges of pan to loosen. Remove from pan to wire rack. Cool 30 minutes before slicing, if you can wait that long, I didnt.",
222
+ "time_to_cook": 45,
223
+ "url": "https://www.foodista.com/recipe/Q5S66TH2/jalapeno-cheese-quick-bread"
224
+ },
225
+ {
226
+ "name": "Brown Butter Twice Baked Sweet Potatoes",
227
+ "serves": 4,
228
+ "description": "Brown Butter Twice Baked Sweet Potatoes might be just the main course you are searching for. One serving contains 689 calories, 16g of protein, and 55g of fat. For $3.43 per serving, this recipe covers 27% of your daily requirements of vitamins and minerals. This recipe from Pink When has 8242 fans. From preparation to the plate, this recipe takes roughly 1 hour and 35 minutes. Head to the store and pick up sweet potatoes, butter, buttermilk, and a few other things to make it today. To use up the buttermilk you could follow this main course with the Buttermilk Pie as a dessert. It is a good option if you're following a gluten free and primal diet. All things considered, we decided this recipe deserves a spoonacular score of 90%. This score is tremendous. Try Twice Baked Sweet Potatoes {with Brown Sugar & Pecans}, Twice Baked Sweet Potatoes with Brown Sugar, Pecans & Marshmallows, and Maple Brown Butter Mashed Sweet Potatoes for similar recipes.",
229
+ "ingredients": [
230
+ "2 very ripe avocados, pitted and skins removed",
231
+ "2 tablespoons buttermilk",
232
+ "4 strips of bacon, cooked until crisp and chopped",
233
+ "1/4 cup fresh parsley, chopped",
234
+ "6 ounces goat's cheese, crumbled",
235
+ "salt and black pepper",
236
+ "1/2 cup sour cream (plain Greek yogurt may be substituted)",
237
+ "4 medium sweet potatoes",
238
+ "6 tablespoons unsalted butter"
239
+ ],
240
+ "recipe": "Preheat your oven to 400 degrees F. Poke your sweet potatoes with a fork and place them directly on the rack of your oven. Place a piece of foil on the rack below to reduce mess. Bake the sweet potatoes for 45-50 minutes or until tender. Times may vary depending on how hot your oven gets.Remove the potatoes from the oven and let stand at room temperature until they are cool enough to handle, about 20-30 minutes. Leave the oven on.While your potatoes are cooling, melt the butter over medium heat. Continue to cook the butter, stirring frequently, until brown bits begin to form on the bottom of the pan, about 5-6 minutes. Pay close attention as the butter can quickly go from brown to burnt in a matter of seconds. Once you see the brown bits forming and a nutty aroma fills the air, pull the butter from the heat immediately. Set aside.Cut the tops off of the sweet potatoes, lengthwise. Scoop the sweet potato flesh into a medium bowl, leaving the skins in tact. To the bowl, add the brown butter, 2 tablespoons of the fresh parsley, 3/4 of the chopped bacon, and 4 ounces of the goats cheese. Sprinkle with salt and black pepper to taste and mash the ingredients together until combined. Scoop the filling back into the sweet potatoes.Place the potatoes on a baking sheet that has been lined with foil or parchment paper. Place them back in the oven to bake for 25 minutes.While your potatoes are baking for a second time, prepare your avocado cream. In the bowl of your food processor or blender, combine the avocados, sour cream and buttermilk. Add a dash of salt and pepper and pulse until completely smooth and creamy.Once your potatoes have baked, remove from oven. Sprinkle on the remaining parsley, bacon and goats cheese. Drizzle with avocado cream and serve immediately.Enjoy!I hope you enjoy this recipe for brown butter twice baked sweet potatoes!",
241
+ "time_to_cook": 95,
242
+ "url": "http://www.pinkwhen.com/brown-butter-twice-baked-sweet-potatoes/"
243
+ }
244
+ ]
metadata ADDED
@@ -0,0 +1,105 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: Recipes_app
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Rodney Ditchfield
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-10-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: tty-prompt
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: terminal-table
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: faraday
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: colorize
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description:
70
+ email:
71
+ executables:
72
+ - Recipes_app
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - bin/Recipes_app
77
+ - lib/api.rb
78
+ - lib/menu.rb
79
+ - lib/recipe_card.rb
80
+ - lib/recipehelper.rb
81
+ - public/recipes.json
82
+ homepage:
83
+ licenses: []
84
+ metadata: {}
85
+ post_install_message:
86
+ rdoc_options: []
87
+ require_paths:
88
+ - lib
89
+ - public
90
+ required_ruby_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: '2.4'
95
+ required_rubygems_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ requirements: []
101
+ rubygems_version: 3.1.2
102
+ signing_key:
103
+ specification_version: 4
104
+ summary: Recipes_app generates random recipes for users
105
+ test_files: []