albacore 1.0.0 → 2.0.0.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -21
- data/.travis.yml +31 -12
- data/Gemfile +14 -6
- data/Guardfile +1 -3
- data/README.md +200 -47
- data/Rakefile +9 -19
- data/albacore.gemspec +33 -23
- data/lib/albacore.rb +3 -47
- data/lib/albacore/albacore_module.rb +57 -0
- data/lib/albacore/application.rb +43 -0
- data/lib/albacore/cmd_config.rb +66 -0
- data/lib/albacore/config_dsl.rb +55 -0
- data/lib/albacore/cross_platform_cmd.rb +291 -0
- data/lib/albacore/dsl.rb +90 -0
- data/lib/albacore/errors/command_failed_error.rb +11 -0
- data/lib/albacore/errors/command_not_found_error.rb +13 -0
- data/lib/albacore/errors/unfilled_property_error.rb +14 -0
- data/lib/albacore/ext/README.md +12 -0
- data/lib/albacore/ext/teamcity.rb +64 -0
- data/lib/albacore/facts.rb +25 -0
- data/lib/albacore/logging.rb +32 -0
- data/lib/albacore/nuget_model.rb +387 -0
- data/lib/albacore/paths.rb +34 -0
- data/lib/albacore/project.rb +141 -0
- data/lib/albacore/semver.rb +5 -0
- data/lib/albacore/task_types/asmver.rb +72 -0
- data/lib/albacore/task_types/asmver/cpp.rb +20 -0
- data/lib/albacore/task_types/asmver/cs.rb +17 -0
- data/lib/albacore/task_types/asmver/engine.rb +126 -0
- data/lib/albacore/task_types/asmver/file_generator.rb +45 -0
- data/lib/albacore/task_types/asmver/fs.rb +37 -0
- data/lib/albacore/task_types/asmver/vb.rb +27 -0
- data/lib/albacore/task_types/build.rb +192 -0
- data/lib/albacore/task_types/nugets_authentication.rb +9 -0
- data/lib/albacore/task_types/nugets_pack.rb +378 -0
- data/lib/albacore/task_types/nugets_restore.rb +138 -0
- data/lib/albacore/task_types/test_runner.rb +39 -0
- data/lib/albacore/tasks/README.md +16 -0
- data/lib/albacore/tasks/albasemver.rb +49 -0
- data/lib/albacore/tasks/projectlint.rb +81 -0
- data/lib/albacore/tasks/versionizer.rb +65 -0
- data/lib/albacore/tools/fluent_migrator.rb +177 -0
- data/lib/albacore/tools/restore_hint_paths.rb +112 -0
- data/lib/albacore/version.rb +3 -3
- data/spec/Rakefile +5 -0
- data/spec/albacore_spec.rb +12 -0
- data/spec/asmver_spec.rb +151 -0
- data/spec/asmver_task_spec.rb +32 -0
- data/spec/build_spec.rb +60 -0
- data/spec/config_dsl_spec.rb +83 -0
- data/spec/cross_platform_cmd_spec.rb +65 -0
- data/spec/dsl_spec.rb +39 -0
- data/spec/ext_teamcity_spec.rb +71 -0
- data/spec/facts_spec.rb +7 -0
- data/spec/nuget_model_spec.rb +401 -0
- data/spec/nugets_pack_spec.rb +231 -0
- data/spec/nugets_restore_spec.rb +55 -0
- data/spec/project_spec.rb +26 -0
- data/spec/projectlint/added_but_not_on_filesystem/aproject.csproj +29 -0
- data/spec/projectlint/correct/File.cs +1 -0
- data/spec/projectlint/correct/Image.txt +1 -0
- data/spec/projectlint/correct/MyHeavy.heavy +1 -0
- data/spec/projectlint/correct/Schema.xsd +1 -0
- data/spec/projectlint/correct/SubFolder/AnotherFile.cs +1 -0
- data/spec/projectlint/correct/aproject.csproj +29 -0
- data/spec/projectlint/on_filesystem_but_not_added/File.cs +1 -0
- data/spec/projectlint/on_filesystem_but_not_added/Image.txt +1 -0
- data/spec/projectlint/on_filesystem_but_not_added/aproject.csproj +11 -0
- data/spec/projectlint_spec.rb +77 -0
- data/spec/smoke_spec.rb +55 -0
- data/spec/spec_helper.rb +19 -20
- data/spec/support/Nuget/NuGet.exe +0 -0
- data/spec/support/echo/FSharp.Core.dll +0 -0
- data/spec/support/echo/FSharp.Core.xml +10517 -0
- data/spec/support/echo/echo.XML +12 -0
- data/spec/support/echo/echo.exe +0 -0
- data/spec/support/echo/echo.exe.config +17 -0
- data/spec/support/echo/echo.pdb +0 -0
- data/spec/support/returnstatus/FSharp.Core.dll +0 -0
- data/spec/support/returnstatus/FSharp.Core.xml +10517 -0
- data/spec/support/returnstatus/returnstatus.XML +12 -0
- data/spec/support/returnstatus/returnstatus.exe +0 -0
- data/spec/support/returnstatus/returnstatus.exe.config +17 -0
- data/spec/support/returnstatus/returnstatus.pdb +0 -0
- data/spec/support/sh_interceptor.rb +83 -0
- data/spec/testdata/.gitignore +5 -0
- data/spec/testdata/DebugProject/.gitignore +1 -0
- data/spec/testdata/DebugProject/Degbu.fsproj +57 -0
- data/spec/testdata/DebugProject/Degbu.sln +20 -0
- data/spec/testdata/DebugProject/Gemfile +1 -0
- data/spec/testdata/DebugProject/Library1.fs +4 -0
- data/spec/testdata/DebugProject/Rakefile +22 -0
- data/spec/testdata/EmptyProject/EmptyProject.csproj +39 -0
- data/spec/{assemblyinfo → testdata/EmptyProject/Properties}/AssemblyInfo.cs +5 -5
- data/spec/testdata/Gemfile +1 -0
- data/spec/testdata/NuGet.exe +0 -0
- data/spec/testdata/Project/Library1.fs +4 -0
- data/spec/testdata/Project/Project.fsproj +52 -0
- data/spec/testdata/Project/Project.sln +20 -0
- data/spec/testdata/Project/packages.config +6 -0
- data/spec/testdata/Rakefile +22 -0
- data/spec/testdata/TestingDependencies/Sample.Commands/Library.fs +6 -0
- data/spec/testdata/TestingDependencies/Sample.Commands/Sample.Commands.fsproj +78 -0
- data/spec/testdata/TestingDependencies/Sample.Commands/Script.fsx +8 -0
- data/spec/testdata/TestingDependencies/Sample.Commands/packages.config +6 -0
- data/spec/testdata/TestingDependencies/Sample.Core/Library.fs +3 -0
- data/spec/testdata/TestingDependencies/Sample.Core/Sample.Core.fsproj +59 -0
- data/spec/testdata/TestingDependencies/Sample.Core/Script.fsx +8 -0
- data/spec/testdata/TestingDependencies/Sample.Core/packages.config +4 -0
- data/spec/testdata/TestingDependencies/Sample.sln +26 -0
- data/spec/testdata/TestingDependencies/vendor/FSharp.Core.dll +0 -0
- data/spec/testdata/TestingDependencies/vendor/FSharp.Core.optdata +0 -0
- data/spec/testdata/TestingDependencies/vendor/FSharp.Core.sigdata +0 -0
- data/spec/testdata/TestingDependencies/vendor/FSharp.Core.xml +8748 -0
- data/spec/testdata/example.nuspec +14 -0
- data/spec/testdata/example.symbols.nuspec +21 -0
- data/spec/tools/fluent_migrator_spec.rb +80 -0
- metadata +303 -212
- data/.bundle/config +0 -2
- data/.rspec +0 -2
- data/CONTRIBUTING.md +0 -87
- data/LICENSE +0 -21
- data/lib/albacore/albacoretask.rb +0 -50
- data/lib/albacore/aspnetcompiler.rb +0 -80
- data/lib/albacore/assemblyinfo.rb +0 -163
- data/lib/albacore/assemblyinfolanguages/assemblyinfoengine.rb +0 -54
- data/lib/albacore/assemblyinfolanguages/cppcliengine.rb +0 -18
- data/lib/albacore/assemblyinfolanguages/csharpengine.rb +0 -15
- data/lib/albacore/assemblyinfolanguages/fsharpengine.rb +0 -23
- data/lib/albacore/assemblyinfolanguages/vbnetengine.rb +0 -15
- data/lib/albacore/config/aspnetcompilerconfig.rb +0 -30
- data/lib/albacore/config/assemblyinfoconfig.rb +0 -18
- data/lib/albacore/config/config.rb +0 -22
- data/lib/albacore/config/cscconfig.rb +0 -28
- data/lib/albacore/config/docuconfig.rb +0 -19
- data/lib/albacore/config/execconfig.rb +0 -19
- data/lib/albacore/config/fluentmigratorconfig.rb +0 -19
- data/lib/albacore/config/ilmergeconfig.rb +0 -19
- data/lib/albacore/config/msbuildconfig.rb +0 -29
- data/lib/albacore/config/mspecconfig.rb +0 -19
- data/lib/albacore/config/mstestconfig.rb +0 -19
- data/lib/albacore/config/nantconfig.rb +0 -18
- data/lib/albacore/config/nchurnconfig.rb +0 -19
- data/lib/albacore/config/ncoverconsoleconfig.rb +0 -19
- data/lib/albacore/config/ncoverreportconfig.rb +0 -18
- data/lib/albacore/config/ndependconfig.rb +0 -19
- data/lib/albacore/config/netversion.rb +0 -28
- data/lib/albacore/config/nugetinstallconfig.rb +0 -18
- data/lib/albacore/config/nugetpackconfig.rb +0 -18
- data/lib/albacore/config/nugetpushconfig.rb +0 -18
- data/lib/albacore/config/nugetupdateconfig.rb +0 -18
- data/lib/albacore/config/nunitconfig.rb +0 -19
- data/lib/albacore/config/nuspecconfig.rb +0 -18
- data/lib/albacore/config/plinkconfig.rb +0 -18
- data/lib/albacore/config/specflowconfig.rb +0 -18
- data/lib/albacore/config/sqlcmdconfig.rb +0 -18
- data/lib/albacore/config/unzipconfig.rb +0 -19
- data/lib/albacore/config/xbuildconfig.rb +0 -18
- data/lib/albacore/config/xunitconfig.rb +0 -18
- data/lib/albacore/config/zipdirectoryconfig.rb +0 -18
- data/lib/albacore/csc.rb +0 -77
- data/lib/albacore/docu.rb +0 -38
- data/lib/albacore/exec.rb +0 -20
- data/lib/albacore/fluentmigrator.rb +0 -69
- data/lib/albacore/ilmerge.rb +0 -38
- data/lib/albacore/msbuild.rb +0 -55
- data/lib/albacore/mspec.rb +0 -39
- data/lib/albacore/mstest.rb +0 -47
- data/lib/albacore/nant.rb +0 -41
- data/lib/albacore/nchurn.rb +0 -49
- data/lib/albacore/ncoverconsole.rb +0 -56
- data/lib/albacore/ncoverreport.rb +0 -40
- data/lib/albacore/ncoverreports.rb +0 -16
- data/lib/albacore/ncoverreports/assemblyfilter.rb +0 -10
- data/lib/albacore/ncoverreports/branchcoverage.rb +0 -10
- data/lib/albacore/ncoverreports/classfilter.rb +0 -9
- data/lib/albacore/ncoverreports/codecoveragebase.rb +0 -27
- data/lib/albacore/ncoverreports/cyclomaticcomplexity.rb +0 -23
- data/lib/albacore/ncoverreports/documentfilter.rb +0 -9
- data/lib/albacore/ncoverreports/fullcoveragereport.rb +0 -9
- data/lib/albacore/ncoverreports/methodcoverage.rb +0 -10
- data/lib/albacore/ncoverreports/methodfilter.rb +0 -9
- data/lib/albacore/ncoverreports/namespacefilter.rb +0 -9
- data/lib/albacore/ncoverreports/reportbase.rb +0 -23
- data/lib/albacore/ncoverreports/reportfilterbase.rb +0 -29
- data/lib/albacore/ncoverreports/summaryreport.rb +0 -9
- data/lib/albacore/ncoverreports/symbolcoverage.rb +0 -9
- data/lib/albacore/ndepend.rb +0 -33
- data/lib/albacore/nugetinstall.rb +0 -62
- data/lib/albacore/nugetpack.rb +0 -50
- data/lib/albacore/nugetpush.rb +0 -40
- data/lib/albacore/nugetupdate.rb +0 -50
- data/lib/albacore/nunit.rb +0 -46
- data/lib/albacore/nuspec.rb +0 -180
- data/lib/albacore/output.rb +0 -105
- data/lib/albacore/plink.rb +0 -50
- data/lib/albacore/specflow.rb +0 -30
- data/lib/albacore/sqlcmd.rb +0 -67
- data/lib/albacore/support/attrmethods.rb +0 -33
- data/lib/albacore/support/createtask.rb +0 -50
- data/lib/albacore/support/failure.rb +0 -15
- data/lib/albacore/support/logging.rb +0 -38
- data/lib/albacore/support/openstruct.rb +0 -13
- data/lib/albacore/support/platform.rb +0 -25
- data/lib/albacore/support/runcommand.rb +0 -45
- data/lib/albacore/support/updateattributes.rb +0 -13
- data/lib/albacore/support/yamlconfig.rb +0 -18
- data/lib/albacore/unzip.rb +0 -42
- data/lib/albacore/xbuild.rb +0 -41
- data/lib/albacore/xunit.rb +0 -44
- data/lib/albacore/zipdirectory.rb +0 -106
- data/spec/albacoremodel_spec.rb +0 -52
- data/spec/aspnetcompiler_spec.rb +0 -84
- data/spec/assemblyinfo_spec.rb +0 -209
- data/spec/attrmethods_spec.rb +0 -135
- data/spec/config_spec.rb +0 -32
- data/spec/createtask_spec.rb +0 -234
- data/spec/csc_spec.rb +0 -86
- data/spec/docu_spec.rb +0 -31
- data/spec/exec_spec.rb +0 -25
- data/spec/fluentmigrator_spec.rb +0 -88
- data/spec/ilmerge_spec.rb +0 -35
- data/spec/msbuild_spec.rb +0 -55
- data/spec/mspec_spec.rb +0 -30
- data/spec/mstest_spec.rb +0 -35
- data/spec/nant_spec.rb +0 -40
- data/spec/nchurn_spec.rb +0 -80
- data/spec/ncoverconsole_spec.rb +0 -80
- data/spec/ncoverreport_spec.rb +0 -139
- data/spec/ndepend_spec.rb +0 -26
- data/spec/netversion_spec.rb +0 -51
- data/spec/nugetinstall_spec.rb +0 -59
- data/spec/nugetpack_spec.rb +0 -49
- data/spec/nugetpush_spec.rb +0 -39
- data/spec/nugetupdate_spec.rb +0 -49
- data/spec/nunit_spec.rb +0 -35
- data/spec/nuspec/nuspec.xsd +0 -84
- data/spec/nuspec_spec.rb +0 -74
- data/spec/output/bar/bar.txt +0 -0
- data/spec/output/baz.txt +0 -0
- data/spec/output/erb.txt +0 -1
- data/spec/output/foo/foo/foo.txt +0 -0
- data/spec/output_spec.rb +0 -85
- data/spec/patch/system_patch.rb +0 -12
- data/spec/platform_spec.rb +0 -15
- data/spec/plink_spec.rb +0 -56
- data/spec/runcommand_spec.rb +0 -92
- data/spec/specflow_spec.rb +0 -30
- data/spec/sqlcmd_spec.rb +0 -66
- data/spec/unzip_spec.rb +0 -56
- data/spec/xbuild_spec.rb +0 -40
- data/spec/xunit_spec.rb +0 -30
- data/spec/yaml/test.yml +0 -3
- data/spec/yamlconfig_spec.rb +0 -53
- data/spec/zip/baz.txt +0 -0
- data/spec/zip/foo/bar/bar.txt +0 -0
- data/spec/zip/foo/foo.txt +0 -0
- data/spec/zip_spec.rb +0 -97
data/spec/docu_spec.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe Docu, "when defining a basic docu task" do
|
4
|
-
subject(:task) do
|
5
|
-
task = Docu.new()
|
6
|
-
task.extend(SystemPatch)
|
7
|
-
task.output_path = "whatever"
|
8
|
-
task.assemblies = ["a.dll", "b.dll"]
|
9
|
-
task.xml_files = ["a.xml", "b.xml"]
|
10
|
-
task
|
11
|
-
end
|
12
|
-
|
13
|
-
let(:cmd) { task.system_command }
|
14
|
-
|
15
|
-
before :each do
|
16
|
-
task.execute
|
17
|
-
end
|
18
|
-
|
19
|
-
it "should dress up the output path" do
|
20
|
-
cmd.should include("--output=\"whatever\"")
|
21
|
-
end
|
22
|
-
|
23
|
-
it "should list the assemblies" do
|
24
|
-
cmd.should include("\"a.dll\" \"b.dll\"")
|
25
|
-
end
|
26
|
-
|
27
|
-
it "should list the xml files" do
|
28
|
-
cmd.should include("\"a.xml\" \"b.xml\"")
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
data/spec/exec_spec.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe Exec do
|
4
|
-
subject(:task) do
|
5
|
-
task = Exec.new()
|
6
|
-
task.extend(SystemPatch)
|
7
|
-
task.command = "whatever"
|
8
|
-
task.parameters = ["foo", "bar"]
|
9
|
-
task
|
10
|
-
end
|
11
|
-
|
12
|
-
let(:cmd) { task.system_command }
|
13
|
-
|
14
|
-
before :each do
|
15
|
-
task.execute
|
16
|
-
end
|
17
|
-
|
18
|
-
it "should run the command" do
|
19
|
-
cmd.should include("whatever")
|
20
|
-
end
|
21
|
-
|
22
|
-
it "should use both parameters" do
|
23
|
-
cmd.should include("foo bar")
|
24
|
-
end
|
25
|
-
end
|
data/spec/fluentmigrator_spec.rb
DELETED
@@ -1,88 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe FluentMigrator do
|
4
|
-
subject(:task) do
|
5
|
-
task = FluentMigrator.new()
|
6
|
-
task.extend(SystemPatch)
|
7
|
-
task.command = "fluentm"
|
8
|
-
task.namespace = "namespace"
|
9
|
-
task.provider = "provider"
|
10
|
-
task.target = "target"
|
11
|
-
task.connection = "connection"
|
12
|
-
task.out
|
13
|
-
task.out_file = "output.txt"
|
14
|
-
task.steps = 1
|
15
|
-
task.task = "migrate:up"
|
16
|
-
task.version = "001"
|
17
|
-
task.script_directory = "scripts"
|
18
|
-
task.profile = "profile"
|
19
|
-
task.timeout = 90
|
20
|
-
task.tag = "tag"
|
21
|
-
task.verbose
|
22
|
-
task.preview
|
23
|
-
task
|
24
|
-
end
|
25
|
-
|
26
|
-
let(:cmd) { task.system_command }
|
27
|
-
|
28
|
-
before :each do
|
29
|
-
task.execute
|
30
|
-
end
|
31
|
-
|
32
|
-
it "should run target" do
|
33
|
-
cmd.should include("/target=\"target\"")
|
34
|
-
end
|
35
|
-
|
36
|
-
it "should use provider" do
|
37
|
-
cmd.should include("/provider=provider")
|
38
|
-
end
|
39
|
-
|
40
|
-
it "should use connection" do
|
41
|
-
cmd.should include("/connection=\"connection\"")
|
42
|
-
end
|
43
|
-
|
44
|
-
it "should include the namespace" do
|
45
|
-
cmd.should include("/ns=namespace")
|
46
|
-
end
|
47
|
-
|
48
|
-
it "should output to the specified file" do
|
49
|
-
cmd.should include("/out")
|
50
|
-
cmd.should include("/outfile=\"output.txt\"")
|
51
|
-
end
|
52
|
-
|
53
|
-
it "should step once" do
|
54
|
-
cmd.should include("/steps=1")
|
55
|
-
end
|
56
|
-
|
57
|
-
it "should run the task" do
|
58
|
-
cmd.should include("/task=migrate:up")
|
59
|
-
end
|
60
|
-
|
61
|
-
it "should run to version one" do
|
62
|
-
cmd.should include("/version=001")
|
63
|
-
end
|
64
|
-
|
65
|
-
it "should use the working directory" do
|
66
|
-
cmd.should include("/wd=\"scripts\"")
|
67
|
-
end
|
68
|
-
|
69
|
-
it "should use profile" do
|
70
|
-
cmd.should include("/profile=profile")
|
71
|
-
end
|
72
|
-
|
73
|
-
it "should timeout" do
|
74
|
-
cmd.should include("/timeout=90")
|
75
|
-
end
|
76
|
-
|
77
|
-
it "should include tag" do
|
78
|
-
cmd.should include("/tag=tag")
|
79
|
-
end
|
80
|
-
|
81
|
-
it "should preview" do
|
82
|
-
cmd.should include("/preview")
|
83
|
-
end
|
84
|
-
|
85
|
-
it "should be verbose" do
|
86
|
-
cmd.should include("/verbose=true")
|
87
|
-
end
|
88
|
-
end
|
data/spec/ilmerge_spec.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe ILMerge do
|
4
|
-
subject(:task) do
|
5
|
-
task = ILMerge.new()
|
6
|
-
task.extend(SystemPatch)
|
7
|
-
task.command = "ilmerge"
|
8
|
-
task.out = "output.dll"
|
9
|
-
task.target_platform = "net40"
|
10
|
-
task.assemblies = ["a.dll", "b.dll"]
|
11
|
-
task
|
12
|
-
end
|
13
|
-
|
14
|
-
let(:cmd) { task.system_command }
|
15
|
-
|
16
|
-
before :each do
|
17
|
-
task.execute
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should use the command" do
|
21
|
-
cmd.should include("ilmerge")
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should output to the assembly" do
|
25
|
-
cmd.should include("/out:\"output.dll\"")
|
26
|
-
end
|
27
|
-
|
28
|
-
it "should target the correct platform" do
|
29
|
-
cmd.should include("/targetPlatform:net40")
|
30
|
-
end
|
31
|
-
|
32
|
-
it "should use the input assemblies" do
|
33
|
-
cmd.should include("\"a.dll\" \"b.dll\"")
|
34
|
-
end
|
35
|
-
end
|
data/spec/msbuild_spec.rb
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe MSBuild do
|
4
|
-
subject(:task) do
|
5
|
-
task = MSBuild.new()
|
6
|
-
task.extend(SystemPatch)
|
7
|
-
task.command = "msbuild"
|
8
|
-
task.solution = "solution"
|
9
|
-
task.targets = [:clean, :build]
|
10
|
-
task.properties = {:foo => "foo", :bar => "bar"}
|
11
|
-
task.verbosity = :minimal
|
12
|
-
task.logger_module = "loggermodule"
|
13
|
-
task.other_switches = {:baz => "baz"}
|
14
|
-
task.no_logo
|
15
|
-
task
|
16
|
-
end
|
17
|
-
|
18
|
-
let(:cmd) { task.system_command }
|
19
|
-
|
20
|
-
before :each do
|
21
|
-
task.execute
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should use the command" do
|
25
|
-
cmd.should include("msbuild")
|
26
|
-
end
|
27
|
-
|
28
|
-
it "should build the solution" do
|
29
|
-
cmd.should include("\"solution\"")
|
30
|
-
end
|
31
|
-
|
32
|
-
it "should use the targets" do
|
33
|
-
cmd.should include("/target:\"clean;build\"")
|
34
|
-
end
|
35
|
-
|
36
|
-
it "should set the properties" do
|
37
|
-
cmd.should include("/property:foo=\"foo\" /property:bar=\"bar\"")
|
38
|
-
end
|
39
|
-
|
40
|
-
it "should set the other switches" do
|
41
|
-
cmd.should include("/baz:\"baz\"")
|
42
|
-
end
|
43
|
-
|
44
|
-
it "should be verbose" do
|
45
|
-
cmd.should include("/verbosity:minimal")
|
46
|
-
end
|
47
|
-
|
48
|
-
it "should hide the startup banner" do
|
49
|
-
cmd.should include("/nologo")
|
50
|
-
end
|
51
|
-
|
52
|
-
it "should log to the module" do
|
53
|
-
cmd.should include("/logger:\"loggermodule\"")
|
54
|
-
end
|
55
|
-
end
|
data/spec/mspec_spec.rb
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe MSpec do
|
4
|
-
subject(:task) do
|
5
|
-
task = MSpec.new()
|
6
|
-
task.extend(SystemPatch)
|
7
|
-
task.command = "mspec"
|
8
|
-
task.assemblies = ["a.dll", "b.dll"]
|
9
|
-
task.results_path = {:html => "output.html"}
|
10
|
-
task
|
11
|
-
end
|
12
|
-
|
13
|
-
let(:cmd) { task.system_command }
|
14
|
-
|
15
|
-
before :each do
|
16
|
-
task.execute
|
17
|
-
end
|
18
|
-
|
19
|
-
it "should use the command" do
|
20
|
-
cmd.should include("mspec")
|
21
|
-
end
|
22
|
-
|
23
|
-
it "should have two assemblies" do
|
24
|
-
cmd.should include("\"a.dll\" \"b.dll\"")
|
25
|
-
end
|
26
|
-
|
27
|
-
it "should have an html switch and path" do
|
28
|
-
cmd.should include("--html \"output.html\"")
|
29
|
-
end
|
30
|
-
end
|
data/spec/mstest_spec.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe MSTest do
|
4
|
-
subject(:task) do
|
5
|
-
task = MSTest.new()
|
6
|
-
task.extend(SystemPatch)
|
7
|
-
task.command = "mstest"
|
8
|
-
task.assemblies = ["a.dll", "b.dll"]
|
9
|
-
task.tests = ["foo", "bar"]
|
10
|
-
task.no_logo
|
11
|
-
task
|
12
|
-
end
|
13
|
-
|
14
|
-
let(:cmd) { task.system_command }
|
15
|
-
|
16
|
-
before :each do
|
17
|
-
task.execute
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should use the command" do
|
21
|
-
cmd.should include("mstest")
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should hide the startup banner" do
|
25
|
-
cmd.should include("/nologo")
|
26
|
-
end
|
27
|
-
|
28
|
-
it "should test the assemblies" do
|
29
|
-
cmd.should include("/testcontainer:\"a.dll\" /testcontainer:\"b.dll\"")
|
30
|
-
end
|
31
|
-
|
32
|
-
it "should run only the tests" do
|
33
|
-
cmd.should include("/test:foo /test:bar")
|
34
|
-
end
|
35
|
-
end
|
data/spec/nant_spec.rb
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe NAnt do
|
4
|
-
subject(:task) do
|
5
|
-
task = NAnt.new()
|
6
|
-
task.extend(SystemPatch)
|
7
|
-
task.command = "nant"
|
8
|
-
task.targets = [:clean, :build]
|
9
|
-
task.build_file = "buildfile"
|
10
|
-
task.properties = {:foo => "foo", :bar => "bar"}
|
11
|
-
task.no_logo
|
12
|
-
task
|
13
|
-
end
|
14
|
-
|
15
|
-
let(:cmd) { task.system_command }
|
16
|
-
|
17
|
-
before :each do
|
18
|
-
task.execute
|
19
|
-
end
|
20
|
-
|
21
|
-
it "should use the command" do
|
22
|
-
cmd.should include("nant")
|
23
|
-
end
|
24
|
-
|
25
|
-
it "should run the targets" do
|
26
|
-
cmd.should include("clean build")
|
27
|
-
end
|
28
|
-
|
29
|
-
it "should use the build file" do
|
30
|
-
cmd.should include("-buildfile:\"buildfile\"")
|
31
|
-
end
|
32
|
-
|
33
|
-
it "should hide the startup banner" do
|
34
|
-
cmd.should include("-nologo")
|
35
|
-
end
|
36
|
-
|
37
|
-
it "should set the properties" do
|
38
|
-
cmd.should include("-D:foo=\"foo\" -D:bar=\"bar\"")
|
39
|
-
end
|
40
|
-
end
|
data/spec/nchurn_spec.rb
DELETED
@@ -1,80 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe NChurn do
|
4
|
-
subject(:task) do
|
5
|
-
task = NChurn.new()
|
6
|
-
task.extend(SystemPatch)
|
7
|
-
task.command = "nchurn"
|
8
|
-
task.input = "input"
|
9
|
-
task.output = "output"
|
10
|
-
task.from = DateTime.parse("01-01-2001")
|
11
|
-
|
12
|
-
# you're only supposed ot use one of these,
|
13
|
-
# but we don't enforce it and this cheating
|
14
|
-
# makes testing easier ;)
|
15
|
-
task.churn = 9
|
16
|
-
task.churn_percent = 30
|
17
|
-
|
18
|
-
task.top = 10
|
19
|
-
task.report_as = :xml
|
20
|
-
task.adapter = :git
|
21
|
-
task.env_paths = ["c:/bin", "c:/tools"]
|
22
|
-
task.include = "foo"
|
23
|
-
task.exclude = "bar"
|
24
|
-
task
|
25
|
-
end
|
26
|
-
|
27
|
-
let(:cmd) { task.system_command }
|
28
|
-
|
29
|
-
before :each do
|
30
|
-
task.execute
|
31
|
-
end
|
32
|
-
|
33
|
-
it "should use the command" do
|
34
|
-
cmd.should include("nchurn")
|
35
|
-
end
|
36
|
-
|
37
|
-
it "should use this input" do
|
38
|
-
cmd.should include("-i \"input\"")
|
39
|
-
end
|
40
|
-
|
41
|
-
it "should output here" do
|
42
|
-
cmd.should include("> \"output\"")
|
43
|
-
end
|
44
|
-
|
45
|
-
it "should use this date range" do
|
46
|
-
cmd.should include("-d \"01-01-2001\"")
|
47
|
-
end
|
48
|
-
|
49
|
-
it "should expect this churn" do
|
50
|
-
cmd.should include("-c 9")
|
51
|
-
end
|
52
|
-
|
53
|
-
it "should expect this churn percent" do
|
54
|
-
cmd.should include("-c 0.3")
|
55
|
-
end
|
56
|
-
|
57
|
-
it "should return the top records" do
|
58
|
-
cmd.should include("-t 10")
|
59
|
-
end
|
60
|
-
|
61
|
-
it "should report as" do
|
62
|
-
cmd.should include("-r xml")
|
63
|
-
end
|
64
|
-
|
65
|
-
it "should expect this repository" do
|
66
|
-
cmd.should include("-a git")
|
67
|
-
end
|
68
|
-
|
69
|
-
it "should add this env path" do
|
70
|
-
cmd.should include("-p \"c:/bin;c:/tools\"")
|
71
|
-
end
|
72
|
-
|
73
|
-
it "should include this" do
|
74
|
-
cmd.should include("-n \"foo\"")
|
75
|
-
end
|
76
|
-
|
77
|
-
it "should exclude this" do
|
78
|
-
cmd.should include("-x \"bar\"")
|
79
|
-
end
|
80
|
-
end
|
data/spec/ncoverconsole_spec.rb
DELETED
@@ -1,80 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe NCoverConsole do
|
4
|
-
let(:runner) do
|
5
|
-
runner = NUnit.new()
|
6
|
-
runner.command = "nunit"
|
7
|
-
runner.assemblies = ["a.dll"]
|
8
|
-
runner.parameters = ["/nologo"]
|
9
|
-
runner
|
10
|
-
end
|
11
|
-
|
12
|
-
subject(:task) do
|
13
|
-
task = NCoverConsole.new()
|
14
|
-
task.extend(SystemPatch)
|
15
|
-
task.command = "ncover"
|
16
|
-
task.include_assemblies = ["a.dll", "b.dll"]
|
17
|
-
task.exclude_assemblies = ["c.dll"]
|
18
|
-
task.include_attributes = ["foo", "bar"]
|
19
|
-
task.exclude_attributes = ["baz"]
|
20
|
-
task.coverage = [:branch, :symbol]
|
21
|
-
task.output = {:xml => "coverage.xml"}
|
22
|
-
task.test_runner = runner
|
23
|
-
task
|
24
|
-
end
|
25
|
-
|
26
|
-
let(:cmd) { task.system_command }
|
27
|
-
|
28
|
-
context "when using defaults" do
|
29
|
-
before :each do
|
30
|
-
task.execute
|
31
|
-
end
|
32
|
-
|
33
|
-
it "should use the command" do
|
34
|
-
cmd.should include("ncover")
|
35
|
-
end
|
36
|
-
|
37
|
-
it "should include these assemblies" do
|
38
|
-
cmd.should include("//include-assemblies \"a.dll;b.dll\"")
|
39
|
-
end
|
40
|
-
|
41
|
-
it "should exclude these assemblies" do
|
42
|
-
cmd.should include("//exclude-assemblies \"c.dll\"")
|
43
|
-
end
|
44
|
-
|
45
|
-
it "should include these attributes" do
|
46
|
-
cmd.should include("//include-attributes \"foo;bar\"")
|
47
|
-
end
|
48
|
-
|
49
|
-
it "should exclude these attributes" do
|
50
|
-
cmd.should include("//exclude-attributes \"baz\"")
|
51
|
-
end
|
52
|
-
|
53
|
-
it "should cover like this" do
|
54
|
-
cmd.should include("//coverage-type \"branch, symbol\"")
|
55
|
-
end
|
56
|
-
|
57
|
-
it "should output to this file" do
|
58
|
-
cmd.should include("//xml \"coverage.xml\"")
|
59
|
-
end
|
60
|
-
|
61
|
-
it "should register" do
|
62
|
-
cmd.should include("//reg")
|
63
|
-
end
|
64
|
-
|
65
|
-
it "should have the entire test runner command line" do
|
66
|
-
cmd.should include("nunit \"a.dll\" /nologo")
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
context "when overriding registration" do
|
71
|
-
before :each do
|
72
|
-
task.no_registration
|
73
|
-
task.execute
|
74
|
-
end
|
75
|
-
|
76
|
-
it "should not register" do
|
77
|
-
cmd.should_not include("//reg")
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|