hangry 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -0
- data/lib/hangry/hrecipe_parser.rb +61 -0
- data/lib/hangry/recipe_parser.rb +61 -0
- data/lib/hangry/schema_org_recipe_parser.rb +70 -0
- data/lib/hangry/version.rb +1 -1
- data/lib/hangry.rb +9 -107
- data/spec/fixtures/epicurious.html +3610 -0
- data/spec/real_examples/epicurious_spec.rb +50 -0
- data/spec/real_examples/food_network_spec.rb +1 -1
- metadata +18 -11
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'hangry'
|
2
|
+
|
3
|
+
describe Hangry do
|
4
|
+
|
5
|
+
context "epicurious.com recipe" do
|
6
|
+
subject { Hangry.parse(File.read("spec/fixtures/epicurious.html")) }
|
7
|
+
|
8
|
+
its(:author) { should == "by Janet Taylor McCracken" }
|
9
|
+
its(:cook_time) { should == nil }
|
10
|
+
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." }
|
11
|
+
its(:prep_time) { should == nil }
|
12
|
+
its(:total_time) { should == 40 }
|
13
|
+
its(:ingredients) {
|
14
|
+
should == [
|
15
|
+
'1/2 teaspoon cumin seeds',
|
16
|
+
'1/2 teaspoon coriander seeds',
|
17
|
+
'1/2 cup mayonnaise',
|
18
|
+
'2 tablespoons extra-virgin olive oil plus additional for brushing',
|
19
|
+
'2 teaspoons fresh lemon juice',
|
20
|
+
'1 1/2 teaspoons smoked paprika',
|
21
|
+
'1 garlic clove, pressed',
|
22
|
+
'1 pound ground dark-meat turkey',
|
23
|
+
'4 1/3 -inch-thick red onion slices',
|
24
|
+
'1 large or 2 small red bell peppers, quartered',
|
25
|
+
'4 slices white cheddar cheese or Monterey Jack cheese',
|
26
|
+
'4 sesame-seed hamburger buns',
|
27
|
+
'Arugula',
|
28
|
+
'Pickle wedges',
|
29
|
+
'Corn chips',
|
30
|
+
]
|
31
|
+
}
|
32
|
+
|
33
|
+
its(:instructions) do
|
34
|
+
instructions = <<-eos
|
35
|
+
Preparation Toast cumin seeds and coriander seeds in small skillet over medium-high heat until aromatic and slightly darker in color, shaking skillet often, about 1 1/2 minutes. Cool. Finely grind toasted seeds in spice grinder or in mortar with pestle. Whisk mayonnaise, 2 tablespoons extra-virgin olive oil, fresh lemon juice, smoked paprika, garlic, and ground spices in small bowl. Season aioli to taste with salt and pepper. DO AHEAD: Aioli can be made 1 day ahead. Cover and refrigerate. Place turkey in medium bowl. Add 2 tablespoons aioli; mix gently. Using damp hands, divide turkey mixture into 4 equal portions, then form each into scant 3/4-inch thick patty, about 3 1/2 inches in diameter. Using thumb, make small indentation in center of each burger. DO AHEAD: Can be made 4 hours ahead. Cover and chill. Prepare barbecue (medium-high heat). Sprinkle burgers with salt and pepper. Brush onion slices and bell pepper pieces with oil; sprinkle with salt and pepper. Grill onions and bell peppers until soft and charred, about 4 minutes per side. Grill turkey burgers 5 minutes. Turn over; grill until almost cooked through, about 4 minutes. Top each burger with 1 cheese slice and grill until meat is cooked through and cheese melts, about 1 minute longer. Place 1 turkey burger on each of 4 bun bottoms. Arrange grilled red pepper pieces, then grilled red onion slices over. Top each with dollop of aioli and some arugula. Cover burgers with bun tops and serve with pickle wedges and corn chips. add your own note
|
36
|
+
eos
|
37
|
+
should == instructions.strip
|
38
|
+
end
|
39
|
+
|
40
|
+
its(:name) { should == "Grilled Turkey Burgers with Cheddar and Smoky Aioli" }
|
41
|
+
its(:published_date) { should == nil }
|
42
|
+
its(:yield) { should == "Makes 4" }
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
|
@@ -31,7 +31,7 @@ describe Hangry do
|
|
31
31
|
|
32
32
|
its(:instructions) do
|
33
33
|
instructions = <<-instructions
|
34
|
-
Place breasts in the center of a plastic food storage bag or 2 large sheets of waxed paper. Pound out the chicken from the center of the bag outward using a heavy-bottomed skillet or mallet. Be firm but controlled with your strokes
|
34
|
+
Place breasts in the center of a plastic food storage bag or 2 large sheets of waxed paper. Pound out the chicken from the center of the bag outward using a heavy-bottomed skillet or mallet. Be firm but controlled with your strokes. Defrost spinach in the microwave. Transfer spinach to a kitchen towel. Twist towel around spinach and wring it out until very dry. Transfer to a medium-mixing bowl. Place a nonstick skillet over moderate heat. When skillet is hot, add butter, mushrooms, garlic and shallot. Season with salt and pepper and saute 5 minutes. Transfer mushrooms, garlic and shallot to the food processor. Pulse to grind the mushrooms and transfer to the mixing bowl, adding the processed mushrooms to the spinach. Add ricotta and grated cheese to the bowl and the nutmeg. Stir to combine the stuffing. Return your skillet to the stove over medium high heat. Place a mound of stuffing on each breast and wrap and roll breast over the stuffing. Secure breasts with toothpicks. Add 3 tablespoons oil to the pan, 3 turns of the pan. Add breasts to the pan and brown on all sides, cooking chicken 10 to 12 minutes. The meat will cook quickly because it is thin. Remove breasts; add butter to the pan and flour. Cook butter and flour for a minute, whisk in wine and reduce another minute. Whisk in broth and return breasts to the pan. Reduce heat and simmer until ready to serve. Remove toothpicks. Serve breasts whole or, remove from pan, slice on an angle and fan out on dinner plates. Top stuffed chicken breasts or sliced stuffed breasts with generous spoonfuls of the sauce.
|
35
35
|
instructions
|
36
36
|
should == instructions.strip
|
37
37
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hangry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2013-03-04 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70248850218560 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70248850218560
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: pry
|
27
|
-
requirement: &
|
27
|
+
requirement: &70248850218140 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70248850218140
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: activesupport
|
38
|
-
requirement: &
|
38
|
+
requirement: &70248850217640 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '3.0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70248850217640
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: iso8601
|
49
|
-
requirement: &
|
49
|
+
requirement: &70248850217140 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 0.4.0
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70248850217140
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: nokogiri
|
60
|
-
requirement: &
|
60
|
+
requirement: &70248835278280 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: '1.5'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70248835278280
|
69
69
|
description: A recipe microformat parser.
|
70
70
|
email:
|
71
71
|
- ian@iancanderson.com
|
@@ -80,11 +80,16 @@ files:
|
|
80
80
|
- Rakefile
|
81
81
|
- hangry.gemspec
|
82
82
|
- lib/hangry.rb
|
83
|
+
- lib/hangry/hrecipe_parser.rb
|
84
|
+
- lib/hangry/recipe_parser.rb
|
85
|
+
- lib/hangry/schema_org_recipe_parser.rb
|
83
86
|
- lib/hangry/version.rb
|
84
87
|
- spec/fixtures/allrecipes.html
|
88
|
+
- spec/fixtures/epicurious.html
|
85
89
|
- spec/fixtures/food_network_schema_org.html
|
86
90
|
- spec/hangry_spec.rb
|
87
91
|
- spec/real_examples/all_recipes_spec.rb
|
92
|
+
- spec/real_examples/epicurious_spec.rb
|
88
93
|
- spec/real_examples/food_network_spec.rb
|
89
94
|
homepage: https://github.com/iancanderson/hangry
|
90
95
|
licenses: []
|
@@ -112,7 +117,9 @@ specification_version: 3
|
|
112
117
|
summary: Parses microformatted recipe HTML into a plain-old-ruby Recipe object.
|
113
118
|
test_files:
|
114
119
|
- spec/fixtures/allrecipes.html
|
120
|
+
- spec/fixtures/epicurious.html
|
115
121
|
- spec/fixtures/food_network_schema_org.html
|
116
122
|
- spec/hangry_spec.rb
|
117
123
|
- spec/real_examples/all_recipes_spec.rb
|
124
|
+
- spec/real_examples/epicurious_spec.rb
|
118
125
|
- spec/real_examples/food_network_spec.rb
|