Skip to content

Commit 671bc3f

Browse files
committed
brought back Sqlite configuration for tests
1 parent c336bcf commit 671bc3f

File tree

7 files changed

+72
-40
lines changed

7 files changed

+72
-40
lines changed

.gitignore

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
**/*.suo
22
**/*.user
33
**/*.sln*
4-
bin
5-
obj
64
_ReSharper*
7-
dist
8-
output
9-
build
105

116
*.DotSettings.user
127
*.csproj.user
13-
src/packages
14-
158
*.resharper.user
169
*.resharper
1710

@@ -24,6 +17,12 @@ src/packages
2417
*.swp
2518
TestResult.xml
2619

27-
TestResult.xml
28-
build/
29-
*.nupkg
20+
src/packages
21+
bin
22+
obj
23+
dist
24+
output
25+
build
26+
*.nupkg
27+
logs/
28+
src/CommonAssemblyInfo.cs

RakeFile

Lines changed: 39 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
require 'fileutils'
22
require 'albacore'
3-
require './tools/albacore/nuspec_patch'
43

54
NH_VERSION = '4.x'
65

6+
# Albacore.configure do |config|
7+
# config.log_level = :verbose
8+
# end
9+
710
module Platform
811

912
def self.is_nix
@@ -30,7 +33,7 @@ def get_version
3033
ENV['BUILD_NUMBER'] || '1.4.0.0'
3134
end
3235

33-
task :default => ['ripple', 'build:all']
36+
task :default => ['ripple:update', 'source:update_version', 'build:all']
3437

3538
namespace :ci do
3639
task :run_ci_build => [
@@ -40,24 +43,30 @@ namespace :ci do
4043
]
4144
end
4245

43-
task :ripple do
44-
ripple = Platform.runtime("buildsupport/ripple.exe")
45-
args = "restore"
46-
sh "#{ripple} #{args}"
46+
namespace :ripple do
47+
desc 'Restores NuGet package binaries'
48+
task :update do |cmd|
49+
ripple = Platform.runtime("buildsupport/ripple.exe")
50+
args = "restore"
51+
sh "#{ripple} #{args}"
52+
end
4753
end
4854

4955
namespace :source do
5056
desc 'Update assembly info with latest version number'
51-
assemblyinfo :update_version do |asm|
52-
asm.output_file = 'src/CommonAssemblyInfo.cs'
57+
assemblyinfo :update_version do |info|
58+
info.output_file = 'src/CommonAssemblyInfo.cs'
59+
60+
commit_hash = `git log -1 --format="%H%"`
5361

54-
asm.version = get_version
55-
asm.company_name = 'http://fluentnhibernate.org'
56-
asm.product_name = 'FluentNHibernate'
57-
asm.copyright = "Copyright 2008-#{Time.new.year} James Gregory and contributors (Paul Batum, Hudson Akridge et al). All rights reserved."
58-
asm.namespaces = ['System.Security']
62+
info.version = info.file_version = get_version
63+
info.company_name = 'http://fluentnhibernate.org'
64+
info.product_name = 'FluentNHibernate'
65+
info.description = commit_hash[0..(commit_hash.length - 3)]
66+
info.copyright = "Copyright 2008-#{Time.new.year} James Gregory and contributors (Paul Batum, Hudson Akridge et al). All rights reserved."
67+
info.namespaces = ['System.Security']
5968

60-
puts "The build number is #{asm.version}"
69+
puts "The new build number is #{info.version}"
6170
end
6271

6372
task :nhibernate_version, :nhibernate_version do |t,args|
@@ -70,15 +79,17 @@ namespace :source do
7079

7180
nh_version_precompiler_switch = 'NH' + args.nhibernate_version.gsub('.', '')
7281

73-
puts nh_version_precompiler_switch
82+
puts 'Precompiler switch: ' + nh_version_precompiler_switch
7483

7584
msb.properties = {
7685
configuration: :Release,
7786
DefineConstants: nh_version_precompiler_switch,
78-
WarningLevel: 0,
87+
WarningLevel: 0
7988
}
8089
msb.targets [:Clean, :Build]
8190
msb.solution = 'src/FluentNHibernate.sln'
91+
msb.verbosity = :minimal
92+
msb.parameters = ["/p:TargetFrameworkVersion=v4.0"]
8293
end
8394
end
8495

@@ -96,6 +107,7 @@ namespace :specs do
96107
nunit :nunit do |nunit|
97108
nunit.command = 'src/packages/NUnit.2.5.7.10213/Tools/nunit-console-x86.exe'
98109
nunit.assemblies 'src/FluentNHibernate.Testing/bin/Release/FluentNHibernate.Testing.dll'
110+
nunit.parameters = [ "/framework:net-4.0" ]
99111
end
100112
end
101113

@@ -158,7 +170,7 @@ namespace :package do
158170
zip.output_path = 'dist'
159171
end
160172

161-
nuspec do |nu|
173+
nuspec do |nu|
162174
nu.id = 'FluentNHibernate'
163175
nu.version = get_version()
164176
nu.authors = 'James Gregory and contributors'
@@ -167,23 +179,25 @@ namespace :package do
167179
nu.language = 'en-US'
168180
nu.licenseUrl = 'http://github.com/jagregory/fluent-nhibernate/raw/master/LICENSE.txt'
169181
nu.projectUrl = 'http://fluentnhibernate.org'
170-
nu.dependency 'NHibernate', '[3.3.1.4000,4.0)'
171-
nu.working_directory = 'build'
182+
nu.dependency 'NHibernate', '4.0'
183+
nu.working_directory = Dir.pwd
172184
nu.output_file = 'fluentnhibernate.nuspec'
173-
nu.file 'FluentNHibernate.dll', 'lib'
174-
nu.file 'FluentNHibernate.xml', 'lib'
185+
nu.file 'FluentNHibernate.dll', 'lib/net40'
186+
nu.file 'FluentNHibernate.pdb', 'lib/net40'
187+
nu.file 'FluentNHibernate.xml', 'lib/net40'
175188
nu.tags = 'orm dal nhibernate conventions'
189+
nu.pretty_formatting = true
176190
end
177-
191+
178192
nugetpack do |nu|
179193
nu.command = 'tools/nuget/NuGet.exe'
180-
nu.nuspec = 'build/fluentnhibernate.nuspec'
181-
nu.base_folder = 'build'
194+
nu.nuspec = 'src/FluentNHibernate.nuspec'
195+
nu.base_folder = 'Release'
182196
nu.output = 'dist'
183197
end
184198

185199
desc 'Create nuget spec and package'
186-
task :nuget => [:nuspec, :nugetpack]
200+
task :nuget => [:nugetpack]
187201

188202
desc 'Package everything (src, bin, docs, nuget)'
189203
task :all => [:source, :binaries, :docs, :nuget]

src/CommonAssemblyInfo.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
using System.Security;
22
using System.Reflection;
33
using System.Runtime.InteropServices;
4+
[assembly: AssemblyDescription("c336bcfedf38354c0e4d02a87a80bf2acb549b42")]
45
[assembly: AssemblyCompany("http://fluentnhibernate.org")]
56
[assembly: AssemblyProduct("FluentNHibernate")]
67
[assembly: AssemblyCopyright("Copyright 2008-2014 James Gregory and contributors (Paul Batum, Hudson Akridge et al). All rights reserved.")]
78
[assembly: AssemblyVersion("1.4.0.0")]
9+
[assembly: AssemblyFileVersion("1.4.0.0")]

src/Examples.FirstAutomappedProject/app.config

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?xml version="1.0"?>
22
<configuration>
3+
<connectionStrings>
4+
<add name="Sqlite_InMemory" providerName="System.Data.SQLite" connectionString="Data Source=:memory:;Version=3;New=True" />
5+
</connectionStrings>
6+
<system.data>
7+
<DbProviderFactories>
8+
<remove invariant="System.Data.SQLite" />
9+
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
10+
</DbProviderFactories>
11+
</system.data>
312
<startup>
413
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
514
</startup>
Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
3+
<startup useLegacyV2RuntimeActivationPolicy="true">
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
5+
<supportedRuntime version="v2.0.50727"></supportedRuntime>
6+
</startup>
37
<appSettings>
48
<add key="connectionString" value="a-connection-string"/>
59
</appSettings>
610
<connectionStrings>
711
<add name="main" connectionString="connection string"/>
12+
<add name="Sqlite_InMemory" providerName="System.Data.SQLite" connectionString="Data Source=:memory:;Version=3;New=True" />
813
</connectionStrings>
9-
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
10-
</startup>
11-
</configuration>
14+
<system.data>
15+
<DbProviderFactories>
16+
<remove invariant="System.Data.SQLite" />
17+
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
18+
</DbProviderFactories>
19+
</system.data>
20+
</configuration>

src/FluentNHibernate.Testing/FluentNHibernate.Testing.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,6 @@
392392
<Compile Include="Utils\ReflectionHelperTests.cs" />
393393
<Compile Include="Testing\XmlWriterTestHelper.cs" />
394394
<Compile Include="Utils\TypeReferenceEqualityTests.cs" />
395-
<Compile Include="Properties\AssemblyInfo.cs" />
396395
<Compile Include="Visitors\ComponentColumnPrefixVisitorSpecs.cs" />
397396
<Compile Include="Visitors\ComponentReferenceResolutionVisitorSpecs.cs" />
398397
<Compile Include="Xml\MappingXmlTestHelper.cs" />

src/FluentNHibernate.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<licenseUrl>http://github.com/jagregory/fluent-nhibernate/blob/master/LICENSE.txt</licenseUrl>
99
<projectUrl>http://github.com/jagregory/fluent-nhibernate/</projectUrl>
1010
<dependencies>
11-
<dependency id="NHibernate" version="[4,)" />
11+
<dependency id="NHibernate" version="4.0" />
1212
</dependencies>
1313
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1414
<description>Fluent, XML-less, compile safe, automated, convention-based mappings for NHibernate.</description>

0 commit comments

Comments
 (0)