xcresult 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/lib/xcresult/models.rb +127 -0
- data/lib/xcresult/version.rb +1 -1
- data/xcresult.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b6282d5f831eef163252d3fe270db888524996f034a2ae2cf5c861607c12af0
|
4
|
+
data.tar.gz: ebe2a795f4087b6ed890fd0ffe47c3ec656af23a7ff738a7ec24cc98681e7829
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 021774567136d57469be3bd4e978883dfb5fcec491f9b4a7af9581f87585a70800bf080b32a568b5871d705066c0c770baa0af7972bba640cd7644475eb10d87
|
7
|
+
data.tar.gz: 4a8304b642581168ded62f78393739605c05a830db811a3863d399b59476d7ca16f4f7ca253531065121b61ac6bd138aa73914ca5e0b554f1dbe477c8b7742df
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
xcresult (0.
|
4
|
+
xcresult (0.2.1)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -13,7 +13,7 @@ GEM
|
|
13
13
|
parser (2.6.4.1)
|
14
14
|
ast (~> 2.4.0)
|
15
15
|
rainbow (3.0.0)
|
16
|
-
rake (
|
16
|
+
rake (13.0.1)
|
17
17
|
rspec (3.8.0)
|
18
18
|
rspec-core (~> 3.8.0)
|
19
19
|
rspec-expectations (~> 3.8.0)
|
@@ -42,10 +42,10 @@ PLATFORMS
|
|
42
42
|
|
43
43
|
DEPENDENCIES
|
44
44
|
bundler (~> 2.0)
|
45
|
-
rake (~>
|
45
|
+
rake (~> 13.0)
|
46
46
|
rspec (~> 3.0)
|
47
47
|
rubocop
|
48
48
|
xcresult!
|
49
49
|
|
50
50
|
BUNDLED WITH
|
51
|
-
2.0.
|
51
|
+
2.0.2
|
data/lib/xcresult/models.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'xcresult/version'
|
4
|
+
require 'time'
|
4
5
|
module XCResult
|
5
6
|
# Model attributes and relationships taken from running the following command:
|
6
7
|
# xcrun xcresulttool formatDescription
|
@@ -117,6 +118,8 @@ module XCResult
|
|
117
118
|
type = data['_type']['_name']
|
118
119
|
if type == 'ActionTestSummaryGroup'
|
119
120
|
return ActionTestSummaryGroup.new(data, parent)
|
121
|
+
elsif type == 'ActionTestSummary'
|
122
|
+
return ActionTestSummary.new(data, parent)
|
120
123
|
elsif type == 'ActionTestMetadata'
|
121
124
|
return ActionTestMetadata.new(data, parent)
|
122
125
|
else
|
@@ -160,12 +163,14 @@ module XCResult
|
|
160
163
|
class ActionTestMetadata < ActionTestSummaryIdentifiableObject
|
161
164
|
attr_accessor :test_status
|
162
165
|
attr_accessor :duration
|
166
|
+
attr_accessor :summary_ref
|
163
167
|
attr_accessor :performance_metrics_count
|
164
168
|
attr_accessor :failure_summaries_count
|
165
169
|
attr_accessor :activity_summaries_count
|
166
170
|
def initialize(data, parent)
|
167
171
|
self.test_status = fetch_value(data, 'testStatus')
|
168
172
|
self.duration = fetch_value(data, 'duration').to_f
|
173
|
+
self.summary_ref = Reference.new(data['summaryRef']) if data['summaryRef']
|
169
174
|
self.performance_metrics_count = fetch_value(data, 'performanceMetricsCount')
|
170
175
|
self.failure_summaries_count = fetch_value(data, 'failureSummariesCount')
|
171
176
|
self.activity_summaries_count = fetch_value(data, 'activitySummariesCount')
|
@@ -420,4 +425,126 @@ module XCResult
|
|
420
425
|
new_message
|
421
426
|
end
|
422
427
|
end
|
428
|
+
|
429
|
+
# - ActionTestSummary
|
430
|
+
# * Supertype: ActionTestSummaryIdentifiableObject
|
431
|
+
# * Kind: object
|
432
|
+
# * Properties:
|
433
|
+
# + testStatus: String
|
434
|
+
# + duration: Double
|
435
|
+
# + performanceMetrics: [ActionTestPerformanceMetricSummary]
|
436
|
+
# + failureSummaries: [ActionTestFailureSummary]
|
437
|
+
# + activitySummaries: [ActionTestActivitySummary]
|
438
|
+
class ActionTestSummary < ActionTestSummaryIdentifiableObject
|
439
|
+
attr_accessor :test_status
|
440
|
+
attr_accessor :duration
|
441
|
+
attr_accessor :activity_summaries
|
442
|
+
def initialize(data, parent = nil)
|
443
|
+
self.test_status = fetch_value(data, 'testStatus')
|
444
|
+
self.duration = fetch_value(data, 'duration').to_f
|
445
|
+
self.activity_summaries = fetch_values(data, 'activitySummaries').map do |summary_data|
|
446
|
+
ActionTestActivitySummary.new(summary_data)
|
447
|
+
end
|
448
|
+
super(data, parent)
|
449
|
+
end
|
450
|
+
end
|
451
|
+
|
452
|
+
# - ActionTestActivitySummary
|
453
|
+
# * Kind: object
|
454
|
+
# * Properties:
|
455
|
+
# + title: String
|
456
|
+
# + activityType: String
|
457
|
+
# + uuid: String
|
458
|
+
# + start: Date?
|
459
|
+
# + finish: Date?
|
460
|
+
# + attachments: [ActionTestAttachment]
|
461
|
+
# + subactivities: [ActionTestActivitySummary]
|
462
|
+
class ActionTestActivitySummary < AbstractObject
|
463
|
+
attr_accessor :title
|
464
|
+
attr_accessor :activity_type
|
465
|
+
attr_accessor :uuid
|
466
|
+
attr_accessor :start
|
467
|
+
attr_accessor :finish
|
468
|
+
attr_accessor :attachments
|
469
|
+
attr_accessor :subactivities
|
470
|
+
def initialize(data)
|
471
|
+
self.title = fetch_value(data, 'title')
|
472
|
+
self.activity_type = fetch_value(data, 'activityType')
|
473
|
+
self.uuid = fetch_value(data, 'uuid')
|
474
|
+
self.start = Time.parse(fetch_value(data, 'start')) if data['start']
|
475
|
+
self.finish = Time.parse(fetch_value(data, 'finish')) if data['finish']
|
476
|
+
self.attachments = fetch_values(data, 'attachments').map do |attachment_data|
|
477
|
+
ActionTestAttachment.new(attachment_data)
|
478
|
+
end
|
479
|
+
self.subactivities = fetch_values(data, 'subactivities').map do |summary_data|
|
480
|
+
ActionTestActivitySummary.new(summary_data)
|
481
|
+
end
|
482
|
+
super(data)
|
483
|
+
end
|
484
|
+
end
|
485
|
+
|
486
|
+
# - ActionTestAttachment
|
487
|
+
# * Kind: object
|
488
|
+
# * Properties:
|
489
|
+
# + uniformTypeIdentifier: String
|
490
|
+
# + name: String?
|
491
|
+
# + timestamp: Date?
|
492
|
+
# + userInfo: SortedKeyValueArray?
|
493
|
+
# + lifetime: String
|
494
|
+
# + inActivityIdentifier: Int
|
495
|
+
# + filename: String?
|
496
|
+
# + payloadRef: Reference?
|
497
|
+
# + payloadSize: Int
|
498
|
+
class ActionTestAttachment < AbstractObject
|
499
|
+
attr_accessor :uniform_type_identifier
|
500
|
+
attr_accessor :name
|
501
|
+
attr_accessor :timestamp
|
502
|
+
attr_accessor :user_info
|
503
|
+
attr_accessor :lifetime
|
504
|
+
attr_accessor :in_activity_identifier
|
505
|
+
attr_accessor :filename
|
506
|
+
attr_accessor :payload_ref
|
507
|
+
attr_accessor :payload_size
|
508
|
+
def initialize(data)
|
509
|
+
self.uniform_type_identifier = fetch_value(data, 'uniformTypeIdentifier')
|
510
|
+
self.name = fetch_value(data, 'name')
|
511
|
+
self.timestamp = Time.parse(fetch_value(data, 'timestamp')) if data['timestamp']
|
512
|
+
self.user_info = SortedKeyValueArray.new(data['userInfo']) if data['userInfo']
|
513
|
+
self.lifetime = fetch_value(data, 'lifetime')
|
514
|
+
self.in_activity_identifier = fetch_value(data, 'inActivityIdentifier').to_i
|
515
|
+
self.filename = fetch_value(data, 'filename')
|
516
|
+
self.payload_ref = Reference.new(data['payloadRef']) if data['payloadRef']
|
517
|
+
self.payload_size = fetch_value(data, 'payloadSize').to_i
|
518
|
+
super(data)
|
519
|
+
end
|
520
|
+
end
|
521
|
+
|
522
|
+
# - SortedKeyValueArray
|
523
|
+
# * Kind: object
|
524
|
+
# * Properties:
|
525
|
+
# + storage: [SortedKeyValueArrayPair]
|
526
|
+
class SortedKeyValueArray < AbstractObject
|
527
|
+
attr_accessor :storage
|
528
|
+
def initialize(data)
|
529
|
+
self.storage = fetch_values(data, 'storage').map do |pair_data|
|
530
|
+
SortedKeyValueArrayPair.new(pair_data)
|
531
|
+
end
|
532
|
+
super(data)
|
533
|
+
end
|
534
|
+
end
|
535
|
+
|
536
|
+
# - SortedKeyValueArrayPair
|
537
|
+
# * Kind: object
|
538
|
+
# * Properties:
|
539
|
+
# + key: String
|
540
|
+
# + value: SchemaSerializable
|
541
|
+
class SortedKeyValueArrayPair < AbstractObject
|
542
|
+
attr_accessor :key
|
543
|
+
attr_accessor :value
|
544
|
+
def initialize(data)
|
545
|
+
self.key = fetch_value(data, 'key')
|
546
|
+
self.value = fetch_value(data, 'value')
|
547
|
+
super(data)
|
548
|
+
end
|
549
|
+
end
|
423
550
|
end
|
data/lib/xcresult/version.rb
CHANGED
data/xcresult.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.require_paths = ['lib']
|
24
24
|
|
25
25
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
26
|
-
spec.add_development_dependency 'rake', '~>
|
26
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
27
27
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
28
28
|
spec.add_development_dependency 'rubocop'
|
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.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Holtz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '13.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '13.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,7 +106,7 @@ 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.
|
109
|
+
rubygems_version: 3.0.6
|
110
110
|
signing_key:
|
111
111
|
specification_version: 4
|
112
112
|
summary: Parses xcresult files
|