Skip to content
This repository has been archived by the owner on Aug 8, 2020. It is now read-only.

Commit

Permalink
Ready for 2.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
phatboyg committed Jul 21, 2011
1 parent 7493635 commit ff4e2d7
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 72 deletions.
12 changes: 6 additions & 6 deletions Magnum.nuspec
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Magnum</id>
<version>1.1.1.0</version>
<metadata>
<id>Magnum</id>
<version>2.0.0.0</version>
<authors>Chris Patterson, Dru Sellers</authors>
<description>Magnum is a library for the larger than average developer</description>
<description>Magnum is a library for the larger than average developer</description>
<language>en-US</language>
<licenseUrl>https://github.com/phatboyg/Magnum/blob/master/LICENSE</licenseUrl>
<projectUrl>https://github.com/phatboyg/Magnum</projectUrl>
</metadata>
</metadata>
<files>
<file src="build_output\net-3.5\Magnum.dll" target="lib\NET35" />
<file src="build_output\net-3.5\Magnum.xml" target="lib\NET35" />
Expand Down
30 changes: 15 additions & 15 deletions rakefile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
require File.dirname(__FILE__) + "/build_support/ilmergeconfig.rb"
require File.dirname(__FILE__) + "/build_support/ilmerge.rb"

BUILD_NUMBER_BASE = '1.1.1'
BUILD_NUMBER_BASE = '2.0.0'
PRODUCT = 'Magnum'
CLR_TOOLS_VERSION = 'v4.0.30319'

Expand All @@ -18,7 +18,7 @@
MSB_USE = (BUILD_CONFIG_KEY == "NET40" ? :net4 : :net35)
OUTPUT_PATH = (BUILD_CONFIG_KEY == "NET40" ? 'net-4.0' : 'net-3.5')

props = {
props = {
:src => File.expand_path("src"),
:build_support => File.expand_path("build_support"),
:stage => File.expand_path("build_output"),
Expand All @@ -28,18 +28,18 @@
}

puts "Building for .NET Framework #{TARGET_FRAMEWORK_VERSION} in #{BUILD_CONFIG}-mode."

desc "Displays a list of tasks"
task :help do

taskHash = Hash[*(`rake.bat -T`.split(/\n/).collect { |l| l.match(/rake (\S+)\s+\#\s(.+)/).to_a }.collect { |l| [l[1], l[2]] }).flatten]
taskHash = Hash[*(`rake.bat -T`.split(/\n/).collect { |l| l.match(/rake (\S+)\s+\#\s(.+)/).to_a }.collect { |l| [l[1], l[2]] }).flatten]

indent = " "

puts "rake #{indent}#Runs the 'default' task"

taskHash.each_pair do |key, value|
if key.nil?
if key.nil?
next
end
puts "rake #{key}#{indent.slice(0, indent.length - key.length)}##{value}"
Expand All @@ -65,7 +65,7 @@
build_number = "#{BUILD_NUMBER_BASE}.#{Date.today.strftime('%y%j')}"
tc_build_number = ENV["BUILD_NUMBER"]
puts "##teamcity[buildNumber '#{build_number}-#{tc_build_number}']" unless tc_build_number.nil?

# Assembly file config
asm.product_name = PRODUCT
asm.description = "Git commit hash: #{commit} - #{commit_date} - Magnum - A library for the larger than average developer. http://github.com/phatboyg/Magnum. magnum-project.net."
Expand All @@ -86,7 +86,7 @@
# work around latency issue where folder still exists for a short while after it is removed
waitfor { !exists?(props[:stage]) }
waitfor { !exists?(props[:artifacts]) }

Dir.mkdir props[:stage]
Dir.mkdir props[:artifacts]
end
Expand Down Expand Up @@ -140,7 +140,7 @@

desc "Only compiles the application."
msbuild :build do |msb|
msb.properties :Configuration => BUILD_CONFIG,
msb.properties :Configuration => BUILD_CONFIG,
:BuildConfigKey => BUILD_CONFIG_KEY,
:TargetFrameworkVersion => TARGET_FRAMEWORK_VERSION,
:Platform => 'Any CPU'
Expand Down Expand Up @@ -211,17 +211,17 @@ def get_commit_hash_and_date
rescue
commit = "git unavailable"
end

[commit, commit_date]
end

def waitfor(&block)
checks = 0
until block.call || checks >10

until block.call || checks >10
sleep 0.5
checks += 1
end

raise 'Waitfor timeout expired. Make sure that you aren\'t running something from the build output folders, or that you have browsed to it through Explorer.' if checks > 10
end
14 changes: 7 additions & 7 deletions src/Magnum/Algorithms/Implementations/AdjacencyList.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2007-2010 The Apache Software Foundation.
//
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use
// this file except in compliance with the License. You may obtain a copy of the
// License at
Expand All @@ -20,8 +20,8 @@ public class AdjacencyList<T, TNode>
where TNode : Node<T>
{
readonly Func<int, T, TNode> _nodeFactory;
IDictionary<TNode, HashSet<Edge<T, TNode>>> _adjacencies;
readonly NodeList<T, TNode> _nodeList;
IDictionary<TNode, HashSet<Edge<T, TNode>>> _adjacencies;


public AdjacencyList(Func<int, T, TNode> nodeFactory)
Expand All @@ -31,6 +31,11 @@ public AdjacencyList(Func<int, T, TNode> nodeFactory)
_adjacencies = new Dictionary<TNode, HashSet<Edge<T, TNode>>>();
}

public ICollection<TNode> SourceNodes
{
get { return _adjacencies.Keys; }
}

public HashSet<Edge<T, TNode>> GetEdges(TNode index)
{
HashSet<Edge<T, TNode>> edges;
Expand Down Expand Up @@ -110,11 +115,6 @@ public AdjacencyList<T, TNode> Reverse()
return result;
}

public ICollection<TNode> SourceNodes
{
get { return _adjacencies.Keys; }
}

public TNode GetNode(T key)
{
return _nodeList[key];
Expand Down
Loading

0 comments on commit ff4e2d7

Please sign in to comment.