Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added docu to the tools and updated the rake file to have a task to b…

…uild the docs

From: James Gregory <james@jagregory.com>

git-svn-id: https://fluent-nhibernate.googlecode.com/svn/trunk@414 48f0ce17-cc52-0410-af8c-857c09b6549b
  • Loading branch information...
commit 22f1ae5da2c7a2ba460074b3674ccc61c1fa6ec4 1 parent f0b6dfe
@jagregory authored
View
14 .gitignore
@@ -1,6 +1,8 @@
-**/*.suo
-**/*.user
-**/*.sln*
-bin
-obj
-_ReSharper*
+**/*.suo
+**/*.user
+**/*.sln*
+bin
+obj
+_ReSharper*
+dist
+output
View
9 BuildUtils.rb
@@ -4,6 +4,7 @@
require 'activesupport'
require 'find'
require 'zip/zip'
+require 'fileutils'
class NUnitRunner
include FileTest
@@ -130,4 +131,12 @@ def create_zip(filename, root, excludes=/^$/)
zip.add(zip_path, path)
end
end
+end
+
+def docu(dll_name)
+ FileUtils.rm_r('output') if File.exists? 'output'
+
+ docu_exe = "tools/docu/docu.exe"
+
+ `#{docu_exe} #{dll_name}`
end
View
22 RakeFile
@@ -1,4 +1,4 @@
-COMPILE_TARGET = "debug"
+COMPILE_TARGET = "release"
require "BuildUtils.rb"
require 'fileutils'
@@ -132,4 +132,22 @@ task :create_binary_zip do
end
desc "Creates binary and source zip files"
-task :create_zips => [:create_source_zip, :create_binary_zip]
+task :create_zips => [:create_source_zip, :create_binary_zip]
+
+desc "Builds the API documentation and puts it in 'output'"
+task :build_docs do
+ puts "Creating docs"
+
+ docu("src/FluentNHibernate/bin/#{COMPILE_TARGET}/FluentNHibernate.dll")
+end
+
+desc "Creates a zip of the API documentation"
+task :create_zip_docs => :build_docs do
+ puts "Creating docs zip"
+ Dir.mkdir DIST_DIR unless File.exists? DIST_DIR
+ revision = get_svn_revision()
+
+ create_zip("#{DIST_DIR}/fluentnhibernate-docs-#{BUILD_NUMBER}#{revision}.zip", 'output/')
+
+ FileUtils.rm_r('output') if File.exists? 'output'
+end
View
2  src/CommonAssemblyInfo.cs
@@ -3,7 +3,7 @@
[assembly: AssemblyVersion("0.1.0.0")]
[assembly: AssemblyCopyright("Copyright 2008-2009 James Gregory and contributors (Paul Batum, Andrew Stewart, Chad Myers et al). All rights reserved.")]
-[assembly: AssemblyProduct("FluentNHibernate")]
+[assembly: AssemblyProduct("Fluent NHibernate")]
[assembly: AssemblyCompany("http://fluentnhibernate.org")]
[assembly: AssemblyConfiguration("debug")]
[assembly: AssemblyInformationalVersion("0.1.0.0")]
View
BIN  tools/docu/Interop.SparkLanguagePackageLib.dll
Binary file not shown
View
10 tools/docu/LICENSE.txt
@@ -0,0 +1,10 @@
+Copyright (c) 2009, James Gregory
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * The name of James Gregory may not be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
View
BIN  tools/docu/Spark.dll
Binary file not shown
View
BIN  tools/docu/SparkLanguage.dll
Binary file not shown
View
BIN  tools/docu/StructureMap.dll
Binary file not shown
View
BIN  tools/docu/docu.exe
Binary file not shown
View
BIN  tools/docu/docu.pdb
Binary file not shown
View
51 tools/docu/templates/!namespace/!type.spark
@@ -0,0 +1,51 @@
+# Formatter.NamespaceUrlFormat = "../{namespace}.htm";
+# Formatter.TypeUrlFormat = "../{type.namespace}/{type}.htm";
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title>${h(Type.PrettyName)} - ${WriteProductName(Assemblies[0])} Documentation</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link type="text/css" rel="stylesheet" href="../main.css" />
+ </head>
+ <body>
+ <namespaces />
+ <types />
+ <div class="header">
+ <p class="class"><strong>Type</strong> ${h(Type.PrettyName)}</p>
+ <p><strong>Namespace</strong> ${Namespace.Name}</p>
+ <p if="Type.ParentType != null && Type.ParentType.PrettyName != 'object'"><strong>Parent</strong> ${WriteReference(Type.ParentType)}</p>
+ <p if="Type.Interfaces.Count > 0"><strong>Interfaces</strong> ${WriteInterfaces(Type.Interfaces)}</p>
+ </div>
+ <div class="sub-header">
+ <if condition="Type.Summary.Count > 0">
+ <div id="summary">
+ ${WriteSummary(Type.Summary)}
+ </div>
+ </if>
+
+ <if condition="Type.Methods.Count > 0">
+ <h3 class="section">Methods</h3>
+ <ul>
+ <li each="var method in Type.Methods"><a href="#${method.Name}" class="type">${h(method.PrettyName)}</a></li>
+ </ul>
+ </if>
+
+ <if condition="Type.Properties.Count > 0">
+ <h3 class="section">Properties</h3>
+ <ul>
+ <li each="var property in Type.Properties"><a href="#${property.Name}" class="type">${h(property.Name)}</a></li>
+ </ul>
+ </if>
+ </div>
+
+ <var publicInstanceMethods="Type.Methods.Where(x => x.IsPublic && !x.IsStatic)" />
+ <methods methods="publicInstanceMethods" title="'Public instance methods'" />
+
+ <var publicStaticMethods="Type.Methods.Where(x => x.IsPublic && x.IsStatic)" />
+ <methods methods="publicStaticMethods" title="'Public static methods'" />
+
+ <properties properties="Type.Properties" title="'Public properties'" />
+
+ <use file="../_footer" />
+ </body>
+</html>
View
20 tools/docu/templates/!namespace/_methods.spark
@@ -0,0 +1,20 @@
+<if condition="methods.Count() > 0">
+ <h3 class="section">${title}</h3>
+
+ <div id="${method.Name}" class="method" each="var method in methods">
+ <h4>${h(method.ReturnType.PrettyName)} <strong>${h(method.PrettyName)}</strong>(${OutputMethodParams(method)})</h4>
+ <div class="content">
+ ${WriteSummary(method.Summary)}
+ <table>
+ <tr if="method.ReturnType.PrettyName != 'void'">
+ <td><code>return ${WriteReference(method.ReturnType)}</code></td>
+ <td></td>
+ </tr>
+ <tr each="var param in method.Parameters">
+ <td><code>${WriteReference(param.Reference)} ${param.Name}</code></td>
+ <td>${WriteSummary(param.Summary)}</td>
+ </tr>
+ </table>
+ </div>
+ </div>
+</if>
View
14 tools/docu/templates/!namespace/_namespaces.spark
@@ -0,0 +1,14 @@
+<div id="namespaces">
+ <h2 class="fixed">Namespaces</h2>
+ <div class="scroll">
+ <ul>
+ <li each="var ns in Namespaces">
+ <if condition="ns == Namespace">
+ <a href="../${ns.Name}/index.htm" class="current">${ns.Name}</a>
+ <else />
+ <a href="../${ns.Name}/index.htm">${ns.Name}</a>
+ </if>
+ </li>
+ </ul>
+ </div>
+</div>
View
17 tools/docu/templates/!namespace/_properties.spark
@@ -0,0 +1,17 @@
+<if condition="properties.Count() > 0">
+ <h3 class="section">${title}</h3>
+
+ <div id="${property.Name}" class="method" each="var property in properties">
+ <h4>${h(property.ReturnType.PrettyName)} <strong>${h(property.Name)}</strong> <if condition="property.HasGet">get;</if> <if condition="property.HasSet">set;</if></h4>
+ <div class="content">
+ ${WriteSummary(property.Summary)}
+ <table>
+ <tr>
+ <td>
+ <code>return ${WriteReference(property.ReturnType)}</code>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+</if>
View
14 tools/docu/templates/!namespace/_types.spark
@@ -0,0 +1,14 @@
+<div id="types">
+ <h2 class="fixed">Types</h2>
+ <div class="scroll">
+ <ul>
+ <li each="var type in Namespace.Types">
+ <if condition="type == Type">
+ <a href="../${type.Namespace.Name}/${type.Name}.htm" class="current">${h(type.PrettyName)}</a>
+ <else />
+ <a href="../${type.Namespace.Name}/${type.Name}.htm">${h(type.PrettyName)}</a>
+ </if>
+ </li>
+ </ul>
+ </div>
+</div>
View
25 tools/docu/templates/!namespace/index.spark
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title>${Namespace.Name} - ${WriteProductName(Assemblies[0])} Documentation</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link type="text/css" rel="stylesheet" href="../main.css" />
+ </head>
+ <body>
+ <namespaces />
+ <types />
+ <div class="header">
+ <p class="class"><strong>Namespace</strong> ${Namespace.Name}</p>
+ </div>
+ <div class="sub-header">
+ <h3 class="section">Types</h3>
+ <ul>
+ <for each="var type in Namespace.Types">
+ <li><a href="${type.Name}.htm">${h(type.PrettyName)}</a></li>
+ </for>
+ </ul>
+ </div>
+
+ <use file="../_footer" />
+ </body>
+</html>
View
4 tools/docu/templates/_footer.spark
@@ -0,0 +1,4 @@
+<div id="footer">
+ <p>Based on v${WriteVersion(Assemblies[0])} of ${WriteProductName(Assemblies[0])}</p>
+ <p>Generated by <a href="http://docu.jagregory.com">docu</a></p>
+</div>
View
8 tools/docu/templates/_namespaces.spark
@@ -0,0 +1,8 @@
+<div id="namespaces">
+ <h2 class="fixed">Namespaces</h2>
+ <div class="scroll">
+ <ul>
+ <li each="var ns in Namespaces"><a href="${ns.Name}/index.htm">${ns.Name}</a></li>
+ </ul>
+ </div>
+</div>
View
10 tools/docu/templates/_types.spark
@@ -0,0 +1,10 @@
+<div id="types">
+ <h2 class="fixed">Types</h2>
+ <div class="scroll">
+ <ul>
+ <for each="var ns in Namespaces">
+ <li each="var type in ns.Types"><a href="${ns.Name}/${type.Name}.htm">${h(type.PrettyName)}</a></li>
+ </for>
+ </ul>
+ </div>
+</div>
View
17 tools/docu/templates/index.spark
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title>${WriteProductName(Assemblies[0])} Documentation</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link type="text/css" rel="stylesheet" href="main.css" />
+ </head>
+ <body>
+ <namespaces />
+ <types />
+ <div class="header">
+ <p class="class">${WriteProductName(Assemblies[0])} Documentation</p>
+ </div>
+
+ <use file="_footer" />
+ </body>
+</html>
View
164 tools/docu/templates/main.css
@@ -0,0 +1,164 @@
+body {
+ margin: 0;
+ padding: 0;
+ font-family: Verdana,Arial,Helvetica,sans-serif;
+ font-size: 90%;
+}
+
+.header {
+ background: #048;
+ border-bottom: 3px solid #006;
+ margin: 0;
+ color: #FFF;
+ padding: 10px;
+ clear: left;
+ font-size: 13px;
+}
+
+.header p
+{
+ margin: 0 0 4px 0;
+}
+
+.header .class
+{
+ font-size: 24px;
+ font-weight: bold;
+}
+
+.header strong
+{
+ font-size: 13px;
+ width: 100px;
+ float: left;
+}
+
+.header a
+{
+ background: transparent;
+ color: #FFF;
+}
+
+.header a:hover
+{
+ background: #FFF;
+ color: #039;
+}
+
+.sub-header {
+ margin: 0 20px;
+}
+
+.sub-header ul
+{
+ margin: 0 0 0 30px;
+ padding: 0;
+ list-style: none;
+}
+
+.sub-header ul li {
+ float: left;
+ margin: 0 15px 0 0;
+ padding: 0;
+ text-indent: 0;
+}
+
+.section {
+ color: #333;
+ border-bottom: 1px solid #999;
+ margin: 10px 10px 0 10px;
+ padding: 10px 0 0 0;
+ clear: left;
+}
+
+div.method
+{
+ background: #EFEFEF;
+ border: 1px dotted #CCC;
+ margin: 5px 10px 15px 10px;
+ padding: 0;
+}
+
+div.method h4
+{
+ background:#CCC;
+ border-bottom:1px solid #666;
+ color:#000;
+ padding:2px 5px;
+ margin:0;
+ font-weight: normal;
+}
+
+div.method .content
+{
+ padding: 0 10px 5px 10px;
+}
+
+#summary
+{
+ background:#EFEFEF;
+ border:1px dotted #999999;
+ margin: 5px 10px 15px 10px;
+ padding: 5px 10px;
+}
+
+#namespaces, #types
+{
+ width: 50%;
+ float: left;
+ background: #FFF;
+}
+
+h2.fixed {
+ background: #CCC;
+ color: #000;
+ border-top: 1px solid #999;
+ border-bottom: 1px solid #999;
+ margin: 0;
+ padding: 2px 10px;
+ font-size: 12px;
+ font-weight: bold;
+}
+
+div.scroll
+{
+ overflow: scroll;
+ height: 150px;
+}
+
+#namespaces ul, #types ul
+{
+ list-style: none;
+ margin: 0 0 10px 0;
+ padding: 0;
+}
+
+#namespaces ul li, #types ul li
+{
+ text-indent: 0;
+ padding-left: 10px;
+}
+
+a {
+ background: #eef;
+ color: #039;
+ text-decoration: none;
+}
+
+a:hover {
+ color: #FFF;
+ background: #039;
+}
+
+#namespaces a.current, #types a.current {
+ background: #039;
+ color: #FFF;
+ text-decoration: none;
+}
+
+#footer
+{
+ text-align: center;
+ font-size: 10px;
+ color: #888;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.