Skip to content

Commit c55bdc8

Browse files
committed
pulled in latest master changes
2 parents 5b55c42 + 9b5e54a commit c55bdc8

File tree

171 files changed

+4403
-179777
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+4403
-179777
lines changed

.gitignore

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
**/*.suo
32
**/*.user
43
**/*.sln*
@@ -11,19 +10,19 @@ build
1110

1211
*.DotSettings.user
1312
*.csproj.user
13+
src/packages
1414

1515
*.resharper.user
16-
1716
*.resharper
1817

1918
*.suo
20-
2119
*.cache
22-
2320
*~
24-
25-
*.swp
26-
TestResult.xml
21+
*ncrunch*
2722
*.ncrunchsolution
2823
*.ncrunchproject
29-
packages/
24+
*.swp
25+
TestResult.xml
26+
27+
TestResult.xml
28+
build/

Build.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
rake
1+
rake

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<img src="http://fluentnhibernate.org/images/logo.png" alt="Fluent NHibernate - Fluent mapping for your model" />
1+
<img src="https://github.com/jagregory/fluent-nhibernate/blob/master/docs/logo.png" alt="Fluent NHibernate - Fluent mapping for your model" />
22
=============================================
33

44
Fluent, XML-less, compile safe, automated, convention-based mappings for NHibernate. *Get your fluent on.*
@@ -26,4 +26,4 @@ Fluent NHibernate wouldn't be possible without the time and effort of its contri
2626

2727
Thanks goes to [Jeremy Miller](http://codebetter.com/blogs/jeremy.miller) for the original idea and implementation.
2828

29-
Fluent NHibernate is &copy; 2008-2011 [James Gregory](http://jagregory.com) and contributors under the [BSD license](fluent-nhibernate/blob/master/LICENSE.txt)
29+
Fluent NHibernate is &copy; 2008-2013 [James Gregory](http://jagregory.com) and contributors under the [BSD license](fluent-nhibernate/blob/master/LICENSE.txt)

RakeFile

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,28 @@ require './tools/albacore/nuspec_patch'
44

55
NH_VERSION = '3.x'
66

7+
module Platform
8+
9+
def self.is_nix
10+
!RUBY_PLATFORM.match("linux|darwin").nil?
11+
end
12+
13+
def self.runtime(cmd)
14+
command = cmd
15+
if self.is_nix
16+
runtime = (CLR_TOOLS_VERSION || "v4.0.30319")
17+
command = "mono --runtime=#{runtime} #{cmd}"
18+
end
19+
command
20+
end
21+
22+
def self.switch(arg)
23+
sw = self.is_nix ? " -" : " /"
24+
sw + arg
25+
end
26+
27+
end
28+
729
def get_version
830
ENV['BUILD_NUMBER'] || '1.3.0.0'
931
end
@@ -12,12 +34,20 @@ task :default => 'build:all'
1234

1335
namespace :ci do
1436
task :run_ci_build => [
37+
'ripple',
1538
'build:all',
1639
'docs:build',
1740
'package:all',
1841
]
1942
end
2043

44+
namespace :ripple do
45+
desc 'using ripple. yay!'
46+
ripple = Platform.runtime("buildsupport/ripple.exe")
47+
args = "restore"
48+
sh "#{ripple} #{args}"
49+
end
50+
2151
namespace :source do
2252
desc 'Update assembly info with latest version number'
2353
assemblyinfo :update_version do |asm|
@@ -26,7 +56,7 @@ namespace :source do
2656
asm.version = get_version
2757
asm.company_name = 'http://fluentnhibernate.org'
2858
asm.product_name = 'FluentNHibernate'
29-
asm.copyright = 'Copyright 2008-2011 James Gregory and contributors (Paul Batum, Hudson Akridge et al). All rights reserved.'
59+
asm.copyright = 'Copyright 2008-2013 James Gregory and contributors (Paul Batum, Hudson Akridge et al). All rights reserved.'
3060
asm.namespaces = ['System.Security']
3161
asm.custom_attributes :AllowPartiallyTrustedCallers => nil
3262

@@ -35,16 +65,6 @@ namespace :source do
3565

3666
task :nhibernate_version, :nhibernate_version do |t,args|
3767
args.with_defaults :nhibernate_version => ENV['nhibernate_version'] || NH_VERSION
38-
39-
raise "Unknown NHibernate version #{args.nhibernate_version} (check your tools/NHibernate folder)" unless File.directory? "tools/NHibernate/#{args.nhibernate_version}"
40-
41-
# clear out existing selected nh version
42-
files_to_delete = Dir["tools/NHibernate/*.*"].reject {|f| File.directory? f }
43-
files_to_delete.each {|f| File.delete f }
44-
45-
# copy specific nh version files to the main directory
46-
files_to_copy = Dir["tools/NHibernate/#{args.nhibernate_version}/*.*"]
47-
files_to_copy.each {|f| FileUtils.copy f, "tools/NHibernate/" }
4868
end
4969

5070
desc 'Compile the source'
@@ -71,13 +91,13 @@ namespace :specs do
7191

7292
desc 'Run MSpec specs'
7393
mspec :mspec do |mspec|
74-
mspec.command = 'src/packages/Machine.Specifications.0.5.6.0/tools/mspec.exe'
94+
mspec.command = 'src/packages/Machine.Specifications.0.5.15/tools/mspec.exe'
7595
mspec.assemblies 'src/FluentNHibernate.Specs/bin/Release/FluentNHibernate.Specs.dll'
7696
end
7797

7898
desc 'Run NUnit tests'
7999
nunit :nunit do |nunit|
80-
nunit.command = 'tools/nunit/nunit-console-x86.exe'
100+
nunit.command = 'src/packages/NUnit.2.5.7.10213/Tools/nunit-console-x86.exe'
81101
nunit.assemblies 'src/FluentNHibernate.Testing/bin/Release/FluentNHibernate.Testing.dll'
82102
end
83103
end

buildsupport/BuildUtils.rb

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
require 'erb'
2+
3+
class NUnitRunner
4+
include FileTest
5+
6+
def initialize(paths)
7+
@sourceDir = paths.fetch(:source, 'source')
8+
@resultsDir = paths.fetch(:results, 'results')
9+
@compilePlatform = paths.fetch(:platform, '')
10+
@compileTarget = paths.fetch(:compilemode, 'debug')
11+
12+
@nunitExe = Nuget.tool("NUnit", "nunit-console#{(@compilePlatform.empty? ? '' : "-#{@compilePlatform}")}.exe") + Platform.switch("nothread")
13+
end
14+
15+
def executeTests(assemblies)
16+
Dir.mkdir @resultsDir unless exists?(@resultsDir)
17+
18+
assemblies.each do |assem|
19+
file = File.expand_path("#{@sourceDir}/#{assem}/bin/#{@compileTarget}/#{assem}.dll")
20+
sh Platform.runtime("#{@nunitExe} -xml=#{@resultsDir}/#{assem}-TestResults.xml \"#{file}\"")
21+
end
22+
end
23+
end
24+
25+
class MSBuildRunner
26+
def self.compile(attributes)
27+
compileTarget = attributes.fetch(:compilemode, 'debug')
28+
solutionFile = attributes[:solutionfile]
29+
30+
attributes[:projFile] = solutionFile
31+
attributes[:properties] ||= []
32+
attributes[:properties] << "Configuration=#{compileTarget}"
33+
attributes[:extraSwitches] = ["v:m", "t:rebuild"]
34+
attributes[:extraSwitches] << "maxcpucount:2" unless Platform.is_nix
35+
36+
self.runProjFile(attributes);
37+
end
38+
39+
def self.runProjFile(attributes)
40+
version = attributes.fetch(:clrversion, 'v4.0.30319')
41+
compileTarget = attributes.fetch(:compilemode, 'debug')
42+
projFile = attributes[:projFile]
43+
44+
if Platform.is_nix
45+
msbuildFile = `which xbuild`.chop
46+
attributes[:properties] << "TargetFrameworkProfile="""""
47+
else
48+
frameworkDir = File.join(ENV['windir'].dup, 'Microsoft.NET', 'Framework', version)
49+
msbuildFile = File.join(frameworkDir, 'msbuild.exe')
50+
end
51+
52+
properties = attributes.fetch(:properties, [])
53+
54+
switchesValue = ""
55+
56+
properties.each do |prop|
57+
switchesValue += " /property:#{prop}"
58+
end
59+
60+
extraSwitches = attributes.fetch(:extraSwitches, [])
61+
62+
extraSwitches.each do |switch|
63+
switchesValue += " /#{switch}"
64+
end
65+
66+
targets = attributes.fetch(:targets, [])
67+
targetsValue = ""
68+
targets.each do |target|
69+
targetsValue += " /t:#{target}"
70+
end
71+
72+
sh "#{msbuildFile} #{projFile} #{targetsValue} #{switchesValue}"
73+
end
74+
end
75+
76+
class AspNetCompilerRunner
77+
def self.compile(attributes)
78+
if Platform.is_nix
79+
puts "Skipping AspNet compilation. Not supported by Mono."
80+
return
81+
end
82+
webPhysDir = attributes.fetch(:webPhysDir, '')
83+
webVirDir = attributes.fetch(:webVirDir, 'This_Value_Is_Not_Used')
84+
85+
frameworkDir = File.join(ENV['windir'].dup, 'Microsoft.NET', 'Framework', 'v4.0.30319')
86+
aspNetCompiler = File.join(frameworkDir, 'aspnet_compiler.exe')
87+
88+
sh "#{aspNetCompiler} -nologo -errorstack -c -p #{webPhysDir} -v #{webVirDir}"
89+
end
90+
end
91+
92+
class AsmInfoBuilder
93+
attr_reader :buildnumber
94+
95+
def initialize(baseVersion, properties)
96+
@properties = properties;
97+
98+
@buildnumber = baseVersion + (ENV["CCNetLabel"].nil? ? '0' : ENV["CCNetLabel"].to_s)
99+
@properties['Version'] = @properties['InformationalVersion'] = buildnumber;
100+
end
101+
102+
103+
104+
def write(file)
105+
template = %q{
106+
using System;
107+
using System.Reflection;
108+
using System.Runtime.InteropServices;
109+
110+
<% @properties.each {|k, v| %>
111+
[assembly: Assembly<%=k%>Attribute("<%=v%>")]
112+
<% } %>
113+
}.gsub(/^ /, '')
114+
115+
erb = ERB.new(template, 0, "%<>")
116+
117+
File.open(file, 'w') do |file|
118+
file.puts erb.result(binding)
119+
end
120+
end
121+
end

buildsupport/FubuCore.dll

260 KB
Binary file not shown.

buildsupport/FubuCore.pdb

1010 KB
Binary file not shown.

buildsupport/ILMerge.exe

753 KB
Binary file not shown.

buildsupport/ILRepack.rb

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
load "#{File.dirname(__FILE__)}/platform.rb"
2+
class ILRepack
3+
4+
def initialize(attributes)
5+
6+
out = attributes.fetch(:out, '')
7+
lib = attributes.fetch(:lib, nil)
8+
target = attributes.fetch(:target, 'library')
9+
targetplatform = attributes.fetch(:targetplatform, "v4")
10+
internalize = attributes.fetch(:internalize, true)
11+
debugsymbols = attributes.fetch(:debugsymbols, false)
12+
union = attributes.fetch(:union, false)
13+
14+
params = []
15+
params << "/out:#{out}"
16+
params << "/lib:#{lib}" unless lib.nil?
17+
params << "/target:#{target}" unless target.nil?
18+
params << "/targetplatform:#{targetplatform}" unless targetplatform.nil?
19+
params << "/internalize" if internalize
20+
params << "/ndebug" unless debugsymbols
21+
params << "/union" if union
22+
23+
merge_exe = "#{File.dirname(__FILE__)}/ILMerge.exe"
24+
@cmd = "#{merge_exe} #{params.join(' ')}"
25+
end
26+
27+
def merge(params)
28+
29+
if Platform.is_nix
30+
puts "Merging is *currently* not supported on Mono. Skipping merge..."
31+
return
32+
end
33+
34+
src = params.fetch(:lib, '')
35+
refs = params.fetch(:refs, []).map {|f| File.join(src, f)}
36+
sh Platform.runtime("#{@cmd} #{refs.join(' ')}")
37+
end
38+
end

buildsupport/NuGet.exe

635 KB
Binary file not shown.

0 commit comments

Comments
 (0)