slather 1.8.1 → 1.8.3
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 +9 -1
- data/README.md +5 -6
- data/bin/slather +4 -1
- data/lib/slather/coverage_service/coveralls.rb +41 -1
- data/lib/slather/project.rb +1 -1
- data/lib/slather/version.rb +1 -1
- data/slather.gemspec +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f112ecdd585fc0e1ec5d2a20e10b9ab38a3a355
|
4
|
+
data.tar.gz: a10bcd0d9036bb4e66ca5dd91cf6d874ca667b6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46cf336e773f273f6e0ac10131028725f6a5d908dd86315d7615c89bdc9d2a113d4cb271bb1ba511626300c7d952c995284cbd2671a1527c26ff0cc5c44e8090
|
7
|
+
data.tar.gz: fc30e49d6dbd3c0589830aa80ef8d0942f17574b5fb4c57ec0bfaa611e09a62eb79e626557031ce09fba11c79407bfa97734991dd78309452fb87c9e7af6d256
|
data/CHANGELOG.md
CHANGED
@@ -2,9 +2,17 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
+
## v1.8.2
|
6
|
+
* Add buildkite support to coveralls
|
7
|
+
[David Hardiman](https://github.com/dhardiman)
|
8
|
+
[#98](https://github.com/venmo/slather/pull/98)
|
9
|
+
* Update to xcodeproj 0.28.0 to avoid collisions with Cocoapods 0.39.0
|
10
|
+
[Julian Krumow](https://github.com/tarbrain)
|
11
|
+
[#106](https://github.com/venmo/slather/pull/106)/[#109](https://github.com/venmo/slather/pull/109)
|
12
|
+
|
5
13
|
## v1.8.1
|
6
14
|
* Fixed dependency conflict with CocoaPods v0.38
|
7
|
-
* Updated usage of cocoapods plugin API since it has changed in v0.38
|
15
|
+
* Updated usage of cocoapods plugin API since it has changed in v0.38
|
8
16
|
[Julian Krumow](https://github.com/tarbrain)
|
9
17
|
[#95](https://github.com/venmo/slather/pull/95)
|
10
18
|
|
data/README.md
CHANGED
@@ -14,7 +14,6 @@ Generate test coverage reports for Xcode projects & hook it into CI.
|
|
14
14
|
| ------- |:--------:|
|
15
15
|
| [Parsimmon](https://github.com/ayanonagon/Parsimmon) | [](https://coveralls.io/r/ayanonagon/Parsimmon?branch=master) |
|
16
16
|
| [VENCore](https://github.com/venmo/VENCore) | [](https://coveralls.io/r/venmo/VENCore?branch=master) |
|
17
|
-
| [CGFloatType](https://github.com/kylef/CGFloatType) | [](https://coveralls.io/r/kylef/CGFloatType?branch=master) |
|
18
17
|
| [DAZABTest](https://github.com/dasmer/DAZABTest) | [](https://coveralls.io/r/dasmer/DAZABTest?branch=master) |
|
19
18
|
| [TBStateMachine](https://github.com/tarbrain/TBStateMachine) | [](https://coveralls.io/r/tarbrain/TBStateMachine?branch=master) |
|
20
19
|
|
@@ -76,7 +75,7 @@ before_install: rvm use $RVM_RUBY_VERSION
|
|
76
75
|
install: bundle install --without=documentation --path ../travis_bundle_dir
|
77
76
|
after_success:
|
78
77
|
- slather
|
79
|
-
- bash <(curl -s https://codecov.io/bash)
|
78
|
+
- bash <(curl -s https://codecov.io/bash) -f path/to/xml_report/cobertura.xml
|
80
79
|
```
|
81
80
|
|
82
81
|
```yml
|
@@ -162,13 +161,13 @@ $ slather coverage -x --output-directory path/to/xml_report
|
|
162
161
|
|
163
162
|
### Static HTML
|
164
163
|
|
165
|
-
To create a report as static html pages, use the command line options `--html
|
164
|
+
To create a report as static html pages, use the command line options `--html`:
|
166
165
|
|
167
166
|
```sh
|
168
|
-
$ slather coverage
|
167
|
+
$ slather coverage --html path/to/project.xcodeproj
|
169
168
|
```
|
170
169
|
|
171
|
-
This will make a directory
|
170
|
+
This will make a directory named `html` in your root directory (unless `--output-directory` is specified) and will generate all the reports as static html pages inside the directory. It will print out the report's path by default, but you can also specify `--show` flag to open it in your browser automatically.
|
172
171
|
|
173
172
|
### Coverage for code included via CocoaPods
|
174
173
|
|
@@ -203,5 +202,5 @@ Please make sure to follow our general coding style and add test coverage for ne
|
|
203
202
|
* [@tpoulos](https://github.com/tpoulos), the perfect logo.
|
204
203
|
* [@ayanonagon](https://github.com/ayanonagon) and [@kylef](https://github.com/kylef), feedback and testing.
|
205
204
|
* [@jhersh](https://github.com/jhersh), CircleCI support.
|
206
|
-
* [@ixnixnixn](https://github.com/ixnixnixn), html support.
|
207
205
|
* [@tarbrain](https://github.com/tarbrain), Cobertura support and bugfixing.
|
206
|
+
* [@ikhsan](https://github.com/ikhsan), html support.
|
data/bin/slather
CHANGED
@@ -14,12 +14,13 @@ Clamp do
|
|
14
14
|
option ["--travis", "-t"], :flag, "Indicate that the builds are running on Travis CI"
|
15
15
|
option ["--circleci"], :flag, "Indicate that the builds are running on CircleCI"
|
16
16
|
option ["--jenkins"], :flag, "Indicate that the builds are running on Jenkins"
|
17
|
+
option ["--buildkite"], :flag, "Indicate that the builds are running on Buildkite"
|
17
18
|
|
18
19
|
option ["--coveralls", "-c"], :flag, "Post coverage results to coveralls"
|
19
20
|
option ["--simple-output", "-s"], :flag, "Output coverage results to the terminal"
|
20
21
|
option ["--gutter-json", "-g"], :flag, "Output coverage results as Gutter JSON format"
|
21
22
|
option ["--cobertura-xml", "-x"], :flag, "Output coverage results as Cobertura XML format"
|
22
|
-
option ["--html"
|
23
|
+
option ["--html"], :flag, "Output coverage results as static html pages"
|
23
24
|
option ["--show"], :flag, "Indicate that the static html pages will open automatically"
|
24
25
|
|
25
26
|
option ["--build-directory", "-b"], "BUILD_DIRECTORY", "The directory where gcno files will be written to. Defaults to derived data."
|
@@ -65,6 +66,8 @@ Clamp do
|
|
65
66
|
project.ci_service = :circleci
|
66
67
|
elsif jenkins?
|
67
68
|
project.ci_service = :jenkins
|
69
|
+
elsif buildkite?
|
70
|
+
project.ci_service = :buildkite
|
68
71
|
end
|
69
72
|
end
|
70
73
|
|
@@ -37,6 +37,16 @@ module Slather
|
|
37
37
|
end
|
38
38
|
private :jenkins_branch_name
|
39
39
|
|
40
|
+
def buildkite_job_id
|
41
|
+
ENV['BUILDKITE_BUILD_NUMBER']
|
42
|
+
end
|
43
|
+
private :buildkite_job_id
|
44
|
+
|
45
|
+
def buildkite_pull_request
|
46
|
+
ENV['BUILDKITE_PULL_REQUEST']
|
47
|
+
end
|
48
|
+
private :buildkite_pull_request
|
49
|
+
|
40
50
|
def jenkins_git_info
|
41
51
|
{
|
42
52
|
head: {
|
@@ -66,6 +76,22 @@ module Slather
|
|
66
76
|
end
|
67
77
|
private :circleci_git_info
|
68
78
|
|
79
|
+
def buildkite_git_info
|
80
|
+
{
|
81
|
+
:head => {
|
82
|
+
:id => ENV['BUILDKITE_COMMIT'],
|
83
|
+
:author_name => (`git log --format=%an -n 1 HEAD`.chomp || ""),
|
84
|
+
:author_email => (`git log --format=%ae -n 1 HEAD`.chomp || ""),
|
85
|
+
:message => (`git log --format=%s -n 1 HEAD`.chomp || "")
|
86
|
+
},
|
87
|
+
:branch => ENV['BUILDKITE_BRANCH']
|
88
|
+
}
|
89
|
+
end
|
90
|
+
|
91
|
+
def buildkite_build_url
|
92
|
+
"https://buildkite.com/" + ENV['BUILDKITE_PROJECT_SLUG'] + "/builds/" + ENV['BUILDKITE_BUILD_NUMBER'] + "#"
|
93
|
+
end
|
94
|
+
|
69
95
|
def coveralls_coverage_data
|
70
96
|
if ci_service == :travis_ci || ci_service == :travis_pro
|
71
97
|
if travis_job_id
|
@@ -117,6 +143,20 @@ module Slather
|
|
117
143
|
else
|
118
144
|
raise StandardError, "Environment variable `BUILD_ID` not set. Is this running on a jenkins build?"
|
119
145
|
end
|
146
|
+
elsif ci_service == :buildkite
|
147
|
+
if buildkite_job_id
|
148
|
+
{
|
149
|
+
:service_job_id => buildkite_job_id,
|
150
|
+
:service_name => "buildkite",
|
151
|
+
:repo_token => coverage_access_token,
|
152
|
+
:source_files => coverage_files.map(&:as_json),
|
153
|
+
:git => buildkite_git_info,
|
154
|
+
:service_build_url => buildkite_build_url,
|
155
|
+
:service_pull_request => buildkite_pull_request
|
156
|
+
}.to_json
|
157
|
+
else
|
158
|
+
raise StandardError, "Environment variable `BUILDKITE_BUILD_NUMBER` not set. Is this running on a buildkite build?"
|
159
|
+
end
|
120
160
|
else
|
121
161
|
raise StandardError, "No support for ci named #{ci_service}"
|
122
162
|
end
|
@@ -143,4 +183,4 @@ module Slather
|
|
143
183
|
|
144
184
|
end
|
145
185
|
end
|
146
|
-
end
|
186
|
+
end
|
data/lib/slather/project.rb
CHANGED
@@ -47,7 +47,7 @@ module Slather
|
|
47
47
|
end.compact
|
48
48
|
|
49
49
|
if coverage_files.empty?
|
50
|
-
raise StandardError, "No coverage files found. Are you sure your project is setup for generating coverage files? Try `slather setup your/project.
|
50
|
+
raise StandardError, "No coverage files found. Are you sure your project is setup for generating coverage files? Try `slather setup your/project.xcodeproj`"
|
51
51
|
else
|
52
52
|
dedupe(coverage_files)
|
53
53
|
end
|
data/lib/slather/version.rb
CHANGED
data/slather.gemspec
CHANGED
@@ -22,11 +22,11 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_development_dependency "rake", "~> 10.3"
|
23
23
|
spec.add_development_dependency "rspec", "~> 2.14"
|
24
24
|
spec.add_development_dependency "pry", "~> 0.9"
|
25
|
-
spec.add_development_dependency "cocoapods", "~> 0.
|
25
|
+
spec.add_development_dependency "cocoapods", "~> 0.39.0"
|
26
26
|
spec.add_development_dependency "json_spec", "~> 1.1.4"
|
27
27
|
spec.add_development_dependency "equivalent-xml", "~> 0.5.1"
|
28
28
|
|
29
29
|
spec.add_dependency "clamp", "~> 0.6"
|
30
|
-
spec.add_dependency "xcodeproj", "~> 0.
|
30
|
+
spec.add_dependency "xcodeproj", "~> 0.28.0"
|
31
31
|
spec.add_dependency "nokogiri", "~> 1.6.3"
|
32
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slather
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Larsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: 0.39.0
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.
|
96
|
+
version: 0.39.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: json_spec
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.
|
145
|
+
version: 0.28.0
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.
|
152
|
+
version: 0.28.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: nokogiri
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|