From faa674f315d314c3b9ec3e3e5cf57ac27897cea7 Mon Sep 17 00:00:00 2001 From: vikingcode Date: Thu, 19 Feb 2015 20:50:37 +1100 Subject: [PATCH 1/3] The most important command. This is literally the recipe that inspired the name and was used for the photo on http://code52.org/pretzel/ --- src/Pretzel/Commands/HungryCommand.cs | 73 +++++++++++++++++++++++++++ src/Pretzel/Pretzel.csproj | 1 + 2 files changed, 74 insertions(+) create mode 100644 src/Pretzel/Commands/HungryCommand.cs diff --git a/src/Pretzel/Commands/HungryCommand.cs b/src/Pretzel/Commands/HungryCommand.cs new file mode 100644 index 000000000..7ce6b1106 --- /dev/null +++ b/src/Pretzel/Commands/HungryCommand.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.Composition; +using System.IO; +using Pretzel.Logic.Extensions; + +namespace Pretzel.Commands +{ + [PartCreationPolicy(CreationPolicy.Shared)] + [CommandInfo(CommandName = "hungry")] + public sealed class HungryCommand : ICommand + { + + + private string recipe = @"===== Ingredients ====== + +== Dough==== +2 ½ cups Plain Flour +½ teaspoon salt +1 teaspoon sugar +2 ¼ teaspoons dried yeast +1 cup warm water + +== Topping==== +½ cup warm water +2 tablespoons baking soda +coarse salt(sea salt, for example) +2 tablespoons unsalted butter, melted OR about a tablespoon of olive oil +If you want to make sweet pretzels rather than savoury/traditional pretzels, replace the coarse salt topping with a mixture of cocoa, cinnamon and a little icing sugar. + + +===== Process ====== +1. Place all of the dough ingredients into a bowl, and beat till well-combined.Knead the dough, for about 5 minutes, till it's soft, smooth, and quite slack. + +2. Flour the dough in a bowl, cover and allow it to rest for 30 minutes. + +3. Preheat your oven to 240°C (fan forced, 260c fanless). + +4. Prepare two baking sheets/trays by spraying them with oil spray, or lining them with baking paper. + +5. Transfer the dough to a lightly greased work surface, and divide it into eight equal pieces (about 70g each). Allow the pieces to rest, uncovered, for 5 minutes. + +6. While the dough is resting, combine the 1/2 cup warm water and the baking soda, and place it in a shallow bowl.Make sure the baking soda is thoroughly dissolved; if it isn't, it'll make your pretzels splotchy. + +7. Roll each piece of dough into a long, thin rope(about 70cm long), and twist each rope into a pretzel.Dip each pretzel in the baking soda wash(this will give the pretzels a nice, golden-brown color), and place them on the baking sheets.Sprinkle lightly with salt(or sweet pretzel mix outlined above). Allow them to rest, uncovered, for 10 minutes. + +8. Bake the pretzels for 7 to 8 minutes, or until they're golden brown, reversing the baking sheets halfway through. + +9. Remove the pretzels from the oven, and brush them thoroughly with the melted butter(or oil). + + +Eat the pretzels warm, or reheat them in an oven or microwave."; + + public void Execute(IEnumerable arguments) + { + Tracing.Info(recipe); + } + + public void WriteHelp(TextWriter writer) + { + writer.Write(recipe); + return; + var textWriter = new StringWriter(); + var strings = recipe.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); + + foreach (var line in recipe) + { + writer.WriteLine(line); + } + } + + } +} \ No newline at end of file diff --git a/src/Pretzel/Pretzel.csproj b/src/Pretzel/Pretzel.csproj index 31de59eb3..cf8d4cf51 100644 --- a/src/Pretzel/Pretzel.csproj +++ b/src/Pretzel/Pretzel.csproj @@ -129,6 +129,7 @@ + From ac84fad9f0decfc3c0a999df62509fc368b261fb Mon Sep 17 00:00:00 2001 From: vikingcode Date: Thu, 19 Feb 2015 21:02:55 +1100 Subject: [PATCH 2/3] Oops, think before you commit --- src/Pretzel/Commands/HungryCommand.cs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/Pretzel/Commands/HungryCommand.cs b/src/Pretzel/Commands/HungryCommand.cs index 7ce6b1106..2bba1d8db 100644 --- a/src/Pretzel/Commands/HungryCommand.cs +++ b/src/Pretzel/Commands/HungryCommand.cs @@ -59,14 +59,6 @@ public void Execute(IEnumerable arguments) public void WriteHelp(TextWriter writer) { writer.Write(recipe); - return; - var textWriter = new StringWriter(); - var strings = recipe.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); - - foreach (var line in recipe) - { - writer.WriteLine(line); - } } } From 2197197d9c987cf0a1955d6cbd1278be492016fa Mon Sep 17 00:00:00 2001 From: vikingcode Date: Fri, 20 Feb 2015 07:18:16 +1100 Subject: [PATCH 3/3] Less obnoxious help --- src/Pretzel/Commands/HungryCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Pretzel/Commands/HungryCommand.cs b/src/Pretzel/Commands/HungryCommand.cs index 2bba1d8db..5a474c267 100644 --- a/src/Pretzel/Commands/HungryCommand.cs +++ b/src/Pretzel/Commands/HungryCommand.cs @@ -58,7 +58,7 @@ public void Execute(IEnumerable arguments) public void WriteHelp(TextWriter writer) { - writer.Write(recipe); + writer.Write(" For use only when hungry\r\n"); } }