xcresult 0.2.1 → 0.2.2

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: 2921dd40608732e79c8bb256a734378aec36dfb3bd3996cfbd9771167a0ed365
4
+ data.tar.gz: 2c775b6af08a176f5dc9c4ed94a4b4eb99b712abb650c27d606a1951d5795198
5
5
  SHA512:
6
- metadata.gz: 021774567136d57469be3bd4e978883dfb5fcec491f9b4a7af9581f87585a70800bf080b32a568b5871d705066c0c770baa0af7972bba640cd7644475eb10d87
7
- data.tar.gz: 4a8304b642581168ded62f78393739605c05a830db811a3863d399b59476d7ca16f4f7ca253531065121b61ac6bd138aa73914ca5e0b554f1dbe477c8b7742df
6
+ metadata.gz: 7d2b6fbac41e64114e8f4acb29ae6960cf6968283a4feb4eee901a9ccebfa0598bccbc71739993799ecd519ac5d5f8f57b7c9833a7aa704ff69074ebf0dc768b
7
+ data.tar.gz: 89a8f191f264e1946f0eae9ca91bd37186400744fc7613da740ead7a95f3ee24951877a0679da4ccd6bc780e5aaafe639b4422d117f83cae46bd48b70934c56d
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.2)
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,24 @@ 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
+ match = `xcrun xcresulttool version`.match(/xcresulttool version (?<version>\d+),/)
89
+
90
+ version = match[:version]&.to_f
91
+
92
+ requires_legacy = version >= 23_021.0
93
+ legacy_flag = requires_legacy ? ' --legacy' : ''
94
+
95
+ cmd = "xcrun xcresulttool #{subcommand}#{legacy_flag} #{args}"
96
+ end
97
+
85
98
  def execute_cmd(cmd)
86
99
  output = `#{cmd}`
87
100
  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.2'
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.2
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: 2024-08-27 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: []