scan 0.7.1 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/scan/options.rb +4 -0
- data/lib/scan/report_collector.rb +13 -4
- data/lib/scan/runner.rb +2 -1
- data/lib/scan/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eec2213c46a081df5c77523a5420fad6e1657dd0
|
4
|
+
data.tar.gz: cfaa604fbc551830125f5fb30b14dac79e1e3c0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25ea53495dd7cea8c11126834a66bc71a05d6d91f8f034d08d07549ce97dc72be767bd7f2bfdd60d4d7299010e4e5102a8ed605db9ed62030562281750ac86bc
|
7
|
+
data.tar.gz: 22e901e83e544d8407d0b6a4a21d580df59190f9a3eaee5d6ef282b37f5b5ef3dbea9ac882943f1925bff8863bfc5cad6cf415636a977fb05acf2d2724e812c6
|
data/lib/scan/options.rb
CHANGED
@@ -173,6 +173,10 @@ module Scan
|
|
173
173
|
FastlaneCore::ConfigItem.new(key: :slack_only_on_failure,
|
174
174
|
description: "Only post on Slack if the tests fail",
|
175
175
|
is_string: false,
|
176
|
+
default_value: false),
|
177
|
+
FastlaneCore::ConfigItem.new(key: :use_clang_report_name,
|
178
|
+
description: "Generate the json compilation database with clang naming convention (compile_commands.json)",
|
179
|
+
is_string: false,
|
176
180
|
default_value: false)
|
177
181
|
]
|
178
182
|
end
|
@@ -3,10 +3,11 @@ module Scan
|
|
3
3
|
SUPPORTED = %w(html junit json-compilation-database)
|
4
4
|
|
5
5
|
# Intialize with values from Scan.config matching these param names
|
6
|
-
def initialize(open_report, output_types, output_directory)
|
6
|
+
def initialize(open_report, output_types, output_directory, use_clang_report_name)
|
7
7
|
@open_report = open_report
|
8
8
|
@output_types = output_types
|
9
9
|
@output_directory = output_directory
|
10
|
+
@use_clang_report_name = use_clang_report_name
|
10
11
|
end
|
11
12
|
|
12
13
|
def parse_raw_file(path)
|
@@ -24,7 +25,7 @@ module Scan
|
|
24
25
|
end
|
25
26
|
end
|
26
27
|
|
27
|
-
# Returns a hash
|
28
|
+
# Returns a hash containing the resulting path as key and the command as value
|
28
29
|
def generate_commands(path, types: nil, output_file_name: nil)
|
29
30
|
types ||= @output_types
|
30
31
|
types = types.split(",") if types.kind_of?(String) # might already be an array when passed via fastlane
|
@@ -38,8 +39,8 @@ module Scan
|
|
38
39
|
next
|
39
40
|
end
|
40
41
|
|
41
|
-
|
42
|
-
|
42
|
+
output_path = output_file_name || File.join(File.expand_path(@output_directory), determine_output_file_name(type))
|
43
|
+
|
43
44
|
parts = ["cat '#{path}' | "]
|
44
45
|
parts << "xcpretty"
|
45
46
|
parts << "--report #{type}"
|
@@ -51,5 +52,13 @@ module Scan
|
|
51
52
|
|
52
53
|
return commands
|
53
54
|
end
|
55
|
+
|
56
|
+
def determine_output_file_name(type)
|
57
|
+
if @use_clang_report_name && type == "json-compilation-database"
|
58
|
+
"compile_commands.json"
|
59
|
+
else
|
60
|
+
"report.#{type}"
|
61
|
+
end
|
62
|
+
end
|
54
63
|
end
|
55
64
|
end
|
data/lib/scan/runner.rb
CHANGED
@@ -53,7 +53,8 @@ module Scan
|
|
53
53
|
|
54
54
|
report_collector = ReportCollector.new(Scan.config[:open_report],
|
55
55
|
Scan.config[:output_types],
|
56
|
-
Scan.config[:output_directory]
|
56
|
+
Scan.config[:output_directory],
|
57
|
+
Scan.config[:use_clang_report_name])
|
57
58
|
|
58
59
|
cmd = report_collector.generate_commands(TestCommandGenerator.xcodebuild_log_path,
|
59
60
|
types: 'junit',
|
data/lib/scan/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane_core
|