xcpretty-teamcity-formatter 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +47 -0
- data/bin/xcpretty-teamcity-formatter +3 -0
- data/lib/teamcity_formatter.rb +53 -0
- metadata +98 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 026cf96baf1892b1a91e861aedde9525cc958c04
|
4
|
+
data.tar.gz: 81e63bd6d6d0e698457dd294def758719d50105e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8b8fcf41df2e76c5656f68790ad840552f968ac4db136bbe4d4a00a259408b6202e20b30380d06132a7ab5d50f5ae5e363a9b73b1be91f07bf5483133e489e22
|
7
|
+
data.tar.gz: 80c8eb61ae523a0d8b9f880fd411d0bf1b29ebac3b2ac8eceb3da4517436991fca7e8e000cda45d15c3c923c58c43e0d230e55b196fb647e27f37cf117c2ec3d
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 XAPPmedia
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
# xcpretty-teamcity-formatter
|
2
|
+
|
3
|
+
Custom formatter for [xcpretty](https://github.com/supermarin/xcpretty) for use with TeamCity. This formatter takes advantage of the [TeamCity reporting messages](https://confluence.jetbrains.com/display/TCDL/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-reportingMessagesForBuildLogReportingMessagesForBuildLog) to report build steps and test results.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'xcpretty-teamcity-formatter'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install xcpretty-teamcity-formatter
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
```
|
24
|
+
#!/bin/bash
|
25
|
+
|
26
|
+
xcodebuild [flags] | xcpretty -f `xcpretty-travis-formatter`
|
27
|
+
```
|
28
|
+
|
29
|
+
## Development
|
30
|
+
|
31
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
32
|
+
|
33
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
34
|
+
|
35
|
+
## Contributing
|
36
|
+
|
37
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/xcpretty-teamcity-formatter. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
38
|
+
|
39
|
+
## License
|
40
|
+
|
41
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
42
|
+
|
43
|
+
## Resources
|
44
|
+
|
45
|
+
* [TeamCity: Reporting Test Results](https://confluence.jetbrains.com/display/TCDL/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ReportingTests)
|
46
|
+
* [xcpretty formatter class](https://github.com/supermarin/xcpretty/blob/master/lib/xcpretty/formatters/formatter.rb)
|
47
|
+
* [xcpretty-travis-formatter](https://github.com/kattrali/xcpretty-travis-formatter)
|
@@ -0,0 +1,53 @@
|
|
1
|
+
|
2
|
+
class TeamCityFormatter < XCPretty::Simple
|
3
|
+
|
4
|
+
def format_test_run_started(name)
|
5
|
+
"##teamcity[testSuiteStarted name='#{name}']"
|
6
|
+
end
|
7
|
+
|
8
|
+
def format_test_run_finished(name, time)
|
9
|
+
"##teamcity[testFinished name='#{name}']"
|
10
|
+
end
|
11
|
+
|
12
|
+
def format_test_suite_started(name)
|
13
|
+
"##teamcity[testSuiteStarted name='#{name}']"
|
14
|
+
end
|
15
|
+
|
16
|
+
def format_passing_test(suite, test, time)
|
17
|
+
"##teamcity[testStarted name='#{test}']\n" +
|
18
|
+
"##teamcity[testFinished name='#{test}' duration='#{time}']"
|
19
|
+
end
|
20
|
+
|
21
|
+
def format_error(message)
|
22
|
+
"##teamcity[testStdErr name='className.testName' out='#{message}']"
|
23
|
+
end
|
24
|
+
|
25
|
+
def format_failing_test(suite, test, time, file_path)
|
26
|
+
"##teamcity[testStarted name='#{test}']\n" +
|
27
|
+
"##teamcity[testFailed name='#{test}' message='#{time}']\n" +
|
28
|
+
"##teamcity[testFinished name='#{test}']"
|
29
|
+
end
|
30
|
+
|
31
|
+
def format_check_dependencies()
|
32
|
+
"##teamcity[progressMessage 'Check dependencies']"
|
33
|
+
end
|
34
|
+
|
35
|
+
def format_build_target(target, project, configuration)
|
36
|
+
"##teamcity[progressMessage 'Building #{target}']"
|
37
|
+
end
|
38
|
+
|
39
|
+
def format_compile(file_name, file_path)
|
40
|
+
"##teamcity[progressMessage 'Compiling #{file_name}'"
|
41
|
+
end
|
42
|
+
|
43
|
+
def format_touch(file_path, file_name)
|
44
|
+
"##teamcity[progressMessage 'Touching #{file_name}'"
|
45
|
+
end
|
46
|
+
|
47
|
+
def format_phase_success(phase_name)
|
48
|
+
"##teamcity[progressMessage '#{phase_name} Success'"
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
|
53
|
+
TeamCityFormatter
|
metadata
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: xcpretty-teamcity-formatter
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Michael Myers
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-02-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: xcpretty
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.2'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.0.7
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.2'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 0.0.7
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: bundler
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.10'
|
40
|
+
type: :development
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '1.10'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rake
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '10.0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '10.0'
|
61
|
+
description: Report build status and test results from xcodebuild directly to TeamCity
|
62
|
+
with xcpretty and the xcpretty-teamcity-formatter.
|
63
|
+
email:
|
64
|
+
- mmm@xappmedia.com
|
65
|
+
executables:
|
66
|
+
- xcpretty-teamcity-formatter
|
67
|
+
extensions: []
|
68
|
+
extra_rdoc_files: []
|
69
|
+
files:
|
70
|
+
- LICENSE.txt
|
71
|
+
- README.md
|
72
|
+
- bin/xcpretty-teamcity-formatter
|
73
|
+
- lib/teamcity_formatter.rb
|
74
|
+
homepage: https://github.com/XappMedia/xcpretty-teamcity-formatter.git
|
75
|
+
licenses:
|
76
|
+
- MIT
|
77
|
+
metadata: {}
|
78
|
+
post_install_message:
|
79
|
+
rdoc_options: []
|
80
|
+
require_paths:
|
81
|
+
- lib
|
82
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
requirements: []
|
93
|
+
rubyforge_project:
|
94
|
+
rubygems_version: 2.4.5.1
|
95
|
+
signing_key:
|
96
|
+
specification_version: 4
|
97
|
+
summary: TeamCity formatter for xcpretty.
|
98
|
+
test_files: []
|