From e5aef055cf483b3fc04dbacd619a3cfed8e9c221 Mon Sep 17 00:00:00 2001 From: Suha Can Date: Fri, 19 Nov 2010 18:41:38 -0800 Subject: [PATCH] PERF: Replacing YAML parser with a simpler implementation. All external YAML references have been removed from Orchard. --HG-- branch : perf --- lib/yaml/ChangeLog.txt | 47 ---- lib/yaml/LICENSE.txt | 177 ------------- lib/yaml/Readme.txt | 39 --- lib/yaml/Yaml.dll | Bin 73728 -> 0 bytes .../Migrations/SchemaCommandGeneratorTests.cs | 7 +- .../DataMigration/DataMigrationTests.cs | 58 ++--- .../ExtensionLoaderCoordinatorTests.cs | 79 +++--- .../Extensions/ExtensionManagerTests.cs | 107 ++++---- .../Extensions/Folders/ExtensionFolders.cs | 244 ++++++++++++------ .../Extensions/Folders/IExtensionFolders.cs | 1 - .../Extensions/Models/ExtensionDescriptor.cs | 3 +- src/Orchard/Orchard.Framework.csproj | 4 - 12 files changed, 283 insertions(+), 483 deletions(-) delete mode 100644 lib/yaml/ChangeLog.txt delete mode 100644 lib/yaml/LICENSE.txt delete mode 100644 lib/yaml/Readme.txt delete mode 100644 lib/yaml/Yaml.dll diff --git a/lib/yaml/ChangeLog.txt b/lib/yaml/ChangeLog.txt deleted file mode 100644 index 026f548a5..000000000 --- a/lib/yaml/ChangeLog.txt +++ /dev/null @@ -1,47 +0,0 @@ ---- 2009-10-04 Osamu TAKEUCHI -Alpha release of YamlSerializer as 0.9.0.2 - -* All "_"s in integer and floating point values are neglected - to accommodate the !!int and !!float encoding. -* YamlConfig.DontUseVerbatimTag is added but the default value is set false. - Note that ! is much human friendly than !System.Int32%5B%2C%5D. -* Equality of YamlNode with an unknown tag is evaluated by identity, - while that of !!map and !!seq node is still evaluated by YAML's standard. - Note that equality of !!map and !!seq are different from that of object[] - and Dictionary. -* YamlConfig.OmitTagForRootNode was added. Fixed issue #2850. -* Serialize Dictionary to !!map. Fixed #2891. -* Modified [126-130] ns-plain-???, [147] c-ns-flow-map-separate-value(n,c) - to accommodate revision 2009-10-01 -* Omit !< > if Tag contains only ns-tag-char, Fixed issue #2813 - ---- 2009-09-23 Osamu TAKEUCHI -Alpha release of YamlSerializer as 0.9.0.1 - -* Removed TODO's for reporting bugs in YAML spec that are done. -* Fixed assembly copyright. -* !!merge is supported. Fixed issue#2605. -* Read-only class-type member with no child members are omitted when - serializing. Fixed issue#2599. -* Culture for TypeConverter is set to be CultureInfo.InvariantCulture. - Fixed issue #2629. -* To fix Issue#2631 - * Field names and property names are always presented as simple texts. - * When deserializing, we can not avoid the parser parses some spacial - names to !!bool and !!null. Such non-text nodes are converted to - texts at construction stage. -* To fix issue#2663 - * Hash code stored in a mapping node is now updated when the a key node's - content is changed. - * Hash code and equality became independent on the order of keys in a - mapping node. - * A mapping node checks for duplicated keys every time the node content - is changed. - * Test results are changed because some of them are dependent on the hash - key order. -* The current equality evaluation is too strict, probably needs some adjustment. -* NativeObject property was added to YamlScalar. -* YamlScalar's equality is evaluated by comparing NativeObject. - ---- 2009-09-11 Osamu TAKEUCHI -First release of YamlSerializer as 0.9.0.0 diff --git a/lib/yaml/LICENSE.txt b/lib/yaml/LICENSE.txt deleted file mode 100644 index 32af28914..000000000 --- a/lib/yaml/LICENSE.txt +++ /dev/null @@ -1,177 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - diff --git a/lib/yaml/Readme.txt b/lib/yaml/Readme.txt deleted file mode 100644 index e6152eb5e..000000000 --- a/lib/yaml/Readme.txt +++ /dev/null @@ -1,39 +0,0 @@ -YamlSerializer 0.9.0.2 (2009-10-04) Osamu TAKEUCHI - -Description: - A library that serialize / deserialize C# native objects into YAML1.2 text. - -Development environment: - Visual C# 2008 Express Edition - Sandcastle (2008-05-29) - SandcastleBuilder 1.8.0.2 - HTML Help workshop 4.74.8702 - NUnit 2.5.0.9122 - TestDriven.NET 2.0 - -Support web page: - http://yamlserializer.codeplex.com/ - -License: - YamlSerializer is distributed under the MIT license as following: - ---- -The MIT License (MIT) -Copyright (c) 2009 Osamu TAKEUCHI - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in the -Software without restriction, including without limitation the rights to use, copy, -modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, -and to permit persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF -CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE -OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/lib/yaml/Yaml.dll b/lib/yaml/Yaml.dll deleted file mode 100644 index 358eb6d3d3167222ed7fa4ea8a32ccdd4c37a966..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 73728 zcmeHwdtlsEmH+*IzcZ7`Ym!Ntq)1Dq&rFl_U7&>meZNQ_G=UZ@rfD*5hbEaYGwFl2 z7?dI)xaa~3@=!os5EWQKMRZYl$SNx;xIQW?=(6}&!4>u=uE6he&b{~hm`A?TqQ5_W zn?UdPp8GiG+;h)8_uR+#JL@mFPFO;S0RFxGwh&*&lm3=)IC?OG>`3#&5%I{mNUkGzjr4bh5RiwmZYNXPT@fe=O9i`Vwz7b>o=_$4&AL;aGi6uuEU>Jc) zR}U`p#R@}gp&0OvCqd-?Eipt@ZdxgDObE2V{tE+MV?#pB$|m+_0gwAF0_1U9-HgfP z?X%LEbT8t}8+ep$z|-}&1Ol0rPV}cxka-2qT&^~++%i|SvFMlt#w0K%fiVe;NnlI@ zV-gsXz?cNaBrqm{F$w%HlEAB2|I#0=O-&IL@r)4Hd{hYU%8`qd6x7eL#K|a$`cX3; z6{4adl=;07p~}p)2&=+nbylhZvHC!HyA=(zhEq2Z6pRKl|Bc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.cs b/src/Orchard.Tests.Modules/Migrations/SchemaCommandGeneratorTests.cs index ea08127b5..8f4edd963 100644 --- a/src/Orchard.Tests.Modules/Migrations/SchemaCommandGeneratorTests.cs +++ b/src/Orchard.Tests.Modules/Migrations/SchemaCommandGeneratorTests.cs @@ -93,8 +93,8 @@ Name: Module1 Version: 0.1 OrchardVersion: 1 Features: - Feature1: - Description: Feature + Feature1: + Description: Feature "); } @@ -108,8 +108,7 @@ Features: public IEnumerable AvailableExtensions() { foreach (var e in Manifests) { string name = e.Key; - var parseResult = ExtensionFolders.ParseManifest(Manifests[name]); - yield return ExtensionFolders.GetDescriptorForExtension("~/", name, "Module", parseResult); + yield return ExtensionFolders.GetDescriptorForExtension("~/", name, "Module", Manifests[name]); } } } diff --git a/src/Orchard.Tests/DataMigration/DataMigrationTests.cs b/src/Orchard.Tests/DataMigration/DataMigrationTests.cs index 5afe105d9..a1ac0bede 100644 --- a/src/Orchard.Tests/DataMigration/DataMigrationTests.cs +++ b/src/Orchard.Tests/DataMigration/DataMigrationTests.cs @@ -20,7 +20,6 @@ using Orchard.Environment.Extensions.Models; using Orchard.Tests.ContentManagement; using Orchard.Data.Providers; using Orchard.Tests.Stubs; -using Orchard.Tests.Utility; namespace Orchard.Tests.DataMigration { [TestFixture] @@ -91,8 +90,7 @@ namespace Orchard.Tests.DataMigration { public IEnumerable AvailableExtensions() { foreach (var e in Manifests) { string name = e.Key; - var parseResult = ExtensionFolders.ParseManifest(Manifests[name]); - yield return ExtensionFolders.GetDescriptorForExtension("~/", name, "Module", parseResult); + yield return ExtensionFolders.GetDescriptorForExtension("~/", name, "Module", Manifests[name]); } } } @@ -235,8 +233,8 @@ Name: Module2 Version: 0.1 OrchardVersion: 1 Features: - Feature1: - Description: Feature + Feature1: + Description: Feature "); _dataMigrationManager.Update("Feature1"); @@ -252,8 +250,8 @@ Name: Module1 Version: 0.1 OrchardVersion: 1 Features: - Feature1: - Description: Feature + Feature1: + Description: Feature "); _dataMigrationManager.Update("Feature1"); @@ -269,8 +267,8 @@ Name: Module1 Version: 0.1 OrchardVersion: 1 Features: - Feature1: - Description: Feature + Feature1: + Description: Feature "); _dataMigrationManager.Update("Feature1"); @@ -288,8 +286,8 @@ Name: Module1 Version: 0.1 OrchardVersion: 1 Features: - Feature1: - Description: Feature + Feature1: + Description: Feature "); _dataMigrationManager.Update("Feature1"); @@ -306,8 +304,8 @@ Name: Module1 Version: 0.1 OrchardVersion: 1 Features: - Feature1: - Description: Feature + Feature1: + Description: Feature "); _repository.Create(new DataMigrationRecord { Version = 42, @@ -329,9 +327,9 @@ Name: Module1 Version: 0.1 OrchardVersion: 1 Features: - Feature1: - Description: Feature - Dependencies: Feature2 + Feature1: + Description: Feature + Dependencies: Feature2 "); _folders.Manifests.Add("Module2", @" @@ -339,8 +337,8 @@ Name: Module2 Version: 0.1 OrchardVersion: 1 Features: - Feature2: - Description: Feature + Feature2: + Description: Feature "); _dataMigrationManager.Update("Feature1"); Assert.That(_repository.Table.Count(), Is.EqualTo(2)); @@ -358,8 +356,8 @@ Name: Module1 Version: 0.1 OrchardVersion: 1 Features: - Feature1: - Description: Feature + Feature1: + Description: Feature "); _dataMigrationManager.Update("Feature1"); @@ -376,14 +374,14 @@ Name: Module1 Version: 0.1 OrchardVersion: 1 Features: - Feature1: - Description: Feature - Feature2: - Description: Feature - Feature3: - Description: Feature - Feature4: - Description: Feature + Feature1: + Description: Feature + Feature2: + Description: Feature + Feature3: + Description: Feature + Feature4: + Description: Feature "); // even if there is a data migration class, as it is empty there should me no migration to do @@ -425,8 +423,8 @@ Name: Module1 Version: 0.1 OrchardVersion: 1 Features: - Feature1: - Description: Feature + Feature1: + Description: Feature "); _dataMigrationManager.Update("Feature1"); diff --git a/src/Orchard.Tests/Environment/Extensions/ExtensionLoaderCoordinatorTests.cs b/src/Orchard.Tests/Environment/Extensions/ExtensionLoaderCoordinatorTests.cs index a9bba8374..92761f549 100644 --- a/src/Orchard.Tests/Environment/Extensions/ExtensionLoaderCoordinatorTests.cs +++ b/src/Orchard.Tests/Environment/Extensions/ExtensionLoaderCoordinatorTests.cs @@ -45,8 +45,7 @@ namespace Orchard.Tests.Environment.Extensions { public IEnumerable AvailableExtensions() { foreach (var e in Manifests) { string name = e.Key; - var parseResult = ExtensionFolders.ParseManifest(Manifests[name]); - yield return ExtensionFolders.GetDescriptorForExtension("~/", name, _extensionType, parseResult); + yield return ExtensionFolders.GetDescriptorForExtension("~/", name, _extensionType, Manifests[name]); } } } @@ -157,8 +156,8 @@ Name: SuperWiki Version: 1.0.3 OrchardVersion: 1 Features: - SuperWiki: - Description: My super wiki module for Orchard. + SuperWiki: + Description: My super wiki module for Orchard. "); var descriptor = _manager.AvailableExtensions().Single(); @@ -181,22 +180,22 @@ Website: http://anotherwiki.codeplex.com Version: 1.2.3 OrchardVersion: 1 Features: - AnotherWiki: - Description: My super wiki module for Orchard. - Dependencies: Versioning, Search - Category: Content types - AnotherWiki Editor: - Description: A rich editor for wiki contents. - Dependencies: TinyMCE, AnotherWiki - Category: Input methods - AnotherWiki DistributionList: - Description: Sends e-mail alerts when wiki contents gets published. - Dependencies: AnotherWiki, Email Subscriptions - Category: Email - AnotherWiki Captcha: - Description: Kills spam. Or makes it zombie-like. - Dependencies: AnotherWiki, reCaptcha - Category: Spam + AnotherWiki: + Description: My super wiki module for Orchard. + Dependencies: Versioning, Search + Category: Content types + AnotherWiki Editor: + Description: A rich editor for wiki contents. + Dependencies: TinyMCE, AnotherWiki + Category: Input methods + AnotherWiki DistributionList: + Description: Sends e-mail alerts when wiki contents gets published. + Dependencies: AnotherWiki, Email Subscriptions + Category: Email + AnotherWiki Captcha: + Description: Kills spam. Or makes it zombie-like. + Dependencies: AnotherWiki, reCaptcha + Category: Spam "); var descriptor = _manager.AvailableExtensions().Single(); @@ -262,10 +261,10 @@ Name: TestModule Version: 1.0.3 OrchardVersion: 1 Features: - TestModule: - Description: My test module for Orchard. - TestFeature: - Description: Contains the Phi type. + TestModule: + Description: My test module for Orchard. + TestFeature: + Description: Contains the Phi type. "); IExtensionManager extensionManager = new ExtensionManager(new[] { extensionFolder }, new[] { extensionLoader }, new StubCacheManager()); @@ -288,10 +287,10 @@ Name: TestModule Version: 1.0.3 OrchardVersion: 1 Features: - TestModule: - Description: My test module for Orchard. - TestFeature: - Description: Contains the Phi type. + TestModule: + Description: My test module for Orchard. + TestFeature: + Description: Contains the Phi type. "); IExtensionManager extensionManager = new ExtensionManager(new[] { extensionFolder }, new[] { extensionLoader }, new StubCacheManager()); @@ -323,10 +322,10 @@ Name: TestModule Version: 1.0.3 OrchardVersion: 1 Features: - TestModule: - Description: My test module for Orchard. - TestFeature: - Description: Contains the Phi type. + TestModule: + Description: My test module for Orchard. + TestFeature: + Description: Contains the Phi type. "); IExtensionManager extensionManager = new ExtensionManager(new[] { extensionFolder }, new[] { extensionLoader }, new StubCacheManager()); @@ -353,10 +352,10 @@ Name: TestModule Version: 1.0.3 OrchardVersion: 1 Features: - TestModule: - Description: My test module for Orchard. - TestFeature: - Description: Contains the Phi type. + TestModule: + Description: My test module for Orchard. + TestFeature: + Description: Contains the Phi type. "); IExtensionManager extensionManager = new ExtensionManager(new[] { extensionFolder }, new[] { extensionLoader }, new StubCacheManager()); @@ -381,10 +380,10 @@ Name: TestModule Version: 1.0.3 OrchardVersion: 1 Features: - TestModule: - Description: My test module for Orchard. - TestFeature: - Description: Contains the Phi type. + TestModule: + Description: My test module for Orchard. + TestFeature: + Description: Contains the Phi type. "); IExtensionManager extensionManager = new ExtensionManager(new[] { extensionFolder }, new[] { extensionLoader }, new StubCacheManager()); diff --git a/src/Orchard.Tests/Environment/Extensions/ExtensionManagerTests.cs b/src/Orchard.Tests/Environment/Extensions/ExtensionManagerTests.cs index fa584ae8b..46ee359cb 100644 --- a/src/Orchard.Tests/Environment/Extensions/ExtensionManagerTests.cs +++ b/src/Orchard.Tests/Environment/Extensions/ExtensionManagerTests.cs @@ -49,8 +49,7 @@ namespace Orchard.Tests.Environment.Extensions { public IEnumerable AvailableExtensions() { foreach (var e in Manifests) { string name = e.Key; - var parseResult = ExtensionFolders.ParseManifest(Manifests[name]); - yield return ExtensionFolders.GetDescriptorForExtension("~/", name, _extensionType, parseResult); + yield return ExtensionFolders.GetDescriptorForExtension("~/", name, _extensionType, Manifests[name]); } } } @@ -161,8 +160,8 @@ Name: SuperWiki Version: 1.0.3 OrchardVersion: 1 Features: - SuperWiki: - Description: My super wiki module for Orchard. + SuperWiki: + Description: My super wiki module for Orchard. "); var descriptor = _manager.AvailableExtensions().Single(); @@ -185,22 +184,22 @@ Website: http://anotherwiki.codeplex.com Version: 1.2.3 OrchardVersion: 1 Features: - AnotherWiki: - Description: My super wiki module for Orchard. - Dependencies: Versioning, Search - Category: Content types - AnotherWiki Editor: - Description: A rich editor for wiki contents. - Dependencies: TinyMCE, AnotherWiki - Category: Input methods - AnotherWiki DistributionList: - Description: Sends e-mail alerts when wiki contents gets published. - Dependencies: AnotherWiki, Email Subscriptions - Category: Email - AnotherWiki Captcha: - Description: Kills spam. Or makes it zombie-like. - Dependencies: AnotherWiki, reCaptcha - Category: Spam + AnotherWiki: + Description: My super wiki module for Orchard. + Dependencies: Versioning, Search + Category: Content types + AnotherWiki Editor: + Description: A rich editor for wiki contents. + Dependencies: TinyMCE, AnotherWiki + Category: Input methods + AnotherWiki DistributionList: + Description: Sends e-mail alerts when wiki contents gets published. + Dependencies: AnotherWiki, Email Subscriptions + Category: Email + AnotherWiki Captcha: + Description: Kills spam. Or makes it zombie-like. + Dependencies: AnotherWiki, reCaptcha + Category: Spam "); var descriptor = _manager.AvailableExtensions().Single(); @@ -266,10 +265,10 @@ Name: TestModule Version: 1.0.3 OrchardVersion: 1 Features: - TestModule: - Description: My test module for Orchard. - TestFeature: - Description: Contains the Phi type. + TestModule: + Description: My test module for Orchard. + TestFeature: + Description: Contains the Phi type. "); IExtensionManager extensionManager = new ExtensionManager(new[] { extensionFolder }, new[] { extensionLoader }, new StubCacheManager()); @@ -292,10 +291,10 @@ Name: TestModule Version: 1.0.3 OrchardVersion: 1 Features: - TestModule: - Description: My test module for Orchard. - TestFeature: - Description: Contains the Phi type. + TestModule: + Description: My test module for Orchard. + TestFeature: + Description: Contains the Phi type. "); IExtensionManager extensionManager = new ExtensionManager(new[] { extensionFolder }, new[] { extensionLoader }, new StubCacheManager()); @@ -327,10 +326,10 @@ Name: TestModule Version: 1.0.3 OrchardVersion: 1 Features: - TestModule: - Description: My test module for Orchard. - TestFeature: - Description: Contains the Phi type. + TestModule: + Description: My test module for Orchard. + TestFeature: + Description: Contains the Phi type. "); IExtensionManager extensionManager = new ExtensionManager(new[] { extensionFolder }, new[] { extensionLoader }, new StubCacheManager()); @@ -357,10 +356,10 @@ Name: TestModule Version: 1.0.3 OrchardVersion: 1 Features: - TestModule: - Description: My test module for Orchard. - TestFeature: - Description: Contains the Phi type. + TestModule: + Description: My test module for Orchard. + TestFeature: + Description: Contains the Phi type. "); IExtensionManager extensionManager = new ExtensionManager(new[] { extensionFolder }, new[] { extensionLoader }, new StubCacheManager()); @@ -385,10 +384,10 @@ Name: TestModule Version: 1.0.3 OrchardVersion: 1 Features: - TestModule: - Description: My test module for Orchard. - TestFeature: - Description: Contains the Phi type. + TestModule: + Description: My test module for Orchard. + TestFeature: + Description: Contains the Phi type. "); IExtensionManager extensionManager = new ExtensionManager(new[] { extensionFolder }, new[] { extensionLoader }, new StubCacheManager()); @@ -433,8 +432,8 @@ Name: Alpha Version: 1.0.3 OrchardVersion: 1 Features: - Alpha: - Dependencies: Gamma + Alpha: + Dependencies: Gamma "); extensionFolder.Manifests.Add("Beta", @" @@ -447,8 +446,8 @@ Name: Gamma Version: 1.0.3 OrchardVersion: 1 Features: - Gamma: - Dependencies: Beta + Gamma: + Dependencies: Beta "); IExtensionManager extensionManager = new ExtensionManager(new[] { extensionFolder }, new[] { extensionLoader }, new StubCacheManager()); @@ -467,8 +466,8 @@ Name: Alpha Version: 1.0.3 OrchardVersion: 1 Features: - Alpha: - Dependencies: Gamma + Alpha: + Dependencies: Gamma "); moduleExtensionFolder.Manifests.Add("Beta", @" @@ -481,8 +480,8 @@ Name: Gamma Version: 1.0.3 OrchardVersion: 1 Features: - Gamma: - Dependencies: Beta + Gamma: + Dependencies: Beta "); moduleExtensionFolder.Manifests.Add("Classic", @" @@ -507,8 +506,8 @@ Name: Alpha Version: 1.0.3 OrchardVersion: 1 Features: - Alpha: - Dependencies: Gamma + Alpha: + Dependencies: Gamma "); moduleExtensionFolder.Manifests.Add("Beta", @" @@ -521,8 +520,8 @@ Name: Gamma Version: 1.0.3 OrchardVersion: 1 Features: - Gamma: - Dependencies: Beta + Gamma: + Dependencies: Beta "); moduleExtensionFolder.Manifests.Add("Classic", @" @@ -530,8 +529,8 @@ Name: Classic Version: 1.0.3 OrchardVersion: 1 Features: - Classic: - Dependencies: Alpha + Classic: + Dependencies: Alpha "); IExtensionManager extensionManager = new ExtensionManager(new[] { moduleExtensionFolder, themeExtensionFolder }, new[] { extensionLoader }, new StubCacheManager()); diff --git a/src/Orchard/Environment/Extensions/Folders/ExtensionFolders.cs b/src/Orchard/Environment/Extensions/Folders/ExtensionFolders.cs index 73d08e7ef..9d184488c 100644 --- a/src/Orchard/Environment/Extensions/Folders/ExtensionFolders.cs +++ b/src/Orchard/Environment/Extensions/Folders/ExtensionFolders.cs @@ -7,15 +7,8 @@ using Orchard.Environment.Extensions.Models; using Orchard.FileSystems.WebSite; using Orchard.Localization; using Orchard.Logging; -using Yaml.Grammar; namespace Orchard.Environment.Extensions.Folders { - public class ParseResult { - public string Location { get; set; } - public string Name { get; set; } - public YamlDocument YamlDocument { get; set; } - } - public class ExtensionFolders : IExtensionFolders { private readonly IEnumerable _paths; private readonly string _manifestName; @@ -73,11 +66,31 @@ namespace Orchard.Environment.Extensions.Folders { return list; } + public static ExtensionDescriptor GetDescriptorForExtension(string locationPath, string extensionName, string extensionType, string manifestText) { + Dictionary manifest = ParseManifest(manifestText); + var extensionDescriptor = new ExtensionDescriptor { + Location = locationPath, + Name = extensionName, + ExtensionType = extensionType, + DisplayName = GetValue(manifest, "Name") ?? extensionName, + Description = GetValue(manifest, "Description"), + Version = GetValue(manifest, "Version"), + OrchardVersion = GetValue(manifest, "OrchardVersion"), + Author = GetValue(manifest, "Author"), + WebSite = GetValue(manifest, "Website"), + Tags = GetValue(manifest, "Tags"), + AntiForgery = GetValue(manifest, "AntiForgery"), + Zones = GetValue(manifest, "Zones"), + BaseTheme = GetValue(manifest, "BaseTheme"), + }; + extensionDescriptor.Features = GetFeaturesForExtension(GetValue(manifest, "Features"), extensionDescriptor); + + return extensionDescriptor; + } + private ExtensionDescriptor GetExtensionDescriptor(string locationPath, string extensionName, string manifestPath) { return _cacheManager.Get(manifestPath, context => { - context.Monitor(_webSiteFolder.WhenPathChanges(manifestPath)); - var manifestText = _webSiteFolder.ReadFile(manifestPath); if (manifestText == null) { if (_manifestIsOptional) { @@ -88,84 +101,128 @@ namespace Orchard.Environment.Extensions.Folders { } } - return GetDescriptorForExtension(locationPath, extensionName, ParseManifest(manifestText)); + return GetDescriptorForExtension(locationPath, extensionName, manifestText); }); } - private ExtensionDescriptor GetDescriptorForExtension(string locationPath, string extensionName, ParseResult parseResult) { - return GetDescriptorForExtension(locationPath, extensionName, _extensionType, parseResult); + private ExtensionDescriptor GetDescriptorForExtension(string locationPath, string extensionName, string manifestText) { + return GetDescriptorForExtension(locationPath, extensionName, _extensionType, manifestText); } - public static ParseResult ParseManifest(string manifestText) { - bool success; - var yamlStream = new YamlParser().ParseYamlStream(new TextInput(manifestText), out success); - if (yamlStream == null || !success) { - return null; - } - return new ParseResult { - Name = manifestText, - YamlDocument = yamlStream.Documents.Single() - }; - } + private static Dictionary ParseManifest(string manifestText) { + var manifest = new Dictionary(); - public static ExtensionDescriptor GetDescriptorForExtension(string locationPath, string extensionName, string extensionType, ParseResult parseResult) { - var mapping = (Mapping)parseResult.YamlDocument.Root; - var fields = mapping.Entities - .Where(x => x.Key is Scalar) - .ToDictionary(x => ((Scalar)x.Key).Text, x => x.Value); - - var extensionDescriptor = new ExtensionDescriptor { - Location = locationPath, - Name = extensionName, - ExtensionType = extensionType, - DisplayName = GetValue(fields, "Name") ?? extensionName, - Description = GetValue(fields, "Description"), - Version = GetValue(fields, "Version"), - OrchardVersion = GetValue(fields, "OrchardVersion"), - Author = GetValue(fields, "Author"), - WebSite = GetValue(fields, "Website"), - Tags = GetValue(fields, "Tags"), - AntiForgery = GetValue(fields, "AntiForgery"), - Zones = GetValue(fields, "Zones"), - BaseTheme = GetValue(fields, "BaseTheme"), - }; - - extensionDescriptor.Features = GetFeaturesForExtension(GetMapping(fields, "Features"), extensionDescriptor); - - return extensionDescriptor; - } - - private static IEnumerable GetFeaturesForExtension(Mapping features, ExtensionDescriptor extensionDescriptor) { - var featureDescriptors = new List(); - if (features != null) { - foreach (var entity in features.Entities) { - var featureDescriptor = new FeatureDescriptor { - Extension = extensionDescriptor, - Name = entity.Key.ToString(), - }; - - if (featureDescriptor.Name == extensionDescriptor.Name) { - featureDescriptor.DisplayName = extensionDescriptor.DisplayName; + using (StringReader reader = new StringReader(manifestText)) { + string line; + while ((line = reader.ReadLine()) != null) { + string[] field = line.Split(new[] {":"}, 2, StringSplitOptions.None); + int fieldLength = field.Length; + if (fieldLength != 2) + continue; + for (int i = 0; i < fieldLength; i++) { + field[i] = field[i].Trim(); } - - var featureMapping = (Mapping)entity.Value; - foreach (var featureEntity in featureMapping.Entities) { - if (featureEntity.Key.ToString() == "Description") { - featureDescriptor.Description = featureEntity.Value.ToString(); - } - else if (featureEntity.Key.ToString() == "Category") { - featureDescriptor.Category = featureEntity.Value.ToString(); - } - else if (featureEntity.Key.ToString() == "Name") { - featureDescriptor.DisplayName = featureEntity.Value.ToString(); - } - else if (featureEntity.Key.ToString() == "Dependencies") { - featureDescriptor.Dependencies = ParseFeatureDependenciesEntry(featureEntity.Value.ToString()); - } + switch (field[0]) { + case "Name": + manifest.Add("Name", field[1]); + break; + case "Description": + manifest.Add("Description", field[1]); + break; + case "Version": + manifest.Add("Version", field[1]); + break; + case "OrchardVersion": + manifest.Add("OrchardVersion", field[1]); + break; + case "Author": + manifest.Add("Author", field[1]); + break; + case "Website": + manifest.Add("Website", field[1]); + break; + case "Tags": + manifest.Add("Tags", field[1]); + break; + case "AntiForgery": + manifest.Add("AntiForgery", field[1]); + break; + case "Zones": + manifest.Add("Zones", field[1]); + break; + case "BaseTheme": + manifest.Add("BaseTheme", field[1]); + break; + case "Features": + manifest.Add("Features", reader.ReadToEnd()); + break; } - featureDescriptors.Add(featureDescriptor); } } + + return manifest; + } + + private static IEnumerable GetFeaturesForExtension(string featuresText, ExtensionDescriptor extensionDescriptor) { + var featureDescriptors = new List(); + if (featuresText != null) { + FeatureDescriptor featureDescriptor = null; + using (StringReader reader = new StringReader(featuresText)) { + string line; + while ((line = reader.ReadLine()) != null) { + if (IsFeatureDeclaration(line)) { + if (featureDescriptor != null) { + featureDescriptors.Add(featureDescriptor); + featureDescriptor = null; + } + featureDescriptor = new FeatureDescriptor { + Extension = extensionDescriptor + }; + string[] featureDeclaration = line.Split(new[] {":"}, StringSplitOptions.RemoveEmptyEntries); + featureDescriptor.Name = featureDeclaration[0].Trim(); + if (featureDescriptor.Name == extensionDescriptor.Name) { + featureDescriptor.DisplayName = extensionDescriptor.DisplayName; + } + } + else if (IsFeatureFieldDeclaration(line)) { + if (featureDescriptor != null) { + string[] featureField = line.Split(new[] {":"}, 2, StringSplitOptions.None); + int featureFieldLength = featureField.Length; + if (featureFieldLength != 2) + continue; + for (int i = 0; i < featureFieldLength; i++) { + featureField[i] = featureField[i].Trim(); + } + switch (featureField[0]) { + case "Name": + featureDescriptor.DisplayName = featureField[1]; + break; + case "Description": + featureDescriptor.Description = featureField[1]; + break; + case "Category": + featureDescriptor.Category = featureField[1]; + break; + case "Dependencies": + featureDescriptor.Dependencies = ParseFeatureDependenciesEntry(featureField[1]); + break; + } + } + else { + string message = string.Format("The line {0} in manifest for extension {1} was ignored", line, extensionDescriptor.Name); + throw new ArgumentException(message); + } + } + else { + string message = string.Format("The line {0} in manifest for extension {1} was ignored", line, extensionDescriptor.Name); + throw new ArgumentException(message); + } + } + if (featureDescriptor != null) + featureDescriptors.Add(featureDescriptor); + } + } + if (!featureDescriptors.Any(fd => fd.Name == extensionDescriptor.Name)) { featureDescriptors.Add(new FeatureDescriptor { Name = extensionDescriptor.Name, @@ -174,9 +231,31 @@ namespace Orchard.Environment.Extensions.Folders { Extension = extensionDescriptor }); } + return featureDescriptors; } + private static bool IsFeatureFieldDeclaration(string line) { + if (line.StartsWith("\t\t") || + line.StartsWith("\t ") || + line.StartsWith(" ") || + line.StartsWith(" \t")) + return true; + + return false; + } + + private static bool IsFeatureDeclaration(string line) { + int lineLength = line.Length; + if (line.StartsWith("\t") && lineLength >= 2) { + return !Char.IsWhiteSpace(line[1]); + } + if (line.StartsWith(" ") && lineLength >= 5) + return !Char.IsWhiteSpace(line[4]); + + return false; + } + private static string[] ParseFeatureDependenciesEntry(string dependenciesEntry) { var dependencies = new List(); foreach (var s in dependenciesEntry.Split(',')) { @@ -185,14 +264,9 @@ namespace Orchard.Environment.Extensions.Folders { return dependencies.ToArray(); } - private static Mapping GetMapping(IDictionary fields, string key) { - DataItem value; - return fields.TryGetValue(key, out value) ? (Mapping)value : null; - } - - private static string GetValue(IDictionary fields, string key) { - DataItem value; - return fields.TryGetValue(key, out value) ? value.ToString() : null; + private static string GetValue(IDictionary fields, string key) { + string value; + return fields.TryGetValue(key, out value) ? value : null; } } } \ No newline at end of file diff --git a/src/Orchard/Environment/Extensions/Folders/IExtensionFolders.cs b/src/Orchard/Environment/Extensions/Folders/IExtensionFolders.cs index 94612540a..c3f8a4531 100644 --- a/src/Orchard/Environment/Extensions/Folders/IExtensionFolders.cs +++ b/src/Orchard/Environment/Extensions/Folders/IExtensionFolders.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using Orchard.Environment.Extensions.Models; -using Yaml.Grammar; namespace Orchard.Environment.Extensions.Folders { public interface IExtensionFolders { diff --git a/src/Orchard/Environment/Extensions/Models/ExtensionDescriptor.cs b/src/Orchard/Environment/Extensions/Models/ExtensionDescriptor.cs index ba2452a2f..db77d35be 100644 --- a/src/Orchard/Environment/Extensions/Models/ExtensionDescriptor.cs +++ b/src/Orchard/Environment/Extensions/Models/ExtensionDescriptor.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; namespace Orchard.Environment.Extensions.Models { public class ExtensionDescriptor { diff --git a/src/Orchard/Orchard.Framework.csproj b/src/Orchard/Orchard.Framework.csproj index e337ea53a..6e65c9ad7 100644 --- a/src/Orchard/Orchard.Framework.csproj +++ b/src/Orchard/Orchard.Framework.csproj @@ -149,10 +149,6 @@ - - False - ..\..\lib\yaml\Yaml.dll -