Skip to content

Commit

Permalink
Added library to Nuget
Browse files Browse the repository at this point in the history
Uploaded v0.2.2 to nuget. Added license and other minor changes to
comments.
  • Loading branch information
CameronWills committed Nov 28, 2015
1 parent 110b8dd commit 68b2915
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 62 deletions.
4 changes: 2 additions & 2 deletions FatAntelope.CommandLine/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.2.0.0")]
[assembly: AssemblyFileVersion("0.2.0.0")]
[assembly: AssemblyVersion("0.2.2.0")]
[assembly: AssemblyFileVersion("0.2.2.0")]
1 change: 0 additions & 1 deletion FatAntelope/FatAntelope.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
<Compile Include="Utility\ByteArrayComparer.cs" />
<Compile Include="Utility\Murmur3Hasher.cs" />
<Compile Include="Writers\BaseDiffWriter.cs" />
<Compile Include="Writers\DebugDiffWriter.cs" />
<Compile Include="Writers\XdtDiffWriter.cs" />
<Compile Include="XDiff.cs" />
<Compile Include="XNode.cs" />
Expand Down
16 changes: 16 additions & 0 deletions FatAntelope/FatAntelope.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>$title$</id>
<version>$version$</version>
<title>$title$</title>
<authors>Cameron Wills</authors>
<owners>Cameron Wills</owners>
<licenseUrl>https://raw.githubusercontent.com/CameronWills/FatAntelope/master/LICENSE.md</licenseUrl>
<projectUrl>https://github.com/CameronWills/FatAntelope</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>$description$</description>
<releaseNotes>Minor bug fixes and improvements to XDT output.</releaseNotes>
<tags>xdt config transform xml diff compare diffgram tree comparison cheetah slowcheetah</tags>
</metadata>
</package>
6 changes: 3 additions & 3 deletions FatAntelope/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("FatAntelope")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyDescription("A tool for comparing two .config (xml) files and generating an XDT transform. Can also be used for unordered XML comparison, as an alternative to Microsoft's XML Diff tool. Extend BaseDiffWriter to create custom patches or diff grams.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FatAntelope")]
Expand All @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.2.0.0")]
[assembly: AssemblyFileVersion("0.2.0.0")]
[assembly: AssemblyVersion("0.2.2.0")]
[assembly: AssemblyFileVersion("0.2.2.0")]
50 changes: 0 additions & 50 deletions FatAntelope/Writers/DebugDiffWriter.cs

This file was deleted.

2 changes: 1 addition & 1 deletion FatAntelope/Writers/XdtDiffWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ private TransformType GetTransformType(XNode oldElement, XNode newElement)
var attributes = GetCounts(oldElement.Attributes, newElement.Attributes);
var elements = GetCounts(oldElement.Elements, newElement.Elements);

// If mostly only element inserts & deletes
// If mostly only element inserts & deletes, then replace
if (elements.Deletes + elements.Inserts > 0
&& elements.Unchanged + elements.Updates == 0
&& attributes.Unchanged < elements.TotalChanges())
Expand Down
8 changes: 4 additions & 4 deletions FatAntelope/XDiff.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ namespace FatAntelope
{
/// <summary>
/// The XDiff algorithm for doing an unordered comparison of two xml documents and flaging the changed, inserted and deleted nodes.
/// I've ported this algorithm to C#, with some modifications, from the original XDiff algorithm by Yuan Wang described here:
/// A C# port, with some modifications, of the original X-Diff algorithm by Yuan Wang described here:
/// http://pages.cs.wisc.edu/~yuanwang/xdiff.html
/// The matching algorithm uses the minimum-cost maximum flow algorithm when necessary, to find the minimum-cost bipartite mapping of the two trees.
/// The node matching logic uses the minimum-cost maximum flow algorithm when necessary, to find the minimum-cost bipartite mapping of the two trees.
/// This gives an optimal matching of nodes between the two trees.
/// </summary>
public class XDiff
Expand Down Expand Up @@ -83,7 +83,7 @@ public static void Diff(XTree tree1, XTree tree2)
}

/// <summary>
/// Compare and match the two nodes (and their children).
/// Compare and match the two elements (and their children).
/// </summary>
private static void DiffElements(XNode node1, XNode node2)
{
Expand All @@ -100,7 +100,7 @@ private static void DiffElements(XNode node1, XNode node2)
SetMatching(node2.Attributes, MatchType.NoMatch);
}

// Children = Elements and Text
// Handle child elements and Text

// First, if no children
if (node1.Children.Length == 0)
Expand Down
2 changes: 1 addition & 1 deletion FatAntelope/XNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class XNode
public XNode Matching { get; set; }

/// <summary>
/// Type (or strength) of match that this node has with it's 'Match' node
/// Type (or strength) of match that this node has with it's 'Matching' node
/// </summary>
public MatchType Match { get; set; }

Expand Down
36 changes: 36 additions & 0 deletions LICENCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Copyright (c) 2015
Cameron Wills. All rights reserved.

Copyright (c) 2001 - 2005
Yuan Wang. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. 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.
3. Redistributions in any form must be accompanied by information on
how to obtain complete source code for the X-Diff software and any
accompanying software that uses the X-Diff software. The source code
must either be included in the distribution or be available for no
more than the cost of distribution plus a nominal fee, and must be
freely redistributable under reasonable conditions. For an executable
file, complete source code means the source code for all modules it
contains. It does not include source code for modules or files that
typically accompany the major components of the operating system on
which the executable file runs.

THIS SOFTWARE IS PROVIDED BY YUAN WANG "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT,
ARE DISCLAIMED. IN NO EVENT SHALL YUAN WANG 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.

0 comments on commit 68b2915

Please sign in to comment.