nutrition 1.0.2.pre → 1.0.3.pre
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/lib/nutrition/ingredient.rb +1 -1
- data/lib/nutrition/recipe.rb +21 -2
- metadata +33 -33
- /data/lib/nutrition/{ingredients → ingredient}/almond.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/basil_leaf.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/cheese.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/cheese_cottage.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/cheese_mozzarella.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/chicken_breast.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/cumin.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/egg.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/egg_white.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/flaxseed.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/flour_whole_wheat_pastry.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/garlic.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/garlic_powder.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/jalepeno.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/meat.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/milk_low_fat.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/nonstick_cooking_spray.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/olive_oil.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/onion.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/parmesan.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/peach.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/pepper.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/rice.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/salt.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/spinach.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/tomato_roma.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/water.rb +0 -0
- /data/lib/nutrition/{ingredients → ingredient}/yogurt.rb +0 -0
- /data/lib/nutrition/{recipes → recipe}/breakfast_muffin_cups_to_go.rb +0 -0
- /data/lib/nutrition/{recipes → recipe}/peaches_n_cream_parfait.rb +0 -0
- /data/lib/nutrition/{recipes → recipe}/tomato_pesto_egg_white_omelet.rb +0 -0
- /data/lib/nutrition/{recipes → recipe}/whole_wheat_crepes_florentine.rb +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 372bdcebb1a6097af9b0e0f47e4ac062968ac20b
|
|
4
|
+
data.tar.gz: 2df7fb525707886fb0ea0c3ba00bde5e071ce26f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f253d1a9577a38b698c411513aa48c0fb254f10f9b709860db027025ff8f3466f6c83f1115ab658ed4a4c41266a2ebb95594e3bc4d7048ce2ed45e634631a63e
|
|
7
|
+
data.tar.gz: 25308b3c1865ceb20c419ed4e163857322fa5b709b17d52a55d39cf11848f2f17693811a2bc48ba69cb6551c0f9db28711a6ffcb92406db247ba573eb1ec24e9
|
data/lib/nutrition/ingredient.rb
CHANGED
data/lib/nutrition/recipe.rb
CHANGED
|
@@ -13,9 +13,27 @@ class Nutrition
|
|
|
13
13
|
SOUP = 'Soup'
|
|
14
14
|
|
|
15
15
|
def self.all
|
|
16
|
-
Dir["./lib/nutrition/
|
|
16
|
+
Dir["./lib/nutrition/recipe/*.rb"].map { |f| f.split("/")
|
|
17
|
+
.last
|
|
18
|
+
.gsub(".rb", "")
|
|
19
|
+
.gsub("_", "-") }
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
##
|
|
23
|
+
# Nutrition::Recipe.find("breakfast-muffin-cups-to-go")
|
|
24
|
+
# =>
|
|
25
|
+
def self.find(slug)
|
|
26
|
+
klass = slug.split("-").map(&:capitalize).join("")
|
|
27
|
+
Nutrition::Recipe.const_get(klass).new
|
|
17
28
|
end
|
|
18
29
|
|
|
30
|
+
##
|
|
31
|
+
# Nutrition::Recipe.BreakfastMuffinCupsToGo.slug
|
|
32
|
+
# => "breakfast-muffin-cups-to-go"
|
|
33
|
+
def self.slug
|
|
34
|
+
self.to_s.split("::").last.gsub(/([^\^])([A-Z])/,'\1-\2').split("-").map(&:downcase).join("-")
|
|
35
|
+
end
|
|
36
|
+
|
|
19
37
|
def tags
|
|
20
38
|
[]
|
|
21
39
|
end
|
|
@@ -23,7 +41,8 @@ class Nutrition
|
|
|
23
41
|
def to_s
|
|
24
42
|
self.class.to_s.split("::").last.gsub(/([^\^])([A-Z])/,'\1 \2')
|
|
25
43
|
end
|
|
44
|
+
|
|
26
45
|
end
|
|
27
46
|
end
|
|
28
47
|
|
|
29
|
-
Dir["./lib/nutrition/
|
|
48
|
+
Dir["./lib/nutrition/recipe/*.rb"].each { |file| require file }
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nutrition
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.3.pre
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Teo Dell'Amico
|
|
@@ -18,40 +18,40 @@ extra_rdoc_files: []
|
|
|
18
18
|
files:
|
|
19
19
|
- lib/nutrition.rb
|
|
20
20
|
- lib/nutrition/ingredient.rb
|
|
21
|
-
- lib/nutrition/
|
|
22
|
-
- lib/nutrition/
|
|
23
|
-
- lib/nutrition/
|
|
24
|
-
- lib/nutrition/
|
|
25
|
-
- lib/nutrition/
|
|
26
|
-
- lib/nutrition/
|
|
27
|
-
- lib/nutrition/
|
|
28
|
-
- lib/nutrition/
|
|
29
|
-
- lib/nutrition/
|
|
30
|
-
- lib/nutrition/
|
|
31
|
-
- lib/nutrition/
|
|
32
|
-
- lib/nutrition/
|
|
33
|
-
- lib/nutrition/
|
|
34
|
-
- lib/nutrition/
|
|
35
|
-
- lib/nutrition/
|
|
36
|
-
- lib/nutrition/
|
|
37
|
-
- lib/nutrition/
|
|
38
|
-
- lib/nutrition/
|
|
39
|
-
- lib/nutrition/
|
|
40
|
-
- lib/nutrition/
|
|
41
|
-
- lib/nutrition/
|
|
42
|
-
- lib/nutrition/
|
|
43
|
-
- lib/nutrition/
|
|
44
|
-
- lib/nutrition/
|
|
45
|
-
- lib/nutrition/
|
|
46
|
-
- lib/nutrition/
|
|
47
|
-
- lib/nutrition/
|
|
48
|
-
- lib/nutrition/
|
|
21
|
+
- lib/nutrition/ingredient/almond.rb
|
|
22
|
+
- lib/nutrition/ingredient/basil_leaf.rb
|
|
23
|
+
- lib/nutrition/ingredient/cheese.rb
|
|
24
|
+
- lib/nutrition/ingredient/cheese_cottage.rb
|
|
25
|
+
- lib/nutrition/ingredient/cheese_mozzarella.rb
|
|
26
|
+
- lib/nutrition/ingredient/chicken_breast.rb
|
|
27
|
+
- lib/nutrition/ingredient/cumin.rb
|
|
28
|
+
- lib/nutrition/ingredient/egg.rb
|
|
29
|
+
- lib/nutrition/ingredient/egg_white.rb
|
|
30
|
+
- lib/nutrition/ingredient/flaxseed.rb
|
|
31
|
+
- lib/nutrition/ingredient/flour_whole_wheat_pastry.rb
|
|
32
|
+
- lib/nutrition/ingredient/garlic.rb
|
|
33
|
+
- lib/nutrition/ingredient/garlic_powder.rb
|
|
34
|
+
- lib/nutrition/ingredient/jalepeno.rb
|
|
35
|
+
- lib/nutrition/ingredient/meat.rb
|
|
36
|
+
- lib/nutrition/ingredient/milk_low_fat.rb
|
|
37
|
+
- lib/nutrition/ingredient/nonstick_cooking_spray.rb
|
|
38
|
+
- lib/nutrition/ingredient/olive_oil.rb
|
|
39
|
+
- lib/nutrition/ingredient/onion.rb
|
|
40
|
+
- lib/nutrition/ingredient/parmesan.rb
|
|
41
|
+
- lib/nutrition/ingredient/peach.rb
|
|
42
|
+
- lib/nutrition/ingredient/pepper.rb
|
|
43
|
+
- lib/nutrition/ingredient/rice.rb
|
|
44
|
+
- lib/nutrition/ingredient/salt.rb
|
|
45
|
+
- lib/nutrition/ingredient/spinach.rb
|
|
46
|
+
- lib/nutrition/ingredient/tomato_roma.rb
|
|
47
|
+
- lib/nutrition/ingredient/water.rb
|
|
48
|
+
- lib/nutrition/ingredient/yogurt.rb
|
|
49
49
|
- lib/nutrition/plan.rb
|
|
50
50
|
- lib/nutrition/recipe.rb
|
|
51
|
-
- lib/nutrition/
|
|
52
|
-
- lib/nutrition/
|
|
53
|
-
- lib/nutrition/
|
|
54
|
-
- lib/nutrition/
|
|
51
|
+
- lib/nutrition/recipe/breakfast_muffin_cups_to_go.rb
|
|
52
|
+
- lib/nutrition/recipe/peaches_n_cream_parfait.rb
|
|
53
|
+
- lib/nutrition/recipe/tomato_pesto_egg_white_omelet.rb
|
|
54
|
+
- lib/nutrition/recipe/whole_wheat_crepes_florentine.rb
|
|
55
55
|
- lib/nutrition/serving.rb
|
|
56
56
|
homepage: http://rubygems.org/gems/nutrition
|
|
57
57
|
licenses:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|