Skip to content

Commit

Permalink
Adding metric system to food measurements
Browse files Browse the repository at this point in the history
Closes #922
  • Loading branch information
Mirv authored and stympy committed Jul 12, 2017
1 parent 1cecbb7 commit 802423f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions doc/food.md
@@ -1,11 +1,16 @@
# Faker::Food

```ruby

Faker::Food.dish #=> "Caesar Salad"

Faker::Food.ingredient #=> "Sweet Potato"

Faker::Food.spice #=> "Caraway Seed"

Faker::Food.measurement #=> "1/4 tablespoon"

Faker::Food.metric_measurement #=> "centiliter"


```
4 changes: 4 additions & 0 deletions lib/faker/food.rb
Expand Up @@ -16,6 +16,10 @@ def spice
def measurement
fetch('food.measurement_sizes') + ' ' + fetch('food.measurements')
end

def metric_measurement
fetch('food.metric_measurements')
end
end
end
end
1 change: 1 addition & 0 deletions lib/locales/en.yml
Expand Up @@ -452,6 +452,7 @@ en:
spices: ["Achiote Seed", "Ajwain Seed", "Ajwan Seed", "Allspice Ground", "Allspice Whole", "Amchoor", "Anise", "Anise Star", "Aniseed Whole", "Annatto Seed", "Arrowroot", "Asafoetida", "Baharat", "Balti Masala", "Balti Stir Fry Mix", "Basil", "Bay Leaves", "Bay Leaves Chopped", "BBQ Seasoning", "Biryani Spice Mix", "Cajun Seasoning", "Caraway Seed", "Cardamom Ground", "Cardamom Whole", "Cassia", "Cassia Bark", "Cayenne Pepper", "Celery Leaf", "Celery Salt", "Celery Seed", "Chamomile", "Chervil", "Chicken Seasoning", "Chilli Crushed", "Chilli Ground", "Chilli Pepper", "Chillies Whole", "China Star", "Chinese 5 Spice", "Chives", "Cinnamon Bark", "Cinnamon Ground", "Cinnamon Powder", "Cinnamon Sticks", "Cloves Ground", "Cloves Whole", "Colombo Powder", "Coriander Ground", "Coriander Leaf", "Coriander Seed", "Creole Seasoning", "Cumin Ground", "Cumin Seed", "Cumin Seed Black", "Cumin Seed Royal", "Curly Leaf Parsley", "Curry Chinese", "Curry Hot", "Curry Leaves", "Curry Madras Medium", "Curry Mild", "Curry Thai Green", "Curry Thai Red", "Dhansak Spice Mix", "Dill Herb", "Dill Leaf", "Dill Seed", "Fajita Seasoning", "Fennel Seed", "Fenugreek Ground", "Fenugreek Leaf", "Fenugreek Seed", "Fines Herbes", "Fish Seasoning", "Five Spice Mix", "French Lavender", "Galangal Ground", "Garam Masala", "Garlic Chips", "Garlic Granules", "Garlic Powder", "Garlic Salt", "German Chamomile", "Ginger Root", "Ginger Ground", "Green Cardamom", "Herbes de Provence", "Jalfrezi Curry Powder", "Jalfrezi Mix", "Jerk Seasoning", "Juniper Berries", "Kaffir Leaves", "Korma Curry Powder", "Korma Mix", "Lamb Seasoning", "Lavender", "Lemon Grass", "Lemon Grass Chopped", "Lemon Pepper", "Lime Leaves", "Lime Leaves Ground", "Liquorice Root", "Mace Ground", "Mace Whole", "Mango Powder", "Marjoram", "Methi", "Methi Leaves", "Mexican Salsa Mix", "Mint", "Mixed Herbs", "Mixed Spice", "Mulled Cider Spices", "Mulled Wine Spices", "Mustard Powder", "Mustard Seed Black", "Mustard Seed Brown", "Mustard Seed White", "Mustard Seed Yellow", "Nigella", "Nutmeg Ground", "Nutmeg Whole", "Onion Seed", "Orange Zest", "Oregano", "Paella Seasoning", "Paprika", "Paprika Hungarian", "Paprika Smoked", "Parsley", "Parsley Flat Leaf", "Pepper Black Coarse", "Pepper Black Ground", "Pepper White Ground", "Peppercorns Black", "Peppercorns Cracked Black", "Peppercorns Green", "Peppercorns Mixed", "Peppercorns Pink", "Peppercorns Szechwan", "Peppercorns White", "Pickling Spice", "Pimento Berries", "Pimento Ground", "Piri Piri Seasoning", "Pizza Topping Mix", "Poppy Seed", "Pot Marjoram", "Poudre de Colombo", "Ras-el-Hanout", "Rice Paper", "Rogan Josh Curry Powder", "Rogan Josh Mix", "Rose Baie", "Rosemary", "Saffron", "Sage", "Sea Salt Coarse", "Seasoning Salt", "Self Adhesive Spice Labels", "Sesame Seed", "Spearmint", "Spice Charts", "Steak Seasoning", "Sumac Ground", "Sweet Basil", "Sweet Laurel", "Tagine Seasoning", "Tandoori Masala", "Tandoori Mix", "Tarragon", "Thai Creen Curry Mix", "Thai Red Curry Mix", "Thai Stir Fry", "Thyme", "Tikka Masala", "Tikka Masala Curry Powder", "Turmeric", "Turmeric Powder", "Vanilla Bean", "Vanilla Pods", "Vegetable Seasoning", "Zahtar Spice Mix"]
measurements: ["teaspoon", "tablespoon", "cup", "pint", "quart", "gallon"]
measurement_sizes: ["1/4", "1/3", "1/2", "1", "2", "3"]
metric_measurements: ["milliliter", "deciliter", "centiliter", "liter"]
esports:
players: ["Froggen", "Dendi", "Surefour", "Seagull", "xPeke", "shroud", "KennyS", "pasha", "RamboRay", "Crimsix", "ACE", "Grubby", "f0rest", "cArn", "Flash", "Faker", "Boxer"]
teams: ["Dignitas", "OpTic", "FaZe", "iBUYPOWER", "Evil Genius", "Ninjas in Pajamas", "NaVi", "SoloMid", "Cloud9", "fnatic", "CLG", "EnVyUs", "Virtus Pro"]
Expand Down
5 changes: 4 additions & 1 deletion test/test_faker_food.rb
Expand Up @@ -20,5 +20,8 @@ def test_spice
def test_measurement
assert @tester.measurement.split(" ").length == 2
end


def test_metric_measurement
assert @tester.metric_measurement.match(/\w+/)
end
end

0 comments on commit 802423f

Please sign in to comment.