Extending manifest parser to support flatenned default feature.

--HG--
branch : dev
This commit is contained in:
Andre Rodrigues
2011-03-16 08:55:07 -07:00
parent 7d44329f5a
commit 173af2bcbe
49 changed files with 260 additions and 258 deletions

View File

@@ -169,6 +169,26 @@ Features:
Assert.That(descriptor.Features.First().Description, Is.EqualTo("My super wiki module for Orchard.")); Assert.That(descriptor.Features.First().Description, Is.EqualTo("My super wiki module for Orchard."));
} }
[Test]
public void ExtensionDescriptorsShouldBeParsedForMinimalModuleTxtWithSimpleFormat() {
_folders.Manifests.Add("SuperWiki", @"
Name: SuperWiki
Version: 1.0.3
OrchardVersion: 1
Description: My super wiki module for Orchard.
");
var descriptor = _manager.AvailableExtensions().Single();
Assert.That(descriptor.Id, Is.EqualTo("SuperWiki"));
Assert.That(descriptor.Version, Is.EqualTo("1.0.3"));
Assert.That(descriptor.OrchardVersion, Is.EqualTo("1"));
Assert.That(descriptor.Features.Count(), Is.EqualTo(1));
Assert.That(descriptor.Features.First().Id, Is.EqualTo("SuperWiki"));
Assert.That(descriptor.Features.First().Extension.Id, Is.EqualTo("SuperWiki"));
Assert.That(descriptor.Features.First().Description, Is.EqualTo("My super wiki module for Orchard."));
}
[Test] [Test]
public void ExtensionDescriptorsShouldBeParsedForCompleteModuleTxt() { public void ExtensionDescriptorsShouldBeParsedForCompleteModuleTxt() {
@@ -250,6 +270,84 @@ Features:
} }
} }
[Test]
public void ExtensionDescriptorsShouldBeParsedForCompleteModuleTxtWithSimpleFormat() {
_folders.Manifests.Add("AnotherWiki", @"
Name: AnotherWiki
Author: Coder Notaprogrammer
Website: http://anotherwiki.codeplex.com
Version: 1.2.3
OrchardVersion: 1
Description: Module Description
FeatureDescription: My super wiki module for Orchard.
Dependencies: Versioning, Search
Category: Content types
Features:
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();
Assert.That(descriptor.Id, Is.EqualTo("AnotherWiki"));
Assert.That(descriptor.Name, Is.EqualTo("AnotherWiki"));
Assert.That(descriptor.Author, Is.EqualTo("Coder Notaprogrammer"));
Assert.That(descriptor.WebSite, Is.EqualTo("http://anotherwiki.codeplex.com"));
Assert.That(descriptor.Version, Is.EqualTo("1.2.3"));
Assert.That(descriptor.OrchardVersion, Is.EqualTo("1"));
Assert.That(descriptor.Description, Is.EqualTo("Module Description"));
Assert.That(descriptor.Features.Count(), Is.EqualTo(4));
foreach (var featureDescriptor in descriptor.Features) {
switch (featureDescriptor.Id) {
case "AnotherWiki":
Assert.That(featureDescriptor.Extension, Is.SameAs(descriptor));
Assert.That(featureDescriptor.Description, Is.EqualTo("My super wiki module for Orchard."));
Assert.That(featureDescriptor.Category, Is.EqualTo("Content types"));
Assert.That(featureDescriptor.Dependencies.Count(), Is.EqualTo(2));
Assert.That(featureDescriptor.Dependencies.Contains("Versioning"));
Assert.That(featureDescriptor.Dependencies.Contains("Search"));
break;
case "AnotherWiki Editor":
Assert.That(featureDescriptor.Extension, Is.SameAs(descriptor));
Assert.That(featureDescriptor.Description, Is.EqualTo("A rich editor for wiki contents."));
Assert.That(featureDescriptor.Category, Is.EqualTo("Input methods"));
Assert.That(featureDescriptor.Dependencies.Count(), Is.EqualTo(2));
Assert.That(featureDescriptor.Dependencies.Contains("TinyMCE"));
Assert.That(featureDescriptor.Dependencies.Contains("AnotherWiki"));
break;
case "AnotherWiki DistributionList":
Assert.That(featureDescriptor.Extension, Is.SameAs(descriptor));
Assert.That(featureDescriptor.Description, Is.EqualTo("Sends e-mail alerts when wiki contents gets published."));
Assert.That(featureDescriptor.Category, Is.EqualTo("Email"));
Assert.That(featureDescriptor.Dependencies.Count(), Is.EqualTo(2));
Assert.That(featureDescriptor.Dependencies.Contains("AnotherWiki"));
Assert.That(featureDescriptor.Dependencies.Contains("Email Subscriptions"));
break;
case "AnotherWiki Captcha":
Assert.That(featureDescriptor.Extension, Is.SameAs(descriptor));
Assert.That(featureDescriptor.Description, Is.EqualTo("Kills spam. Or makes it zombie-like."));
Assert.That(featureDescriptor.Category, Is.EqualTo("Spam"));
Assert.That(featureDescriptor.Dependencies.Count(), Is.EqualTo(2));
Assert.That(featureDescriptor.Dependencies.Contains("AnotherWiki"));
Assert.That(featureDescriptor.Dependencies.Contains("reCaptcha"));
break;
default:
Assert.Fail("Features not parsed correctly");
break;
}
}
}
[Test] [Test]
public void ExtensionManagerShouldLoadFeatures() { public void ExtensionManagerShouldLoadFeatures() {
var extensionLoader = new StubLoaders(); var extensionLoader = new StubLoaders();

View File

@@ -5,8 +5,6 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The common module introduces content parts that are going to be used by most content types (common, body and routable). Description: The common module introduces content parts that are going to be used by most content types (common, body and routable).
Features: FeatureDescription: Core content parts.
Common:
Description: Core content parts.
Dependencies: Settings Dependencies: Settings
Category: Core Category: Core

View File

@@ -5,8 +5,6 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The containers module introduces container and containable behaviors for content items. Description: The containers module introduces container and containable behaviors for content items.
Features: FeatureDescription: Container and containable parts to enable parent-child relationships between content items.
Containers:
Description: Container and containable parts to enable parent-child relationships between content items.
Dependencies: Contents, Routable Dependencies: Contents, Routable
Category: Content Category: Content

View File

@@ -5,7 +5,5 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The contents module enables the creation of custom content types. Description: The contents module enables the creation of custom content types.
Features: FeatureDescription: Default custom content type definition, creation and management.
Contents:
Description: Default custom content type definition, creation and management.
Category: Core Category: Core

View File

@@ -5,7 +5,5 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The dashboard module is providing the dashboard screen of the admininstration UI of the application. Description: The dashboard module is providing the dashboard screen of the admininstration UI of the application.
Features: FeatureDescription: Standard admin dashboard.
Dashboard:
Description: Standard admin dashboard.
Category: Core Category: Core

View File

@@ -5,7 +5,5 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The Feeds module is providing RSS feeds to content items. Description: The Feeds module is providing RSS feeds to content items.
Features: FeatureDescription: RSS feeds for content items.
Feeds:
Description: RSS feeds for content items.
Category: Syndication Category: Syndication

View File

@@ -5,7 +5,5 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The HomePage module enables the promotion of a content item or container to be the home page of the site. Description: The HomePage module enables the promotion of a content item or container to be the home page of the site.
Features: FeatureDescription: Standard site home page that allows a specified content type or container to *be* the home page.
HomePage:
Description: Standard site home page that allows a specified content type or container to *be* the home page.
Category: Core Category: Core

View File

@@ -5,7 +5,5 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The navigation module creates and manages a simple navigation menu for the front-end of the application and allows you to add content items to the admin menu. Description: The navigation module creates and manages a simple navigation menu for the front-end of the application and allows you to add content items to the admin menu.
Features: FeatureDescription: Menu management.
Navigation:
Description: Menu management.
Category: Core Category: Core

View File

@@ -5,7 +5,5 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The dashboard module is providing the reports screen of the application. Description: The dashboard module is providing the reports screen of the application.
Features: FeatureDescription: Reports management.
Reports:
Description: Reports management.
Category: Core Category: Core

View File

@@ -5,8 +5,6 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The routable module enables content items to be accessed through a friendly human-readable URL. Description: The routable module enables content items to be accessed through a friendly human-readable URL.
Features: FeatureDescription: Routable content part.
Routable:
Description: Routable content part.
Dependencies: Settings Dependencies: Settings
Category: Core Category: Core

View File

@@ -5,7 +5,5 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The scheduling module enables background task scheduling. Description: The scheduling module enables background task scheduling.
Features: FeatureDescription: Scheduled background tasks.
Scheduling:
Description: Scheduled background tasks.
Category: Core Category: Core

View File

@@ -5,7 +5,5 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The settings module creates site settings that other modules can contribute to. Description: The settings module creates site settings that other modules can contribute to.
Features: FeatureDescription: Site settings.
Settings:
Description: Site settings.
Category: Core Category: Core

View File

@@ -5,7 +5,5 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The shapes module contains core shape templates and display hooks. Description: The shapes module contains core shape templates and display hooks.
Features: FeatureDescription: Core shape templates and display hooks.
Shapes:
Description: Core shape templates and display hooks.
Category: Core Category: Core

View File

@@ -5,7 +5,5 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The XmlRpc module enables creation of contents from client applications such as LiveWriter. Description: The XmlRpc module enables creation of contents from client applications such as LiveWriter.
Features: FeatureDescription: XML-RPC opt-in implementation.
XmlRpc:
Description: XML-RPC opt-in implementation.
Category: Content Publishing Category: Content Publishing

View File

@@ -5,8 +5,5 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The Lucene module enables the site to be indexed using Lucene.NET. The index generated by this module can then be used by the search module to provide an integrated full-text search experience to a web site. Description: The Lucene module enables the site to be indexed using Lucene.NET. The index generated by this module can then be used by the search module to provide an integrated full-text search experience to a web site.
Features: FeatureDescription: Lucene indexing services.
Lucene:
Name: Lucene
Description: Lucene indexing services.
Category: Search Category: Search

View File

@@ -5,9 +5,6 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The ArchiveLater module introduces scheduled archiving functionality. Description: The ArchiveLater module introduces scheduled archiving functionality.
Features: FeatureDescription: Scheduled archiving.
Orchard.ArchiveLater:
Name: Archive Later
Description: Scheduled archiving.
Category: Content Category: Content
Dependencies: Common, Scheduling, Orchard.jQuery Dependencies: Common, Scheduling, Orchard.jQuery

View File

@@ -5,12 +5,10 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The Orchard Blogs module is implementing basic blogging features. Description: The Orchard Blogs module is implementing basic blogging features.
Features: FeatureDescription: A simple web log.
Orchard.Blogs:
Name: Blogs
Description: A simple web log.
Dependencies: Shapes, Common, Routable, Feeds, Navigation, Orchard.Widgets, Orchard.jQuery, Orchard.PublishLater Dependencies: Shapes, Common, Routable, Feeds, Navigation, Orchard.Widgets, Orchard.jQuery, Orchard.PublishLater
Category: Content Category: Content
Features:
Orchard.Blogs.RemotePublishing: Orchard.Blogs.RemotePublishing:
Name: Remote Blog Publishing Name: Remote Blog Publishing
Description: Blog easier using a dedicated MetaWeblogAPI-compatible publishing tool. Description: Blog easier using a dedicated MetaWeblogAPI-compatible publishing tool.

View File

@@ -5,8 +5,5 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: Tools to create Orchard components. Description: Tools to create Orchard components.
Features: FeatureDescription: Tools to create Orchard components.
Orchard.CodeGeneration:
Name: Code Generation
Description: Tools to create Orchard components.
Category: Developer Category: Developer

View File

@@ -5,9 +5,6 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The comments system implemented by this module can be applied to arbitrary Orchard content types, such as blogs and pages. It includes comment validation and spam protection through the Akismet service. Description: The comments system implemented by this module can be applied to arbitrary Orchard content types, such as blogs and pages. It includes comment validation and spam protection through the Akismet service.
Features: FeatureDescription: Standard content item comments.
Orchard.Comments:
Name: Comments
Description: Standard content item comments.
Dependencies: Settings Dependencies: Settings
Category: Social Category: Social

View File

@@ -4,9 +4,6 @@ Author: The Orchard Team
Website: http://orchardproject.net Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Features:
Orchard.ContentTypes:
Name: Content Types
Description: ContentTypes modules enables the creation and alteration of content types not based on code. Description: ContentTypes modules enables the creation and alteration of content types not based on code.
Dependencies: Contents Dependencies: Contents
Category: Content Category: Content

View File

@@ -5,12 +5,10 @@ Website: http://orchardproject.net
Version: 1.0 Version: 1.0
OrchardVersion: 1.0 OrchardVersion: 1.0
Description: Contains designer tools to ease the Themes development process Description: Contains designer tools to ease the Themes development process
Features:
Orchard.DesignerTools:
Name: Shape Tracing
Category: Designer Category: Designer
Description: Displays all currently displayed shapes and some information to customize them FeatureDescription: Displays all currently displayed shapes and some information to customize them
Dependencies: Orchard.jQuery Dependencies: Orchard.jQuery
Features:
UrlAlternates: UrlAlternates:
Name: Url Alternates Name: Url Alternates
Category: Designer Category: Designer

View File

@@ -5,9 +5,6 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The Email Messaging module adds Email sending functionalities. Description: The Email Messaging module adds Email sending functionalities.
Features: FeatureDescription: Email Messaging services.
Orchard.Email:
Name: Email
Description: Email Messaging services.
Category: Messaging Category: Messaging
Dependencies: Orchard.Messaging Dependencies: Orchard.Messaging

View File

@@ -5,11 +5,8 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: An assortment of debugging tools. Description: An assortment of debugging tools.
Features:
Orchard.Experimental:
Name: Experimental
Description: An assortment of debugging tools.
Category: Developer Category: Developer
Features:
Profiling: Profiling:
Name: Profiling Name: Profiling
Description: Tools to help profile Orchard. Description: Tools to help profile Orchard.

View File

@@ -5,8 +5,5 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: Provides content item data import and export capability. Description: Provides content item data import and export capability.
Features: FeatureDescription: Imports and exports content item data
Orchard.ImportExport:
Name: Import Export
Description: Imports and exports content item data
Category: Content Category: Content

View File

@@ -5,8 +5,5 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The Indexing module enables the site to be indexed. The index generated by this module can then be used by the search module to provide an integrated full-text search experience to a web site. Description: The Indexing module enables the site to be indexed. The index generated by this module can then be used by the search module to provide an integrated full-text search experience to a web site.
Features: FeatureDescription: Indexing infrastructure. Requires an index implementation like the Lucene module.
Orchard.Indexing:
Name: Indexing
Description: Indexing infrastructure. Requires an index implementation like the Lucene module.
Category: Search Category: Search

View File

@@ -5,9 +5,6 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: Introduces a preconfigured container-enabled content type. Description: Introduces a preconfigured container-enabled content type.
Features: FeatureDescription: A basic container-enabled content type.
Orchard.Lists:
Name: Lists
Description: A basic container-enabled content type.
Dependencies: Contents, Containers, Navigation Dependencies: Contents, Containers, Navigation
Category: Content Category: Content

View File

@@ -5,9 +5,6 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The localization module enables the localization of content items. Description: The localization module enables the localization of content items.
Features: FeatureDescription: Localize content items.
Orchard.Localization:
Name: Localization
Description: Localize content items.
Dependencies: Settings Dependencies: Settings
Category: Content Category: Content

View File

@@ -5,8 +5,5 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The media module offer basic media management features. It currently only supports image files. Storage goes into the current Orchard file system, which can be the server's physical file system or Azure blob storage. Description: The media module offer basic media management features. It currently only supports image files. Storage goes into the current Orchard file system, which can be the server's physical file system or Azure blob storage.
Features: FeatureDescription: File system based media upload, storage and management.
Orchard.Media:
Name: Media
Description: File system based media upload, storage and management.
Category: Media Category: Media

View File

@@ -5,9 +5,6 @@ Website: http://orchardproject.net
Version: 1.0 Version: 1.0
OrchardVersion: 1.0 OrchardVersion: 1.0
Description: Description for the module Description: Description for the module
Features:
Orchard.MediaPicker:
Name: MediaPicker
Dependencies: Orchard.Media, Orchard.jQuery Dependencies: Orchard.Media, Orchard.jQuery
Description: UI for browsing for, uploading, or selecting an image for an HTML editor. FeatureDescription: UI for browsing for, uploading, or selecting an image for an HTML editor.
Category: Input Editor Category: Input Editor

View File

@@ -5,9 +5,6 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The Messaging module adds messaging functionalities. Description: The Messaging module adds messaging functionalities.
Features: FeatureDescription: Messaging services.
Orchard.Messaging:
Name: Messaging
Description: Messaging services.
Category: Messaging Category: Messaging
Dependencies: Settings Dependencies: Settings

View File

@@ -5,11 +5,9 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: Data migration commands. Description: Data migration commands.
Features: FeatureDescription: Data migration commands.
Orchard.Migrations:
Name: Migrations
Description: Data migration commands.
Category: Developer Category: Developer
Features:
DatabaseUpdate: DatabaseUpdate:
Name: Database Update Name: Database Update
Description: Commands for updating the database schema according to the definition of the "Record" classes in code. Description: Commands for updating the database schema according to the definition of the "Record" classes in code.

View File

@@ -5,8 +5,5 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The Modules module enables the administrator of the site to manage the installed modules as well as activate and de-activate features. Description: The Modules module enables the administrator of the site to manage the installed modules as well as activate and de-activate features.
Features: FeatureDescription: Standard module and feature management.
Orchard.Modules:
Name: Modules
Description: Standard module and feature management.
Category: Core Category: Core

View File

@@ -5,8 +5,5 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The multi-tenancy module enables multiple Orchard sites to run in isolation inside of a single web application, improving site density on a single server or hosted account. Description: The multi-tenancy module enables multiple Orchard sites to run in isolation inside of a single web application, improving site density on a single server or hosted account.
Features: FeatureDescription: Configure multiple site tenants.
Orchard.MultiTenancy:
Name: Multi Tenancy
Description: Configure multiple site tenants.
Category: Hosting Category: Hosting

View File

@@ -5,16 +5,14 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The packaging module enables packaging modules using the OPC format. Description: The packaging module enables packaging modules using the OPC format.
FeatureDescription: Commands for creating/installing local modules.
Category: Packaging
Dependencies: PackagingServices
Features: Features:
PackagingServices: PackagingServices:
Name: Packaging Services Name: Packaging Services
Description: Core services for packaging using the OPC format. Description: Core services for packaging using the OPC format.
Category: Packaging Category: Packaging
Orchard.Packaging:
Name: Packaging
Description: Commands for creating/installing local modules.
Category: Packaging
Dependencies: PackagingServices
Gallery: Gallery:
Name: Gallery Name: Gallery
Description: Module gallery management. Description: Module gallery management.

View File

@@ -5,9 +5,6 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: Introduces a preconfigured page content type. Description: Introduces a preconfigured page content type.
Features: FeatureDescription: A basic page content type.
Orchard.Pages:
Name: Pages
Description: A basic page content type.
Dependencies: Contents Dependencies: Contents
Category: Content Category: Content

View File

@@ -5,9 +5,6 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The PublishLater module introduces draft creation and scheduled publishing functionality. Description: The PublishLater module introduces draft creation and scheduled publishing functionality.
Features: FeatureDescription: Draft creation and scheduled publishing.
Orchard.PublishLater:
Name: Publish Later
Description: Draft creation and scheduled publishing.
Category: Content Category: Content
Dependencies: Common, Scheduling, Orchard.jQuery Dependencies: Common, Scheduling, Orchard.jQuery

View File

@@ -5,8 +5,5 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: Provides Orchard Recipes. Description: Provides Orchard Recipes.
Features: FeatureDescription: Implementation of Orchard recipes.
Orchard.Recipes:
Name: Recipes
Description: Implementation of Orchard recipes.
Category: Core Category: Core

View File

@@ -5,9 +5,6 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The roles module is adding the ability to assign roles to users. It's also providing a set of default roles for which other modules can define default permissions. Description: The roles module is adding the ability to assign roles to users. It's also providing a set of default roles for which other modules can define default permissions.
Features: FeatureDescription: Standard user roles.
Orchard.Roles:
Name: Roles
Description: Standard user roles.
Category: Core Category: Core
Dependencies: Orchard.Users Dependencies: Orchard.Users

View File

@@ -5,9 +5,6 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The DLR scripting module enables the possibility to execute scripts using the DLR. Description: The DLR scripting module enables the possibility to execute scripts using the DLR.
Features: FeatureDescription: DLR scripting support.
Orchard.Scripting.Dlr:
Name: DLR Scripting
Description: DLR scripting support.
Dependencies: Orchard.Scripting Dependencies: Orchard.Scripting
Category: Scripting Category: Scripting

View File

@@ -5,11 +5,9 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The scripting module enables the possibility to execute scripts using a simple custom scripting language. Description: The scripting module enables the possibility to execute scripts using a simple custom scripting language.
Features: FeatureDescription: Scripting support.
Orchard.Scripting:
Name: Scripting
Description: Scripting support.
Category: Scripting Category: Scripting
Features:
Orchard.Scripting.Lightweight: Orchard.Scripting.Lightweight:
Name: Lightweight scripting Name: Lightweight scripting
Description: Custom lightweight and simple scripting language. Description: Custom lightweight and simple scripting language.

View File

@@ -5,9 +5,6 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The search module enables the management of the search index and provides the front-end searching user interface. Description: The search module enables the management of the search index and provides the front-end searching user interface.
Features: FeatureDescription: Standard interface to Orchard's built-in search.
Orchard.Search:
Name: Search
Description: Standard interface to Orchard's built-in search.
Category: Search Category: Search
Dependencies: Orchard.Indexing Dependencies: Orchard.Indexing

View File

@@ -4,8 +4,5 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The setup module is creating the application's setup experience. Description: The setup module is creating the application's setup experience.
Features: FeatureDescription: Standard site setup. This feature is disabled automatically once setup is over.
Orchard.Setup:
Name: Setup
Description: Standard site setup. This feature is disabled automatically once setup is over.
Category: Core Category: Core

View File

@@ -5,9 +5,6 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The tags module is providing basic tagging for arbitrary content types. Description: The tags module is providing basic tagging for arbitrary content types.
Features: FeatureDescription: Tag a content item.
Orchard.Tags:
Name: Tags
Description: Tag a content item.
Dependencies: Settings Dependencies: Settings
Category: Navigation Category: Navigation

View File

@@ -5,8 +5,5 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The themes module makes it possible for Orchard applications to customize the look and feel of an Orchard web site. Description: The themes module makes it possible for Orchard applications to customize the look and feel of an Orchard web site.
Features: FeatureDescription: Basic theming capability.
Orchard.Themes:
Name: Themes
Description: Basic theming capability.
Category: Core Category: Core

View File

@@ -5,9 +5,6 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The users module enables user management. Description: The users module enables user management.
Features: FeatureDescription: Standard users.
Orchard.Users:
Name: Users
Description: Standard users.
Category: Core Category: Core
Dependencies: Settings Dependencies: Settings

View File

@@ -5,9 +5,6 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: An implementation of widgets for Orchard. Description: An implementation of widgets for Orchard.
Features: FeatureDescription: An implementation of widgets.
Orchard.Widgets:
Name: Widgets
Description: An implementation of widgets.
Category: Widget Category: Widget
Dependencies: Orchard.Scripting Dependencies: Orchard.Scripting

View File

@@ -5,8 +5,5 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The jQuery module contains the jQuery and related script libraries. Description: The jQuery module contains the jQuery and related script libraries.
Features: FeatureDescription: A common location for jQuery and related script libraries.
Orchard.jQuery:
Name: jQuery
Description: A common location for jQuery and related script libraries.
Category: Core Category: Core

View File

@@ -5,8 +5,5 @@ Website: http://orchardproject.net
Version: 1.0.20 Version: 1.0.20
OrchardVersion: 1.0.20 OrchardVersion: 1.0.20
Description: The TinyMCE module enables rich text contents to be created using a "What You See Is What You Get" user interface. Description: The TinyMCE module enables rich text contents to be created using a "What You See Is What You Get" user interface.
Features: FeatureDescription: TinyMCE HTML WYSIWYG editor.
TinyMce:
Name: TinyMce
Description: TinyMCE HTML WYSIWYG editor.
Category: Input Editor Category: Input Editor

View File

@@ -101,7 +101,7 @@ namespace Orchard.Environment.Extensions.Folders {
Zones = GetValue(manifest, "Zones"), Zones = GetValue(manifest, "Zones"),
BaseTheme = GetValue(manifest, "BaseTheme"), BaseTheme = GetValue(manifest, "BaseTheme"),
}; };
extensionDescriptor.Features = GetFeaturesForExtension(GetValue(manifest, "Features"), extensionDescriptor); extensionDescriptor.Features = GetFeaturesForExtension(manifest, extensionDescriptor);
return extensionDescriptor; return extensionDescriptor;
} }
@@ -174,6 +174,15 @@ namespace Orchard.Environment.Extensions.Folders {
case "BaseTheme": case "BaseTheme":
manifest.Add("BaseTheme", field[1]); manifest.Add("BaseTheme", field[1]);
break; break;
case "Dependencies":
manifest.Add("Dependencies", field[1]);
break;
case "Category":
manifest.Add("Category", field[1]);
break;
case "FeatureDescription":
manifest.Add("FeatureDescription", field[1]);
break;
case "Features": case "Features":
manifest.Add("Features", reader.ReadToEnd()); manifest.Add("Features", reader.ReadToEnd());
break; break;
@@ -184,8 +193,23 @@ namespace Orchard.Environment.Extensions.Folders {
return manifest; return manifest;
} }
private static IEnumerable<FeatureDescriptor> GetFeaturesForExtension(string featuresText, ExtensionDescriptor extensionDescriptor) { private static IEnumerable<FeatureDescriptor> GetFeaturesForExtension(IDictionary<string, string> manifest, ExtensionDescriptor extensionDescriptor) {
var featureDescriptors = new List<FeatureDescriptor>(); var featureDescriptors = new List<FeatureDescriptor>();
// Default feature
FeatureDescriptor defaultFeature = new FeatureDescriptor {
Id = extensionDescriptor.Id,
Name = extensionDescriptor.Name,
Description = GetValue(manifest, "FeatureDescription") ?? GetValue(manifest, "Description") ?? string.Empty,
Dependencies = ParseFeatureDependenciesEntry(GetValue(manifest, "Dependencies")),
Extension = extensionDescriptor,
Category = GetValue(manifest, "Category")
};
featureDescriptors.Add(defaultFeature);
// Remaining features
string featuresText = GetValue(manifest, "Features");
if (featuresText != null) { if (featuresText != null) {
FeatureDescriptor featureDescriptor = null; FeatureDescriptor featureDescriptor = null;
using (StringReader reader = new StringReader(featuresText)) { using (StringReader reader = new StringReader(featuresText)) {
@@ -193,16 +217,24 @@ namespace Orchard.Environment.Extensions.Folders {
while ((line = reader.ReadLine()) != null) { while ((line = reader.ReadLine()) != null) {
if (IsFeatureDeclaration(line)) { if (IsFeatureDeclaration(line)) {
if (featureDescriptor != null) { if (featureDescriptor != null) {
if (!featureDescriptor.Equals(defaultFeature)) {
featureDescriptors.Add(featureDescriptor); featureDescriptors.Add(featureDescriptor);
}
featureDescriptor = null; featureDescriptor = null;
} }
string[] featureDeclaration = line.Split(new[] { ":" }, StringSplitOptions.RemoveEmptyEntries);
string featureDescriptorId = featureDeclaration[0].Trim();
if (featureDescriptorId == extensionDescriptor.Id) {
featureDescriptor = defaultFeature;
featureDescriptor.Name = extensionDescriptor.Name;
}
else {
featureDescriptor = new FeatureDescriptor { featureDescriptor = new FeatureDescriptor {
Id = featureDescriptorId,
Extension = extensionDescriptor Extension = extensionDescriptor
}; };
string[] featureDeclaration = line.Split(new[] { ":" }, StringSplitOptions.RemoveEmptyEntries);
featureDescriptor.Id = featureDeclaration[0].Trim();
if (featureDescriptor.Id == extensionDescriptor.Id) {
featureDescriptor.Name = extensionDescriptor.Name;
} }
} }
else if (IsFeatureFieldDeclaration(line)) { else if (IsFeatureFieldDeclaration(line)) {
@@ -239,20 +271,12 @@ namespace Orchard.Environment.Extensions.Folders {
throw new ArgumentException(message); throw new ArgumentException(message);
} }
} }
if (featureDescriptor != null)
if (featureDescriptor != null && !featureDescriptor.Equals(defaultFeature))
featureDescriptors.Add(featureDescriptor); featureDescriptors.Add(featureDescriptor);
} }
} }
if (!featureDescriptors.Any(fd => fd.Id == extensionDescriptor.Id)) {
featureDescriptors.Add(new FeatureDescriptor {
Id = extensionDescriptor.Id,
Name = extensionDescriptor.Name,
Dependencies = new string[0],
Extension = extensionDescriptor
});
}
return featureDescriptors; return featureDescriptors;
} }
@@ -277,12 +301,15 @@ namespace Orchard.Environment.Extensions.Folders {
return false; return false;
} }
private static string[] ParseFeatureDependenciesEntry(string dependenciesEntry) { private static IEnumerable<string> ParseFeatureDependenciesEntry(string dependenciesEntry) {
if (string.IsNullOrEmpty(dependenciesEntry))
return Enumerable.Empty<string>();
var dependencies = new List<string>(); var dependencies = new List<string>();
foreach (var s in dependenciesEntry.Split(',')) { foreach (var s in dependenciesEntry.Split(',')) {
dependencies.Add(s.Trim()); dependencies.Add(s.Trim());
} }
return dependencies.ToArray(); return dependencies;
} }
private static string GetValue(IDictionary<string, string> fields, string key) { private static string GetValue(IDictionary<string, string> fields, string key) {