pre_push 1.0.1 → 1.1.0
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.
- checksums.yaml +7 -0
- data/README.md +5 -0
- data/bin/prepush +1 -1
- data/lib/pre_push/version.rb +1 -1
- data/lib/pre_push.rb +12 -9
- data/lib/template/pre-push +2 -1
- data/spec/TestProj/packages/Machine.Specifications.0.5.12/tools/InstallDotCoverRunner.2.0.bat +7 -7
- data/spec/TestProj/packages/Machine.Specifications.0.5.12/tools/InstallDotCoverRunner.2.1.bat +7 -7
- data/spec/TestProj/packages/Machine.Specifications.0.5.12/tools/InstallDotCoverRunner.2.2.bat +7 -7
- data/spec/TestProj/packages/Machine.Specifications.0.5.12/tools/InstallResharperRunner.6.1.bat +10 -10
- data/spec/TestProj/packages/Machine.Specifications.0.5.12/tools/InstallResharperRunner.7.0.bat +10 -10
- data/spec/TestProj/packages/Machine.Specifications.0.5.12/tools/InstallResharperRunner.7.1.bat +10 -10
- data/spec/TestProj/packages/Machine.Specifications.0.5.12/tools/mspec-clr4.exe.config +8 -8
- data/spec/TestProj/packages/Machine.Specifications.0.5.12/tools/mspec-x86-clr4.exe.config +8 -8
- data/spec/TestProj/packages/NUnit.2.6.2/NUnit.2.6.2.nuspec +8 -8
- data/spec/pre_push_spec.rb +11 -0
- data/spec/spec_helper.rb +76 -76
- metadata +5 -11
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 88d2fcd81090f8698bde0b9a45dd92a8de672ca1
|
4
|
+
data.tar.gz: c6cf28cd9f7c5095bab19693fb976b0b27b0ecee
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 950e90534790bb61722caa2d596914f5928cbe74474661f9fc4577c59c260a64be7995d63fb293691c54ce24c4722ece21831b9eaae0595a2f3043c937c03aef
|
7
|
+
data.tar.gz: 3b747cb36cc6d012f7c5e6fce9aabffed0145b261291a740be7f6c0aacf516a65b449155f01826d9e9e7dec13e62061915da21b90d7b3bc9542fd881f5e2d3b0
|
data/README.md
CHANGED
@@ -40,6 +40,11 @@ If you wish to specify the dlls that your test runner should run/test use:
|
|
40
40
|
|
41
41
|
$ prepush /td=./path/to/some.dll,./path/to/another.dll
|
42
42
|
|
43
|
+
If you wish to specify what dlls should be ran by which test runner, you'll need to add something like the following to you pre-push hook:
|
44
|
+
|
45
|
+
@tests_to_run = {mspec0515: ["./path/to/mspec/tests.dll"], nunit262: ["./path/to/nunit/tests1.dll", "./path/to/nunit/tests2.dll"]}
|
46
|
+
**This will override anything you may have assigned to @assemblies!**
|
47
|
+
|
43
48
|
The default msbuild path used is C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe.
|
44
49
|
If you wish to override it use:
|
45
50
|
|
data/bin/prepush
CHANGED
@@ -20,7 +20,7 @@ if PrePush::Validator.validate(runner)
|
|
20
20
|
sln_path = PrePush::SlnFinder.find || "path/to/your.sln"
|
21
21
|
content = file_text.gsub(/\{runner\}/, "\"#{runner}\"").gsub(/\{sln_path\}/, "\"#{sln_path}\"")
|
22
22
|
if test_dlls != nil
|
23
|
-
content = content.sub("# @assemblies = {test_dlls}", "@assemblies = #{test_dlls}")
|
23
|
+
content = content.sub("# @assemblies = [{test_dlls}]", "@assemblies = [#{test_dlls}]")
|
24
24
|
end
|
25
25
|
if msbuild != nil
|
26
26
|
content = content.sub("# override_msbuild 'path/to/custom/msbuild.exe'","override_msbuild '#{msbuild}'")
|
data/lib/pre_push/version.rb
CHANGED
data/lib/pre_push.rb
CHANGED
@@ -20,14 +20,16 @@ module PrePush
|
|
20
20
|
$?.success?
|
21
21
|
end
|
22
22
|
def run_tests assemblies
|
23
|
-
assemblies = assemblies
|
24
|
-
assemblies = assemblies.empty? ? [@solution] : assemblies
|
23
|
+
assemblies = assemblies.to_a.empty? ? [@solution] : assemblies
|
25
24
|
success = true
|
26
25
|
gem_lib = File.dirname(__FILE__)
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
26
|
+
tests_to_run = @tests_to_run || {@test_runner => assemblies}
|
27
|
+
tests_to_run.each_pair do |test_to_run|
|
28
|
+
test_to_run[1].each do |assembly|
|
29
|
+
system "#{test_runner_path(gem_lib, test_to_run[0])} \"#{assembly}\""
|
30
|
+
success &= $?.success?
|
31
|
+
end
|
32
|
+
end
|
31
33
|
success
|
32
34
|
end
|
33
35
|
|
@@ -35,8 +37,9 @@ module PrePush
|
|
35
37
|
def msbuild
|
36
38
|
MSBuild
|
37
39
|
end
|
38
|
-
def test_runner_path gem_lib
|
39
|
-
|
40
|
+
def test_runner_path gem_lib, test_runner
|
41
|
+
test_runner = test_runner.to_s
|
42
|
+
"\"#{gem_lib}/runners/#{test_runner}/#{runners_exes[test_runner]}\""
|
40
43
|
end
|
41
44
|
def override_msbuild custom_msbuild
|
42
45
|
define_singleton_method :msbuild do
|
@@ -44,7 +47,7 @@ module PrePush
|
|
44
47
|
end
|
45
48
|
end
|
46
49
|
def force_test_runner runner_path
|
47
|
-
define_singleton_method :test_runner_path do |gem_lib|
|
50
|
+
define_singleton_method :test_runner_path do |gem_lib, nothing|
|
48
51
|
runner_path
|
49
52
|
end
|
50
53
|
end
|
data/lib/template/pre-push
CHANGED
@@ -9,7 +9,8 @@ class Executor
|
|
9
9
|
###
|
10
10
|
|
11
11
|
@solution = {sln_path} # the path to the solution to build
|
12
|
-
# @assemblies = {test_dlls} # insert dlls to test if different to the solution.
|
12
|
+
# @assemblies = [{test_dlls}] # insert dlls to test if different to the solution.
|
13
|
+
# @tests_to_run = {xunit191: ["./path/to/xunit/tests.dll"], nunit262: ["./path/to/nunit/tests1.dll", "./path/to/nunit/tests2.dll"]}
|
13
14
|
# override_msbuild 'path/to/custom/msbuild.exe'
|
14
15
|
# force_test_runner 'path/to/my/custom/test_runner.exe' # uncomment to use a custom test runner
|
15
16
|
end
|
data/spec/TestProj/packages/Machine.Specifications.0.5.12/tools/InstallDotCoverRunner.2.0.bat
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
mkdir "%LOCALAPPDATA%\JetBrains\dotCover\v2.0\Plugins" 2> NUL
|
2
|
-
mkdir "%LOCALAPPDATA%\JetBrains\dotCover\v2.0\Plugins\mspec" 2> NUL
|
3
|
-
copy /y Machine.Specifications.dll "%LOCALAPPDATA%\JetBrains\dotCover\v2.0\Plugins\mspec"
|
4
|
-
copy /y Machine.Specifications.pdb "%LOCALAPPDATA%\JetBrains\dotCover\v2.0\Plugins\mspec" > NUL
|
5
|
-
copy /y Machine.Specifications.dotCoverRunner.2.0.dll "%LOCALAPPDATA%\JetBrains\dotCover\v2.0\Plugins\mspec"
|
6
|
-
copy /y Machine.Specifications.dotCoverRunner.2.0.pdb "%LOCALAPPDATA%\JetBrains\dotCover\v2.0\Plugins\mspec" > NUL
|
7
|
-
pause
|
1
|
+
mkdir "%LOCALAPPDATA%\JetBrains\dotCover\v2.0\Plugins" 2> NUL
|
2
|
+
mkdir "%LOCALAPPDATA%\JetBrains\dotCover\v2.0\Plugins\mspec" 2> NUL
|
3
|
+
copy /y Machine.Specifications.dll "%LOCALAPPDATA%\JetBrains\dotCover\v2.0\Plugins\mspec"
|
4
|
+
copy /y Machine.Specifications.pdb "%LOCALAPPDATA%\JetBrains\dotCover\v2.0\Plugins\mspec" > NUL
|
5
|
+
copy /y Machine.Specifications.dotCoverRunner.2.0.dll "%LOCALAPPDATA%\JetBrains\dotCover\v2.0\Plugins\mspec"
|
6
|
+
copy /y Machine.Specifications.dotCoverRunner.2.0.pdb "%LOCALAPPDATA%\JetBrains\dotCover\v2.0\Plugins\mspec" > NUL
|
7
|
+
pause
|
data/spec/TestProj/packages/Machine.Specifications.0.5.12/tools/InstallDotCoverRunner.2.1.bat
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
mkdir "%LOCALAPPDATA%\JetBrains\dotCover\v2.1\Plugins" 2> NUL
|
2
|
-
mkdir "%LOCALAPPDATA%\JetBrains\dotCover\v2.1\Plugins\mspec" 2> NUL
|
3
|
-
copy /y Machine.Specifications.dll "%LOCALAPPDATA%\JetBrains\dotCover\v2.1\Plugins\mspec"
|
4
|
-
copy /y Machine.Specifications.pdb "%LOCALAPPDATA%\JetBrains\dotCover\v2.1\Plugins\mspec" > NUL
|
5
|
-
copy /y Machine.Specifications.dotCoverRunner.2.1.dll "%LOCALAPPDATA%\JetBrains\dotCover\v2.1\Plugins\mspec"
|
6
|
-
copy /y Machine.Specifications.dotCoverRunner.2.1.pdb "%LOCALAPPDATA%\JetBrains\dotCover\v2.1\Plugins\mspec" > NUL
|
7
|
-
pause
|
1
|
+
mkdir "%LOCALAPPDATA%\JetBrains\dotCover\v2.1\Plugins" 2> NUL
|
2
|
+
mkdir "%LOCALAPPDATA%\JetBrains\dotCover\v2.1\Plugins\mspec" 2> NUL
|
3
|
+
copy /y Machine.Specifications.dll "%LOCALAPPDATA%\JetBrains\dotCover\v2.1\Plugins\mspec"
|
4
|
+
copy /y Machine.Specifications.pdb "%LOCALAPPDATA%\JetBrains\dotCover\v2.1\Plugins\mspec" > NUL
|
5
|
+
copy /y Machine.Specifications.dotCoverRunner.2.1.dll "%LOCALAPPDATA%\JetBrains\dotCover\v2.1\Plugins\mspec"
|
6
|
+
copy /y Machine.Specifications.dotCoverRunner.2.1.pdb "%LOCALAPPDATA%\JetBrains\dotCover\v2.1\Plugins\mspec" > NUL
|
7
|
+
pause
|
data/spec/TestProj/packages/Machine.Specifications.0.5.12/tools/InstallDotCoverRunner.2.2.bat
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
mkdir "%LOCALAPPDATA%\JetBrains\dotCover\v2.2\Plugins" 2> NUL
|
2
|
-
mkdir "%LOCALAPPDATA%\JetBrains\dotCover\v2.2\Plugins\mspec" 2> NUL
|
3
|
-
copy /y Machine.Specifications.dll "%LOCALAPPDATA%\JetBrains\dotCover\v2.2\Plugins\mspec"
|
4
|
-
copy /y Machine.Specifications.pdb "%LOCALAPPDATA%\JetBrains\dotCover\v2.2\Plugins\mspec" > NUL
|
5
|
-
copy /y Machine.Specifications.dotCoverRunner.2.2.dll "%LOCALAPPDATA%\JetBrains\dotCover\v2.2\Plugins\mspec"
|
6
|
-
copy /y Machine.Specifications.dotCoverRunner.2.2.pdb "%LOCALAPPDATA%\JetBrains\dotCover\v2.2\Plugins\mspec" > NUL
|
7
|
-
pause
|
1
|
+
mkdir "%LOCALAPPDATA%\JetBrains\dotCover\v2.2\Plugins" 2> NUL
|
2
|
+
mkdir "%LOCALAPPDATA%\JetBrains\dotCover\v2.2\Plugins\mspec" 2> NUL
|
3
|
+
copy /y Machine.Specifications.dll "%LOCALAPPDATA%\JetBrains\dotCover\v2.2\Plugins\mspec"
|
4
|
+
copy /y Machine.Specifications.pdb "%LOCALAPPDATA%\JetBrains\dotCover\v2.2\Plugins\mspec" > NUL
|
5
|
+
copy /y Machine.Specifications.dotCoverRunner.2.2.dll "%LOCALAPPDATA%\JetBrains\dotCover\v2.2\Plugins\mspec"
|
6
|
+
copy /y Machine.Specifications.dotCoverRunner.2.2.pdb "%LOCALAPPDATA%\JetBrains\dotCover\v2.2\Plugins\mspec" > NUL
|
7
|
+
pause
|
data/spec/TestProj/packages/Machine.Specifications.0.5.12/tools/InstallResharperRunner.6.1.bat
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
del "%APPDATA%\JetBrains\ReSharper\v6.1\vs9.0\Plugins\Machine.Specifications.*" 2> NUL
|
2
|
-
del "%APPDATA%\JetBrains\ReSharper\v6.1\vs10.0\Plugins\Machine.Specifications.*" 2> NUL
|
3
|
-
|
4
|
-
mkdir "%APPDATA%\JetBrains\ReSharper\v6.1\Plugins" 2> NUL
|
5
|
-
mkdir "%APPDATA%\JetBrains\ReSharper\v6.1\Plugins\mspec" 2> NUL
|
6
|
-
copy /y Machine.Specifications.dll "%APPDATA%\JetBrains\ReSharper\v6.1\Plugins\mspec"
|
7
|
-
copy /y Machine.Specifications.pdb "%APPDATA%\JetBrains\ReSharper\v6.1\Plugins\mspec" > NUL
|
8
|
-
copy /y Machine.Specifications.ReSharperRunner.6.1.dll "%APPDATA%\JetBrains\ReSharper\v6.1\Plugins\mspec"
|
9
|
-
copy /y Machine.Specifications.ReSharperRunner.6.1.pdb "%APPDATA%\JetBrains\ReSharper\v6.1\Plugins\mspec" > NUL
|
10
|
-
pause
|
1
|
+
del "%APPDATA%\JetBrains\ReSharper\v6.1\vs9.0\Plugins\Machine.Specifications.*" 2> NUL
|
2
|
+
del "%APPDATA%\JetBrains\ReSharper\v6.1\vs10.0\Plugins\Machine.Specifications.*" 2> NUL
|
3
|
+
|
4
|
+
mkdir "%APPDATA%\JetBrains\ReSharper\v6.1\Plugins" 2> NUL
|
5
|
+
mkdir "%APPDATA%\JetBrains\ReSharper\v6.1\Plugins\mspec" 2> NUL
|
6
|
+
copy /y Machine.Specifications.dll "%APPDATA%\JetBrains\ReSharper\v6.1\Plugins\mspec"
|
7
|
+
copy /y Machine.Specifications.pdb "%APPDATA%\JetBrains\ReSharper\v6.1\Plugins\mspec" > NUL
|
8
|
+
copy /y Machine.Specifications.ReSharperRunner.6.1.dll "%APPDATA%\JetBrains\ReSharper\v6.1\Plugins\mspec"
|
9
|
+
copy /y Machine.Specifications.ReSharperRunner.6.1.pdb "%APPDATA%\JetBrains\ReSharper\v6.1\Plugins\mspec" > NUL
|
10
|
+
pause
|
data/spec/TestProj/packages/Machine.Specifications.0.5.12/tools/InstallResharperRunner.7.0.bat
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
del "%APPDATA%\JetBrains\ReSharper\v7.0\vs10.0\Plugins\Machine.Specifications.*" 2> NUL
|
2
|
-
del "%APPDATA%\JetBrains\ReSharper\v7.0\vs11.0\Plugins\Machine.Specifications.*" 2> NUL
|
3
|
-
|
4
|
-
mkdir "%APPDATA%\JetBrains\ReSharper\v7.0\Plugins" 2> NUL
|
5
|
-
mkdir "%APPDATA%\JetBrains\ReSharper\v7.0\Plugins\mspec" 2> NUL
|
6
|
-
copy /y Machine.Specifications.dll "%APPDATA%\JetBrains\ReSharper\v7.0\Plugins\mspec"
|
7
|
-
copy /y Machine.Specifications.pdb "%APPDATA%\JetBrains\ReSharper\v7.0\Plugins\mspec" > NUL
|
8
|
-
copy /y Machine.Specifications.ReSharperRunner.7.0.dll "%APPDATA%\JetBrains\ReSharper\v7.0\Plugins\mspec"
|
9
|
-
copy /y Machine.Specifications.ReSharperRunner.7.0.pdb "%APPDATA%\JetBrains\ReSharper\v7.0\Plugins\mspec" > NUL
|
10
|
-
pause
|
1
|
+
del "%APPDATA%\JetBrains\ReSharper\v7.0\vs10.0\Plugins\Machine.Specifications.*" 2> NUL
|
2
|
+
del "%APPDATA%\JetBrains\ReSharper\v7.0\vs11.0\Plugins\Machine.Specifications.*" 2> NUL
|
3
|
+
|
4
|
+
mkdir "%APPDATA%\JetBrains\ReSharper\v7.0\Plugins" 2> NUL
|
5
|
+
mkdir "%APPDATA%\JetBrains\ReSharper\v7.0\Plugins\mspec" 2> NUL
|
6
|
+
copy /y Machine.Specifications.dll "%APPDATA%\JetBrains\ReSharper\v7.0\Plugins\mspec"
|
7
|
+
copy /y Machine.Specifications.pdb "%APPDATA%\JetBrains\ReSharper\v7.0\Plugins\mspec" > NUL
|
8
|
+
copy /y Machine.Specifications.ReSharperRunner.7.0.dll "%APPDATA%\JetBrains\ReSharper\v7.0\Plugins\mspec"
|
9
|
+
copy /y Machine.Specifications.ReSharperRunner.7.0.pdb "%APPDATA%\JetBrains\ReSharper\v7.0\Plugins\mspec" > NUL
|
10
|
+
pause
|
data/spec/TestProj/packages/Machine.Specifications.0.5.12/tools/InstallResharperRunner.7.1.bat
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
del "%APPDATA%\JetBrains\ReSharper\v7.1\vs10.0\Plugins\Machine.Specifications.*" 2> NUL
|
2
|
-
del "%APPDATA%\JetBrains\ReSharper\v7.1\vs11.0\Plugins\Machine.Specifications.*" 2> NUL
|
3
|
-
|
4
|
-
mkdir "%APPDATA%\JetBrains\ReSharper\v7.1\Plugins" 2> NUL
|
5
|
-
mkdir "%APPDATA%\JetBrains\ReSharper\v7.1\Plugins\mspec" 2> NUL
|
6
|
-
copy /y Machine.Specifications.dll "%APPDATA%\JetBrains\ReSharper\v7.1\Plugins\mspec"
|
7
|
-
copy /y Machine.Specifications.pdb "%APPDATA%\JetBrains\ReSharper\v7.1\Plugins\mspec" > NUL
|
8
|
-
copy /y Machine.Specifications.ReSharperRunner.7.1.dll "%APPDATA%\JetBrains\ReSharper\v7.1\Plugins\mspec"
|
9
|
-
copy /y Machine.Specifications.ReSharperRunner.7.1.pdb "%APPDATA%\JetBrains\ReSharper\v7.1\Plugins\mspec" > NUL
|
10
|
-
pause
|
1
|
+
del "%APPDATA%\JetBrains\ReSharper\v7.1\vs10.0\Plugins\Machine.Specifications.*" 2> NUL
|
2
|
+
del "%APPDATA%\JetBrains\ReSharper\v7.1\vs11.0\Plugins\Machine.Specifications.*" 2> NUL
|
3
|
+
|
4
|
+
mkdir "%APPDATA%\JetBrains\ReSharper\v7.1\Plugins" 2> NUL
|
5
|
+
mkdir "%APPDATA%\JetBrains\ReSharper\v7.1\Plugins\mspec" 2> NUL
|
6
|
+
copy /y Machine.Specifications.dll "%APPDATA%\JetBrains\ReSharper\v7.1\Plugins\mspec"
|
7
|
+
copy /y Machine.Specifications.pdb "%APPDATA%\JetBrains\ReSharper\v7.1\Plugins\mspec" > NUL
|
8
|
+
copy /y Machine.Specifications.ReSharperRunner.7.1.dll "%APPDATA%\JetBrains\ReSharper\v7.1\Plugins\mspec"
|
9
|
+
copy /y Machine.Specifications.ReSharperRunner.7.1.pdb "%APPDATA%\JetBrains\ReSharper\v7.1\Plugins\mspec" > NUL
|
10
|
+
pause
|
@@ -1,9 +1,9 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<configuration>
|
3
|
-
<startup useLegacyV2RuntimeActivationPolicy="true">
|
4
|
-
<supportedRuntime version="v4.0"/>
|
5
|
-
</startup>
|
6
|
-
<runtime>
|
7
|
-
<loadFromRemoteSources enabled="true"/>
|
8
|
-
</runtime>
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<configuration>
|
3
|
+
<startup useLegacyV2RuntimeActivationPolicy="true">
|
4
|
+
<supportedRuntime version="v4.0"/>
|
5
|
+
</startup>
|
6
|
+
<runtime>
|
7
|
+
<loadFromRemoteSources enabled="true"/>
|
8
|
+
</runtime>
|
9
9
|
</configuration>
|
@@ -1,9 +1,9 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<configuration>
|
3
|
-
<startup useLegacyV2RuntimeActivationPolicy="true">
|
4
|
-
<supportedRuntime version="v4.0"/>
|
5
|
-
</startup>
|
6
|
-
<runtime>
|
7
|
-
<loadFromRemoteSources enabled="true"/>
|
8
|
-
</runtime>
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<configuration>
|
3
|
+
<startup useLegacyV2RuntimeActivationPolicy="true">
|
4
|
+
<supportedRuntime version="v4.0"/>
|
5
|
+
</startup>
|
6
|
+
<runtime>
|
7
|
+
<loadFromRemoteSources enabled="true"/>
|
8
|
+
</runtime>
|
9
9
|
</configuration>
|
@@ -10,16 +10,16 @@
|
|
10
10
|
<projectUrl>http://nunit.org/</projectUrl>
|
11
11
|
<iconUrl>http://nunit.org/nuget/nunit_32x32.png</iconUrl>
|
12
12
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
13
|
-
<description>NUnit features a fluent assert syntax, parameterized, generic and theory tests and is user-extensible. A number of runners, both from the NUnit project and by third parties, are able to execute NUnit tests.
|
14
|
-
|
15
|
-
Version 2.6 is the seventh major release of this well-known and well-tested programming tool.
|
16
|
-
|
13
|
+
<description>NUnit features a fluent assert syntax, parameterized, generic and theory tests and is user-extensible. A number of runners, both from the NUnit project and by third parties, are able to execute NUnit tests.
|
14
|
+
|
15
|
+
Version 2.6 is the seventh major release of this well-known and well-tested programming tool.
|
16
|
+
|
17
17
|
This package includes only the framework assembly. You will need to install the NUnit.Runners package unless you are using a third-party runner.</description>
|
18
18
|
<summary>NUnit is a unit-testing framework for all .Net languages with a strong TDD focus.</summary>
|
19
|
-
<releaseNotes>Version 2.6 is the seventh major release of NUnit.
|
20
|
-
|
21
|
-
Unlike earlier versions, this package includes only the framework assembly. You will need to install the NUnit.Runners package unless you are using a third-party runner.
|
22
|
-
|
19
|
+
<releaseNotes>Version 2.6 is the seventh major release of NUnit.
|
20
|
+
|
21
|
+
Unlike earlier versions, this package includes only the framework assembly. You will need to install the NUnit.Runners package unless you are using a third-party runner.
|
22
|
+
|
23
23
|
The nunit.mocks assembly is now provided by the NUnit.Mocks package. The pnunit.framework assembly is provided by the pNUnit package.</releaseNotes>
|
24
24
|
<copyright />
|
25
25
|
<language>en-US</language>
|
data/spec/pre_push_spec.rb
CHANGED
@@ -11,6 +11,11 @@ class EmptyDllsDummy
|
|
11
11
|
include PrePush
|
12
12
|
end
|
13
13
|
|
14
|
+
class MultiTesterDummy
|
15
|
+
@tests_to_run = {mspec0515: ["./path/to/mspec/tests.dll"], nunit262: ["./path/to/nunit/tests1.dll", "./path/to/nunit/tests2.dll"]}
|
16
|
+
include PrePush
|
17
|
+
end
|
18
|
+
|
14
19
|
class DummyCustomMSBuild < Dummy
|
15
20
|
override_msbuild 'path/to/custom/msbuild.exe'
|
16
21
|
end
|
@@ -48,6 +53,12 @@ describe PrePush do
|
|
48
53
|
DummyCustomTestRunner.should_receive("system").with(/^path\/to\/my\/custom\/test_runner.exe/)
|
49
54
|
DummyCustomTestRunner.run_tests(['some_test_proj.csproj'])
|
50
55
|
end
|
56
|
+
it "should use specified test runner on specified test dlls when using tests_to_run" do
|
57
|
+
MultiTesterDummy.should_receive("system").with(/mspec-clr4.exe\" \".\/path\/to\/mspec\/tests.dll\"$/)
|
58
|
+
MultiTesterDummy.should_receive("system").with(/nunit-console.exe\" \".\/path\/to\/nunit\/tests1.dll\"$/)
|
59
|
+
MultiTesterDummy.should_receive("system").with(/nunit-console.exe\" \".\/path\/to\/nunit\/tests2.dll\"$/)
|
60
|
+
MultiTesterDummy.run_tests(nil)
|
61
|
+
end
|
51
62
|
describe 'when assemblies are left empty' do
|
52
63
|
it 'should call system to run tests on solution' do
|
53
64
|
EmptyDllsDummy.should_receive("system").with(/\.\/path\/to\/some.sln"$/)
|
data/spec/spec_helper.rb
CHANGED
@@ -1,76 +1,76 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'spork'
|
3
|
-
require 'rspec'
|
4
|
-
require 'rspec/expectations'
|
5
|
-
require 'nokogiri'
|
6
|
-
require 'pre_push'
|
7
|
-
require 'prepush_validator'
|
8
|
-
require 'sln_finder'
|
9
|
-
require 'args_parser'
|
10
|
-
|
11
|
-
#uncomment the following line to use spork with the debugger
|
12
|
-
#require 'spork/ext/ruby-debug'
|
13
|
-
|
14
|
-
Spork.prefork do
|
15
|
-
# Loading more in this block will cause your tests to run faster. However,
|
16
|
-
# if you change any configuration or code from libraries loaded here, you'll
|
17
|
-
# need to restart spork for it take effect.
|
18
|
-
|
19
|
-
end
|
20
|
-
|
21
|
-
Spork.each_run do
|
22
|
-
# This code will be run each time you run your specs.
|
23
|
-
|
24
|
-
end
|
25
|
-
|
26
|
-
# --- Instructions ---
|
27
|
-
# Sort the contents of this file into a Spork.prefork and a Spork.each_run
|
28
|
-
# block.
|
29
|
-
#
|
30
|
-
# The Spork.prefork block is run only once when the spork server is started.
|
31
|
-
# You typically want to place most of your (slow) initializer code in here, in
|
32
|
-
# particular, require'ing any 3rd-party gems that you don't normally modify
|
33
|
-
# during development.
|
34
|
-
#
|
35
|
-
# The Spork.each_run block is run each time you run your specs. In case you
|
36
|
-
# need to load files that tend to change during development, require them here.
|
37
|
-
# With Rails, your application modules are loaded automatically, so sometimes
|
38
|
-
# this block can remain empty.
|
39
|
-
#
|
40
|
-
# Note: You can modify files loaded *from* the Spork.each_run block without
|
41
|
-
# restarting the spork server. However, this file itself will not be reloaded,
|
42
|
-
# so if you change any of the code inside the each_run block, you still need to
|
43
|
-
# restart the server. In general, if you have non-trivial code in this file,
|
44
|
-
# it's advisable to move it into a separate file so you can easily edit it
|
45
|
-
# without restarting spork. (For example, with RSpec, you could move
|
46
|
-
# non-trivial code into a file spec/support/my_helper.rb, making sure that the
|
47
|
-
# spec/support/* files are require'd from inside the each_run block.)
|
48
|
-
#
|
49
|
-
# Any code that is left outside the two blocks will be run during preforking
|
50
|
-
# *and* during each_run -- that's probably not what you want.
|
51
|
-
#
|
52
|
-
# These instructions should self-destruct in 10 seconds. If they don't, feel
|
53
|
-
# free to delete them.
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
class ReplaceClr
|
60
|
-
def self.between(old_version, new_version, proj = nil)
|
61
|
-
lines = []
|
62
|
-
lib = File.dirname(__FILE__)
|
63
|
-
|
64
|
-
proj = proj || 'TestProj'
|
65
|
-
tfv = "TargetFrameworkVersion"
|
66
|
-
target = "<#{tfv}>#{old_version}</#{tfv}>"
|
67
|
-
replace = "<#{tfv}>#{new_version}</#{tfv}>"
|
68
|
-
csproj = "#{lib}/../spec/TestProj/#{proj}/TestProj.csproj"
|
69
|
-
File.open(csproj) do |f|
|
70
|
-
f.each_line {|line| lines << line.sub(old_version, new_version)}
|
71
|
-
end
|
72
|
-
File.open(csproj, "w") do |file|
|
73
|
-
lines.each { |l| file.puts l }
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
1
|
+
require 'rubygems'
|
2
|
+
require 'spork'
|
3
|
+
require 'rspec'
|
4
|
+
require 'rspec/expectations'
|
5
|
+
require 'nokogiri'
|
6
|
+
require 'pre_push'
|
7
|
+
require 'prepush_validator'
|
8
|
+
require 'sln_finder'
|
9
|
+
require 'args_parser'
|
10
|
+
|
11
|
+
#uncomment the following line to use spork with the debugger
|
12
|
+
#require 'spork/ext/ruby-debug'
|
13
|
+
|
14
|
+
Spork.prefork do
|
15
|
+
# Loading more in this block will cause your tests to run faster. However,
|
16
|
+
# if you change any configuration or code from libraries loaded here, you'll
|
17
|
+
# need to restart spork for it take effect.
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
Spork.each_run do
|
22
|
+
# This code will be run each time you run your specs.
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
# --- Instructions ---
|
27
|
+
# Sort the contents of this file into a Spork.prefork and a Spork.each_run
|
28
|
+
# block.
|
29
|
+
#
|
30
|
+
# The Spork.prefork block is run only once when the spork server is started.
|
31
|
+
# You typically want to place most of your (slow) initializer code in here, in
|
32
|
+
# particular, require'ing any 3rd-party gems that you don't normally modify
|
33
|
+
# during development.
|
34
|
+
#
|
35
|
+
# The Spork.each_run block is run each time you run your specs. In case you
|
36
|
+
# need to load files that tend to change during development, require them here.
|
37
|
+
# With Rails, your application modules are loaded automatically, so sometimes
|
38
|
+
# this block can remain empty.
|
39
|
+
#
|
40
|
+
# Note: You can modify files loaded *from* the Spork.each_run block without
|
41
|
+
# restarting the spork server. However, this file itself will not be reloaded,
|
42
|
+
# so if you change any of the code inside the each_run block, you still need to
|
43
|
+
# restart the server. In general, if you have non-trivial code in this file,
|
44
|
+
# it's advisable to move it into a separate file so you can easily edit it
|
45
|
+
# without restarting spork. (For example, with RSpec, you could move
|
46
|
+
# non-trivial code into a file spec/support/my_helper.rb, making sure that the
|
47
|
+
# spec/support/* files are require'd from inside the each_run block.)
|
48
|
+
#
|
49
|
+
# Any code that is left outside the two blocks will be run during preforking
|
50
|
+
# *and* during each_run -- that's probably not what you want.
|
51
|
+
#
|
52
|
+
# These instructions should self-destruct in 10 seconds. If they don't, feel
|
53
|
+
# free to delete them.
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
class ReplaceClr
|
60
|
+
def self.between(old_version, new_version, proj = nil)
|
61
|
+
lines = []
|
62
|
+
lib = File.dirname(__FILE__)
|
63
|
+
|
64
|
+
proj = proj || 'TestProj'
|
65
|
+
tfv = "TargetFrameworkVersion"
|
66
|
+
target = "<#{tfv}>#{old_version}</#{tfv}>"
|
67
|
+
replace = "<#{tfv}>#{new_version}</#{tfv}>"
|
68
|
+
csproj = "#{lib}/../spec/TestProj/#{proj}/TestProj.csproj"
|
69
|
+
File.open(csproj) do |f|
|
70
|
+
f.each_line {|line| lines << line.sub(old_version, new_version)}
|
71
|
+
end
|
72
|
+
File.open(csproj, "w") do |file|
|
73
|
+
lines.each { |l| file.puts l }
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pre_push
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
5
|
-
prerelease:
|
4
|
+
version: 1.1.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- nieve
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-11-30 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: bundler
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rake
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ! '>='
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ! '>='
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -241,6 +236,7 @@ files:
|
|
241
236
|
homepage: https://github.com/nieve/prepush
|
242
237
|
licenses:
|
243
238
|
- MIT
|
239
|
+
metadata: {}
|
244
240
|
post_install_message: ! "cd to your git repository (containing the .git directory)
|
245
241
|
and from there type 'prepush' to drop the prush hook into .git/hooks. \nBy default
|
246
242
|
the hook will use 'C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe' to
|
@@ -250,22 +246,20 @@ rdoc_options: []
|
|
250
246
|
require_paths:
|
251
247
|
- lib
|
252
248
|
required_ruby_version: !ruby/object:Gem::Requirement
|
253
|
-
none: false
|
254
249
|
requirements:
|
255
250
|
- - ! '>='
|
256
251
|
- !ruby/object:Gem::Version
|
257
252
|
version: '0'
|
258
253
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
259
|
-
none: false
|
260
254
|
requirements:
|
261
255
|
- - ! '>='
|
262
256
|
- !ruby/object:Gem::Version
|
263
257
|
version: '0'
|
264
258
|
requirements: []
|
265
259
|
rubyforge_project:
|
266
|
-
rubygems_version: 1.
|
260
|
+
rubygems_version: 2.1.11
|
267
261
|
signing_key:
|
268
|
-
specification_version:
|
262
|
+
specification_version: 4
|
269
263
|
summary: Add a pre-push git hook on any of your repos to build & run tests of your
|
270
264
|
.net project.
|
271
265
|
test_files:
|