albacore 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. data/README.markdown +84 -81
  2. data/VERSION +1 -1
  3. data/install_dependencies.rb +10 -10
  4. data/lib/albacore.rb +10 -2
  5. data/lib/albacore/assemblyinfo.rb +100 -100
  6. data/lib/albacore/assemblyinfolanguages/csharpengine.rb +14 -0
  7. data/lib/albacore/assemblyinfolanguages/vbnetengine.rb +14 -0
  8. data/lib/albacore/docu.rb +39 -0
  9. data/lib/albacore/exec.rb +23 -0
  10. data/lib/albacore/expandtemplates.rb +73 -71
  11. data/lib/albacore/msbuild.rb +56 -61
  12. data/lib/albacore/mspectestrunner.rb +44 -42
  13. data/lib/albacore/nant.rb +39 -0
  14. data/lib/albacore/ncoverconsole.rb +68 -61
  15. data/lib/albacore/ncoverreport.rb +56 -55
  16. data/lib/albacore/ncoverreports/assemblyfilter.rb +7 -7
  17. data/lib/albacore/ncoverreports/branchcoverage.rb +7 -7
  18. data/lib/albacore/ncoverreports/classfilter.rb +5 -5
  19. data/lib/albacore/ncoverreports/codecoveragebase.rb +22 -22
  20. data/lib/albacore/ncoverreports/cyclomaticcomplexity.rb +19 -19
  21. data/lib/albacore/ncoverreports/documentfilter.rb +5 -5
  22. data/lib/albacore/ncoverreports/fullcoveragereport.rb +17 -17
  23. data/lib/albacore/ncoverreports/methodcoverage.rb +7 -7
  24. data/lib/albacore/ncoverreports/methodfilter.rb +5 -5
  25. data/lib/albacore/ncoverreports/namespacefilter.rb +5 -5
  26. data/lib/albacore/ncoverreports/reportfilterbase.rb +23 -23
  27. data/lib/albacore/ncoverreports/summaryreport.rb +18 -18
  28. data/lib/albacore/ncoverreports/symbolcoverage.rb +6 -7
  29. data/lib/albacore/ndepend.rb +35 -0
  30. data/lib/albacore/nunittestrunner.rb +36 -35
  31. data/lib/albacore/plink.rb +48 -0
  32. data/lib/albacore/sftp.rb +33 -31
  33. data/lib/albacore/sqlcmd.rb +54 -51
  34. data/lib/albacore/ssh.rb +35 -33
  35. data/lib/albacore/support/albacore_helper.rb +1 -4
  36. data/lib/albacore/support/attrmethods.rb +25 -0
  37. data/lib/albacore/support/failure.rb +17 -17
  38. data/lib/albacore/support/globalconfig.rb +6 -0
  39. data/lib/albacore/support/logging.rb +30 -28
  40. data/lib/albacore/support/runcommand.rb +41 -41
  41. data/lib/albacore/support/yamlconfig.rb +23 -27
  42. data/lib/albacore/unzip.rb +28 -0
  43. data/lib/albacore/xbuild.rb +54 -0
  44. data/lib/albacore/xunittestrunner.rb +40 -43
  45. data/lib/albacore/zipdirectory.rb +72 -63
  46. data/lib/rake/assemblyinfotask.rb +12 -11
  47. data/lib/rake/docutask.rb +17 -0
  48. data/lib/rake/exectask.rb +18 -0
  49. data/lib/rake/expandtemplatestask.rb +12 -11
  50. data/lib/rake/msbuildtask.rb +13 -12
  51. data/lib/rake/mspectask.rb +12 -11
  52. data/lib/rake/nanttask.rb +17 -0
  53. data/lib/rake/ncoverconsoletask.rb +12 -11
  54. data/lib/rake/ncoverreporttask.rb +12 -11
  55. data/lib/rake/ndependtask.rb +23 -0
  56. data/lib/rake/nunittask.rb +12 -11
  57. data/lib/rake/plinktask.rb +23 -0
  58. data/lib/rake/renametask.rb +15 -15
  59. data/lib/rake/sftptask.rb +11 -10
  60. data/lib/rake/sqlcmdtask.rb +13 -12
  61. data/lib/rake/sshtask.rb +11 -10
  62. data/lib/rake/support/albacoretask.rb +16 -15
  63. data/lib/rake/unziptask.rb +17 -0
  64. data/lib/rake/xbuildtask.rb +22 -0
  65. data/lib/rake/xunittask.rb +12 -11
  66. data/lib/rake/ziptask.rb +12 -11
  67. data/rakefile.rb +255 -204
  68. data/spec/assemblyinfo_spec.rb +426 -221
  69. data/spec/assemblyinfotask_spec.rb +21 -21
  70. data/spec/docu_spec.rb +70 -0
  71. data/spec/docutask_spec.rb +39 -0
  72. data/spec/exec_spec.rb +23 -0
  73. data/spec/exectask_spec.rb +31 -0
  74. data/spec/expandtemplates_spec.rb +149 -148
  75. data/spec/expandtemplatestask_spec.rb +21 -21
  76. data/spec/msbuild_spec.rb +150 -139
  77. data/spec/msbuildtask_spec.rb +21 -21
  78. data/spec/mspectask_spec.rb +21 -21
  79. data/spec/nant_spec.rb +101 -0
  80. data/spec/nanttask_spec.rb +31 -0
  81. data/spec/ncoverconsole_spec.rb +253 -221
  82. data/spec/ncoverconsoletask_spec.rb +21 -21
  83. data/spec/ncoverreport_spec.rb +538 -523
  84. data/spec/ncoverreporttask_spec.rb +21 -21
  85. data/spec/ndepend_spec.rb +49 -0
  86. data/spec/{commandtask_spec.rb → ndependtask_spec.rb} +10 -10
  87. data/spec/nunittask_spec.rb +21 -21
  88. data/spec/nunittestrunner_spec.rb +6 -6
  89. data/spec/patches/docu_patch.rb +13 -0
  90. data/spec/patches/system_patch.rb +18 -18
  91. data/spec/patches/tasklib_patch.rb +10 -10
  92. data/spec/plink_spec.rb +61 -0
  93. data/spec/plinktask_spec.rb +31 -0
  94. data/spec/renametask_spec.rb +21 -21
  95. data/spec/sftp_spec.rb +24 -24
  96. data/spec/sftptask_spec.rb +31 -31
  97. data/spec/sqlcmd_spec.rb +118 -120
  98. data/spec/sqlcmdtask_spec.rb +21 -21
  99. data/spec/ssh_spec.rb +36 -37
  100. data/spec/sshtask_spec.rb +29 -29
  101. data/spec/support/TestSolution/NDependProject.xml +315 -0
  102. data/spec/support/TestSolution/TestSolution.XUnitTests/Class1.cs +12 -12
  103. data/spec/support/TestSolution/TestSolution.XUnitTests/FailingTestFixture.cs +14 -0
  104. data/spec/support/TestSolution/TestSolution.XUnitTests/TestSolution.XUnitTests.csproj +1 -0
  105. data/spec/support/TestSolution/TestSolution.build +25 -0
  106. data/spec/support/assemblyinfotester.rb +40 -38
  107. data/spec/support/expandtemplatestestdata.rb +73 -73
  108. data/spec/support/msbuildtestdata.rb +28 -28
  109. data/spec/support/nanttestdata.rb +33 -0
  110. data/spec/support/ncoverconsoletestdata.rb +18 -0
  111. data/spec/support/ncoverreporttestdata.rb +24 -24
  112. data/spec/support/spec_helper.rb +2 -1
  113. data/spec/support/yamlconfig/msbuild.yml +3 -0
  114. data/spec/support/yamlconfig/yaml_autoconfig_test.yml +1 -0
  115. data/spec/support/ziptestdata.rb +11 -6
  116. data/spec/xunit_spec.rb +63 -0
  117. data/spec/xunittask_spec.rb +19 -19
  118. data/spec/yamlconfig_spec.rb +38 -52
  119. data/spec/zip_spec.rb +56 -11
  120. data/spec/ziptask_spec.rb +22 -22
  121. metadata +53 -8
  122. data/lib/albacore/command.rb +0 -23
  123. data/lib/rake/commandtask.rb +0 -16
  124. data/spec/command_spec.rb +0 -23
@@ -1,23 +0,0 @@
1
- require 'albacore/support/albacore_helper'
2
-
3
- class Command
4
- include RunCommand
5
- include YAMLConfig
6
- include Logging
7
-
8
- attr_accessor :parameters
9
-
10
- def initialize()
11
- @require_valid_command=false
12
- @path_to_command=''
13
- @parameters = []
14
- super()
15
- end
16
-
17
- def execute()
18
- result = run_command "Command", @parameters.join(" ")
19
-
20
- failure_message = 'Command Failed. See Build Log For Detail'
21
- fail_with_message failure_message if !result
22
- end
23
- end
@@ -1,16 +0,0 @@
1
- require 'rake/tasklib'
2
-
3
- def commandtask(name=:command, *args, &block)
4
- Albacore::CommandTask.new(name, *args, &block)
5
- end
6
-
7
- module Albacore
8
- class CommandTask < Albacore::AlbacoreTask
9
- def execute(task_args)
10
- cmd = Command.new
11
- @block.call(cmd, *task_args) unless @block.nil?
12
- cmd.execute
13
- fail if cmd.failed
14
- end
15
- end
16
- end
@@ -1,23 +0,0 @@
1
- require File.join(File.dirname(__FILE__), 'support', 'spec_helper')
2
- require 'albacore/command'
3
-
4
- @@nunit = File.join(File.dirname(__FILE__), 'support', 'Tools', 'NUnit-v2.5', 'nunit-console-x86.exe')
5
-
6
- describe Command, "when executing a command with parameters" do
7
- before :all do
8
- @cmd = Command.new
9
- @cmd.log_level = :verbose
10
- @cmd.extend(SystemPatch)
11
- @cmd.path_to_command = @@nunit
12
- @cmd.parameters << ["--help"]
13
- @cmd.execute
14
- end
15
-
16
- it "should run the command with the parameters" do
17
- @cmd.system_command.should include("\"#{@@nunit}\" --help")
18
- end
19
-
20
- it "should not fail" do
21
- @cmd.failed.should be_false
22
- end
23
- end