hangry 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -0
- data/lib/hangry.rb +1 -0
- data/lib/hangry/data_vocabulary_recipe_parser.rb +4 -0
- data/lib/hangry/hrecipe_parser.rb +20 -6
- data/lib/hangry/recipe_parser.rb +3 -1
- data/lib/hangry/schema_org_recipe_parser.rb +4 -0
- data/lib/hangry/version.rb +1 -1
- data/spec/fixtures/{bbc.co.uk.html → hrecipe/bbc.co.uk.html} +0 -0
- data/spec/fixtures/{bigoven.html → hrecipe/bigoven.html} +0 -0
- data/spec/fixtures/hrecipe/campbellskitchen.com.html +1970 -0
- data/spec/fixtures/{cooking.com.html → hrecipe/cooking.com.html} +0 -0
- data/spec/fixtures/{cooks.com.html → hrecipe/cooks.com.html} +0 -0
- data/spec/fixtures/hrecipe/drinksmixer.com.html +604 -0
- data/spec/fixtures/{epicurious.html → hrecipe/epicurious.html} +0 -0
- data/spec/fixtures/hrecipe/grouprecipes.com.html +982 -0
- data/spec/fixtures/hrecipe/homecooking.about.com.html +326 -0
- data/spec/fixtures/hrecipe/jamieoliver.com.html +868 -0
- data/spec/fixtures/hrecipe/mrfood.com.html +4642 -0
- data/spec/fixtures/hrecipe/southernfood.about.com.html +328 -0
- data/spec/fixtures/{tasteofhome.com.html → hrecipe/tasteofhome.com.html} +0 -0
- data/spec/fixtures/{allrecipes.html → schema_org/allrecipes.html} +0 -0
- data/spec/fixtures/{betty_crocker.html → schema_org/betty_crocker.html} +0 -0
- data/spec/fixtures/{copykat.com.html → schema_org/copykat.com.html} +0 -0
- data/spec/fixtures/{chow.com.html → schema_org/data-vocabulary_org/chow.com.html} +0 -0
- data/spec/fixtures/{myrecipes.com.html → schema_org/data-vocabulary_org/myrecipes.com.html} +0 -0
- data/spec/fixtures/{saveur.com.html → schema_org/data-vocabulary_org/saveur.com.html} +0 -0
- data/spec/fixtures/{tarladalal.com.html → schema_org/data-vocabulary_org/tarladalal.com.html} +0 -0
- data/spec/fixtures/{taste.com.au.html → schema_org/data-vocabulary_org/taste.com.au.html} +0 -0
- data/spec/fixtures/{eatingwell.com.html → schema_org/eatingwell.com.html} +0 -0
- data/spec/fixtures/{food.com.html → schema_org/food.com.html} +0 -0
- data/spec/fixtures/{food_network_schema_org.html → schema_org/food_network_schema_org.html} +0 -0
- data/spec/fixtures/{food_network_with_blank_ingredients.html → schema_org/food_network_with_blank_ingredients.html} +0 -0
- data/spec/fixtures/{foodandwine.com.html → schema_org/foodandwine.com.html} +0 -0
- data/spec/fixtures/{heart.org.html → schema_org/heart.org.html} +0 -0
- data/spec/fixtures/{pillsbury.com.html → schema_org/pillsbury.com.html} +0 -0
- data/spec/hangry_spec.rb +1 -0
- data/spec/real_examples/{bbc_co_uk_spec.rb → hrecipe/bbc_co_uk_spec.rb} +2 -1
- data/spec/real_examples/{big_oven_spec.rb → hrecipe/big_oven_spec.rb} +2 -1
- data/spec/real_examples/hrecipe/campbells_kitchen_com_spec.rb +63 -0
- data/spec/real_examples/{cooking_com_spec.rb → hrecipe/cooking_com_spec.rb} +3 -2
- data/spec/real_examples/{cooks_com_spec.rb → hrecipe/cooks_com_spec.rb} +2 -1
- data/spec/real_examples/hrecipe/drinks_mixer_com_spec.rb +57 -0
- data/spec/real_examples/{epicurious_spec.rb → hrecipe/epicurious_spec.rb} +2 -1
- data/spec/real_examples/hrecipe/group_recipes_com_spec.rb +65 -0
- data/spec/real_examples/hrecipe/home_cooking_food_com_spec.rb +79 -0
- data/spec/real_examples/hrecipe/jamie_oliver_com_spec.rb +61 -0
- data/spec/real_examples/hrecipe/mr_food_com_spec.rb +55 -0
- data/spec/real_examples/hrecipe/southern_food_about_com_spec.rb +64 -0
- data/spec/real_examples/{taste_of_home_spec.rb → hrecipe/taste_of_home_spec.rb} +4 -3
- data/spec/real_examples/{all_recipes_spec.rb → schema_org/all_recipes_spec.rb} +2 -1
- data/spec/real_examples/{betty_crocker_spec.rb → schema_org/betty_crocker_spec.rb} +2 -1
- data/spec/real_examples/{copykat_spec.rb → schema_org/copykat_spec.rb} +2 -1
- data/spec/real_examples/{chow_com_spec.rb → schema_org/data-vocabulary_org/chow_com_spec.rb} +2 -1
- data/spec/real_examples/{myrecipes_com_spec.rb → schema_org/data-vocabulary_org/myrecipes_com_spec.rb} +2 -1
- data/spec/real_examples/{saveur_com_spec.rb → schema_org/data-vocabulary_org/saveur_com_spec.rb} +2 -1
- data/spec/real_examples/{tarladalal_com_spec.rb → schema_org/data-vocabulary_org/tarladalal_com_spec.rb} +2 -1
- data/spec/real_examples/{taste_com_au_spec.rb → schema_org/data-vocabulary_org/taste_com_au_spec.rb} +2 -1
- data/spec/real_examples/{eating_well_spec.rb → schema_org/eating_well_spec.rb} +3 -2
- data/spec/real_examples/{food_and_wine_spec.rb → schema_org/food_and_wine_spec.rb} +2 -1
- data/spec/real_examples/{food_com_spec.rb → schema_org/food_com_spec.rb} +2 -1
- data/spec/real_examples/{food_network_spec.rb → schema_org/food_network_spec.rb} +4 -2
- data/spec/real_examples/{heart_org_spec.rb → schema_org/heart_org_spec.rb} +2 -1
- data/spec/real_examples/{pillsbury_spec.rb → schema_org/pillsbury_spec.rb} +2 -1
- metadata +124 -96
@@ -4,13 +4,14 @@ require 'hangry'
|
|
4
4
|
describe Hangry do
|
5
5
|
|
6
6
|
context "cooking.com recipe" do
|
7
|
-
let(:html) { File.read("spec/fixtures/cooking.com.html") }
|
7
|
+
let(:html) { File.read("spec/fixtures/hrecipe/cooking.com.html") }
|
8
8
|
subject { Hangry.parse(html) }
|
9
9
|
|
10
10
|
its(:author) { should == "Casual Cuisines of the World - Taverna" }
|
11
11
|
its(:canonical_url) { should == "http://www.cooking.com/Recipes-And-More/recipes/garlic-shrimp-recipe-41.aspx" }
|
12
12
|
its(:cook_time) { should == nil }
|
13
13
|
its(:description) { should == "In Spanish tavernas, these shrimp; fragrant with garlic and olive oil; are brought to the table sizzling in a little metal pan. Have plenty of bread on hand to sop up the delicious pan juices. Serve with lemon wedges, if desired." }
|
14
|
+
its(:image_url) { should == nil }
|
14
15
|
its(:ingredients) {
|
15
16
|
should == [
|
16
17
|
"1/4 cup olive oil",
|
@@ -47,7 +48,7 @@ In a saute pan over medium heat, warm the olive oil. Add the garlic and red pepp
|
|
47
48
|
should == instructions.strip
|
48
49
|
}
|
49
50
|
|
50
|
-
its(:prep_time) { should ==
|
51
|
+
its(:prep_time) { should == 10 }
|
51
52
|
its(:published_date) { should == nil }
|
52
53
|
its(:total_time) { should == 10 }
|
53
54
|
its(:yield) { should == "Serves 4" }
|
@@ -4,13 +4,14 @@ require 'hangry'
|
|
4
4
|
describe Hangry do
|
5
5
|
|
6
6
|
context "cooks.com recipe" do
|
7
|
-
let(:html) { File.read("spec/fixtures/cooks.com.html") }
|
7
|
+
let(:html) { File.read("spec/fixtures/hrecipe/cooks.com.html") }
|
8
8
|
subject { Hangry.parse(html) }
|
9
9
|
|
10
10
|
its(:author) { should == "CM" }
|
11
11
|
its(:canonical_url) { should == nil }
|
12
12
|
its(:cook_time) { should == nil }
|
13
13
|
its(:description) { should == nil }
|
14
|
+
its(:image_url) { should == 'http://img.cooks.com/i/rec/IMG_0814-200.jpg' }
|
14
15
|
its(:ingredients) {
|
15
16
|
should == [
|
16
17
|
"2 c. flour",
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require 'hangry'
|
3
|
+
|
4
|
+
describe Hangry do
|
5
|
+
|
6
|
+
context "drinksmixer.com recipe" do
|
7
|
+
let(:html) { File.read("spec/fixtures/hrecipe/drinksmixer.com.html") }
|
8
|
+
subject { Hangry.parse(html) }
|
9
|
+
|
10
|
+
its(:author) { should == nil }
|
11
|
+
its(:canonical_url) { should == nil }
|
12
|
+
its(:cook_time) { should == nil }
|
13
|
+
its(:description) { should == nil }
|
14
|
+
its(:image_url) { should == nil }
|
15
|
+
its(:ingredients) {
|
16
|
+
should == [
|
17
|
+
"2 oz gin",
|
18
|
+
"1 oz lemon juice",
|
19
|
+
"1 tsp superfine sugar",
|
20
|
+
"3 oz club soda",
|
21
|
+
"1 maraschino cherry",
|
22
|
+
"1 slice orange"
|
23
|
+
]
|
24
|
+
}
|
25
|
+
its(:name) { should == "Tom Collins recipe" }
|
26
|
+
its(:nutrition) do
|
27
|
+
should == {
|
28
|
+
calories: nil,
|
29
|
+
cholesterol: nil,
|
30
|
+
fiber: nil,
|
31
|
+
protein: nil,
|
32
|
+
saturated_fat: nil,
|
33
|
+
sodium: nil,
|
34
|
+
sugar: nil,
|
35
|
+
total_carbohydrates: nil,
|
36
|
+
total_fat: nil,
|
37
|
+
trans_fat: nil,
|
38
|
+
unsaturated_fat: nil
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
its(:instructions) {
|
43
|
+
instructions = <<-eos
|
44
|
+
In a shaker half-filled with ice cubes, combine the gin, lemon juice, and sugar. Shake well. Strain into a collins glass almost filled with ice cubes. Add the club soda. Stir and garnish with the cherry and the orange slice.
|
45
|
+
eos
|
46
|
+
should == instructions.strip
|
47
|
+
}
|
48
|
+
|
49
|
+
its(:prep_time) { should == nil }
|
50
|
+
its(:published_date) { should == nil }
|
51
|
+
its(:total_time) { should == nil }
|
52
|
+
its(:yield) { should == nil }
|
53
|
+
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
|
@@ -3,7 +3,7 @@ require 'hangry'
|
|
3
3
|
describe Hangry do
|
4
4
|
|
5
5
|
context "epicurious.com recipe" do
|
6
|
-
subject { Hangry.parse(File.read("spec/fixtures/epicurious.html")) }
|
6
|
+
subject { Hangry.parse(File.read("spec/fixtures/hrecipe/epicurious.html")) }
|
7
7
|
|
8
8
|
its(:author) { should == "by Janet Taylor McCracken" }
|
9
9
|
its(:canonical_url) { should == "http://www.epicurious.com/articlesguides/bestof/toprecipes/bestburgerrecipes/recipes/food/views/Grilled-Turkey-Burgers-with-Cheddar-and-Smoky-Aioli-354289" }
|
@@ -11,6 +11,7 @@ describe Hangry do
|
|
11
11
|
its(:description) { should == "A simple Moroccan-spiced aioli is mixed in with the ground turkey to keep the burgers moist and give them tons of flavor. Smoked paprika is available in the spice aisle of most supermarkets." }
|
12
12
|
its(:prep_time) { should == 40 }
|
13
13
|
its(:total_time) { should == 40 }
|
14
|
+
its(:image_url) { should == '/images/recipesmenus/2009/2009_august/354289_116.jpg' }
|
14
15
|
its(:ingredients) {
|
15
16
|
should == [
|
16
17
|
'1/2 teaspoon cumin seeds',
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require 'hangry'
|
3
|
+
|
4
|
+
describe Hangry do
|
5
|
+
|
6
|
+
context "grouprecipes.com recipe" do
|
7
|
+
let(:html) { File.read("spec/fixtures/hrecipe/grouprecipes.com.html") }
|
8
|
+
subject { Hangry.parse(html) }
|
9
|
+
|
10
|
+
its(:author) { should == nil }
|
11
|
+
its(:canonical_url) { should == nil }
|
12
|
+
its(:cook_time) { should == nil }
|
13
|
+
its(:description) { should == nil }
|
14
|
+
its(:image_url) { should == 'http://s1.grouprecipes.com/images/recipes/200/05383996f195c3c350a844fe062ef66a.jpg' }
|
15
|
+
its(:ingredients) { should == [] }
|
16
|
+
its(:name) { should == "Deep Dark Chocolate Cheesecake Recipe" }
|
17
|
+
its(:nutrition) do
|
18
|
+
should == {
|
19
|
+
calories: nil,
|
20
|
+
cholesterol: nil,
|
21
|
+
fiber: nil,
|
22
|
+
protein: nil,
|
23
|
+
saturated_fat: nil,
|
24
|
+
sodium: nil,
|
25
|
+
sugar: nil,
|
26
|
+
total_carbohydrates: nil,
|
27
|
+
total_fat: nil,
|
28
|
+
trans_fat: nil,
|
29
|
+
unsaturated_fat: nil
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
its(:instructions) {
|
34
|
+
instructions = <<-eos
|
35
|
+
Crust
|
36
|
+
Preheat oven to 350°F. Butter a 9” springform pan and line the base with parchment.
|
37
|
+
Mix all the crust ingredients together well.
|
38
|
+
Press evenly onto the bottom (not the sides) of the prepared pan.
|
39
|
+
Bake just until set, about 6 minutes.
|
40
|
+
Set aside while preparing filling. Keep oven on.
|
41
|
+
Filling
|
42
|
+
Melt the chocolate in the microwave or over a pot of simmering water until smooth and glossy.
|
43
|
+
In a bowl, beat cheeses, sour cream, brown sugar, cocoa powder, cornstarch and salt until smooth. Blend in eggs, 1 at a time.
|
44
|
+
By hand, fold in the chocolate until just blended in, trying not to incorporate air.
|
45
|
+
Pour filling over crust and rap sharply on a countertop to dislodge air pockets.
|
46
|
+
Smooth the top and place in a deep roasting pan.
|
47
|
+
Pour boiling water into the roasting pan, about ½ way up the side of the springform.
|
48
|
+
Bake until center is just set and just appears dry, about 1 hour.
|
49
|
+
Turn the oven off and cool the cheesecake inside for 1 hour, then remove from the oven and waterbath and cool 1 hour on a rack.
|
50
|
+
Run a knife around the side of cake to loosen the ring, but do not remove it.
|
51
|
+
Cover loosely and chill overnight before removing the ring and slicing.
|
52
|
+
Serve with Raspberry Compote
|
53
|
+
eos
|
54
|
+
should == instructions.strip
|
55
|
+
}
|
56
|
+
|
57
|
+
its(:prep_time) { should == nil }
|
58
|
+
its(:published_date) { should == nil }
|
59
|
+
its(:total_time) { should == nil }
|
60
|
+
its(:yield) { should == nil }
|
61
|
+
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
65
|
+
|
@@ -0,0 +1,79 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require 'hangry'
|
3
|
+
|
4
|
+
describe Hangry do
|
5
|
+
|
6
|
+
context "homecooking.about.com recipe" do
|
7
|
+
let(:html) { File.read("spec/fixtures/hrecipe/homecooking.about.com.html") }
|
8
|
+
subject { Hangry.parse(html) }
|
9
|
+
|
10
|
+
its(:author) { should == "Peggy Trowbridge Filippone, About.com Guide" }
|
11
|
+
its(:canonical_url) { should == "http://homecooking.about.com/od/muffinrecipes/r/blmuff23.htm" }
|
12
|
+
its(:cook_time) { should == nil }
|
13
|
+
its(:description) { should == "The combination of key limes and white chocolate is irresistable. Use this basic recipe for incredibly moist and delightfully tangy sweet muffins or cake." }
|
14
|
+
its(:image_url) { should == "http://0.tqn.com/d/homecooking/1/I/G/C/1/blmuff23.jpg" }
|
15
|
+
its(:ingredients) {
|
16
|
+
should == [
|
17
|
+
"Cupcakes/Cake:",
|
18
|
+
"1-3/4 cups all-purpose flour",
|
19
|
+
"2 teaspoons baking powder",
|
20
|
+
"1/2 teaspoon salt",
|
21
|
+
"6 Tablespoons butter, softened",
|
22
|
+
"1 cup sugar",
|
23
|
+
"2 large eggs, lightly beaten",
|
24
|
+
"1-1/2 teaspoons grated key lime zest",
|
25
|
+
"1 Tablespoon fresh key lime juice",
|
26
|
+
"2/3 cup buttermilk",
|
27
|
+
"1 cup white chocolate chips",
|
28
|
+
".",
|
29
|
+
"Glaze:",
|
30
|
+
"1 cup powdered sugar",
|
31
|
+
"1/8 cup fresh key lime juice"
|
32
|
+
]
|
33
|
+
}
|
34
|
+
its(:name) { should == "White Chocolate Key Lime Muffins or Cake Recipe" }
|
35
|
+
its(:nutrition) do
|
36
|
+
should == {
|
37
|
+
calories: nil,
|
38
|
+
cholesterol: nil,
|
39
|
+
fiber: nil,
|
40
|
+
protein: nil,
|
41
|
+
saturated_fat: nil,
|
42
|
+
sodium: nil,
|
43
|
+
sugar: nil,
|
44
|
+
total_carbohydrates: nil,
|
45
|
+
total_fat: nil,
|
46
|
+
trans_fat: nil,
|
47
|
+
unsaturated_fat: nil
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
its(:instructions) {
|
52
|
+
instructions = <<-EOS
|
53
|
+
For Muffins:
|
54
|
+
Preheat oven to 350 degrees F (175 degrees C). Line standard-size muffin tin with foil liners.
|
55
|
+
Blend the flour, baking powder, and salt together in a small bowl. Set aside.
|
56
|
+
In a large mixing bowl, cream butter and sugar together with a mixer, beating until blended. Add the eggs, 1-1/2 teaspoons lime zest, and 1 tablespoon lime juice.
|
57
|
+
Into the butter-cream mixture in the large bowl, add 1/3 of the flour mixture, stirring until combined. Add one-third of the buttermilk, stirring until combined. Continue alternating one-third of each until all is mixed well. Fold in white chocolate chips.
|
58
|
+
Fill cupcake liners two-thirds full with batter. Bake 18 to 20 minutes (or 12 to 14 minutes for mini-muffins) until wooden pick inserted in the center comes out clean.
|
59
|
+
Glaze:
|
60
|
+
Whisk powdered sugar and 1/8 cup lime juice together until combined and smooth. While muffins are still warm, poke holes in the tops of the muffins with a wooden pick. Smooth about a teaspoon on top of each warm muffin. Cool completely.
|
61
|
+
Yield: about 18 muffins
|
62
|
+
For Cake:
|
63
|
+
Preheat oven to 350 degrees F (175 degrees C). Prepare 9 x 13-inch baking pan by lining with foil (non-stick foil recommended).
|
64
|
+
Follow the same mixing instructions as above. Spread batter evenly in pan. Bake 35 to 40 minutes or until wooden pick inserted in center comes out clean. Let rest in pan about 5 minutes and then poke holes all over the top of the cake with a wooden pick. Spread glaze evenly over top of cake and cool completely. Cut into 18 pieces to serve.
|
65
|
+
Yield: 18 servings
|
66
|
+
White Chocolate Key Lime Muffins or Cake Recipe Photo © 2008 Peggy Trowbridge Filippone, licensed to About.com, Inc.
|
67
|
+
EOS
|
68
|
+
should == instructions.strip
|
69
|
+
}
|
70
|
+
|
71
|
+
its(:prep_time) { should == nil }
|
72
|
+
its(:published_date) { should == nil }
|
73
|
+
its(:total_time) { should == 35 }
|
74
|
+
its(:yield) { should == nil }
|
75
|
+
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
79
|
+
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require 'hangry'
|
3
|
+
|
4
|
+
describe Hangry do
|
5
|
+
|
6
|
+
context "jamieoliver.com recipe" do
|
7
|
+
let(:html) { File.read("spec/fixtures/hrecipe/jamieoliver.com.html") }
|
8
|
+
subject { Hangry.parse(html) }
|
9
|
+
|
10
|
+
its(:author) { should == "Jamie Oliver" }
|
11
|
+
its(:canonical_url) { should == nil }
|
12
|
+
its(:cook_time) { should == nil }
|
13
|
+
its(:description) { should == "This is a boneless steak cut from the top of the pork shoulder. It doesn't have a rim of fat round the edge, but what it does have is a beautiful marbling of fat through the meat. This keeps the meat deliciously moist while it cooks. The steaks are probably best cooked on a ridged griddle, but you can also pan-fry or roast them. The garlic, sage and lemon add extra flavour to the meat, but don't worry if you don't have them, the dish will work just as well without. Prep time: 10 minutes Cook time: 10 minutes" }
|
14
|
+
its(:image_url) { should == 'http://6f2e58107b6165c9c562-94f33990a658cbe0ad31be70884cbddb.r7.cf1.rackcdn.com/360_1_1349871789_lrg.jpg' }
|
15
|
+
its(:ingredients) {
|
16
|
+
should == [
|
17
|
+
"4 higher-welfare pork neck fillet steaks",
|
18
|
+
"olive oil",
|
19
|
+
"2 cloves garlic, peeled and crushed",
|
20
|
+
"1 handful fresh sage leaves, chopped",
|
21
|
+
"sea salt",
|
22
|
+
"freshly ground black pepper",
|
23
|
+
"1 lemon"
|
24
|
+
]
|
25
|
+
}
|
26
|
+
its(:name) { should == "Neck fillet steak" }
|
27
|
+
its(:nutrition) do
|
28
|
+
should == {
|
29
|
+
calories: nil,
|
30
|
+
cholesterol: nil,
|
31
|
+
fiber: nil,
|
32
|
+
protein: nil,
|
33
|
+
saturated_fat: nil,
|
34
|
+
sodium: nil,
|
35
|
+
sugar: nil,
|
36
|
+
total_carbohydrates: nil,
|
37
|
+
total_fat: nil,
|
38
|
+
trans_fat: nil,
|
39
|
+
unsaturated_fat: nil
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
its(:instructions) {
|
44
|
+
instructions = <<-EOS
|
45
|
+
Get your griddle pan on a high heat and let it get screaming hot. Lay the steaks out on a chopping board and drizzle a little olive oil over each one. Sprinkle over the garlic, sage, a good sprinkling of salt and lots of ground black pepper. Grate the zest of the lemon onto the steaks, then cut the lemon in two and squeeze one of the halves over them as well. Rub this marinade into both sides of each steak with your fingers so they are evenly oiled and seasoned.
|
46
|
+
Place the steaks on your griddle or in a hot frying-pan (they make a bit of smoke, so get your fan on!). Make sure you don't have too many in the pan at one time – there should be a gap between the steaks and they shouldn't be touching each other at all, so if your pan isn't big enough, cook in batches.
|
47
|
+
Turn the steaks over after two minutes, then turn every minute until they've had 8 minutes cooking time in total. Squeeze the other half of the lemon over the cooked steaks and let them sizzle for a moment, then lift them out of the pan with tongs to a plate to rest for a minute before serving. Absolutely delicious served with some oven-baked jacket potato wedges, a lovely green salad and some hot chilli sauce.
|
48
|
+
EOS
|
49
|
+
should == instructions.strip
|
50
|
+
}
|
51
|
+
|
52
|
+
its(:prep_time) { should == nil }
|
53
|
+
its(:published_date) { should == nil }
|
54
|
+
its(:total_time) { should == nil }
|
55
|
+
its(:yield) { should == "4" }
|
56
|
+
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
|
61
|
+
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require 'hangry'
|
3
|
+
|
4
|
+
describe Hangry do
|
5
|
+
|
6
|
+
context "mrfood.com recipe" do
|
7
|
+
let(:html) { File.read("spec/fixtures/hrecipe/mrfood.com.html") }
|
8
|
+
subject { Hangry.parse(html) }
|
9
|
+
|
10
|
+
its(:author) { should == nil }
|
11
|
+
its(:canonical_url) { should == nil }
|
12
|
+
its(:cook_time) { should == nil }
|
13
|
+
its(:description) { should == nil }
|
14
|
+
its(:image_url) { should == "http://cf2.primecp.com/master_images/MrFood/Saucy-Italian-Pot-Roast-RE.jpg" }
|
15
|
+
its(:ingredients) {
|
16
|
+
should == [
|
17
|
+
"1 (8-ounce) package sliced fresh baby Portobello mushrooms",
|
18
|
+
"1 large onion, cut in half and sliced",
|
19
|
+
"1 (2-1/2- to 3-pound boneless chuck roast, trimmed",
|
20
|
+
"1 (1.6-ounce) package garlic-and-herb sauce mix",
|
21
|
+
"1/2 teaspoon crushed red pepper",
|
22
|
+
"2 (14-1/2-ounce) cans Italian-style diced tomatoes, undrained",
|
23
|
+
"1 (8-ounce) can no-salt-added tomato sauce",
|
24
|
+
"2 tablespoons cornstarch",
|
25
|
+
"2 tablespoons water"
|
26
|
+
]
|
27
|
+
}
|
28
|
+
its(:name) { should == "Saucy Italian Pot Roast" }
|
29
|
+
its(:nutrition) do
|
30
|
+
should == {
|
31
|
+
calories: nil,
|
32
|
+
cholesterol: nil,
|
33
|
+
fiber: nil,
|
34
|
+
protein: nil,
|
35
|
+
saturated_fat: nil,
|
36
|
+
sodium: nil,
|
37
|
+
sugar: nil,
|
38
|
+
total_carbohydrates: nil,
|
39
|
+
total_fat: nil,
|
40
|
+
trans_fat: nil,
|
41
|
+
unsaturated_fat: nil
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
its(:instructions) { should == "" }
|
46
|
+
|
47
|
+
its(:prep_time) { should == nil }
|
48
|
+
its(:published_date) { should == nil }
|
49
|
+
its(:total_time) { should == nil }
|
50
|
+
its(:yield) { should == nil }
|
51
|
+
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require 'hangry'
|
3
|
+
|
4
|
+
describe Hangry do
|
5
|
+
|
6
|
+
context "southernfood.about.com recipe" do
|
7
|
+
let(:html) { File.read("spec/fixtures/hrecipe/southernfood.about.com.html") }
|
8
|
+
subject { Hangry.parse(html) }
|
9
|
+
|
10
|
+
its(:author) { should == "Diana Rattray, About.com Guide" }
|
11
|
+
its(:canonical_url) { should == "http://southernfood.about.com/od/collardgreens/r/Kale-Saute-Recipe.htm" }
|
12
|
+
its(:cook_time) { should == nil }
|
13
|
+
its(:description) { should == "This kale recipe is nutritious and delicious, and it's very easy to prepare and cook. There's very little fat in the recipe, and it can be reduced even further by using nonstick cooking spray and a little broth to saute the onion. I used the Portuguese hot crushed red peppers (wet, from jar) in this dish, but feel free to use fresh minced hot peppers for heat. Take a look at the large picture of this kale recipe." }
|
14
|
+
its(:image_url) { should == "http://0.tqn.com/d/southernfood/1/I/r/Q/3/kale-saute-2.jpg" }
|
15
|
+
its(:ingredients) {
|
16
|
+
should == [
|
17
|
+
"1 pound kale, large stems removed, chopped, cooked (or use frozen chopped kale)",
|
18
|
+
"2 teaspoons olive oil",
|
19
|
+
"1/2 cup finely chopped purple onion",
|
20
|
+
"1 medium clove garlic, pressed",
|
21
|
+
"1 or 2 hot peppers, minced, or 1 heaping tablespoon Portuguese crushed red peppers from a jar*",
|
22
|
+
"3 tablespoons red wine vinegar",
|
23
|
+
"1 tomato, chopped",
|
24
|
+
"1/2 teaspoon salt, or to taste",
|
25
|
+
"pepper, to taste"
|
26
|
+
]
|
27
|
+
}
|
28
|
+
its(:name) { should == "Sautéed Kale" }
|
29
|
+
its(:nutrition) do
|
30
|
+
should == {
|
31
|
+
calories: nil,
|
32
|
+
cholesterol: nil,
|
33
|
+
fiber: nil,
|
34
|
+
protein: nil,
|
35
|
+
saturated_fat: nil,
|
36
|
+
sodium: nil,
|
37
|
+
sugar: nil,
|
38
|
+
total_carbohydrates: nil,
|
39
|
+
total_fat: nil,
|
40
|
+
trans_fat: nil,
|
41
|
+
unsaturated_fat: nil
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
its(:instructions) {
|
46
|
+
instructions = <<-EOS
|
47
|
+
To cook the kale, bring a pot of salted water to a boil. Add the chopped kale and boil for 10 to 15 minutes, or until stem portions are tender. Or, follow directions on the package if using frozen kale.
|
48
|
+
Heat olive oil in a large skillet over medium heat; cook onion until just tender. Add the garlic and cook, stirring, for 1 minute. Add crushed red peppers, kale, and vinegar; cook, stirring, for 1 minute longer. Add chopped tomato, salt, and pepper; heat through.
|
49
|
+
Serves 4 to 6.
|
50
|
+
*
|
51
|
+
Portuguese style wet crushed hot red peppers might be found in the ethnic or Spanish section. I found Pastene in my area, but if you can't find the crushed peppers, use any fresh hot chile pepper, finely chopped.
|
52
|
+
EOS
|
53
|
+
should == instructions.strip
|
54
|
+
}
|
55
|
+
|
56
|
+
its(:prep_time) { should == nil }
|
57
|
+
its(:published_date) { should == nil }
|
58
|
+
its(:total_time) { should == 25 }
|
59
|
+
its(:yield) { should == "Serves 4 to 6" }
|
60
|
+
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
64
|
+
|
@@ -4,7 +4,7 @@ require 'hangry'
|
|
4
4
|
describe Hangry do
|
5
5
|
|
6
6
|
context "tasteofhome.com recipe" do
|
7
|
-
let(:html) { File.read("spec/fixtures/tasteofhome.com.html") }
|
7
|
+
let(:html) { File.read("spec/fixtures/hrecipe/tasteofhome.com.html") }
|
8
8
|
subject { Hangry.parse(html) }
|
9
9
|
|
10
10
|
it "should use the correct parser" do
|
@@ -13,8 +13,9 @@ describe Hangry do
|
|
13
13
|
|
14
14
|
its(:author) { should == nil }
|
15
15
|
its(:canonical_url) { should == 'http://www.tasteofhome.com/Recipes/Rhubarb-Popover-Pie' }
|
16
|
-
its(:cook_time) { should ==
|
16
|
+
its(:cook_time) { should == 20 }
|
17
17
|
its(:description) { should == nil }
|
18
|
+
its(:image_url) { should == "//hostedmedia.reimanpub.com/TOH/Images/Photos/37/exps49051_HCA1864839B02_17_3bC.jpg" }
|
18
19
|
its(:ingredients) {
|
19
20
|
should == [
|
20
21
|
"1/2 cup all-purpose flour",
|
@@ -58,7 +59,7 @@ Meanwhile, in a large skillet, saute rhubarb and pineapple in butter until rhuba
|
|
58
59
|
should == instructions.strip
|
59
60
|
}
|
60
61
|
|
61
|
-
its(:prep_time) { should ==
|
62
|
+
its(:prep_time) { should == 25 }
|
62
63
|
its(:published_date) { should == nil }
|
63
64
|
its(:total_time) { should == 45 }
|
64
65
|
its(:yield) { should == "Yield: 6 Servings" }
|