xcpretty 0.2.4 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/LICENSE.txt +1 -1
- data/Rakefile +1 -0
- data/features/simple_format.feature +6 -1
- data/features/steps/formatting_steps.rb +8 -0
- data/lib/xcpretty/formatters/formatter.rb +4 -3
- data/lib/xcpretty/parser.rb +11 -11
- data/lib/xcpretty/reporters/html.rb +5 -2
- data/lib/xcpretty/version.rb +1 -1
- data/spec/fixtures/constants.rb +16 -0
- data/spec/xcpretty/formatters/formatter_spec.rb +19 -12
- data/spec/xcpretty/parser_spec.rb +35 -0
- metadata +20 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 316a4833e8feac6ba8771d0d05dd592f5891392f
|
4
|
+
data.tar.gz: 4e26ec875ca5d4b4b0e6bafb4ddcb21fb75cf0fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2534ba94ce92988f947d9b70dd89e94a1175374878958566bb372f3f6d8b549bdfc0473cea21f3550516551862ea718e407640a9477bfead1c41f0db2846bcb7
|
7
|
+
data.tar.gz: e80e9f26fc78f4f07348dd049a52aac8f47d3c282cea927a6372bb86b3e703967ee9d5f17261748209b16541b9f15ebad1af44da7260c7871d42fe74298fc8bb
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.2.6
|
4
|
+
|
5
|
+
* Codesigning matchers improvements
|
6
|
+
* Screenshots parsing fixes
|
7
|
+
|
8
|
+
###### Bug fixes
|
9
|
+
|
10
|
+
* Fix reporers crash by default ld warning implementation
|
11
|
+
| [iKiKi](https://github.com/iKiKi)
|
12
|
+
| [#187](https://github.com/supermarin/xcpretty/pull/187)
|
13
|
+
|
3
14
|
## 0.2.1
|
4
15
|
|
5
16
|
###### Bug fixes
|
data/LICENSE.txt
CHANGED
data/Rakefile
CHANGED
@@ -225,4 +225,9 @@ Feature: Showing build output in simple format
|
|
225
225
|
Scenario: Showing code signing is required error
|
226
226
|
Given the target requires code signing
|
227
227
|
When I pipe to xcpretty with "--simple --no-color"
|
228
|
-
Then I should see the code signing is requried message
|
228
|
+
Then I should see the code signing is requried message
|
229
|
+
|
230
|
+
Scenario: Showing no profile matching error
|
231
|
+
Given the matching profile is missing
|
232
|
+
When I pipe to xcpretty with "--simple --no-color"
|
233
|
+
Then I should see the no profile matching message
|
@@ -144,6 +144,10 @@ Given(/^the target requires code signing$/) do
|
|
144
144
|
add_run_input SAMPLE_CODE_SIGNING_IS_REQUIRED_ERROR
|
145
145
|
end
|
146
146
|
|
147
|
+
Given(/^the matching profile is missing$/) do
|
148
|
+
add_run_input SAMPLE_NO_PROFILE_MATCHING_ERROR
|
149
|
+
end
|
150
|
+
|
147
151
|
Then(/^I should see a "(\w+)" completion message$/) do |phase|
|
148
152
|
run_output.should start_with("▸ #{phase.capitalize} Succeeded")
|
149
153
|
end
|
@@ -368,3 +372,7 @@ Then(/^I should see the code signing is requried message$/) do
|
|
368
372
|
run_output.should include("Code signing is required for product type 'Application' in SDK 'iOS 10.0'")
|
369
373
|
end
|
370
374
|
|
375
|
+
Then(/^I should see the no profile matching message$/) do
|
376
|
+
run_output.should include("No profile matching 'TargetName' found: Xcode couldn't find a profile matching 'TargetName'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the General tab of the target editor.")
|
377
|
+
end
|
378
|
+
|
@@ -167,10 +167,11 @@ module XCPretty
|
|
167
167
|
|
168
168
|
def format_failure(f)
|
169
169
|
snippet = Snippet.from_filepath(f[:file_path])
|
170
|
+
output = " #{f[:test_case]}, #{red(f[:reason])}"
|
171
|
+
output += "\n #{cyan(f[:file_path])}"
|
172
|
+
return output if snippet.contents.empty?
|
170
173
|
|
171
|
-
output
|
172
|
-
"#{cyan(f[:file_path])}\n ```\n"
|
173
|
-
|
174
|
+
output += "\n ```\n"
|
174
175
|
if @colorize
|
175
176
|
output += Syntax.highlight(snippet)
|
176
177
|
else
|
data/lib/xcpretty/parser.rb
CHANGED
@@ -60,7 +60,7 @@ module XCPretty
|
|
60
60
|
# @regex Captured groups
|
61
61
|
# $1 compiler_command
|
62
62
|
# $2 file_path
|
63
|
-
COMPILE_COMMAND_MATCHER = /^\s*(.*\/
|
63
|
+
COMPILE_COMMAND_MATCHER = /^\s*(.*\/bin\/clang\s.*\s\-c\s(.*\.(?:m|mm|c|cc|cpp|cxx))\s.*\.o)$/
|
64
64
|
|
65
65
|
# @regex Captured groups
|
66
66
|
# $1 file_path
|
@@ -224,11 +224,15 @@ module XCPretty
|
|
224
224
|
|
225
225
|
# @regex Captured groups
|
226
226
|
# $1 = whole error
|
227
|
-
|
227
|
+
CHECK_DEPENDENCIES_ERRORS_MATCHER = /^(Code\s?Sign error:.*|Code signing is required for product type .* in SDK .*|No profile matching .* found:.*|Provisioning profile .* doesn't .*|Swift is unavailable on .*|.?Use Legacy Swift Language Version.*)$/
|
228
228
|
|
229
229
|
# @regex Captured groups
|
230
230
|
# $1 = whole error
|
231
|
-
|
231
|
+
PROVISIONING_PROFILE_REQUIRED_MATCHER = /^(.*requires a provisioning profile.*)$/
|
232
|
+
|
233
|
+
# @regex Captured groups
|
234
|
+
# $1 = whole error
|
235
|
+
NO_CERTIFICATE_MATCHER = /^(No certificate matching.*)$/
|
232
236
|
|
233
237
|
# @regex Captured groups
|
234
238
|
# $1 = file_path
|
@@ -240,10 +244,6 @@ module XCPretty
|
|
240
244
|
# $1 cursor (with whitespaces and tildes)
|
241
245
|
CURSOR_MATCHER = /^([\s~]*\^[\s~]*)$/
|
242
246
|
|
243
|
-
# @regex Captured groups
|
244
|
-
# $1 = whole message
|
245
|
-
PROFILE_DOESNT_SUPPORT_OR_INCLUDE = /^(Provisioning profile .* doesn't .*)$/
|
246
|
-
|
247
247
|
# @regex Captured groups
|
248
248
|
# $1 = whole error.
|
249
249
|
# it varies a lot, not sure if it makes sense to catch everything separately
|
@@ -328,9 +328,11 @@ module XCPretty
|
|
328
328
|
formatter.format_codesign($1)
|
329
329
|
when CODESIGN_MATCHER
|
330
330
|
formatter.format_codesign($1)
|
331
|
-
when
|
331
|
+
when CHECK_DEPENDENCIES_ERRORS_MATCHER
|
332
|
+
formatter.format_error($1)
|
333
|
+
when PROVISIONING_PROFILE_REQUIRED_MATCHER
|
332
334
|
formatter.format_error($1)
|
333
|
-
when
|
335
|
+
when NO_CERTIFICATE_MATCHER
|
334
336
|
formatter.format_error($1)
|
335
337
|
when COMPILE_MATCHER
|
336
338
|
formatter.format_compile($2, $1)
|
@@ -346,8 +348,6 @@ module XCPretty
|
|
346
348
|
formatter.format_copy_plist_file($1, $2)
|
347
349
|
when CPRESOURCE_MATCHER
|
348
350
|
formatter.format_cpresource($1)
|
349
|
-
when PROFILE_DOESNT_SUPPORT_OR_INCLUDE
|
350
|
-
formatter.format_error($1)
|
351
351
|
when EXECUTED_MATCHER
|
352
352
|
format_summary_if_needed(text)
|
353
353
|
when UI_FAILING_TEST_MATCHER
|
@@ -70,7 +70,10 @@ module XCPretty
|
|
70
70
|
Dir.foreach(SCREENSHOT_DIR) do |item|
|
71
71
|
next if item == '.' || item == '..' || File.extname(item) != '.png'
|
72
72
|
|
73
|
-
|
73
|
+
suite = item.split(".")
|
74
|
+
next if suite.empty?
|
75
|
+
|
76
|
+
suite_name = find_test_suite(suite[0])
|
74
77
|
next if suite_name.nil?
|
75
78
|
|
76
79
|
@test_suites[suite_name][:screenshots] << item
|
@@ -79,7 +82,7 @@ module XCPretty
|
|
79
82
|
|
80
83
|
def find_test_suite(image_name)
|
81
84
|
@test_suites.each do |key, value|
|
82
|
-
return key if image_name.start_with?(key)
|
85
|
+
return key if image_name.start_with?(key.split('.').last)
|
83
86
|
end
|
84
87
|
nil
|
85
88
|
end
|
data/lib/xcpretty/version.rb
CHANGED
data/spec/fixtures/constants.rb
CHANGED
@@ -582,6 +582,14 @@ SAMPLE_CODESIGN_ERROR_NO_SPACES = %Q(
|
|
582
582
|
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.0'
|
583
583
|
)
|
584
584
|
|
585
|
+
SAMPLE_REQUIRES_PROVISION = %Q(
|
586
|
+
PROJECT_NAME requires a provisioning profile. Select a provisioning profile for the "Debug" build configuration in the project editor.
|
587
|
+
)
|
588
|
+
|
589
|
+
SAMPLE_NO_CERTIFICATE = %Q(
|
590
|
+
No certificate matching 'iPhone Distribution: Name (B89SBB0AV9)' for team 'B89SBB0AV9': Select a different signing certificate for CODE_SIGN_IDENTITY, a team that matches your selected certificate, or switch to automatic provisioning.
|
591
|
+
)
|
592
|
+
|
585
593
|
SAMPLE_FATAL_COMPILE_ERROR = %Q(
|
586
594
|
In file included from /Users/musalj/code/OSS/SampleApp/Pods/SuperCoolPod/SuperAwesomeClass.m:12:
|
587
595
|
In file included from /Users/musalj/code/OSS/SampleApp/Pods/../LessCoolPod/LessCoolClass.h:9:
|
@@ -641,6 +649,14 @@ SAMPLE_CODE_SIGNING_IS_REQUIRED_ERROR = %Q(
|
|
641
649
|
Code signing is required for product type 'Application' in SDK 'iOS 10.0'
|
642
650
|
)
|
643
651
|
|
652
|
+
SAMPLE_NO_PROFILE_MATCHING_ERROR = %Q(
|
653
|
+
No profile matching 'TargetName' found: Xcode couldn't find a profile matching 'TargetName'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the General tab of the target editor.
|
654
|
+
)
|
655
|
+
|
656
|
+
SAMPLE_SWIFT_UNAVAILABLE = "Swift is unavailable on iOS earlier than 7.0; please set IPHONEOS_DEPLOYMENT_TARGET to 7.0 or later (currently it is '6.0')."
|
657
|
+
|
658
|
+
SAMPLE_USE_LEGACY_SWIFT = "“Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly."
|
659
|
+
|
644
660
|
################################################################################
|
645
661
|
# WARNINGS
|
646
662
|
################################################################################
|
@@ -103,18 +103,21 @@ module XCPretty
|
|
103
103
|
second_path = File.expand_path('spec/fixtures/NSStringTests.m:57')
|
104
104
|
|
105
105
|
failures = {
|
106
|
-
'CarSpec' => [
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
106
|
+
'CarSpec' => [{
|
107
|
+
file_path: first_path,
|
108
|
+
reason: "just doesn't work",
|
109
|
+
test_case: 'Starting the car'
|
110
|
+
}],
|
111
|
+
'StringSpec' => [{
|
112
|
+
file_path: second_path,
|
113
|
+
reason: "doesn't split",
|
114
|
+
test_case: 'Splitting the string'
|
115
|
+
}],
|
116
|
+
'UI spec' => [{
|
117
|
+
file_path: "<unknown.m>:0",
|
118
|
+
reason: "ui test failed",
|
119
|
+
test_case: 'yolo'
|
120
|
+
}]
|
118
121
|
}
|
119
122
|
@formatter.format_test_summary(SAMPLE_EXECUTED_TESTS, failures).should == %Q(
|
120
123
|
|
@@ -136,6 +139,10 @@ StringSpec
|
|
136
139
|
});
|
137
140
|
```
|
138
141
|
|
142
|
+
UI spec
|
143
|
+
yolo, #{@formatter.red("ui test failed")}
|
144
|
+
#{@formatter.cyan("<unknown.m>:0")}
|
145
|
+
|
139
146
|
|
140
147
|
#{@formatter.red(SAMPLE_EXECUTED_TESTS)})
|
141
148
|
end
|
@@ -452,6 +452,41 @@ module XCPretty
|
|
452
452
|
@parser.parse(SAMPLE_CODESIGN_ERROR_NO_SPACES)
|
453
453
|
end
|
454
454
|
|
455
|
+
it "parses No profile matching error:" do
|
456
|
+
@formatter.should receive(:format_error).with(
|
457
|
+
"No profile matching 'TargetName' found: Xcode couldn't find a profile matching 'TargetName'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the General tab of the target editor."
|
458
|
+
)
|
459
|
+
@parser.parse(SAMPLE_NO_PROFILE_MATCHING_ERROR)
|
460
|
+
end
|
461
|
+
|
462
|
+
it "parses requires provision error:" do
|
463
|
+
@formatter.should receive(:format_error).with(
|
464
|
+
'PROJECT_NAME requires a provisioning profile. Select a provisioning profile for the "Debug" build configuration in the project editor.'
|
465
|
+
)
|
466
|
+
@parser.parse(SAMPLE_REQUIRES_PROVISION)
|
467
|
+
end
|
468
|
+
|
469
|
+
it "parses no certificate error:" do
|
470
|
+
@formatter.should receive(:format_error).with(
|
471
|
+
"No certificate matching 'iPhone Distribution: Name (B89SBB0AV9)' for team 'B89SBB0AV9': Select a different signing certificate for CODE_SIGN_IDENTITY, a team that matches your selected certificate, or switch to automatic provisioning."
|
472
|
+
)
|
473
|
+
@parser.parse(SAMPLE_NO_CERTIFICATE)
|
474
|
+
end
|
475
|
+
|
476
|
+
it "parses swift unavailable error:" do
|
477
|
+
@formatter.should receive(:format_error).with(
|
478
|
+
SAMPLE_SWIFT_UNAVAILABLE
|
479
|
+
)
|
480
|
+
@parser.parse(SAMPLE_SWIFT_UNAVAILABLE)
|
481
|
+
end
|
482
|
+
|
483
|
+
it "parses use legacy swift error:" do
|
484
|
+
@formatter.should receive(:format_error).with(
|
485
|
+
SAMPLE_USE_LEGACY_SWIFT
|
486
|
+
)
|
487
|
+
@parser.parse(SAMPLE_USE_LEGACY_SWIFT)
|
488
|
+
end
|
489
|
+
|
455
490
|
it "parses ld library errors" do
|
456
491
|
@formatter.should receive(:format_error).with(
|
457
492
|
SAMPLE_LD_LIBRARY_ERROR
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcpretty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marin Usalj
|
@@ -9,62 +9,62 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-03-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rouge
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - ~>
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '1.8'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - ~>
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '1.8'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: bundler
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - ~>
|
32
|
+
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '1.3'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - ~>
|
39
|
+
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '1.3'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: rake
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- -
|
53
|
+
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: rubocop
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- - ~>
|
60
|
+
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: 0.34.0
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- - ~>
|
67
|
+
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: 0.34.0
|
70
70
|
- !ruby/object:Gem::Dependency
|
@@ -85,14 +85,14 @@ dependencies:
|
|
85
85
|
name: cucumber
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- - ~>
|
88
|
+
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '1.0'
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- - ~>
|
95
|
+
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '1.0'
|
98
98
|
description: "\n Xcodebuild formatter designed to be piped with `xcodebuild`,\n
|
@@ -106,11 +106,11 @@ executables:
|
|
106
106
|
extensions: []
|
107
107
|
extra_rdoc_files: []
|
108
108
|
files:
|
109
|
-
- .gitignore
|
110
|
-
- .hound.yml
|
111
|
-
- .kick
|
112
|
-
- .rubocop.yml
|
113
|
-
- .travis.yml
|
109
|
+
- ".gitignore"
|
110
|
+
- ".hound.yml"
|
111
|
+
- ".kick"
|
112
|
+
- ".rubocop.yml"
|
113
|
+
- ".travis.yml"
|
114
114
|
- CHANGELOG.md
|
115
115
|
- CONTRIBUTING.md
|
116
116
|
- Gemfile
|
@@ -189,17 +189,17 @@ require_paths:
|
|
189
189
|
- lib
|
190
190
|
required_ruby_version: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
|
-
- -
|
192
|
+
- - ">="
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: 2.0.0
|
195
195
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
196
196
|
requirements:
|
197
|
-
- -
|
197
|
+
- - ">="
|
198
198
|
- !ruby/object:Gem::Version
|
199
199
|
version: '0'
|
200
200
|
requirements: []
|
201
201
|
rubyforge_project:
|
202
|
-
rubygems_version: 2.
|
202
|
+
rubygems_version: 2.0.14.1
|
203
203
|
signing_key:
|
204
204
|
specification_version: 4
|
205
205
|
summary: xcodebuild formatter done right
|