scan 0.7.1 → 0.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0bcd8ee8019bb241821adea0e93da4de004d4e14
4
- data.tar.gz: aa7fd2adc1974ad04a16e87506734d64bf9af726
3
+ metadata.gz: eec2213c46a081df5c77523a5420fad6e1657dd0
4
+ data.tar.gz: cfaa604fbc551830125f5fb30b14dac79e1e3c0f
5
5
  SHA512:
6
- metadata.gz: 9315af243cdc6c1fb0ed059c8140e1a0ef7bd0950afdbce0c508910dcf2c831d5527c6ffd9c56044416a06fb11e908955f4664cd25461ae863efe77ac11787a9
7
- data.tar.gz: 53077320e1aacc44a2a76e4e3c8f2a0c158078e85d0065d5df7eabf2dc7b1e048868f7a420a092de3f338bb4c845a980b2f8858745c122bb1999dace25bba228
6
+ metadata.gz: 25ea53495dd7cea8c11126834a66bc71a05d6d91f8f034d08d07549ce97dc72be767bd7f2bfdd60d4d7299010e4e5102a8ed605db9ed62030562281750ac86bc
7
+ data.tar.gz: 22e901e83e544d8407d0b6a4a21d580df59190f9a3eaee5d6ef282b37f5b5ef3dbea9ac882943f1925bff8863bfc5cad6cf415636a977fb05acf2d2724e812c6
@@ -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 containg the resulting path as key and the command as value
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
- file_name = "report.#{type}"
42
- output_path = output_file_name || File.join(File.expand_path(@output_directory), file_name)
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
@@ -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',
@@ -1,4 +1,4 @@
1
1
  module Scan
2
- VERSION = "0.7.1"
2
+ VERSION = "0.8.0"
3
3
  DESCRIPTION = "The easiest way to run tests of your iOS and Mac app"
4
4
  end
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.7.1
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-05-24 00:00:00.000000000 Z
11
+ date: 2016-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core