nbuild 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/nbuild/file_filter.rb +4 -1
- data/lib/nbuild/ncover_cmd.rb +8 -1
- data/lib/nbuild/nunit_cmd.rb +22 -0
- metadata +4 -3
data/lib/nbuild/file_filter.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
|
1
3
|
module Nbuild
|
2
4
|
class FileFilter
|
3
5
|
def initialize replacements
|
@@ -5,6 +7,7 @@ module Nbuild
|
|
5
7
|
end
|
6
8
|
|
7
9
|
def filter from, to
|
10
|
+
FileUtils.mkdir_p(File.dirname(to))
|
8
11
|
File.open(from) do |io_in|
|
9
12
|
File.open(to, 'w') do |io_out|
|
10
13
|
io_in.each do |line|
|
@@ -15,4 +18,4 @@ module Nbuild
|
|
15
18
|
end
|
16
19
|
end
|
17
20
|
end
|
18
|
-
end
|
21
|
+
end
|
data/lib/nbuild/ncover_cmd.rb
CHANGED
@@ -13,6 +13,13 @@ module Nbuild
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def NCoverCmd params={}
|
16
|
+
ncover params
|
17
|
+
end
|
18
|
+
|
19
|
+
# task :test_report do
|
20
|
+
# ncover :cmd => NUnitCmd.new(:test_assembly => 'bin/TestAssembly.dll')
|
21
|
+
# end
|
22
|
+
def ncover
|
16
23
|
NCoverCmd.new(params).execute
|
17
24
|
end
|
18
|
-
end
|
25
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'nbuild/cmd'
|
2
|
+
|
3
|
+
module Nbuild
|
4
|
+
class NUnitCmd < Cmd
|
5
|
+
def initialize params={}
|
6
|
+
@path = ENV['NUNIT_HOME'] || 'C:\Program Files\NUnit\bin'
|
7
|
+
@params = params
|
8
|
+
end
|
9
|
+
|
10
|
+
def command
|
11
|
+
"\"#{@path}\\nunit-console.exe\" #{@params[:test_assembly]}"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
# for example:
|
16
|
+
# task :test_report do
|
17
|
+
# nunit :test_assembly => 'bin/TestAssembly.dll'
|
18
|
+
# end
|
19
|
+
def nunit params={}
|
20
|
+
NUnitCmd.new(params).execute
|
21
|
+
end
|
22
|
+
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 5
|
9
|
+
version: 0.0.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Mark Ryall
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-03-18 00:00:00 +11:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|
@@ -38,6 +38,7 @@ files:
|
|
38
38
|
- lib/nbuild/ncache_cmd.rb
|
39
39
|
- lib/nbuild/ncover_cmd.rb
|
40
40
|
- lib/nbuild/ndepend_cmd.rb
|
41
|
+
- lib/nbuild/nunit_cmd.rb
|
41
42
|
- lib/nbuild/tf.rb
|
42
43
|
- lib/nbuild/visual_studio_cmd.rb
|
43
44
|
- lib/nbuild.rb
|