Permalink
Browse files

line endings cleanup

  • Loading branch information...
shiftbot committed Mar 19, 2013
1 parent b918c32 commit a8bcc894ca737414a0b33461c8b35c763a044aff
Showing with 18,051 additions and 18,051 deletions.
  1. +21 −21 LICENSE.md
  2. +129 −129 src/Pretzel.Logic/Commands/CommandParameters.cs
  3. +19 −19 src/Pretzel.Logic/Extensibility/Extensions/PrettifyUrlFilter.cs
  4. +28 −28 src/Pretzel.Logic/Extensibility/Extensions/SlugifyFilter.cs
  5. +30 −30 src/Pretzel.Logic/Extensibility/Extensions/WebSequenceDiagrams.cs
  6. +9 −9 src/Pretzel.Logic/Extensibility/IContentTransform.cs
  7. +6 −6 src/Pretzel.Logic/Extensibility/IFilter.cs
  8. +10 −10 src/Pretzel.Logic/Extensibility/IHaveCommandLineArgs.cs
  9. +33 −33 src/Pretzel.Logic/Extensions/Logger.cs
  10. +560 −560 src/Pretzel.Logic/Extensions/StringExtensions.cs
  11. +29 −29 src/Pretzel.Logic/Extensions/Tracing.cs
  12. +109 −109 src/Pretzel.Logic/Extensions/YamlExtensions.cs
  13. +3 −3 src/Pretzel.Logic/Import/WordpressImport.cs
  14. +2 −2 src/Pretzel.Logic/Liquid/HighlightBlock.cs
  15. +11 −11 src/Pretzel.Logic/Liquid/XmlEscapeFilter.cs
  16. +10 −10 src/Pretzel.Logic/Minification/ITransform.cs
  17. +1 −1 src/Pretzel.Logic/Minification/JsMinifier.cs
  18. +121 −121 src/Pretzel.Logic/Minification/LessTransform.cs
  19. +228 −228 src/Pretzel.Logic/Pretzel.Logic.csproj
  20. +13 −13 src/Pretzel.Logic/Pretzel.Logic.ncrunchproject
  21. +225 −225 src/Pretzel.Logic/Properties/Liquid.Designer.cs
  22. +144 −144 src/Pretzel.Logic/Properties/Liquid.resx
  23. +222 −222 src/Pretzel.Logic/Properties/Razor.Designer.cs
  24. +144 −144 src/Pretzel.Logic/Properties/Razor.resx
  25. +135 −135 src/Pretzel.Logic/Properties/Resources.resx
  26. +100 −100 src/Pretzel.Logic/Properties/Resources1.Designer.cs
  27. +103 −103 src/Pretzel.Logic/Recipe/Recipe.cs
  28. +10 −10 src/Pretzel.Logic/Resources/Liquid/About.liquid
  29. +28 −28 src/Pretzel.Logic/Resources/Liquid/Atom.liquid
  30. +1 −1 src/Pretzel.Logic/Resources/Liquid/Config.liquid
  31. +63 −63 src/Pretzel.Logic/Resources/Liquid/Index.liquid
  32. +31 −31 src/Pretzel.Logic/Resources/Liquid/Layout.liquid
  33. +37 −37 src/Pretzel.Logic/Resources/Liquid/Post.liquid
  34. +26 −26 src/Pretzel.Logic/Resources/Liquid/Rss.liquid
  35. +10 −10 src/Pretzel.Logic/Resources/Razor/About.cshtml
  36. +31 −31 src/Pretzel.Logic/Resources/Razor/Atom.cshtml
  37. +1 −1 src/Pretzel.Logic/Resources/Razor/Config.cshtml
  38. +74 −74 src/Pretzel.Logic/Resources/Razor/Index.cshtml
  39. +33 −33 src/Pretzel.Logic/Resources/Razor/Layout.cshtml
  40. +49 −49 src/Pretzel.Logic/Resources/Razor/Post.cshtml
  41. +29 −29 src/Pretzel.Logic/Resources/Razor/Rss.cshtml
  42. +9 −9 src/Pretzel.Logic/Templating/Context/Category.cs
  43. +5 −5 src/Pretzel.Logic/Templating/Context/NonProcessedPage.cs
  44. +33 −33 src/Pretzel.Logic/Templating/Context/Page.cs
  45. +77 −77 src/Pretzel.Logic/Templating/Context/PageContext.cs
  46. +35 −35 src/Pretzel.Logic/Templating/Context/Paginator.cs
  47. +31 −31 src/Pretzel.Logic/Templating/Context/PathExtensions.cs
  48. +5 −5 src/Pretzel.Logic/Templating/Context/Post.cs
  49. +52 −52 src/Pretzel.Logic/Templating/Context/SiteContext.cs
  50. +355 −355 src/Pretzel.Logic/Templating/Context/SiteContextGenerator.cs
  51. +14 −14 src/Pretzel.Logic/Templating/Context/Tag.cs
  52. +13 −13 src/Pretzel.Logic/Templating/ISiteEngine.cs
  53. +7 −7 src/Pretzel.Logic/Templating/ISiteEngineInfo.cs
  54. +3 −3 src/Pretzel.Logic/Templating/Jekyll/Extensions/PageExtensions.cs
  55. +21 −21 src/Pretzel.Logic/Templating/Jekyll/Includes.cs
  56. +76 −76 src/Pretzel.Logic/Templating/Jekyll/LiquidEngine.cs
  57. +24 −24 src/Pretzel.Logic/Templating/Jekyll/PostDrop.cs
  58. +51 −51 src/Pretzel.Logic/Templating/Jekyll/SiteContextDrop.cs
  59. +210 −210 src/Pretzel.Logic/Templating/JekyllEngineBase.cs
  60. +72 −72 src/Pretzel.Logic/Templating/Razor/ExtensibleTemplate.cs
  61. +39 −39 src/Pretzel.Logic/Templating/Razor/IncludesResolver.cs
  62. +43 −43 src/Pretzel.Logic/Templating/Razor/RazorSiteEngine.cs
  63. +16 −16 src/Pretzel.Logic/Templating/SiteEngineInfoAttribute.cs
  64. +12 −12 src/Pretzel.Logic/VirtualDirectoryTransform.cs
  65. +12 −12 src/Pretzel.Logic/packages.config
  66. +96 −96 src/Pretzel.Tests/CommandParameterOutputTests.cs
  67. +208 −208 src/Pretzel.Tests/CommandParameterTests.cs
  68. +60 −60 src/Pretzel.Tests/Commands/CommandExtensions.cs
  69. +4 −4 src/Pretzel.Tests/Extensibility/Extensions/WebSequenceDiagramsTests.cs
  70. +38 −38 src/Pretzel.Tests/Import/WordpressImportTests.cs
  71. +131 −131 src/Pretzel.Tests/Minification/LessTransformTests.cs
  72. +26 −26 src/Pretzel.Tests/Minification/TestContainerFactory.cs
  73. +29 −29 src/Pretzel.Tests/Minification/TestFileReader.cs
  74. +19 −19 src/Pretzel.Tests/Minification/TestPathResolver.cs
  75. +113 −113 src/Pretzel.Tests/Pretzel.Tests.csproj
  76. +13 −13 src/Pretzel.Tests/Pretzel.Tests.ncrunchproject
  77. +91 −91 src/Pretzel.Tests/Recipe/RecipeTests.cs
  78. +257 −257 src/Pretzel.Tests/Templating/Context/SiteContextGeneratorTests.cs
  79. +15 −15 src/Pretzel.Tests/Templating/Jekyll/BakingEnvironment.cs
  80. +484 −484 src/Pretzel.Tests/Templating/Jekyll/LiquidEngineTests.cs
  81. +25 −25 src/Pretzel.Tests/Templating/Jekyll/LiquidExtensionsTests.cs
  82. +9 −9 src/Pretzel.Tests/Templating/Jekyll/StringTestExtensions.cs
  83. +16 −16 src/Pretzel.Tests/Templating/Plugins/TagCloudTests.cs
  84. +169 −169 src/Pretzel.Tests/Templating/Razor/RazorEngineTests.cs
  85. +116 −116 src/Pretzel.Tests/YamlExtensionsTests.cs
  86. +8 −8 src/Pretzel.Tests/packages.config
  87. +9 −9 src/Pretzel.ncrunchsolution
  88. +43 −43 src/Pretzel.sln
  89. +59 −59 src/Pretzel/Commands/BakeCommand.cs
  90. +47 −47 src/Pretzel/Commands/CommandCollection.cs
  91. +16 −16 src/Pretzel/Commands/CommandInfoAttribute.cs
  92. +13 −13 src/Pretzel/Commands/ICommand.cs
  93. +7 −7 src/Pretzel/Commands/ICommandInfo.cs
  94. +23 −23 src/Pretzel/Commands/ImportCommand.cs
  95. +50 −50 src/Pretzel/Commands/RecipeCommand.cs
  96. +97 −97 src/Pretzel/Commands/TasteCommand.cs
  97. +39 −39 src/Pretzel/Commands/TemplateEngineCollection.cs
  98. +8 −8 src/Pretzel/Modules/IFileSystemWatcher.cs
  99. +45 −45 src/Pretzel/Modules/SimpleFileSystemWatcher.cs
  100. +125 −125 src/Pretzel/Pretzel.csproj
  101. +13 −13 src/Pretzel/Pretzel.ncrunchproject
  102. +108 −108 src/Pretzel/Program.cs
  103. +4 −4 src/Pretzel/Properties/AssemblyInfo.cs
  104. +99 −99 src/Pretzel/WebHost/FileContentProvider.cs
  105. +11 −11 src/Pretzel/WebHost/IWebContent.cs
  106. +48 −48 src/Pretzel/WebHost/MemoryContentProvider.cs
  107. +138 −138 src/Pretzel/WebHost/WebHost.cs
  108. +9 −9 src/Pretzel/packages.config
  109. +104 −104 tools/MSBuildCommunityTasks/MSBuild.Community.Tasks.Targets
  110. +6,506 −6,506 tools/MSBuildCommunityTasks/MSBuild.Community.Tasks.xml
  111. +4,292 −4,292 tools/MSBuildCommunityTasks/MSBuild.Community.Tasks.xsd
  112. +12 −12 tools/chocolatey/chocolateyInstall.ps1
  113. +13 −13 tools/chocolatey/pretzel.nuspec
  114. +103 −103 tools/ilmerge/ILMerge License.rtf
View
@@ -1,22 +1,22 @@
-###Microsoft Public License (MS-PL)
-
-This license governs use of the accompanying software. If you use the software, you
-accept this license. If you do not accept the license, do not use the software.
-
-1. Definitions
-The terms "reproduce," "reproduction," "derivative works," and "distribution" have the
-same meaning here as under U.S. copyright law.
-A "contribution" is the original software, or any additions or changes to the software.
-A "contributor" is any person that distributes its contribution under this license.
-"Licensed patents" are a contributor's patent claims that read directly on its contribution.
-
-2. Grant of Rights
-(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
-(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
-
-3. Conditions and Limitations
-(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
-(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
-(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
-(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
+###Microsoft Public License (MS-PL)
+
+This license governs use of the accompanying software. If you use the software, you
+accept this license. If you do not accept the license, do not use the software.
+
+1. Definitions
+The terms "reproduce," "reproduction," "derivative works," and "distribution" have the
+same meaning here as under U.S. copyright law.
+A "contribution" is the original software, or any additions or changes to the software.
+A "contributor" is any person that distributes its contribution under this license.
+"Licensed patents" are a contributor's patent claims that read directly on its contribution.
+
+2. Grant of Rights
+(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
+(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
+
+3. Conditions and Limitations
+(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
+(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
+(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
+(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
@@ -1,129 +1,129 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.ComponentModel.Composition;
-using System.IO;
-using System.Linq;
-using NDesk.Options;
-using Pretzel.Logic.Extensibility;
-using Pretzel.Logic.Extensions;
-using Pretzel.Logic.Templating;
-using Pretzel.Logic.Templating.Context;
-
-namespace Pretzel.Logic.Commands
-{
- [Export]
- [PartCreationPolicy(CreationPolicy.Shared)]
- public class CommandParameters
- {
- readonly IEnumerable<IHaveCommandLineArgs> commandLineExtensions;
-
- [ImportingConstructor]
- public CommandParameters([ImportMany] IEnumerable<IHaveCommandLineArgs> commandLineExtensions)
- {
- this.commandLineExtensions = commandLineExtensions;
- GetDefaultValue("Port", s => decimal.TryParse(s, out port));
-
- Settings = new OptionSet
- {
- { "t|template=", "The templating engine to use", v => Template = v },
- { "d|directory=", "The path to site directory", p => Path = p },
- { "p|port=", "The port to test the site locally", p => decimal.TryParse(p, out port) },
- { "i|import=", "The import type", v => ImportType = v }, // TODO: necessary?
- { "f|file=", "Path to import file", v => ImportPath = v },
- };
- }
-
- private void GetDefaultValue(string propertyName, Action<string> converter)
- {
- var attributes = TypeDescriptor.GetProperties(this)[propertyName].Attributes;
- var myAttribute = (DefaultValueAttribute) attributes[typeof (DefaultValueAttribute)];
- converter(myAttribute.Value.ToString());
- }
-
- public string Path { get; private set; }
- public string Template { get; set; }
- public string ImportPath { get; private set; }
- public string ImportType { get; set; }
-
- private decimal port;
-
- [DefaultValue(8080)]
- public decimal Port
- {
- get { return port; }
- set { port = value; }
- }
-
- private OptionSet Settings { get; set; }
-
- public void Parse(IEnumerable<string> arguments)
- {
- // Allow extensions to register command line args
- foreach (var commandLineExtension in commandLineExtensions)
- {
- commandLineExtension.UpdateOptions(Settings);
- }
-
- var argumentList = arguments.ToArray();
-
- Settings.Parse(argumentList);
-
- var firstArgument = argumentList.FirstOrDefault();
-
- if (firstArgument != null && !firstArgument.StartsWith("-") && !firstArgument.StartsWith("/"))
- {
- Path = System.IO.Path.IsPathRooted(firstArgument)
- ? firstArgument
- : System.IO.Path.Combine(Directory.GetCurrentDirectory(), firstArgument);
- }
-
- if (string.IsNullOrWhiteSpace(Path))
- {
- Path = Directory.GetCurrentDirectory();
- }
- else
- {
- Path = System.IO.Path.GetFullPath(Path);
- }
- }
-
- public void DetectFromDirectory(IDictionary<string, ISiteEngine> engines, SiteContext context)
- {
- foreach (var engine in engines)
- {
- if (!engine.Value.CanProcess(context)) continue;
-
- Tracing.Info(String.Format("Recommended engine for directory: '{0}'", engine.Key));
- Template = engine.Key;
- return;
- }
-
- if (Template == null)
- Template = "liquid";
- }
-
- public void WriteOptions(TextWriter writer, params string[] args)
- {
- if (args.Length == 0)
- Settings.WriteOptionDescriptions(writer);
- else
- WriteSubset(writer, args);
- }
-
- private void WriteSubset(TextWriter writer, string[] args)
- {
- var textWriter = new StringWriter();
- Settings.WriteOptionDescriptions(textWriter);
- var output = textWriter.ToString();
-
- foreach (var line in output.Split(new[] {"\r\n"}, StringSplitOptions.RemoveEmptyEntries))
- {
- if (args.Any(line.Contains))
- {
- writer.WriteLine(line);
- }
- }
- }
- }
-}
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.ComponentModel.Composition;
+using System.IO;
+using System.Linq;
+using NDesk.Options;
+using Pretzel.Logic.Extensibility;
+using Pretzel.Logic.Extensions;
+using Pretzel.Logic.Templating;
+using Pretzel.Logic.Templating.Context;
+
+namespace Pretzel.Logic.Commands
+{
+ [Export]
+ [PartCreationPolicy(CreationPolicy.Shared)]
+ public class CommandParameters
+ {
+ readonly IEnumerable<IHaveCommandLineArgs> commandLineExtensions;
+
+ [ImportingConstructor]
+ public CommandParameters([ImportMany] IEnumerable<IHaveCommandLineArgs> commandLineExtensions)
+ {
+ this.commandLineExtensions = commandLineExtensions;
+ GetDefaultValue("Port", s => decimal.TryParse(s, out port));
+
+ Settings = new OptionSet
+ {
+ { "t|template=", "The templating engine to use", v => Template = v },
+ { "d|directory=", "The path to site directory", p => Path = p },
+ { "p|port=", "The port to test the site locally", p => decimal.TryParse(p, out port) },
+ { "i|import=", "The import type", v => ImportType = v }, // TODO: necessary?
+ { "f|file=", "Path to import file", v => ImportPath = v },
+ };
+ }
+
+ private void GetDefaultValue(string propertyName, Action<string> converter)
+ {
+ var attributes = TypeDescriptor.GetProperties(this)[propertyName].Attributes;
+ var myAttribute = (DefaultValueAttribute) attributes[typeof (DefaultValueAttribute)];
+ converter(myAttribute.Value.ToString());
+ }
+
+ public string Path { get; private set; }
+ public string Template { get; set; }
+ public string ImportPath { get; private set; }
+ public string ImportType { get; set; }
+
+ private decimal port;
+
+ [DefaultValue(8080)]
+ public decimal Port
+ {
+ get { return port; }
+ set { port = value; }
+ }
+
+ private OptionSet Settings { get; set; }
+
+ public void Parse(IEnumerable<string> arguments)
+ {
+ // Allow extensions to register command line args
+ foreach (var commandLineExtension in commandLineExtensions)
+ {
+ commandLineExtension.UpdateOptions(Settings);
+ }
+
+ var argumentList = arguments.ToArray();
+
+ Settings.Parse(argumentList);
+
+ var firstArgument = argumentList.FirstOrDefault();
+
+ if (firstArgument != null && !firstArgument.StartsWith("-") && !firstArgument.StartsWith("/"))
+ {
+ Path = System.IO.Path.IsPathRooted(firstArgument)
+ ? firstArgument
+ : System.IO.Path.Combine(Directory.GetCurrentDirectory(), firstArgument);
+ }
+
+ if (string.IsNullOrWhiteSpace(Path))
+ {
+ Path = Directory.GetCurrentDirectory();
+ }
+ else
+ {
+ Path = System.IO.Path.GetFullPath(Path);
+ }
+ }
+
+ public void DetectFromDirectory(IDictionary<string, ISiteEngine> engines, SiteContext context)
+ {
+ foreach (var engine in engines)
+ {
+ if (!engine.Value.CanProcess(context)) continue;
+
+ Tracing.Info(String.Format("Recommended engine for directory: '{0}'", engine.Key));
+ Template = engine.Key;
+ return;
+ }
+
+ if (Template == null)
+ Template = "liquid";
+ }
+
+ public void WriteOptions(TextWriter writer, params string[] args)
+ {
+ if (args.Length == 0)
+ Settings.WriteOptionDescriptions(writer);
+ else
+ WriteSubset(writer, args);
+ }
+
+ private void WriteSubset(TextWriter writer, string[] args)
+ {
+ var textWriter = new StringWriter();
+ Settings.WriteOptionDescriptions(textWriter);
+ var output = textWriter.ToString();
+
+ foreach (var line in output.Split(new[] {"\r\n"}, StringSplitOptions.RemoveEmptyEntries))
+ {
+ if (args.Any(line.Contains))
+ {
+ writer.WriteLine(line);
+ }
+ }
+ }
+ }
+}
@@ -1,20 +1,20 @@
-using System;
-using System.ComponentModel.Composition;
-
-namespace Pretzel.Logic.Extensibility.Extensions
-{
- [Export(typeof(IFilter))]
- public class PrettifyUrlFilter : IFilter
- {
- public string Name
- {
- get { return "PrettifyUrl"; }
- }
-
- public static string PrettifyUrl(string input)
- {
- return input.Replace("index.html", String.Empty);
- }
-
- }
+using System;
+using System.ComponentModel.Composition;
+
+namespace Pretzel.Logic.Extensibility.Extensions
+{
+ [Export(typeof(IFilter))]
+ public class PrettifyUrlFilter : IFilter
+ {
+ public string Name
+ {
+ get { return "PrettifyUrl"; }
+ }
+
+ public static string PrettifyUrl(string input)
+ {
+ return input.Replace("index.html", String.Empty);
+ }
+
+ }
}
Oops, something went wrong.

0 comments on commit a8bcc89

Please sign in to comment.