xcresult 0.2.1 → 0.2.4

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
  SHA256:
3
- metadata.gz: 7b6282d5f831eef163252d3fe270db888524996f034a2ae2cf5c861607c12af0
4
- data.tar.gz: ebe2a795f4087b6ed890fd0ffe47c3ec656af23a7ff738a7ec24cc98681e7829
3
+ metadata.gz: 1d2df19e4db1c1335a316a67e25e1902fdc4ec018b9933deec2d9c2134b7d03c
4
+ data.tar.gz: 9e33e023d183caba87ba49625bfd93f8f820219f998fd9d06224d6c91e44d544
5
5
  SHA512:
6
- metadata.gz: 021774567136d57469be3bd4e978883dfb5fcec491f9b4a7af9581f87585a70800bf080b32a568b5871d705066c0c770baa0af7972bba640cd7644475eb10d87
7
- data.tar.gz: 4a8304b642581168ded62f78393739605c05a830db811a3863d399b59476d7ca16f4f7ca253531065121b61ac6bd138aa73914ca5e0b554f1dbe477c8b7742df
6
+ metadata.gz: 37e6d1999642f4ea2f127ee9ef78a98d802d5c91adc26e59b801fd80c646cd038b2b3d54bf248ed70921f9a4eea7d9ce080a498f2715d02007c79d793ce19faf
7
+ data.tar.gz: 43c2ffe290fde684dcbe03bcfb4371e392dfc6616c7ea485519f024901729505bfe76b72272c4b6320de1bce19d00fcde14d6a945d2de93a0eefffd2ab56788e
data/Gemfile.lock CHANGED
@@ -1,19 +1,25 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- xcresult (0.2.1)
4
+ xcresult (0.2.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- ast (2.4.0)
9
+ ast (2.4.2)
10
10
  diff-lcs (1.3)
11
- jaro_winkler (1.5.3)
12
- parallel (1.17.0)
13
- parser (2.6.4.1)
14
- ast (~> 2.4.0)
15
- rainbow (3.0.0)
11
+ json (2.7.2)
12
+ language_server-protocol (3.17.0.3)
13
+ parallel (1.25.1)
14
+ parser (3.3.4.0)
15
+ ast (~> 2.4.1)
16
+ racc
17
+ racc (1.8.1)
18
+ rainbow (3.1.1)
16
19
  rake (13.0.1)
20
+ regexp_parser (2.9.2)
21
+ rexml (3.3.4)
22
+ strscan
17
23
  rspec (3.8.0)
18
24
  rspec-core (~> 3.8.0)
19
25
  rspec-expectations (~> 3.8.0)
@@ -27,15 +33,22 @@ GEM
27
33
  diff-lcs (>= 1.2.0, < 2.0)
28
34
  rspec-support (~> 3.8.0)
29
35
  rspec-support (3.8.2)
30
- rubocop (0.73.0)
31
- jaro_winkler (~> 1.5.1)
36
+ rubocop (1.65.1)
37
+ json (~> 2.3)
38
+ language_server-protocol (>= 3.17.0)
32
39
  parallel (~> 1.10)
33
- parser (>= 2.6)
40
+ parser (>= 3.3.0.2)
34
41
  rainbow (>= 2.2.2, < 4.0)
42
+ regexp_parser (>= 2.4, < 3.0)
43
+ rexml (>= 3.2.5, < 4.0)
44
+ rubocop-ast (>= 1.31.1, < 2.0)
35
45
  ruby-progressbar (~> 1.7)
36
- unicode-display_width (>= 1.4.0, < 1.7)
37
- ruby-progressbar (1.10.1)
38
- unicode-display_width (1.6.0)
46
+ unicode-display_width (>= 2.4.0, < 3.0)
47
+ rubocop-ast (1.32.0)
48
+ parser (>= 3.3.1.0)
49
+ ruby-progressbar (1.13.0)
50
+ strscan (3.1.0)
51
+ unicode-display_width (2.5.0)
39
52
 
40
53
  PLATFORMS
41
54
  ruby
@@ -44,8 +57,8 @@ DEPENDENCIES
44
57
  bundler (~> 2.0)
45
58
  rake (~> 13.0)
46
59
  rspec (~> 3.0)
47
- rubocop
60
+ rubocop (~> 1.65)
48
61
  xcresult!
49
62
 
50
63
  BUNDLED WITH
51
- 2.0.2
64
+ 2.5.10
@@ -28,7 +28,7 @@ module XCResult
28
28
  # Maps ids into ActionTestPlanRunSummaries by executing xcresulttool to get JSON
29
29
  # containing specific information for each test summary
30
30
  @action_test_plan_summaries = ids.map do |id|
31
- raw = execute_cmd("xcrun xcresulttool get --format json --path #{path} --id #{id}")
31
+ raw = execute_cmd(xcresulttool_command("get", "--format json --path #{path} --id #{id}"))
32
32
  json = JSON.parse(raw)
33
33
  XCResult::ActionTestPlanRunSummaries.new(json)
34
34
  end
@@ -48,7 +48,7 @@ module XCResult
48
48
  # Exports all xccovreport files from the report references
49
49
  ids.each_with_index.map do |id, i|
50
50
  output_path = File.join(destination, "action_#{i}.xccovreport")
51
- cmd = "xcrun xcresulttool export --path #{path} --id '#{id}' --output-path #{output_path} --type file"
51
+ cmd = xcresulttool_command("export", "--path #{path} --id '#{id}' --output-path #{output_path} --type file")
52
52
  execute_cmd(cmd)
53
53
 
54
54
  output_path
@@ -67,7 +67,7 @@ module XCResult
67
67
  # Exports all xcovarchive directories from the archive references
68
68
  ids.each_with_index.map do |id, i|
69
69
  output_path = File.join(destination, "action_#{i}.xccovarchive")
70
- cmd = "xcrun xcresulttool export --path #{path} --id '#{id}' --output-path #{output_path} --type directory"
70
+ cmd = xcresulttool_command("export", "--path #{path} --id '#{id}' --output-path #{output_path} --type directory")
71
71
  execute_cmd(cmd)
72
72
 
73
73
  output_path
@@ -77,11 +77,26 @@ module XCResult
77
77
  private
78
78
 
79
79
  def get_result_bundle_json(id: nil)
80
- cmd = "xcrun xcresulttool get --format json --path #{path}"
80
+ cmd = xcresulttool_command("get", "--format json --path #{path}")
81
81
  cmd += " --id #{id}" if id
82
82
  execute_cmd(cmd)
83
83
  end
84
84
 
85
+ def xcresulttool_command(subcommand, args)
86
+ # Find the current xcresulttool version based on Fastlane's implementation
87
+ # xcresulttool version 23024, format version 3.53 (current)
88
+ # xcresulttool version 24051.1, schema version: 0.1.0 (legacy commands format version: 3.53)
89
+ match = `xcrun xcresulttool version`.match(/xcresulttool version (?<version>\d+(\.\d+)?),/)
90
+
91
+ version = match ? match[:version]&.to_f : nil
92
+
93
+ # If version string does not match expected format, assume legacy is required
94
+ requires_legacy = version.nil? || version >= 23_021.0
95
+ legacy_flag = requires_legacy ? ' --legacy' : ''
96
+
97
+ cmd = "xcrun xcresulttool #{subcommand}#{legacy_flag} #{args}"
98
+ end
99
+
85
100
  def execute_cmd(cmd)
86
101
  output = `#{cmd}`
87
102
  raise "Failed to execute - #{cmd}" unless $?.success?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module XCResult
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.4'
5
5
  end
data/xcresult.gemspec CHANGED
@@ -25,5 +25,5 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency 'bundler', '~> 2.0'
26
26
  spec.add_development_dependency 'rake', '~> 13.0'
27
27
  spec.add_development_dependency 'rspec', '~> 3.0'
28
- spec.add_development_dependency 'rubocop'
28
+ spec.add_development_dependency 'rubocop', '~> 1.65'
29
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcresult
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Holtz
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-28 00:00:00.000000000 Z
11
+ date: 2025-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -56,16 +56,16 @@ dependencies:
56
56
  name: rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '1.65'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '1.65'
69
69
  description: Parses xcresult files for viewing test summaries and code coverages
70
70
  email:
71
71
  - me@joshholtz.com
@@ -91,7 +91,7 @@ homepage: https://github.com/fastlane-community/xcresult
91
91
  licenses:
92
92
  - MIT
93
93
  metadata: {}
94
- post_install_message:
94
+ post_install_message:
95
95
  rdoc_options: []
96
96
  require_paths:
97
97
  - lib
@@ -106,8 +106,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  - !ruby/object:Gem::Version
107
107
  version: '0'
108
108
  requirements: []
109
- rubygems_version: 3.0.6
110
- signing_key:
109
+ rubygems_version: 3.5.3
110
+ signing_key:
111
111
  specification_version: 4
112
112
  summary: Parses xcresult files
113
113
  test_files: []