bozo-scripts 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/bozo/test_runners/nunit3.rb +95 -0
- data/lib/bozo_scripts.rb +1 -0
- metadata +26 -7
- checksums.yaml +0 -15
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.10.
|
1
|
+
0.10.2
|
@@ -0,0 +1,95 @@
|
|
1
|
+
module Bozo::TestRunners
|
2
|
+
|
3
|
+
# A TestRunner for NUnit3
|
4
|
+
class Nunit3
|
5
|
+
|
6
|
+
def initialize
|
7
|
+
@projects = []
|
8
|
+
end
|
9
|
+
|
10
|
+
def platform(platform)
|
11
|
+
@platform = platform
|
12
|
+
end
|
13
|
+
|
14
|
+
def project(path)
|
15
|
+
@projects << path
|
16
|
+
end
|
17
|
+
|
18
|
+
def report_path(path)
|
19
|
+
@report_path = path
|
20
|
+
end
|
21
|
+
|
22
|
+
def to_s
|
23
|
+
"Run tests with nunit3 against projects #{@projects}"
|
24
|
+
end
|
25
|
+
|
26
|
+
# Returns the path to the runner's executable.
|
27
|
+
#
|
28
|
+
# @returns [String]
|
29
|
+
def runner_path
|
30
|
+
exe_name = 'nunit3-console.exe'
|
31
|
+
|
32
|
+
nunit_runners = expand_and_glob('packages', 'NUnit*', 'tools', exe_name)
|
33
|
+
raise nunit_runner_not_found if nunit_runners.empty?
|
34
|
+
raise multiple_runners_found if nunit_runners.size > 1
|
35
|
+
|
36
|
+
nunit_runner = nunit_runners.first
|
37
|
+
|
38
|
+
log_debug "Found runner at #{nunit_runner}"
|
39
|
+
|
40
|
+
nunit_runner
|
41
|
+
end
|
42
|
+
|
43
|
+
# Returns the arguments required for the runner's executable.
|
44
|
+
#
|
45
|
+
# @returns [Array]
|
46
|
+
def runner_args
|
47
|
+
args = []
|
48
|
+
|
49
|
+
@projects.each do |project|
|
50
|
+
expand_and_glob('temp', 'msbuild', project, '**', "#{project}.dll").each do |test_dll|
|
51
|
+
args << "\"#{test_dll}\""
|
52
|
+
end
|
53
|
+
end
|
54
|
+
args << '--noheader'
|
55
|
+
|
56
|
+
if @platform == 'x86'
|
57
|
+
args << '--x86'
|
58
|
+
end
|
59
|
+
|
60
|
+
report_path = @report_path
|
61
|
+
report_path = expand_path('temp', 'nunit', "#{Time.now.to_i}-nunit-report.xml") unless report_path
|
62
|
+
|
63
|
+
# Ensure the directory is there because NUnit won't make it
|
64
|
+
FileUtils.mkdir_p File.dirname(report_path)
|
65
|
+
|
66
|
+
args << "--result=\"#{report_path}\""
|
67
|
+
|
68
|
+
args
|
69
|
+
end
|
70
|
+
|
71
|
+
def execute
|
72
|
+
execute_command :nunit, [runner_path] << runner_args
|
73
|
+
end
|
74
|
+
|
75
|
+
private
|
76
|
+
|
77
|
+
def nunit_runner_not_found
|
78
|
+
Bozo::ConfigurationError.new 'No NUnit runners found. You must install one via nuget.'
|
79
|
+
end
|
80
|
+
|
81
|
+
def multiple_runners_found
|
82
|
+
Bozo::ConfigurationError.new 'Multiple NUnit runners found. There should only be one.'
|
83
|
+
end
|
84
|
+
|
85
|
+
def expand_path(*args)
|
86
|
+
File.expand_path(File.join(args))
|
87
|
+
end
|
88
|
+
|
89
|
+
def expand_and_glob(*args)
|
90
|
+
Dir[expand_path(*args)]
|
91
|
+
end
|
92
|
+
|
93
|
+
end
|
94
|
+
|
95
|
+
end
|
data/lib/bozo_scripts.rb
CHANGED
@@ -27,6 +27,7 @@ require 'bozo/publishers/rubygems'
|
|
27
27
|
require 'bozo/test_runners/dotcover'
|
28
28
|
require 'bozo/test_runners/opencover'
|
29
29
|
require 'bozo/test_runners/nunit'
|
30
|
+
require 'bozo/test_runners/nunit3'
|
30
31
|
require 'bozo/test_runners/runit'
|
31
32
|
require 'bozo/configuration'
|
32
33
|
require 'bozo/erubis_templating_coordinator'
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bozo-scripts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Garry Shutler
|
@@ -9,11 +10,12 @@ authors:
|
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date:
|
13
|
+
date: 2016-01-13 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: nokogiri
|
16
17
|
requirement: !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
17
19
|
requirements:
|
18
20
|
- - ~>
|
19
21
|
- !ruby/object:Gem::Version
|
@@ -21,6 +23,7 @@ dependencies:
|
|
21
23
|
type: :runtime
|
22
24
|
prerelease: false
|
23
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
24
27
|
requirements:
|
25
28
|
- - ~>
|
26
29
|
- !ruby/object:Gem::Version
|
@@ -28,6 +31,7 @@ dependencies:
|
|
28
31
|
- !ruby/object:Gem::Dependency
|
29
32
|
name: erubis
|
30
33
|
requirement: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
31
35
|
requirements:
|
32
36
|
- - ~>
|
33
37
|
- !ruby/object:Gem::Version
|
@@ -35,6 +39,7 @@ dependencies:
|
|
35
39
|
type: :runtime
|
36
40
|
prerelease: false
|
37
41
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
38
43
|
requirements:
|
39
44
|
- - ~>
|
40
45
|
- !ruby/object:Gem::Version
|
@@ -42,6 +47,7 @@ dependencies:
|
|
42
47
|
- !ruby/object:Gem::Dependency
|
43
48
|
name: test-unit
|
44
49
|
requirement: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
45
51
|
requirements:
|
46
52
|
- - ~>
|
47
53
|
- !ruby/object:Gem::Version
|
@@ -49,6 +55,7 @@ dependencies:
|
|
49
55
|
type: :runtime
|
50
56
|
prerelease: false
|
51
57
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
52
59
|
requirements:
|
53
60
|
- - ~>
|
54
61
|
- !ruby/object:Gem::Version
|
@@ -56,6 +63,7 @@ dependencies:
|
|
56
63
|
- !ruby/object:Gem::Dependency
|
57
64
|
name: bozo
|
58
65
|
requirement: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
59
67
|
requirements:
|
60
68
|
- - ~>
|
61
69
|
- !ruby/object:Gem::Version
|
@@ -63,6 +71,7 @@ dependencies:
|
|
63
71
|
type: :runtime
|
64
72
|
prerelease: false
|
65
73
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
66
75
|
requirements:
|
67
76
|
- - ~>
|
68
77
|
- !ruby/object:Gem::Version
|
@@ -70,6 +79,7 @@ dependencies:
|
|
70
79
|
- !ruby/object:Gem::Dependency
|
71
80
|
name: zip
|
72
81
|
requirement: !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
73
83
|
requirements:
|
74
84
|
- - ~>
|
75
85
|
- !ruby/object:Gem::Version
|
@@ -77,6 +87,7 @@ dependencies:
|
|
77
87
|
type: :runtime
|
78
88
|
prerelease: false
|
79
89
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
80
91
|
requirements:
|
81
92
|
- - ~>
|
82
93
|
- !ruby/object:Gem::Version
|
@@ -89,8 +100,6 @@ executables: []
|
|
89
100
|
extensions: []
|
90
101
|
extra_rdoc_files: []
|
91
102
|
files:
|
92
|
-
- LICENSE
|
93
|
-
- VERSION
|
94
103
|
- lib/bozo/compilers/msbuild.rb
|
95
104
|
- lib/bozo/configuration.rb
|
96
105
|
- lib/bozo/dependency_resolvers/bundler.rb
|
@@ -115,33 +124,43 @@ files:
|
|
115
124
|
- lib/bozo/publishers/rubygems.rb
|
116
125
|
- lib/bozo/test_runners/dotcover.rb
|
117
126
|
- lib/bozo/test_runners/nunit.rb
|
127
|
+
- lib/bozo/test_runners/nunit3.rb
|
118
128
|
- lib/bozo/test_runners/opencover.rb
|
119
129
|
- lib/bozo/test_runners/runit.rb
|
120
130
|
- lib/bozo/tools/nuget.rb
|
121
131
|
- lib/bozo/tools/opencover.rb
|
122
132
|
- lib/bozo/version.rb
|
123
133
|
- lib/bozo_scripts.rb
|
134
|
+
- VERSION
|
135
|
+
- LICENSE
|
124
136
|
homepage: https://github.com/zopaUK/bozo-scripts
|
125
137
|
licenses: []
|
126
|
-
metadata: {}
|
127
138
|
post_install_message:
|
128
139
|
rdoc_options: []
|
129
140
|
require_paths:
|
130
141
|
- lib
|
131
142
|
required_ruby_version: !ruby/object:Gem::Requirement
|
143
|
+
none: false
|
132
144
|
requirements:
|
133
145
|
- - ! '>='
|
134
146
|
- !ruby/object:Gem::Version
|
135
147
|
version: '0'
|
148
|
+
segments:
|
149
|
+
- 0
|
150
|
+
hash: 821952179
|
136
151
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
|
+
none: false
|
137
153
|
requirements:
|
138
154
|
- - ! '>='
|
139
155
|
- !ruby/object:Gem::Version
|
140
156
|
version: '0'
|
157
|
+
segments:
|
158
|
+
- 0
|
159
|
+
hash: 821952179
|
141
160
|
requirements: []
|
142
161
|
rubyforge_project: bozo-scripts
|
143
|
-
rubygems_version:
|
162
|
+
rubygems_version: 1.8.29
|
144
163
|
signing_key:
|
145
|
-
specification_version:
|
164
|
+
specification_version: 3
|
146
165
|
summary: Zopa build system scripts
|
147
166
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
N2ExZTI1MTNlZTljZjkxMzNjMzI5ZTcwZDg1MDRjZWIyMDUyZTMwYg==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
OTNlOWY2Y2FiZDk2NmY5N2ZhNjNhNDA3ZDMzNzU0YTM3ZTJhZTM4ZQ==
|
7
|
-
SHA512:
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
YzNlZDE4YTgxOGI0MzI3OTllOTg0ODU1NTNjYTlhYTkxNzgxNTU5YzI2YTJk
|
10
|
-
NTE1MGI2OTFiZjQ4MzhmNTQwYWIzNTU3ZTNmZGNjYzZiNWExZjcwODE0NGNm
|
11
|
-
MGJhMjg4OTdjZmM5MzE5YjY0YjZiYmRhMjRmZmY3NTBlNjJlMWE=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ODkxNGUzYjQ0NDY4NTczMzQ0NWQ3MzVkZjg5MDY5NDk2NWJiZGE2ZjJkYjU2
|
14
|
-
MTEwM2FiM2I2ZDNiY2VlYzJmZWIyOTYxYjIzOGY4NmEwYzI5NDMzMzM5NmJi
|
15
|
-
OTg2MzJhY2I1ZjIyM2NlMzY2YTZmZjEwOWM5MDhiMTRhODJjY2U=
|