albacore 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.autotest +4 -4
- data/.bundle/config +2 -2
- data/.rvmrc +1 -1
- data/Gemfile +12 -12
- data/README.markdown +92 -68
- data/VERSION +1 -1
- data/lib/albacore.rb +9 -9
- data/lib/albacore/albacoretask.rb +50 -50
- data/lib/albacore/aspnetcompiler.rb +58 -58
- data/lib/albacore/assemblyinfo.rb +140 -140
- data/lib/albacore/assemblyinfolanguages/cppcliengine.rb +17 -0
- data/lib/albacore/assemblyinfolanguages/csharpengine.rb +18 -18
- data/lib/albacore/assemblyinfolanguages/vbnetengine.rb +18 -18
- data/lib/albacore/config/aspnetcompilerconfig.rb +29 -29
- data/lib/albacore/config/assemblyinfoconfig.rb +13 -13
- data/lib/albacore/config/config.rb +22 -22
- data/lib/albacore/config/cscconfig.rb +28 -28
- data/lib/albacore/config/docuconfig.rb +23 -23
- data/lib/albacore/config/execconfig.rb +15 -15
- data/lib/albacore/config/fluentmigratorrunnerconfig.rb +15 -15
- data/lib/albacore/config/msbuildconfig.rb +29 -29
- data/lib/albacore/config/mspectestrunnerconfig.rb +15 -15
- data/lib/albacore/config/mstesttestrunnerconfig.rb +15 -15
- data/lib/albacore/config/nantconfig.rb +15 -15
- data/lib/albacore/config/nchurnconfig.rb +15 -15
- data/lib/albacore/config/ncoverconsoleconfig.rb +15 -15
- data/lib/albacore/config/ncoverreportconfig.rb +15 -15
- data/lib/albacore/config/ndependconfig.rb +15 -15
- data/lib/albacore/config/netversion.rb +21 -21
- data/lib/albacore/config/nugetpackconfig.rb +3 -3
- data/lib/albacore/config/nugetpublishconfig.rb +19 -0
- data/lib/albacore/config/nugetpushconfig.rb +19 -0
- data/lib/albacore/config/nunittestrunnerconfig.rb +14 -14
- data/lib/albacore/config/specflowreportconfig.rb +24 -24
- data/lib/albacore/config/sqlcmdconfig.rb +15 -15
- data/lib/albacore/config/unzipconfig.rb +15 -15
- data/lib/albacore/config/vssgetconfig.rb +14 -0
- data/lib/albacore/config/xbuildconfig.rb +15 -15
- data/lib/albacore/config/xunittestrunnerconfig.rb +15 -15
- data/lib/albacore/config/zipdirectoryconfig.rb +15 -15
- data/lib/albacore/csc.rb +66 -62
- data/lib/albacore/docu.rb +41 -41
- data/lib/albacore/exec.rb +18 -18
- data/lib/albacore/fluentmigratorrunner.rb +51 -46
- data/lib/albacore/msbuild.rb +55 -55
- data/lib/albacore/mspectestrunner.rb +50 -50
- data/lib/albacore/mstesttestrunner.rb +43 -43
- data/lib/albacore/nant.rb +38 -38
- data/lib/albacore/nchurn.rb +74 -74
- data/lib/albacore/ncoverconsole.rb +68 -68
- data/lib/albacore/ncoverreport.rb +62 -62
- data/lib/albacore/ncoverreports/assemblyfilter.rb +9 -9
- data/lib/albacore/ncoverreports/branchcoverage.rb +9 -9
- data/lib/albacore/ncoverreports/classfilter.rb +9 -9
- data/lib/albacore/ncoverreports/codecoveragebase.rb +25 -25
- data/lib/albacore/ncoverreports/cyclomaticcomplexity.rb +23 -23
- data/lib/albacore/ncoverreports/documentfilter.rb +9 -9
- data/lib/albacore/ncoverreports/fullcoveragereport.rb +13 -13
- data/lib/albacore/ncoverreports/methodcoverage.rb +9 -9
- data/lib/albacore/ncoverreports/methodfilter.rb +9 -9
- data/lib/albacore/ncoverreports/namespacefilter.rb +9 -9
- data/lib/albacore/ncoverreports/reportfilterbase.rb +26 -26
- data/lib/albacore/ncoverreports/summaryreport.rb +18 -18
- data/lib/albacore/ncoverreports/symbolcoverage.rb +9 -9
- data/lib/albacore/ndepend.rb +33 -33
- data/lib/albacore/nugetpublish.rb +47 -0
- data/lib/albacore/nugetpush.rb +46 -0
- data/lib/albacore/nunittestrunner.rb +41 -41
- data/lib/albacore/nuspec.rb +133 -109
- data/lib/albacore/output.rb +99 -99
- data/lib/albacore/plink.rb +47 -47
- data/lib/albacore/specflowreport.rb +62 -62
- data/lib/albacore/sqlcmd.rb +80 -80
- data/lib/albacore/support/attrmethods.rb +33 -33
- data/lib/albacore/support/createtask.rb +50 -30
- data/lib/albacore/support/failure.rb +15 -15
- data/lib/albacore/support/logging.rb +38 -38
- data/lib/albacore/support/openstruct.rb +13 -13
- data/lib/albacore/support/runcommand.rb +45 -45
- data/lib/albacore/support/supportlinux.rb +23 -23
- data/lib/albacore/support/updateattributes.rb +13 -13
- data/lib/albacore/support/yamlconfig.rb +18 -18
- data/lib/albacore/unzip.rb +28 -28
- data/lib/albacore/vssget.rb +44 -0
- data/lib/albacore/xbuild.rb +54 -54
- data/lib/albacore/xunittestrunner.rb +52 -52
- data/lib/albacore/zipdirectory.rb +105 -105
- data/rakefile.rb +297 -297
- data/spec/albacoremodel_spec.rb +53 -53
- data/spec/assemblyinfo_spec.rb +541 -541
- data/spec/attrmethods_spec.rb +136 -136
- data/spec/config_spec.rb +34 -34
- data/spec/createtask_spec.rb +236 -236
- data/spec/csc_spec.rb +253 -253
- data/spec/docu_spec.rb +109 -109
- data/spec/exec_spec.rb +45 -45
- data/spec/fluentmigratorrunner_spec.rb +254 -185
- data/spec/msbuild_spec.rb +215 -215
- data/spec/mspec_spec.rb +28 -28
- data/spec/mstesttestrunner_spec.rb +142 -142
- data/spec/nant_spec.rb +110 -110
- data/spec/nchurn_spec.rb +75 -75
- data/spec/ncoverconsole_spec.rb +353 -353
- data/spec/ncoverreport_spec.rb +619 -619
- data/spec/ndepend_spec.rb +72 -72
- data/spec/nunittestrunner_spec.rb +122 -122
- data/spec/nuspec_spec.rb +78 -78
- data/spec/patches/docu_patch.rb +12 -12
- data/spec/patches/fail_patch.rb +8 -8
- data/spec/patches/system_patch.rb +20 -20
- data/spec/plink_spec.rb +62 -62
- data/spec/runcommand_spec.rb +94 -94
- data/spec/spec_helper.rb +17 -17
- data/spec/specflowreport_spec.rb +146 -146
- data/spec/sqlcmd_spec.rb +334 -334
- data/spec/support/assemblyinfotester.rb +51 -51
- data/spec/support/ironruby_validator.rb +26 -26
- data/spec/support/msbuildtestdata.rb +32 -32
- data/spec/support/nanttestdata.rb +33 -33
- data/spec/support/ncoverconsoletestdata.rb +19 -19
- data/spec/support/ncoverreporttestdata.rb +26 -26
- data/spec/support/nokogiri_validator.rb +15 -15
- data/spec/support/outputtestdata.rb +12 -12
- data/spec/support/ziptestdata.rb +12 -12
- data/spec/unzip_spec.rb +15 -15
- data/spec/xbuild_spec.rb +15 -15
- data/spec/xunit_spec.rb +168 -168
- data/spec/yamlconfig_spec.rb +49 -49
- data/spec/zip_spec.rb +104 -104
- data/watchrtesting.rb +8 -8
- metadata +15 -119
data/rakefile.rb
CHANGED
@@ -1,297 +1,297 @@
|
|
1
|
-
$: << './'
|
2
|
-
require 'lib/albacore'
|
3
|
-
require 'version_bumper'
|
4
|
-
|
5
|
-
task :default => ['albacore:sample']
|
6
|
-
|
7
|
-
namespace :specs do
|
8
|
-
require 'spec/rake/spectask'
|
9
|
-
|
10
|
-
@spec_opts = '--colour --format specdoc'
|
11
|
-
|
12
|
-
desc "Run all specs for albacore"
|
13
|
-
Spec::Rake::SpecTask.new :all do |t|
|
14
|
-
t.spec_files = FileList['spec/**/*_spec.rb'].exclude{ |f|
|
15
|
-
f if IS_IRONRUBY && (f.include?("zip"))
|
16
|
-
}
|
17
|
-
t.spec_opts << @spec_opts
|
18
|
-
end
|
19
|
-
|
20
|
-
desc "CSharp compiler (csc.exe) specs"
|
21
|
-
Spec::Rake::SpecTask.new :csc do |t|
|
22
|
-
t.spec_files = FileList['spec/csc*_spec.rb']
|
23
|
-
t.spec_opts << @spec_opts
|
24
|
-
end
|
25
|
-
|
26
|
-
desc "Assembly info functional specs"
|
27
|
-
Spec::Rake::SpecTask.new :assemblyinfo do |t|
|
28
|
-
t.spec_files = FileList['spec/assemblyinfo*_spec.rb']
|
29
|
-
t.spec_opts << @spec_opts
|
30
|
-
end
|
31
|
-
|
32
|
-
desc "MSBuild functional specs"
|
33
|
-
Spec::Rake::SpecTask.new :msbuild do |t|
|
34
|
-
t.spec_files = FileList['spec/msbuild*_spec.rb']
|
35
|
-
t.spec_opts << @spec_opts
|
36
|
-
end
|
37
|
-
|
38
|
-
desc "SQLServer SQLCmd functional specs"
|
39
|
-
Spec::Rake::SpecTask.new :sqlcmd do |t|
|
40
|
-
t.spec_files = FileList['spec/sqlcmd*_spec.rb']
|
41
|
-
t.spec_opts << @spec_opts
|
42
|
-
end
|
43
|
-
|
44
|
-
desc "Nant functional specs"
|
45
|
-
Spec::Rake::SpecTask.new :nant do |t|
|
46
|
-
t.spec_files = FileList['spec/nant*_spec.rb']
|
47
|
-
t.spec_opts << @spec_opts
|
48
|
-
end
|
49
|
-
|
50
|
-
desc "NCover Console functional specs"
|
51
|
-
Spec::Rake::SpecTask.new :ncoverconsole do |t|
|
52
|
-
t.spec_files = FileList['spec/ncoverconsole*_spec.rb']
|
53
|
-
t.spec_opts << @spec_opts
|
54
|
-
end
|
55
|
-
|
56
|
-
desc "NCover Report functional specs"
|
57
|
-
Spec::Rake::SpecTask.new :ncoverreport do |t|
|
58
|
-
t.spec_files = FileList['spec/ncoverreport*_spec.rb']
|
59
|
-
t.spec_opts << @spec_opts
|
60
|
-
end
|
61
|
-
|
62
|
-
desc "Ndepend functional specs"
|
63
|
-
Spec::Rake::SpecTask.new :ndepend do |t|
|
64
|
-
t.spec_files = FileList['spec/ndepend*_spec.rb']
|
65
|
-
t.spec_opts << @spec_opts
|
66
|
-
end
|
67
|
-
|
68
|
-
desc "Zip functional specs"
|
69
|
-
Spec::Rake::SpecTask.new :zip do |t|
|
70
|
-
t.spec_files = FileList['spec/zip*_spec.rb']
|
71
|
-
t.spec_opts << @spec_opts
|
72
|
-
end
|
73
|
-
|
74
|
-
desc "XUnit functional specs"
|
75
|
-
Spec::Rake::SpecTask.new :xunit do |t|
|
76
|
-
t.spec_files = FileList['spec/xunit*_spec.rb']
|
77
|
-
t.spec_opts << @spec_opts
|
78
|
-
end
|
79
|
-
|
80
|
-
desc "NUnit functional specs"
|
81
|
-
Spec::Rake::SpecTask.new :nunit do |t|
|
82
|
-
t.spec_files = FileList['spec/nunit*_spec.rb']
|
83
|
-
t.spec_opts << @spec_opts
|
84
|
-
end
|
85
|
-
|
86
|
-
desc "MSTest functional specs"
|
87
|
-
Spec::Rake::SpecTask.new :mstest do |t|
|
88
|
-
t.spec_files = FileList['spec/mstest*_spec.rb']
|
89
|
-
t.spec_opts << @spec_opts
|
90
|
-
end
|
91
|
-
|
92
|
-
desc "MSpec functional specs"
|
93
|
-
Spec::Rake::SpecTask.new :mspec do |t|
|
94
|
-
t.spec_files = FileList['spec/mspec*_spec.rb']
|
95
|
-
t.spec_opts << @spec_opts
|
96
|
-
end
|
97
|
-
|
98
|
-
desc "Exec functional specs"
|
99
|
-
Spec::Rake::SpecTask.new :exec do |t|
|
100
|
-
t.spec_files = FileList['spec/exec*_spec.rb']
|
101
|
-
t.spec_opts << @spec_opts
|
102
|
-
end
|
103
|
-
|
104
|
-
desc "Docu functional specs"
|
105
|
-
Spec::Rake::SpecTask.new :docu do |t|
|
106
|
-
t.spec_files = FileList['spec/docu*_spec.rb']
|
107
|
-
t.spec_opts << @spec_opts
|
108
|
-
end
|
109
|
-
|
110
|
-
desc "YAML Config functional specs"
|
111
|
-
Spec::Rake::SpecTask.new :yamlconfig do |t|
|
112
|
-
t.spec_files = FileList['spec/yaml*_spec.rb']
|
113
|
-
t.spec_opts << @spec_opts
|
114
|
-
end
|
115
|
-
|
116
|
-
desc "FluenMigrator functional specs"
|
117
|
-
Spec::Rake::SpecTask.new :fluentmigrator do |t|
|
118
|
-
t.spec_files = FileList['spec/fluentmigrator*_spec.rb']
|
119
|
-
t.spec_opts << @spec_opts
|
120
|
-
end
|
121
|
-
|
122
|
-
desc "Output functional specs"
|
123
|
-
Spec::Rake::SpecTask.new :output do |t|
|
124
|
-
t.spec_files = FileList['spec/output*_spec.rb']
|
125
|
-
t.spec_opts << @spec_opts
|
126
|
-
end
|
127
|
-
|
128
|
-
desc "NChurn functional specs"
|
129
|
-
Spec::Rake::SpecTask.new :nchurn do |t|
|
130
|
-
t.spec_files = FileList['spec/nchurn*_spec.rb']
|
131
|
-
t.spec_opts << @spec_opts
|
132
|
-
end
|
133
|
-
end
|
134
|
-
|
135
|
-
namespace :albacore do
|
136
|
-
Albacore.configure do |config|
|
137
|
-
config.yaml_config_folder = "spec/support/yamlconfig"
|
138
|
-
config.log_level = :verbose
|
139
|
-
end
|
140
|
-
|
141
|
-
desc "Run a complete Albacore build sample"
|
142
|
-
task :sample => ['albacore:assemblyinfo',
|
143
|
-
'albacore:assemblyinfo_modify',
|
144
|
-
'albacore:msbuild',
|
145
|
-
'albacore:ncoverconsole',
|
146
|
-
'albacore:ncoverreport',
|
147
|
-
'albacore:mspec',
|
148
|
-
'albacore:nunit',
|
149
|
-
'albacore:xunit',
|
150
|
-
'albacore:mstest',
|
151
|
-
'albacore:fluentmigrator']
|
152
|
-
|
153
|
-
desc "Run a sample MSBuild with YAML autoconfig"
|
154
|
-
msbuild :msbuild
|
155
|
-
|
156
|
-
desc "Run a sample assembly info generator"
|
157
|
-
assemblyinfo do |asm|
|
158
|
-
asm.version = "0.1.2.3"
|
159
|
-
asm.company_name = "a test company"
|
160
|
-
asm.product_name = "a product name goes here"
|
161
|
-
asm.title = "my assembly title"
|
162
|
-
asm.description = "this is the assembly description"
|
163
|
-
asm.copyright = "copyright some year, by some legal entity"
|
164
|
-
asm.custom_attributes :SomeAttribute => "some value goes here", :AnotherAttribute => "with some data"
|
165
|
-
|
166
|
-
asm.output_file = "spec/support/AssemblyInfo/AssemblyInfo.cs"
|
167
|
-
end
|
168
|
-
|
169
|
-
desc "Run a sample assembly info modifier"
|
170
|
-
assemblyinfo :assemblyinfo_modify do|asm|
|
171
|
-
# modify existing
|
172
|
-
asm.version = "0.1.2.3"
|
173
|
-
asm.company_name = "a test company"
|
174
|
-
|
175
|
-
# new attribute
|
176
|
-
asm.file_version = "4.5.6.7"
|
177
|
-
|
178
|
-
asm.input_file = "spec/support/AssemblyInfo/AssemblyInfoInput.test"
|
179
|
-
asm.output_file = "spec/support/AssemblyInfo/AssemblyInfoOutput.cs"
|
180
|
-
end
|
181
|
-
|
182
|
-
desc "Run a sample NCover Console code coverage"
|
183
|
-
ncoverconsole do |ncc|
|
184
|
-
@xml_coverage = "spec/support/CodeCoverage/test-coverage.xml"
|
185
|
-
File.delete(@xml_coverage) if File.exist?(@xml_coverage)
|
186
|
-
|
187
|
-
ncc.log_level = :verbose
|
188
|
-
ncc.command = "spec/support/Tools/NCover-v3.3/NCover.Console.exe"
|
189
|
-
ncc.output :xml => @xml_coverage
|
190
|
-
ncc.working_directory = "spec/support/CodeCoverage/nunit"
|
191
|
-
|
192
|
-
nunit = NUnitTestRunner.new("spec/support/Tools/NUnit-v2.5/nunit-console-x86.exe")
|
193
|
-
nunit.log_level = :verbose
|
194
|
-
nunit.assemblies "assemblies/TestSolution.Tests.dll"
|
195
|
-
nunit.options '/noshadow'
|
196
|
-
|
197
|
-
ncc.testrunner = nunit
|
198
|
-
end
|
199
|
-
|
200
|
-
desc "Run a sample NCover Report to check code coverage"
|
201
|
-
ncoverreport :ncoverreport => :ncoverconsole do |ncr|
|
202
|
-
@xml_coverage = "spec/support/CodeCoverage/test-coverage.xml"
|
203
|
-
|
204
|
-
ncr.command = "spec/support/Tools/NCover-v3.3/NCover.Reporting.exe"
|
205
|
-
ncr.coverage_files @xml_coverage
|
206
|
-
|
207
|
-
fullcoveragereport = NCover::FullCoverageReport.new
|
208
|
-
fullcoveragereport.output_path = "spec/support/CodeCoverage/report/output"
|
209
|
-
ncr.reports fullcoveragereport
|
210
|
-
|
211
|
-
ncr.required_coverage(
|
212
|
-
NCover::BranchCoverage.new(:minimum => 10),
|
213
|
-
NCover::CyclomaticComplexity.new(:maximum => 1)
|
214
|
-
)
|
215
|
-
end
|
216
|
-
|
217
|
-
desc "Run ZipDirectory example"
|
218
|
-
zip do |zip|
|
219
|
-
zip.output_path = File.dirname(__FILE__)
|
220
|
-
zip.directories_to_zip = "lib", "spec"
|
221
|
-
zip.additional_files "README.markdown"
|
222
|
-
zip.output_file = 'albacore_example.zip'
|
223
|
-
end
|
224
|
-
|
225
|
-
desc "Run UnZip example"
|
226
|
-
unzip do |zip|
|
227
|
-
zip.unzip_path = File.join File.dirname(__FILE__), 'temp'
|
228
|
-
zip.zip_file = 'albacore_example.zip'
|
229
|
-
end
|
230
|
-
|
231
|
-
desc "MSpec Test Runner Example"
|
232
|
-
mspec do |mspec|
|
233
|
-
mspec.command = "spec/support/Tools/Machine.Specification-v0.2/Machine.Specifications.ConsoleRunner.exe"
|
234
|
-
mspec.assemblies "spec/support/CodeCoverage/mspec/assemblies/TestSolution.MSpecTests.dll"
|
235
|
-
end
|
236
|
-
|
237
|
-
desc "NUnit Test Runner Example"
|
238
|
-
nunit do |nunit|
|
239
|
-
nunit.command = "spec/support/Tools/NUnit-v2.5/nunit-console.exe"
|
240
|
-
nunit.assemblies "spec/support/CodeCoverage/nunit/assemblies/TestSolution.Tests.dll"
|
241
|
-
end
|
242
|
-
|
243
|
-
desc "MSTest Test Runner Example"
|
244
|
-
mstest do |mstest|
|
245
|
-
mstest.command = "spec/support/Tools/MSTest-2008/mstest.exe"
|
246
|
-
mstest.assemblies "spec/support/CodeCoverage/mstest/TestSolution.MsTestTests.dll"
|
247
|
-
end
|
248
|
-
|
249
|
-
desc "XUnit Test Runner Example"
|
250
|
-
xunit do |xunit|
|
251
|
-
xunit.command = "spec/support/Tools/XUnit-v1.5/xunit.console.exe"
|
252
|
-
xunit.assembly = "spec/support/CodeCoverage/xunit/assemblies/TestSolution.XUnitTests.dll"
|
253
|
-
end
|
254
|
-
|
255
|
-
desc "Exec Task Example"
|
256
|
-
exec do |exec|
|
257
|
-
exec.command = 'hostname'
|
258
|
-
end
|
259
|
-
|
260
|
-
desc "Mono \ xBuild Example"
|
261
|
-
mono do |xbuild|
|
262
|
-
xbuild.properties :configuration => :release, :platform => 'Any CPU'
|
263
|
-
xbuild.targets :clean, :build
|
264
|
-
xbuild.solution = "spec/support/TestSolution/TestSolution.sln"
|
265
|
-
end
|
266
|
-
|
267
|
-
desc "FluentMigrator Test Runner Example"
|
268
|
-
fluentmigrator do |migrator|
|
269
|
-
db_file = "#{ENV['TEMP']}/fluentmigrator.sqlite3"
|
270
|
-
File.delete(db_file) if File.exist?(db_file)
|
271
|
-
|
272
|
-
migrator.command = "spec/support/Tools/FluentMigrator-0.9/Migrate.exe"
|
273
|
-
migrator.target = "spec/support/FluentMigrator/TestSolution.FluentMigrator.dll"
|
274
|
-
migrator.provider = "sqlite"
|
275
|
-
migrator.connection = "Data Source=#{db_file};"
|
276
|
-
end
|
277
|
-
|
278
|
-
end
|
279
|
-
|
280
|
-
namespace :jeweler do
|
281
|
-
require 'jeweler'
|
282
|
-
Jeweler::Tasks.new do |gs|
|
283
|
-
gs.name = "albacore"
|
284
|
-
gs.summary = "Dolphin-Safe Rake Tasks For .NET Systems"
|
285
|
-
gs.description = "Easily build your .NET solutions with Ruby and Rake, using this suite of Rake tasks."
|
286
|
-
gs.email = "albacorebuild@gmail.com"
|
287
|
-
gs.homepage = "http://albacorebuild.net"
|
288
|
-
gs.authors = ["Derick Bailey", "etc"]
|
289
|
-
gs.has_rdoc = false
|
290
|
-
gs.files.exclude(
|
291
|
-
"albacore.gemspec",
|
292
|
-
".gitignore",
|
293
|
-
"spec/",
|
294
|
-
"pkg/"
|
295
|
-
)
|
296
|
-
end
|
297
|
-
end
|
1
|
+
$: << './'
|
2
|
+
require 'lib/albacore'
|
3
|
+
require 'version_bumper'
|
4
|
+
|
5
|
+
task :default => ['albacore:sample']
|
6
|
+
|
7
|
+
namespace :specs do
|
8
|
+
require 'spec/rake/spectask'
|
9
|
+
|
10
|
+
@spec_opts = '--colour --format specdoc'
|
11
|
+
|
12
|
+
desc "Run all specs for albacore"
|
13
|
+
Spec::Rake::SpecTask.new :all do |t|
|
14
|
+
t.spec_files = FileList['spec/**/*_spec.rb'].exclude{ |f|
|
15
|
+
f if IS_IRONRUBY && (f.include?("zip"))
|
16
|
+
}
|
17
|
+
t.spec_opts << @spec_opts
|
18
|
+
end
|
19
|
+
|
20
|
+
desc "CSharp compiler (csc.exe) specs"
|
21
|
+
Spec::Rake::SpecTask.new :csc do |t|
|
22
|
+
t.spec_files = FileList['spec/csc*_spec.rb']
|
23
|
+
t.spec_opts << @spec_opts
|
24
|
+
end
|
25
|
+
|
26
|
+
desc "Assembly info functional specs"
|
27
|
+
Spec::Rake::SpecTask.new :assemblyinfo do |t|
|
28
|
+
t.spec_files = FileList['spec/assemblyinfo*_spec.rb']
|
29
|
+
t.spec_opts << @spec_opts
|
30
|
+
end
|
31
|
+
|
32
|
+
desc "MSBuild functional specs"
|
33
|
+
Spec::Rake::SpecTask.new :msbuild do |t|
|
34
|
+
t.spec_files = FileList['spec/msbuild*_spec.rb']
|
35
|
+
t.spec_opts << @spec_opts
|
36
|
+
end
|
37
|
+
|
38
|
+
desc "SQLServer SQLCmd functional specs"
|
39
|
+
Spec::Rake::SpecTask.new :sqlcmd do |t|
|
40
|
+
t.spec_files = FileList['spec/sqlcmd*_spec.rb']
|
41
|
+
t.spec_opts << @spec_opts
|
42
|
+
end
|
43
|
+
|
44
|
+
desc "Nant functional specs"
|
45
|
+
Spec::Rake::SpecTask.new :nant do |t|
|
46
|
+
t.spec_files = FileList['spec/nant*_spec.rb']
|
47
|
+
t.spec_opts << @spec_opts
|
48
|
+
end
|
49
|
+
|
50
|
+
desc "NCover Console functional specs"
|
51
|
+
Spec::Rake::SpecTask.new :ncoverconsole do |t|
|
52
|
+
t.spec_files = FileList['spec/ncoverconsole*_spec.rb']
|
53
|
+
t.spec_opts << @spec_opts
|
54
|
+
end
|
55
|
+
|
56
|
+
desc "NCover Report functional specs"
|
57
|
+
Spec::Rake::SpecTask.new :ncoverreport do |t|
|
58
|
+
t.spec_files = FileList['spec/ncoverreport*_spec.rb']
|
59
|
+
t.spec_opts << @spec_opts
|
60
|
+
end
|
61
|
+
|
62
|
+
desc "Ndepend functional specs"
|
63
|
+
Spec::Rake::SpecTask.new :ndepend do |t|
|
64
|
+
t.spec_files = FileList['spec/ndepend*_spec.rb']
|
65
|
+
t.spec_opts << @spec_opts
|
66
|
+
end
|
67
|
+
|
68
|
+
desc "Zip functional specs"
|
69
|
+
Spec::Rake::SpecTask.new :zip do |t|
|
70
|
+
t.spec_files = FileList['spec/zip*_spec.rb']
|
71
|
+
t.spec_opts << @spec_opts
|
72
|
+
end
|
73
|
+
|
74
|
+
desc "XUnit functional specs"
|
75
|
+
Spec::Rake::SpecTask.new :xunit do |t|
|
76
|
+
t.spec_files = FileList['spec/xunit*_spec.rb']
|
77
|
+
t.spec_opts << @spec_opts
|
78
|
+
end
|
79
|
+
|
80
|
+
desc "NUnit functional specs"
|
81
|
+
Spec::Rake::SpecTask.new :nunit do |t|
|
82
|
+
t.spec_files = FileList['spec/nunit*_spec.rb']
|
83
|
+
t.spec_opts << @spec_opts
|
84
|
+
end
|
85
|
+
|
86
|
+
desc "MSTest functional specs"
|
87
|
+
Spec::Rake::SpecTask.new :mstest do |t|
|
88
|
+
t.spec_files = FileList['spec/mstest*_spec.rb']
|
89
|
+
t.spec_opts << @spec_opts
|
90
|
+
end
|
91
|
+
|
92
|
+
desc "MSpec functional specs"
|
93
|
+
Spec::Rake::SpecTask.new :mspec do |t|
|
94
|
+
t.spec_files = FileList['spec/mspec*_spec.rb']
|
95
|
+
t.spec_opts << @spec_opts
|
96
|
+
end
|
97
|
+
|
98
|
+
desc "Exec functional specs"
|
99
|
+
Spec::Rake::SpecTask.new :exec do |t|
|
100
|
+
t.spec_files = FileList['spec/exec*_spec.rb']
|
101
|
+
t.spec_opts << @spec_opts
|
102
|
+
end
|
103
|
+
|
104
|
+
desc "Docu functional specs"
|
105
|
+
Spec::Rake::SpecTask.new :docu do |t|
|
106
|
+
t.spec_files = FileList['spec/docu*_spec.rb']
|
107
|
+
t.spec_opts << @spec_opts
|
108
|
+
end
|
109
|
+
|
110
|
+
desc "YAML Config functional specs"
|
111
|
+
Spec::Rake::SpecTask.new :yamlconfig do |t|
|
112
|
+
t.spec_files = FileList['spec/yaml*_spec.rb']
|
113
|
+
t.spec_opts << @spec_opts
|
114
|
+
end
|
115
|
+
|
116
|
+
desc "FluenMigrator functional specs"
|
117
|
+
Spec::Rake::SpecTask.new :fluentmigrator do |t|
|
118
|
+
t.spec_files = FileList['spec/fluentmigrator*_spec.rb']
|
119
|
+
t.spec_opts << @spec_opts
|
120
|
+
end
|
121
|
+
|
122
|
+
desc "Output functional specs"
|
123
|
+
Spec::Rake::SpecTask.new :output do |t|
|
124
|
+
t.spec_files = FileList['spec/output*_spec.rb']
|
125
|
+
t.spec_opts << @spec_opts
|
126
|
+
end
|
127
|
+
|
128
|
+
desc "NChurn functional specs"
|
129
|
+
Spec::Rake::SpecTask.new :nchurn do |t|
|
130
|
+
t.spec_files = FileList['spec/nchurn*_spec.rb']
|
131
|
+
t.spec_opts << @spec_opts
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
namespace :albacore do
|
136
|
+
Albacore.configure do |config|
|
137
|
+
config.yaml_config_folder = "spec/support/yamlconfig"
|
138
|
+
config.log_level = :verbose
|
139
|
+
end
|
140
|
+
|
141
|
+
desc "Run a complete Albacore build sample"
|
142
|
+
task :sample => ['albacore:assemblyinfo',
|
143
|
+
'albacore:assemblyinfo_modify',
|
144
|
+
'albacore:msbuild',
|
145
|
+
'albacore:ncoverconsole',
|
146
|
+
'albacore:ncoverreport',
|
147
|
+
'albacore:mspec',
|
148
|
+
'albacore:nunit',
|
149
|
+
'albacore:xunit',
|
150
|
+
'albacore:mstest',
|
151
|
+
'albacore:fluentmigrator']
|
152
|
+
|
153
|
+
desc "Run a sample MSBuild with YAML autoconfig"
|
154
|
+
msbuild :msbuild
|
155
|
+
|
156
|
+
desc "Run a sample assembly info generator"
|
157
|
+
assemblyinfo do |asm|
|
158
|
+
asm.version = "0.1.2.3"
|
159
|
+
asm.company_name = "a test company"
|
160
|
+
asm.product_name = "a product name goes here"
|
161
|
+
asm.title = "my assembly title"
|
162
|
+
asm.description = "this is the assembly description"
|
163
|
+
asm.copyright = "copyright some year, by some legal entity"
|
164
|
+
asm.custom_attributes :SomeAttribute => "some value goes here", :AnotherAttribute => "with some data"
|
165
|
+
|
166
|
+
asm.output_file = "spec/support/AssemblyInfo/AssemblyInfo.cs"
|
167
|
+
end
|
168
|
+
|
169
|
+
desc "Run a sample assembly info modifier"
|
170
|
+
assemblyinfo :assemblyinfo_modify do|asm|
|
171
|
+
# modify existing
|
172
|
+
asm.version = "0.1.2.3"
|
173
|
+
asm.company_name = "a test company"
|
174
|
+
|
175
|
+
# new attribute
|
176
|
+
asm.file_version = "4.5.6.7"
|
177
|
+
|
178
|
+
asm.input_file = "spec/support/AssemblyInfo/AssemblyInfoInput.test"
|
179
|
+
asm.output_file = "spec/support/AssemblyInfo/AssemblyInfoOutput.cs"
|
180
|
+
end
|
181
|
+
|
182
|
+
desc "Run a sample NCover Console code coverage"
|
183
|
+
ncoverconsole do |ncc|
|
184
|
+
@xml_coverage = "spec/support/CodeCoverage/test-coverage.xml"
|
185
|
+
File.delete(@xml_coverage) if File.exist?(@xml_coverage)
|
186
|
+
|
187
|
+
ncc.log_level = :verbose
|
188
|
+
ncc.command = "spec/support/Tools/NCover-v3.3/NCover.Console.exe"
|
189
|
+
ncc.output :xml => @xml_coverage
|
190
|
+
ncc.working_directory = "spec/support/CodeCoverage/nunit"
|
191
|
+
|
192
|
+
nunit = NUnitTestRunner.new("spec/support/Tools/NUnit-v2.5/nunit-console-x86.exe")
|
193
|
+
nunit.log_level = :verbose
|
194
|
+
nunit.assemblies "assemblies/TestSolution.Tests.dll"
|
195
|
+
nunit.options '/noshadow'
|
196
|
+
|
197
|
+
ncc.testrunner = nunit
|
198
|
+
end
|
199
|
+
|
200
|
+
desc "Run a sample NCover Report to check code coverage"
|
201
|
+
ncoverreport :ncoverreport => :ncoverconsole do |ncr|
|
202
|
+
@xml_coverage = "spec/support/CodeCoverage/test-coverage.xml"
|
203
|
+
|
204
|
+
ncr.command = "spec/support/Tools/NCover-v3.3/NCover.Reporting.exe"
|
205
|
+
ncr.coverage_files @xml_coverage
|
206
|
+
|
207
|
+
fullcoveragereport = NCover::FullCoverageReport.new
|
208
|
+
fullcoveragereport.output_path = "spec/support/CodeCoverage/report/output"
|
209
|
+
ncr.reports fullcoveragereport
|
210
|
+
|
211
|
+
ncr.required_coverage(
|
212
|
+
NCover::BranchCoverage.new(:minimum => 10),
|
213
|
+
NCover::CyclomaticComplexity.new(:maximum => 1)
|
214
|
+
)
|
215
|
+
end
|
216
|
+
|
217
|
+
desc "Run ZipDirectory example"
|
218
|
+
zip do |zip|
|
219
|
+
zip.output_path = File.dirname(__FILE__)
|
220
|
+
zip.directories_to_zip = "lib", "spec"
|
221
|
+
zip.additional_files "README.markdown"
|
222
|
+
zip.output_file = 'albacore_example.zip'
|
223
|
+
end
|
224
|
+
|
225
|
+
desc "Run UnZip example"
|
226
|
+
unzip do |zip|
|
227
|
+
zip.unzip_path = File.join File.dirname(__FILE__), 'temp'
|
228
|
+
zip.zip_file = 'albacore_example.zip'
|
229
|
+
end
|
230
|
+
|
231
|
+
desc "MSpec Test Runner Example"
|
232
|
+
mspec do |mspec|
|
233
|
+
mspec.command = "spec/support/Tools/Machine.Specification-v0.2/Machine.Specifications.ConsoleRunner.exe"
|
234
|
+
mspec.assemblies "spec/support/CodeCoverage/mspec/assemblies/TestSolution.MSpecTests.dll"
|
235
|
+
end
|
236
|
+
|
237
|
+
desc "NUnit Test Runner Example"
|
238
|
+
nunit do |nunit|
|
239
|
+
nunit.command = "spec/support/Tools/NUnit-v2.5/nunit-console.exe"
|
240
|
+
nunit.assemblies "spec/support/CodeCoverage/nunit/assemblies/TestSolution.Tests.dll"
|
241
|
+
end
|
242
|
+
|
243
|
+
desc "MSTest Test Runner Example"
|
244
|
+
mstest do |mstest|
|
245
|
+
mstest.command = "spec/support/Tools/MSTest-2008/mstest.exe"
|
246
|
+
mstest.assemblies "spec/support/CodeCoverage/mstest/TestSolution.MsTestTests.dll"
|
247
|
+
end
|
248
|
+
|
249
|
+
desc "XUnit Test Runner Example"
|
250
|
+
xunit do |xunit|
|
251
|
+
xunit.command = "spec/support/Tools/XUnit-v1.5/xunit.console.exe"
|
252
|
+
xunit.assembly = "spec/support/CodeCoverage/xunit/assemblies/TestSolution.XUnitTests.dll"
|
253
|
+
end
|
254
|
+
|
255
|
+
desc "Exec Task Example"
|
256
|
+
exec do |exec|
|
257
|
+
exec.command = 'hostname'
|
258
|
+
end
|
259
|
+
|
260
|
+
desc "Mono \ xBuild Example"
|
261
|
+
mono do |xbuild|
|
262
|
+
xbuild.properties :configuration => :release, :platform => 'Any CPU'
|
263
|
+
xbuild.targets :clean, :build
|
264
|
+
xbuild.solution = "spec/support/TestSolution/TestSolution.sln"
|
265
|
+
end
|
266
|
+
|
267
|
+
desc "FluentMigrator Test Runner Example"
|
268
|
+
fluentmigrator do |migrator|
|
269
|
+
db_file = "#{ENV['TEMP']}/fluentmigrator.sqlite3"
|
270
|
+
File.delete(db_file) if File.exist?(db_file)
|
271
|
+
|
272
|
+
migrator.command = "spec/support/Tools/FluentMigrator-0.9/Migrate.exe"
|
273
|
+
migrator.target = "spec/support/FluentMigrator/TestSolution.FluentMigrator.dll"
|
274
|
+
migrator.provider = "sqlite"
|
275
|
+
migrator.connection = "Data Source=#{db_file};"
|
276
|
+
end
|
277
|
+
|
278
|
+
end
|
279
|
+
|
280
|
+
namespace :jeweler do
|
281
|
+
require 'jeweler'
|
282
|
+
Jeweler::Tasks.new do |gs|
|
283
|
+
gs.name = "albacore"
|
284
|
+
gs.summary = "Dolphin-Safe Rake Tasks For .NET Systems"
|
285
|
+
gs.description = "Easily build your .NET solutions with Ruby and Rake, using this suite of Rake tasks."
|
286
|
+
gs.email = "albacorebuild@gmail.com"
|
287
|
+
gs.homepage = "http://albacorebuild.net"
|
288
|
+
gs.authors = ["Derick Bailey", "etc"]
|
289
|
+
gs.has_rdoc = false
|
290
|
+
gs.files.exclude(
|
291
|
+
"albacore.gemspec",
|
292
|
+
".gitignore",
|
293
|
+
"spec/",
|
294
|
+
"pkg/"
|
295
|
+
)
|
296
|
+
end
|
297
|
+
end
|