bozo-scripts 0.9.1 → 0.10.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 +8 -8
- data/VERSION +1 -1
- data/lib/bozo/hooks/fxcop.rb +9 -28
- data/lib/bozo/publishers/nuget.rb +22 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjFkMjFkMTc1N2U0MjhmMDRlMzIzZTcwODAyOGViYmJjZDllZGI4ZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjYzMWQzZWQzMjU0NzA1YWJkMjNhY2RjZGQyNDgzNGUwZTkzYWE3Yg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjIzMDUyODQ0YjJjMDUxODU4MTUyY2FlZmU4ODQ3N2E1MmE1Y2JjNjE3MWFl
|
10
|
+
ZmU4NWM2MGFjNTFjZDg3MDJlNDkwNjhmM2M0YzllMTZiNjU5OTQ4YTkwZmFj
|
11
|
+
ZjI2OTE1ODY0NzEyZWIwODVkNWEwOThlYWE0ZmVmOTAzNGVjMTY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YWRmMDkxZDIyZjU0ZDM0MDkwYjUxN2M4NTgwNmY5ZmE5MDViMDgwNWFiMWFh
|
14
|
+
YTAxNmFjMzJjMTg1N2RmMTg1NmIzMDA5YjMxOTY1YmJlZmFhNzMzY2MyYjJl
|
15
|
+
M2U0NDQ4OTAxZWI0OTJlNzQ3Zjc1YzI4YzNmM2E0ZTQ3OGE1YzI=
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.10.0
|
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],
|
26
26
|
:project => nil,
|
27
27
|
:path => FxCop.default_path
|
28
28
|
}
|
@@ -48,19 +48,12 @@ 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
|
-
|
58
51
|
# Runs the post_compile hook
|
59
52
|
def post_compile
|
60
53
|
config = config_with_defaults
|
61
54
|
|
62
|
-
raise no_executable_path_specified if
|
63
|
-
raise no_executable_exists unless File.exists?(
|
55
|
+
raise no_executable_path_specified if path.nil?
|
56
|
+
raise no_executable_exists unless File.exists?(path)
|
64
57
|
|
65
58
|
if config[:project].nil?
|
66
59
|
execute_projects config
|
@@ -87,32 +80,24 @@ module Bozo::Hooks
|
|
87
80
|
# @param [Hash] config
|
88
81
|
# The fxcop configuration
|
89
82
|
def execute_projects(config)
|
90
|
-
log_debug "Executing projects with '#{
|
83
|
+
log_debug "Executing projects with '#{path}'" if config[:framework_versions].any?
|
91
84
|
|
92
85
|
config[:framework_versions].each do |framework_version|
|
93
86
|
args = []
|
94
|
-
args << '"' +
|
87
|
+
args << '"' + path + '"'
|
95
88
|
args << "/out:#{output_path}\\#{Time.now.to_i}-#{framework_version}-FxCop-report.xml"
|
96
89
|
args << "/types:" + config[:types].join(',') unless config[:types].empty?
|
97
90
|
|
98
|
-
skip_framework_version = false
|
99
|
-
|
100
91
|
project_dirs.each do |project|
|
101
92
|
projects = project_files(project, framework_version)
|
102
93
|
|
103
|
-
skip_framework_version = !projects.any?
|
104
|
-
|
105
94
|
projects.each do |project_file|
|
106
95
|
project_path = File.expand_path(project_file).gsub(/\//, '\\')
|
107
96
|
args << "/file:\"#{project_path}\""
|
108
97
|
end
|
109
98
|
end
|
110
99
|
|
111
|
-
|
112
|
-
execute_command :fx_cop, args unless skip_framework_version
|
113
|
-
rescue Exception => e
|
114
|
-
puts e.to_s
|
115
|
-
end
|
100
|
+
execute_command :fx_cop, args
|
116
101
|
end
|
117
102
|
end
|
118
103
|
|
@@ -123,16 +108,12 @@ module Bozo::Hooks
|
|
123
108
|
def execute_fxcop_project(config)
|
124
109
|
log_debug "Executing fxcop project '#{config[:project]}' with '#{path}'"
|
125
110
|
|
126
|
-
output_file = File.join(out_path, File.basename(config[:project], '.*') + '-FxCop-report.xml' )
|
127
|
-
|
128
111
|
args = []
|
129
|
-
args << '"' +
|
130
|
-
args << "/out:\"#{
|
112
|
+
args << '"' + path + '"'
|
113
|
+
args << "/out:\"#{output_path}\\#{File.basename(config[:project], '.*')}-FxCop-report.xml\""
|
131
114
|
args << "/project:\"#{config[:project]}\""
|
132
115
|
args << "/types:" + config[:types].join(',') unless config[:types].empty?
|
133
116
|
|
134
|
-
FileUtils.mkdir_p(output_path)
|
135
|
-
|
136
117
|
execute_command :fx_cop, args
|
137
118
|
end
|
138
119
|
|
@@ -5,6 +5,10 @@ module Bozo::Publishers
|
|
5
5
|
# Publisher that pushes package to nuget
|
6
6
|
class Nuget
|
7
7
|
|
8
|
+
def initialize
|
9
|
+
@packages = []
|
10
|
+
end
|
11
|
+
|
8
12
|
def server(server)
|
9
13
|
@server = server
|
10
14
|
end
|
@@ -13,12 +17,23 @@ module Bozo::Publishers
|
|
13
17
|
@api_key = api_key
|
14
18
|
end
|
15
19
|
|
20
|
+
def package(package)
|
21
|
+
@packages << package
|
22
|
+
end
|
23
|
+
|
16
24
|
def execute
|
17
25
|
raise Bozo::ConfigurationError.new 'You must specify a nuget server address' if @server.empty?
|
18
|
-
raise Bozo::ConfigurationError.new 'You must specify a nuget api key' if @api_key.empty?
|
19
26
|
|
20
|
-
|
21
|
-
|
27
|
+
if @packages.empty?
|
28
|
+
Dir[File.join('dist', 'nuget', '**', '*')].each do |source_file|
|
29
|
+
push File.expand_path(source_file)
|
30
|
+
end
|
31
|
+
else
|
32
|
+
@packages.each do |package|
|
33
|
+
Dir[File.join('dist', 'nuget', '**', "#{@package}*")].each do |source_file|
|
34
|
+
push File.expand_path(source_file)
|
35
|
+
end
|
36
|
+
end
|
22
37
|
end
|
23
38
|
end
|
24
39
|
|
@@ -29,11 +44,13 @@ module Bozo::Publishers
|
|
29
44
|
args << File.expand_path(File.join('build', 'tools', 'nuget', 'NuGet.exe'))
|
30
45
|
args << "push"
|
31
46
|
args << "\"#{source_file}\""
|
32
|
-
args << "\"#{@api_key}\""
|
33
47
|
args << "-s #{@server}"
|
48
|
+
|
49
|
+
if !@api_key.nil?
|
50
|
+
args << "\"#{@api_key}\""
|
51
|
+
end
|
34
52
|
execute_command :nuget, args
|
35
53
|
end
|
36
|
-
|
37
54
|
end
|
38
55
|
|
39
56
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bozo-scripts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garry Shutler
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-11-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|