xcpretty-bb 0.1.12.bb3 → 0.1.12.bb4
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 +4 -4
- data/lib/xcpretty/formatters/formatter.rb +7 -2
- data/lib/xcpretty/parser.rb +25 -13
- data/lib/xcpretty/version.rb +1 -1
- data/spec/fixtures/constants.rb +10 -0
- data/spec/xcpretty/formatters/simple_spec.rb +1 -1
- data/spec/xcpretty/parser_spec.rb +24 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 48165ab74fa10573e1ab84d4e9130f13f8f6940d
|
|
4
|
+
data.tar.gz: 7d24fe784c594f4d86ba1289a1bae7982a72ef0a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 82ca034935f7dbd1ea470d3b02a81bf0b1b2f225ca189ec0114f85344be4db09ff6a96df4538e13c047f3860ed483cbf4a76f256a6fbea0f40c425eb03211658
|
|
7
|
+
data.tar.gz: 7c9d978b128d66c22a4d7b9524a55bdcbffd0add6dfa98c4b37953dede44f4a348253c80bfc8a325a0d3dfa99133d82d3c3430f53ad459c250613c6dacf5a7b9
|
|
@@ -19,6 +19,7 @@ module XCPretty
|
|
|
19
19
|
def format_compile(file_name, file_path); EMPTY; end
|
|
20
20
|
def format_compile_command(compiler_command, file_path); EMPTY; end
|
|
21
21
|
def format_compile_storyboard(file_name, file_path); EMPTY; end
|
|
22
|
+
def format_compile_storyboard_error(file_name, error); EMPTY; end
|
|
22
23
|
def format_compile_xib(file_name, file_path); EMPTY; end
|
|
23
24
|
def format_copy_header_file(source, target); EMPTY; end
|
|
24
25
|
def format_copy_plist_file(source, target); EMPTY; end
|
|
@@ -116,8 +117,8 @@ module XCPretty
|
|
|
116
117
|
end
|
|
117
118
|
|
|
118
119
|
def format_phase_script_error(error, output)
|
|
119
|
-
|
|
120
|
-
"\n#{red(error_symbol + " ")}#{error}: #{red(
|
|
120
|
+
indented_output = output.join(" ")
|
|
121
|
+
"\n#{red(error_symbol + " ")}#{error}: #{red(indented_output)}\n\n"
|
|
121
122
|
end
|
|
122
123
|
|
|
123
124
|
def format_compile_error(file, file_path, reason, line, cursor)
|
|
@@ -125,6 +126,10 @@ module XCPretty
|
|
|
125
126
|
"#{line}\n#{cyan(cursor)}\n\n"
|
|
126
127
|
end
|
|
127
128
|
|
|
129
|
+
def format_compile_storyboard_error(file_name, error)
|
|
130
|
+
format_error(file_name + ": " + error)
|
|
131
|
+
end
|
|
132
|
+
|
|
128
133
|
def format_file_missing_error(reason, file_path)
|
|
129
134
|
"\n#{red(error_symbol + " " + reason)} #{file_path}\n\n"
|
|
130
135
|
end
|
data/lib/xcpretty/parser.rb
CHANGED
|
@@ -180,7 +180,7 @@ module XCPretty
|
|
|
180
180
|
module PhaseScript
|
|
181
181
|
# @regex Captured groups
|
|
182
182
|
# $1 = phase_details
|
|
183
|
-
PHASE_SCRIPT_EXECUTION_MATCHER = /^PhaseScriptExecution\s(.*)
|
|
183
|
+
PHASE_SCRIPT_EXECUTION_MATCHER = /^PhaseScriptExecution\s(.*)/
|
|
184
184
|
|
|
185
185
|
# @regex Captured groups
|
|
186
186
|
# $1 = file not found
|
|
@@ -255,6 +255,11 @@ module XCPretty
|
|
|
255
255
|
# $1 reason
|
|
256
256
|
LINKER_UNDEFINED_SYMBOLS_MATCHER = /^(Undefined symbols for architecture .*):$/
|
|
257
257
|
|
|
258
|
+
# @regex Captured groups
|
|
259
|
+
# $1 storyboard
|
|
260
|
+
# $2 error
|
|
261
|
+
COMPILE_STORYBOARD_ERROR_MATCHER = /([^\/]*\.storyboard).*:\serror:\s(.*)$/
|
|
262
|
+
|
|
258
263
|
# @regex Captured groups
|
|
259
264
|
# $1 reason
|
|
260
265
|
PODS_ERROR_MATCHER = /^(error:\s.*)/
|
|
@@ -262,6 +267,9 @@ module XCPretty
|
|
|
262
267
|
# @regex Captured groups
|
|
263
268
|
# $1 = reference
|
|
264
269
|
SYMBOL_REFERENCED_FROM_MATCHER = /\s+"(.*)", referenced from:$/
|
|
270
|
+
|
|
271
|
+
# @regex Captured groups
|
|
272
|
+
GENERIC_ERROR_MATCHER = /error:\s(.*)$/
|
|
265
273
|
end
|
|
266
274
|
end
|
|
267
275
|
|
|
@@ -321,6 +329,8 @@ module XCPretty
|
|
|
321
329
|
formatter.format_compile_xib($2, $1)
|
|
322
330
|
when COMPILE_STORYBOARD_MATCHER
|
|
323
331
|
formatter.format_compile_storyboard($2, $1)
|
|
332
|
+
when COMPILE_STORYBOARD_ERROR_MATCHER
|
|
333
|
+
formatter.format_compile_storyboard_error($1, $2)
|
|
324
334
|
when COPY_HEADER_MATCHER
|
|
325
335
|
formatter.format_copy_header_file($1, $2)
|
|
326
336
|
when COPY_PLIST_MATCHER
|
|
@@ -385,6 +395,8 @@ module XCPretty
|
|
|
385
395
|
formatter.format_shell_command($1, $2)
|
|
386
396
|
when GENERIC_WARNING_MATCHER
|
|
387
397
|
formatter.format_warning($1)
|
|
398
|
+
when GENERIC_ERROR_MATCHER
|
|
399
|
+
formatter.format_error($1)
|
|
388
400
|
else
|
|
389
401
|
""
|
|
390
402
|
end
|
|
@@ -394,18 +406,18 @@ module XCPretty
|
|
|
394
406
|
|
|
395
407
|
def update_phase_script_state(text)
|
|
396
408
|
case text
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
+
when PHASE_SCRIPT_EXECUTION_MATCHER
|
|
410
|
+
@current_phase_script_output = [text]
|
|
411
|
+
when PHASE_SCRIPT_COMMAND_FAILED_MATCHER, PHASE_SCRIPT_NO_SUCH_FILE_OR_DIRECTORY_MATCHER
|
|
412
|
+
unless @current_phase_script_output.nil?
|
|
413
|
+
@current_phase_script_output << text
|
|
414
|
+
current_phase_script_failure[:output] = @current_phase_script_output
|
|
415
|
+
current_phase_script_failure[:error] = text
|
|
416
|
+
end
|
|
417
|
+
else
|
|
418
|
+
unless @current_phase_script_output.nil?
|
|
419
|
+
@current_phase_script_output << text
|
|
420
|
+
end
|
|
409
421
|
end
|
|
410
422
|
end
|
|
411
423
|
|
data/lib/xcpretty/version.rb
CHANGED
data/spec/fixtures/constants.rb
CHANGED
|
@@ -127,6 +127,12 @@ TiffUtil eye_icon.tiff
|
|
|
127
127
|
cd /Users/musalj/code/OSS/Alcatraz
|
|
128
128
|
/usr/bin/tiffutil -cathidpicheck /Users/musalj/code/OSS/Alcatraz/Alcatraz/eye_icon@2x.png /Users/musalj/code/OSS/Alcatraz/Alcatraz/eye_icon.png -out /Users/musalj/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin/Contents/Resources/eye_icon.tiff
|
|
129
129
|
)
|
|
130
|
+
SAMPLE_RUN_SCRIPT_ERROR = %Q(
|
|
131
|
+
PhaseScriptExecution Run\\ Script DerivedData/Build/Intermediates/Blah.build/Debug-iphonesimulator/Blah.build/Script-F07128051BCF177900851764.sh
|
|
132
|
+
cd /Users/blah/iosapps/test/iOS
|
|
133
|
+
/bin/sh -c /Users/blah/iosapps/test/iOS/DerivedData/Build/Intermediates/Blah.build/Debug-iphonesimulator/Blah.build/Script-F07128051BCF177900851764.sh
|
|
134
|
+
/bin/sh: blah: No such file or directory
|
|
135
|
+
)
|
|
130
136
|
SAMPLE_RUN_SCRIPT = %Q(
|
|
131
137
|
PhaseScriptExecution Check\\ Pods\\ Manifest.lock /Users/musalj/Library/Developer/Xcode/DerivedData/ObjectiveSugar-ayzdhqmmwtqgysdpznmovjlupqjy/Build/Intermediates/ObjectiveSugar.build/Debug-iphonesimulator/ObjectiveSugar.build/Script-468DABF301EC4EC1A00CC4C2.sh
|
|
132
138
|
cd /Users/musalj/code/OSS/ObjectiveSugar/Example
|
|
@@ -461,6 +467,7 @@ PhaseScriptExecution Check\\ Pods\\ Manifest.lock /Users/musalj/Library/Develope
|
|
|
461
467
|
setenv variant normal
|
|
462
468
|
/bin/sh -c /Users/musalj/Library/Developer/Xcode/DerivedData/ObjectiveSugar-ayzdhqmmwtqgysdpznmovjlupqjy/Build/Intermediates/ObjectiveSugar.build/Debug-iphonesimulator/ObjectiveSugar.build/Script-468DABF301EC4EC1A00CC4C2.sh
|
|
463
469
|
)
|
|
470
|
+
|
|
464
471
|
SAMPLE_ANALYZE = %Q(
|
|
465
472
|
Analyze CocoaChip/CCChip8DisplayView.m
|
|
466
473
|
cd /Users/dustin/Source/CocoaChip
|
|
@@ -485,6 +492,9 @@ CompileStoryboard sample/Main.storyboard
|
|
|
485
492
|
export XCODE_DEVELOPER_USR_PATH=/Applications/Xcode.app/Contents/Developer/usr/bin/..
|
|
486
493
|
/Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --target-device iphone --target-device ipad --errors --warnings --notices --module sample --minimum-deployment-target 7.0 --output-partial-info-plist /Users/chipp/Library/Developer/Xcode/DerivedData/sample-etjztiverddwaddrudeteewjzfxw/Build/Intermediates/ArchiveIntermediates/sample/IntermediateBuildFilesPath/sample.build/Release-iphoneos/sample.build/SJMetroPickerStoryboard-SBPartialInfo.plist --auto-activate-custom-fonts --output-format human-readable-text --compilation-directory /Users/chipp/Library/Developer/Xcode/DerivedData/sample-etjztiverddwaddrudeteewjzfxw/Build/Intermediates/ArchiveIntermediates/sample/InstallationBuildProductsLocation/Applications/sample.app /Users/chipp/Developer/sample/sample/Main.storyboard
|
|
487
494
|
)
|
|
495
|
+
SAMPLE_COMPILE_STORYBOARD_ERROR = %Q(
|
|
496
|
+
/Users/blah/iosapps/test/blah-Blah-ios/Blah/Resources/Views/LaunchScreen.storyboard: error: Line 11: error parsing attribute name
|
|
497
|
+
)
|
|
488
498
|
SAMPLE_CODESIGN = %Q(
|
|
489
499
|
CodeSign build/Release/CocoaChip.app
|
|
490
500
|
cd /Users/dustin/Source/CocoaChip
|
|
@@ -120,7 +120,7 @@ module XCPretty
|
|
|
120
120
|
|
|
121
121
|
it "formats Phase Script Execution" do
|
|
122
122
|
@formatter.format_phase_script_execution("Check Pods Manifest.lock").should ==
|
|
123
|
-
"> Running
|
|
123
|
+
"> Running phase 'Check Pods Manifest.lock'"
|
|
124
124
|
end
|
|
125
125
|
|
|
126
126
|
it "formats precompiling output" do
|
|
@@ -111,6 +111,11 @@ module XCPretty
|
|
|
111
111
|
@parser.parse(SAMPLE_COMPILE_STORYBOARD)
|
|
112
112
|
end
|
|
113
113
|
|
|
114
|
+
it "parses compiling storyboard errors" do
|
|
115
|
+
@formatter.should receive(:format_compile_storyboard_error).with("LaunchScreen.storyboard", "Line 11: error parsing attribute name")
|
|
116
|
+
@parser.parse(SAMPLE_COMPILE_STORYBOARD_ERROR)
|
|
117
|
+
end
|
|
118
|
+
|
|
114
119
|
it 'parses CopyPlistFile' do
|
|
115
120
|
@formatter.should receive(:format_copy_plist_file).with(
|
|
116
121
|
'/path/to/Some.plist', '/some other/File.plist')
|
|
@@ -214,10 +219,23 @@ module XCPretty
|
|
|
214
219
|
end
|
|
215
220
|
|
|
216
221
|
it "parses PhaseScriptExecution" do
|
|
217
|
-
@formatter.should receive(:format_phase_script_execution).with('Check Pods Manifest.lock')
|
|
222
|
+
@formatter.should receive(:format_phase_script_execution).with('Check Pods Manifest.lock /Users/musalj/Library/Developer/Xcode/DerivedData/ObjectiveSugar-ayzdhqmmwtqgysdpznmovjlupqjy/Build/Intermediates/ObjectiveSugar.build/Debug-iphonesimulator/ObjectiveSugar.build/Script-468DABF301EC4EC1A00CC4C2.sh')
|
|
218
223
|
@parser.parse(SAMPLE_RUN_SCRIPT)
|
|
219
224
|
end
|
|
220
225
|
|
|
226
|
+
it "parses PhaseScriptExecution Error" do
|
|
227
|
+
@formatter.should receive(:format_phase_script_execution).with('Run Script DerivedData/Build/Intermediates/Blah.build/Debug-iphonesimulator/Blah.build/Script-F07128051BCF177900851764.sh')
|
|
228
|
+
@formatter.should receive(:format_phase_script_error).with('/bin/sh: blah: No such file or directory',
|
|
229
|
+
['PhaseScriptExecution Run\\ Script DerivedData/Build/Intermediates/Blah.build/Debug-iphonesimulator/Blah.build/Script-F07128051BCF177900851764.sh',
|
|
230
|
+
'cd /Users/blah/iosapps/test/iOS',
|
|
231
|
+
'/bin/sh -c /Users/blah/iosapps/test/iOS/DerivedData/Build/Intermediates/Blah.build/Debug-iphonesimulator/Blah.build/Script-F07128051BCF177900851764.sh',
|
|
232
|
+
'/bin/sh: blah: No such file or directory'])
|
|
233
|
+
|
|
234
|
+
SAMPLE_RUN_SCRIPT_ERROR.each_line do |line|
|
|
235
|
+
@parser.parse(line.chomp)
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
|
|
221
239
|
it "parses process PCH" do
|
|
222
240
|
@formatter.should receive(:format_process_pch).with("Pods-CocoaLumberjack-prefix.pch")
|
|
223
241
|
@parser.parse(SAMPLE_PRECOMPILE)
|
|
@@ -448,6 +466,11 @@ module XCPretty
|
|
|
448
466
|
@formatter.should_not receive(:format_compile_error)
|
|
449
467
|
@parser.parse("hohohoooo")
|
|
450
468
|
end
|
|
469
|
+
|
|
470
|
+
it 'parses generic errors' do
|
|
471
|
+
@formatter.should receive(:format_error).with("Hi there. I'm a really nasty error. Can you fix me")
|
|
472
|
+
@parser.parse(" error: Hi there. I'm a really nasty error. Can you fix me")
|
|
473
|
+
end
|
|
451
474
|
end
|
|
452
475
|
|
|
453
476
|
context "warnings" do
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: xcpretty-bb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.12.
|
|
4
|
+
version: 0.1.12.bb4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Marin Usalj
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2015-10-
|
|
12
|
+
date: 2015-10-15 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rouge
|