xcpretty 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 +4 -4
- data/CHANGELOG.md +10 -1
- data/README.md +10 -9
- data/Rakefile +0 -1
- data/features/json_compilation_database_report.feature +6 -1
- data/features/steps/json_steps.rb +4 -0
- data/lib/xcpretty/parser.rb +1 -1
- data/lib/xcpretty/reporters/json_compilation_database.rb +4 -1
- data/lib/xcpretty/version.rb +1 -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: 6174a374d362e6eef62f59962119eb7b6aaf384e
|
4
|
+
data.tar.gz: 14df3e40231cf38544095c3385b327375eaa4759
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9216ed7953d333dc50fee64448f7c768c0e5779a8e37c8a574d8760ebe39465c17d0639dd95218d5b8c5ccccc3c02d1417122b73547fb451e0ffe29fbd0d72ff
|
7
|
+
data.tar.gz: f2bcf82f2de77686c8fac0b01cc26a14c39938ba619fbfcae0634dab5607eb8d7db2dc8979044740ef48f990fb7df7ce180d28d829e23b2e117dc1c67b62b56c
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.2.1
|
4
|
+
|
5
|
+
###### Bug fixes
|
6
|
+
|
7
|
+
* Fix reporers crash by default ld warning implementation
|
8
|
+
| [iKiKi](https://github.com/iKiKi)
|
9
|
+
| [#187](https://github.com/supermarin/xcpretty/pull/187)
|
10
|
+
|
11
|
+
|
3
12
|
## 0.2.0
|
4
13
|
|
5
14
|
###### Enhancements
|
@@ -78,7 +87,7 @@
|
|
78
87
|
| [Piet Brauer](https://github.com/pietbrauer)
|
79
88
|
| [#128](https://github.com/supermarin/xcpretty/pull/128)
|
80
89
|
* Support for `oclint v0.9dev` json-compilation-database
|
81
|
-
| [
|
90
|
+
| [iKiKi](https://github.com/iKiKi)
|
82
91
|
| [#121](https://github.com/supermarin/xcpretty/pull/121)
|
83
92
|
* Syntax highlighting for other languages than Objc (Swift, C++, Objc++, Dylan, Ruby)
|
84
93
|
| [#110](https://github.com/supermarin/xcpretty/pull/110)
|
data/README.md
CHANGED
@@ -14,7 +14,7 @@ $ gem install xcpretty
|
|
14
14
|
|
15
15
|
## Usage
|
16
16
|
``` bash
|
17
|
-
$ xcodebuild [flags] | xcpretty
|
17
|
+
$ xcodebuild [flags] | xcpretty
|
18
18
|
```
|
19
19
|
`xcpretty` is designed to be piped with `xcodebuild` and thus keeping 100%
|
20
20
|
compatibility with it. It's even a bit faster than `xcodebuild` itself, since
|
@@ -25,11 +25,11 @@ may want to exit with same status code as `xcodebuild`.
|
|
25
25
|
CI systems usually use status codes to determine if the build has failed.
|
26
26
|
|
27
27
|
``` bash
|
28
|
-
$ set -o pipefail && xcodebuild [flags] | xcpretty
|
28
|
+
$ set -o pipefail && xcodebuild [flags] | xcpretty
|
29
29
|
#
|
30
30
|
# OR
|
31
31
|
#
|
32
|
-
$ xcodebuild [flags] | xcpretty
|
32
|
+
$ xcodebuild [flags] | xcpretty && exit ${PIPESTATUS[0]}
|
33
33
|
```
|
34
34
|
|
35
35
|
## Raw xcodebuild output
|
@@ -40,16 +40,11 @@ output.
|
|
40
40
|
|
41
41
|
Here's a way of doing it:
|
42
42
|
``` bash
|
43
|
-
$ xcodebuild [flags] | tee xcodebuild.log | xcpretty
|
43
|
+
$ xcodebuild [flags] | tee xcodebuild.log | xcpretty
|
44
44
|
```
|
45
45
|
|
46
46
|
## Formats
|
47
47
|
|
48
|
-
- `--[no-]color`: Show build icons in color. (you can add it to `--simple` or `--test` format).
|
49
|
-
Defaults to auto-detecting color availability.
|
50
|
-
- `--[no-]utf`: Use unicode characters in build output or only ASCII.
|
51
|
-
Defaults to auto-detecting the current locale
|
52
|
-
|
53
48
|
- `--simple`, `-s` (default)
|
54
49
|

|
55
50
|
|
@@ -58,6 +53,12 @@ $ xcodebuild [flags] | tee xcodebuild.log | xcpretty -c
|
|
58
53
|
- `--tap` ([Test Anything Protocol](http://testanything.org)-compatible output)
|
59
54
|
- `--knock`, `-k` (a [simplified version](https://github.com/chneukirchen/knock) of the Test Anything Protocol)
|
60
55
|
|
56
|
+
## ANSI / UTF-8
|
57
|
+
|
58
|
+
- `--[no-]color`: Show build icons in color. (you can add it to `--simple` or `--test` format).
|
59
|
+
Defaults to auto-detecting color availability.
|
60
|
+
- `--[no-]utf`: Use unicode characters in build output or only ASCII.
|
61
|
+
Defaults to auto-detecting the current locale.
|
61
62
|
|
62
63
|
## Reporters
|
63
64
|
|
data/Rakefile
CHANGED
@@ -18,4 +18,9 @@ Feature: Create a JSON compilation database
|
|
18
18
|
|
19
19
|
Scenario: Writing to multiple custom file paths
|
20
20
|
When I pipe to xcpretty with two custom "json-compilation-database" report paths
|
21
|
-
Then I should have JSON compilation databases in two custom paths
|
21
|
+
Then I should have JSON compilation databases in two custom paths
|
22
|
+
|
23
|
+
Scenario: A project with dependencies with no .pch file
|
24
|
+
Given some big input
|
25
|
+
When I pipe to xcpretty with "--report json-compilation-database" and specify a custom path
|
26
|
+
Then entries with a command shouldn't have malformed "-include" directives
|
@@ -35,3 +35,7 @@ Then(/^the JSON compilation database should be complete$/) do
|
|
35
35
|
entries.length.should == JSON_DB_FIXTURE_COMMAND_COUNT
|
36
36
|
end
|
37
37
|
|
38
|
+
Then(/^entries with a command shouldn't have malformed "-include" directives$/) do
|
39
|
+
entries = json_db.select { |entry| entry['command'].match(/-include\s+-/) }
|
40
|
+
entries.length.should == 0
|
41
|
+
end
|
data/lib/xcpretty/parser.rb
CHANGED
@@ -129,7 +129,7 @@ module XCPretty
|
|
129
129
|
|
130
130
|
# @regex Captured groups
|
131
131
|
# $1 = script_name
|
132
|
-
PHASE_SCRIPT_EXECUTION_MATCHER = /^PhaseScriptExecution\s(
|
132
|
+
PHASE_SCRIPT_EXECUTION_MATCHER = /^PhaseScriptExecution\s((\\\ |\S)*)\s/
|
133
133
|
|
134
134
|
# @regex Captured groups
|
135
135
|
# $1 = file
|
@@ -39,7 +39,10 @@ module XCPretty
|
|
39
39
|
def format_compile_command(compiler_command, file_path)
|
40
40
|
directory = file_path.gsub("#{@current_path}", '').gsub(/\/$/, '')
|
41
41
|
directory = '/' if directory.empty?
|
42
|
-
|
42
|
+
|
43
|
+
cmd = compiler_command
|
44
|
+
cmd = cmd.gsub(/(\-include)\s.*\.pch/, "\\1 #{@pch_path}") if @pch_path
|
45
|
+
|
43
46
|
@compilation_units << {command: cmd,
|
44
47
|
file: @current_path,
|
45
48
|
directory: directory}
|
data/lib/xcpretty/version.rb
CHANGED
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.2
|
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-
|
12
|
+
date: 2015-12-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rouge
|