bozo-scripts 0.9.0 → 0.9.1
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 +15 -0
- data/VERSION +1 -1
- data/lib/bozo/compilers/msbuild.rb +6 -1
- data/lib/bozo/hooks/fxcop.rb +28 -9
- metadata +7 -25
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NmEyYmQ1N2UwYzhjNWJjOTA2NjE1ZTRlYTVmZDZjODhhNGU3NDUzZA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NGQxNGIzNDU4OWEwOGUwMmM2ZThjOWE2YWE4NzU3YjE0OGI1NDJlNg==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZDRjOTIyNTY2MWE5MjdmMGZjZWM0OTczMzk4YWE5ODNhNjdkNzk3OTQzYTg5
|
10
|
+
Njk3ODRmOGExNTE4OWY0ZDQ4MmI2NWJkMzAzYzlmMzUyMTg1M2UzMDRmNjNi
|
11
|
+
MzVjYzVkNWZkNjMwMDRiMWU3ZTFkNDNkZWI2MmM3M2U3Zjc0NDY=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YWU1YzkxMzBlMjFjNTI1Y2IyMmYxNGU4MDJiZjk2OWE4ZjBjMTk1MzFmMGVk
|
14
|
+
ZDc1NTBjMjhlNWY4NzkxOTFkNWM5OGYyODYwYjA5MTNlMzE3NjQ3ODVjOTkx
|
15
|
+
OWFiYmEzMTlhZWE0YzYzNzk2NmIxZmQxYTNkMTIzYzBmZjA1NGQ=
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.1
|
@@ -9,7 +9,12 @@ module Bozo::Compilers
|
|
9
9
|
@config = {
|
10
10
|
:version => 'v4.0.30319',
|
11
11
|
:framework => 'Framework64',
|
12
|
-
:properties => {
|
12
|
+
:properties => {
|
13
|
+
:configuration => :release,
|
14
|
+
:debugtype => :pdbonly,
|
15
|
+
:debugsymbols => :true,
|
16
|
+
:optimize => :true
|
17
|
+
},
|
13
18
|
:max_cores => nil,
|
14
19
|
:targets => [:build],
|
15
20
|
:websites_as_zip => false
|
data/lib/bozo/hooks/fxcop.rb
CHANGED
@@ -16,13 +16,13 @@ module Bozo::Hooks
|
|
16
16
|
program_files_path = ENV['ProgramFiles(x86)']
|
17
17
|
end
|
18
18
|
|
19
|
-
File.join(program_files_path, 'Microsoft Fxcop 10.0', '
|
19
|
+
File.join(program_files_path, 'Microsoft Fxcop 10.0', 'FxCopCmd.exe') unless program_files_path.nil?
|
20
20
|
end
|
21
21
|
|
22
22
|
def initialize
|
23
23
|
@@defaults = {
|
24
24
|
:types => [],
|
25
|
-
:framework_versions => [:net35, :net40],
|
25
|
+
:framework_versions => [:net35, :net40, :net45],
|
26
26
|
:project => nil,
|
27
27
|
:path => FxCop.default_path
|
28
28
|
}
|
@@ -48,12 +48,19 @@ module Bozo::Hooks
|
|
48
48
|
@config[:path]
|
49
49
|
end
|
50
50
|
|
51
|
+
# Specifies the framework versions to use
|
52
|
+
def framework_versions(framework_versions)
|
53
|
+
@config[:framework_versions] = framework_versions unless framework_versions.nil?
|
54
|
+
|
55
|
+
@config[:framework_versions]
|
56
|
+
end
|
57
|
+
|
51
58
|
# Runs the post_compile hook
|
52
59
|
def post_compile
|
53
60
|
config = config_with_defaults
|
54
61
|
|
55
|
-
raise no_executable_path_specified if path.nil?
|
56
|
-
raise no_executable_exists unless File.exists?(path)
|
62
|
+
raise no_executable_path_specified if config[:path].nil?
|
63
|
+
raise no_executable_exists unless File.exists?(config[:path])
|
57
64
|
|
58
65
|
if config[:project].nil?
|
59
66
|
execute_projects config
|
@@ -80,24 +87,32 @@ module Bozo::Hooks
|
|
80
87
|
# @param [Hash] config
|
81
88
|
# The fxcop configuration
|
82
89
|
def execute_projects(config)
|
83
|
-
log_debug "Executing projects with '#{path}'" if config[:framework_versions].any?
|
90
|
+
log_debug "Executing projects with '#{config[:path]}'" if config[:framework_versions].any?
|
84
91
|
|
85
92
|
config[:framework_versions].each do |framework_version|
|
86
93
|
args = []
|
87
|
-
args << '"' + path + '"'
|
94
|
+
args << '"' + config[:path] + '"'
|
88
95
|
args << "/out:#{output_path}\\#{Time.now.to_i}-#{framework_version}-FxCop-report.xml"
|
89
96
|
args << "/types:" + config[:types].join(',') unless config[:types].empty?
|
90
97
|
|
98
|
+
skip_framework_version = false
|
99
|
+
|
91
100
|
project_dirs.each do |project|
|
92
101
|
projects = project_files(project, framework_version)
|
93
102
|
|
103
|
+
skip_framework_version = !projects.any?
|
104
|
+
|
94
105
|
projects.each do |project_file|
|
95
106
|
project_path = File.expand_path(project_file).gsub(/\//, '\\')
|
96
107
|
args << "/file:\"#{project_path}\""
|
97
108
|
end
|
98
109
|
end
|
99
110
|
|
100
|
-
|
111
|
+
begin
|
112
|
+
execute_command :fx_cop, args unless skip_framework_version
|
113
|
+
rescue Exception => e
|
114
|
+
puts e.to_s
|
115
|
+
end
|
101
116
|
end
|
102
117
|
end
|
103
118
|
|
@@ -108,12 +123,16 @@ module Bozo::Hooks
|
|
108
123
|
def execute_fxcop_project(config)
|
109
124
|
log_debug "Executing fxcop project '#{config[:project]}' with '#{path}'"
|
110
125
|
|
126
|
+
output_file = File.join(out_path, File.basename(config[:project], '.*') + '-FxCop-report.xml' )
|
127
|
+
|
111
128
|
args = []
|
112
|
-
args << '"' + path + '"'
|
113
|
-
args << "/out:\"#{
|
129
|
+
args << '"' + config[:path] + '"'
|
130
|
+
args << "/out:\"#{output_file}\""
|
114
131
|
args << "/project:\"#{config[:project]}\""
|
115
132
|
args << "/types:" + config[:types].join(',') unless config[:types].empty?
|
116
133
|
|
134
|
+
FileUtils.mkdir_p(output_path)
|
135
|
+
|
117
136
|
execute_command :fx_cop, args
|
118
137
|
end
|
119
138
|
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bozo-scripts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
5
|
-
prerelease:
|
4
|
+
version: 0.9.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Garry Shutler
|
@@ -10,12 +9,11 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2015-10-
|
12
|
+
date: 2015-10-19 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: nokogiri
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
18
|
- - ~>
|
21
19
|
- !ruby/object:Gem::Version
|
@@ -23,7 +21,6 @@ dependencies:
|
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
25
|
- - ~>
|
29
26
|
- !ruby/object:Gem::Version
|
@@ -31,7 +28,6 @@ dependencies:
|
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: erubis
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
31
|
requirements:
|
36
32
|
- - ~>
|
37
33
|
- !ruby/object:Gem::Version
|
@@ -39,7 +35,6 @@ dependencies:
|
|
39
35
|
type: :runtime
|
40
36
|
prerelease: false
|
41
37
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
38
|
requirements:
|
44
39
|
- - ~>
|
45
40
|
- !ruby/object:Gem::Version
|
@@ -47,7 +42,6 @@ dependencies:
|
|
47
42
|
- !ruby/object:Gem::Dependency
|
48
43
|
name: test-unit
|
49
44
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
45
|
requirements:
|
52
46
|
- - ~>
|
53
47
|
- !ruby/object:Gem::Version
|
@@ -55,7 +49,6 @@ dependencies:
|
|
55
49
|
type: :runtime
|
56
50
|
prerelease: false
|
57
51
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
52
|
requirements:
|
60
53
|
- - ~>
|
61
54
|
- !ruby/object:Gem::Version
|
@@ -63,7 +56,6 @@ dependencies:
|
|
63
56
|
- !ruby/object:Gem::Dependency
|
64
57
|
name: bozo
|
65
58
|
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
59
|
requirements:
|
68
60
|
- - ~>
|
69
61
|
- !ruby/object:Gem::Version
|
@@ -71,7 +63,6 @@ dependencies:
|
|
71
63
|
type: :runtime
|
72
64
|
prerelease: false
|
73
65
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
66
|
requirements:
|
76
67
|
- - ~>
|
77
68
|
- !ruby/object:Gem::Version
|
@@ -79,7 +70,6 @@ dependencies:
|
|
79
70
|
- !ruby/object:Gem::Dependency
|
80
71
|
name: zip
|
81
72
|
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
73
|
requirements:
|
84
74
|
- - ~>
|
85
75
|
- !ruby/object:Gem::Version
|
@@ -87,7 +77,6 @@ dependencies:
|
|
87
77
|
type: :runtime
|
88
78
|
prerelease: false
|
89
79
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
80
|
requirements:
|
92
81
|
- - ~>
|
93
82
|
- !ruby/object:Gem::Version
|
@@ -100,6 +89,8 @@ executables: []
|
|
100
89
|
extensions: []
|
101
90
|
extra_rdoc_files: []
|
102
91
|
files:
|
92
|
+
- LICENSE
|
93
|
+
- VERSION
|
103
94
|
- lib/bozo/compilers/msbuild.rb
|
104
95
|
- lib/bozo/configuration.rb
|
105
96
|
- lib/bozo/dependency_resolvers/bundler.rb
|
@@ -130,36 +121,27 @@ files:
|
|
130
121
|
- lib/bozo/tools/opencover.rb
|
131
122
|
- lib/bozo/version.rb
|
132
123
|
- lib/bozo_scripts.rb
|
133
|
-
- VERSION
|
134
|
-
- LICENSE
|
135
124
|
homepage: https://github.com/zopaUK/bozo-scripts
|
136
125
|
licenses: []
|
126
|
+
metadata: {}
|
137
127
|
post_install_message:
|
138
128
|
rdoc_options: []
|
139
129
|
require_paths:
|
140
130
|
- lib
|
141
131
|
required_ruby_version: !ruby/object:Gem::Requirement
|
142
|
-
none: false
|
143
132
|
requirements:
|
144
133
|
- - ! '>='
|
145
134
|
- !ruby/object:Gem::Version
|
146
135
|
version: '0'
|
147
|
-
segments:
|
148
|
-
- 0
|
149
|
-
hash: -43450659
|
150
136
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
151
|
-
none: false
|
152
137
|
requirements:
|
153
138
|
- - ! '>='
|
154
139
|
- !ruby/object:Gem::Version
|
155
140
|
version: '0'
|
156
|
-
segments:
|
157
|
-
- 0
|
158
|
-
hash: -43450659
|
159
141
|
requirements: []
|
160
142
|
rubyforge_project: bozo-scripts
|
161
|
-
rubygems_version:
|
143
|
+
rubygems_version: 2.4.6
|
162
144
|
signing_key:
|
163
|
-
specification_version:
|
145
|
+
specification_version: 4
|
164
146
|
summary: Zopa build system scripts
|
165
147
|
test_files: []
|