jekyll-cooklang-converter 0.3.0 → 0.4.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 +4 -4
- data/clash/test-site/_expected/recipes/baked-ziti.html +1 -1
- data/clash/test-site/_recipes/baked-ziti.cook +1 -1
- data/clash/test-site/_site/recipes/baked-ziti.html +1 -1
- data/lib/jekyll/converters/cooklang.rb +18 -10
- data/lib/jekyll-cooklang-converter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12645bcaffa4192f683b66dba99bab13816c443e95bfc230aefe1300b3a34cb6
|
4
|
+
data.tar.gz: e41ce8b50f24b7ca9f78eb74016dc2a5802b90e7a87f05c95577ccfa2a2b9bf8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce4a582b365abf71907ca9b219835738be2a03339390e840a0cadb3d35c66b4686e6a75e86476c8749c55e6ed48cf9e20a8b4fec0209e76a6bbf07c09fe94645
|
7
|
+
data.tar.gz: 21e44551283bd5a9e2f4a01670a885bd19a654b7279a20e4910d2e7d8897f2392a42603903621983873319a706beabbbcf4c23a6846976dd420face48fda39fe
|
@@ -2,7 +2,7 @@
|
|
2
2
|
---
|
3
3
|
set a #pot of water on the stove, to boil (you'll need for pasta later), and preheat the oven to 350
|
4
4
|
|
5
|
-
cut @mushrooms{1%box} into slices, and sautee (no oil) in a pan over medium high heat until browned. Set aside
|
5
|
+
cut @mushrooms{1/2%box} into slices, and sautee (no oil) in a pan over medium high heat until browned. Set aside
|
6
6
|
|
7
7
|
brown @ground sausage{1%pound} in the same pan, seasoning with @garlic powder{}, @italian seasoning{}, and @chili powder{} set aside
|
8
8
|
|
@@ -12,9 +12,17 @@ module Jekyll
|
|
12
12
|
|
13
13
|
class Ingredient < ToHTML
|
14
14
|
def initialize(quantity, unit, name)
|
15
|
-
@name = name
|
16
|
-
@unit = unit
|
17
|
-
@quantity = quantity
|
15
|
+
@name = name.to_s
|
16
|
+
@unit = unit.to_s
|
17
|
+
@quantity = if quantity.respond_to? :rationalize
|
18
|
+
if quantity.rationalize(0.1).denominator == 1
|
19
|
+
quantity.to_s
|
20
|
+
else
|
21
|
+
quantity.rationalize(0.1).to_s
|
22
|
+
end
|
23
|
+
else
|
24
|
+
quantity.to_s
|
25
|
+
end
|
18
26
|
end
|
19
27
|
|
20
28
|
def to_html
|
@@ -25,9 +33,9 @@ module Jekyll
|
|
25
33
|
|
26
34
|
class Timer < ToHTML
|
27
35
|
def initialize(quantity, unit, name)
|
28
|
-
@name = name
|
29
|
-
@unit = unit
|
30
|
-
@quantity = quantity
|
36
|
+
@name = name.to_s
|
37
|
+
@unit = unit.to_s
|
38
|
+
@quantity = quantity.to_s
|
31
39
|
end
|
32
40
|
|
33
41
|
def to_html
|
@@ -38,8 +46,8 @@ module Jekyll
|
|
38
46
|
|
39
47
|
class CookWare < ToHTML
|
40
48
|
def initialize(quantity, name)
|
41
|
-
@name = name
|
42
|
-
@quantity = quantity
|
49
|
+
@name = name.to_s
|
50
|
+
@quantity = quantity.to_s
|
43
51
|
end
|
44
52
|
|
45
53
|
def to_html
|
@@ -112,13 +120,13 @@ module Jekyll
|
|
112
120
|
ingredients = recipe["steps"].flatten.select { |item|
|
113
121
|
item["type"] == "ingredient"
|
114
122
|
}.map { |item|
|
115
|
-
Ingredient.new(item["quantity"]
|
123
|
+
Ingredient.new(item["quantity"], item["units"], item["name"])
|
116
124
|
}
|
117
125
|
|
118
126
|
cookware = recipe["steps"].flatten.select { |item|
|
119
127
|
item["type"] == "cookware"
|
120
128
|
}.map { |item|
|
121
|
-
CookWare.new(item["quantity"]
|
129
|
+
CookWare.new(item["quantity"], item["name"])
|
122
130
|
}
|
123
131
|
|
124
132
|
steps = recipe["steps"].map do |step|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-cooklang-converter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BraeTroutman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|