slather 1.8.1 → 1.8.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fac517dd878eb5bce60aab2496af9a66e559aa65
4
- data.tar.gz: e1738148431be3032b3071ff1401454d3eb1144c
3
+ metadata.gz: 4f112ecdd585fc0e1ec5d2a20e10b9ab38a3a355
4
+ data.tar.gz: a10bcd0d9036bb4e66ca5dd91cf6d874ca667b6e
5
5
  SHA512:
6
- metadata.gz: 076afcb5a6290f350808eb3d5e7f82ff140ef063f103c97dddca0a300f5ecca92a2ef7f3a4c35c6e9596860525a3da8692e12d97a3a506fc2a78a45fa7fed664
7
- data.tar.gz: 590e5c5eed3b6148b8baf39328de21cb9a2f3b2f5647d66ed207e33a3d0df917dbe7b480cdcd472bd0a473d750da9581972d5b96e344b4ee57d0a5aaa0bad209
6
+ metadata.gz: 46cf336e773f273f6e0ac10131028725f6a5d908dd86315d7615c89bdc9d2a113d4cb271bb1ba511626300c7d952c995284cbd2671a1527c26ff0cc5c44e8090
7
+ data.tar.gz: fc30e49d6dbd3c0589830aa80ef8d0942f17574b5fb4c57ec0bfaa611e09a62eb79e626557031ce09fba11c79407bfa97734991dd78309452fb87c9e7af6d256
@@ -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) | [![Parsimmon Coverage](https://coveralls.io/repos/ayanonagon/Parsimmon/badge.svg?branch=master)](https://coveralls.io/r/ayanonagon/Parsimmon?branch=master) |
16
16
  | [VENCore](https://github.com/venmo/VENCore) | [![VENCore Coverage](https://coveralls.io/repos/venmo/VENCore/badge.svg?branch=master)](https://coveralls.io/r/venmo/VENCore?branch=master) |
17
- | [CGFloatType](https://github.com/kylef/CGFloatType) | [![CGFloatType Coverage](https://coveralls.io/repos/kylef/CGFloatType/badge.svg?branch=master)](https://coveralls.io/r/kylef/CGFloatType?branch=master) |
18
17
  | [DAZABTest](https://github.com/dasmer/DAZABTest) | [![DAZABTest Coverage](https://coveralls.io/repos/dasmer/DAZABTest/badge.svg?branch=master)](https://coveralls.io/r/dasmer/DAZABTest?branch=master) |
19
18
  | [TBStateMachine](https://github.com/tarbrain/TBStateMachine) | [![TBStateMachine Coverage](https://coveralls.io/repos/tarbrain/TBStateMachine/badge.svg?branch=master)](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` or `-h`:
164
+ To create a report as static html pages, use the command line options `--html`:
166
165
 
167
166
  ```sh
168
- $ slather coverage -h path/to/project.xcodeproj
167
+ $ slather coverage --html path/to/project.xcodeproj
169
168
  ```
170
169
 
171
- This will make a directory called `html` in your directory (unless output directory is specified) and generate all the static html pages inside the 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.
@@ -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", "-h"], :flag, "Output coverage results as static html pages"
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
@@ -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.pbxproj`"
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
@@ -1,3 +1,3 @@
1
1
  module Slather
2
- VERSION = "1.8.1"
2
+ VERSION = "1.8.3"
3
3
  end
@@ -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.38.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.26.2"
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.1
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: 2015-08-04 00:00:00.000000000 Z
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.38.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.38.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.26.2
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.26.2
152
+ version: 0.28.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: nokogiri
155
155
  requirement: !ruby/object:Gem::Requirement