slather 2.7.1 → 2.7.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
  SHA256:
3
- metadata.gz: 82acbc5ecfb8610c49f39cdea2ff67387d30b3c41bf78c34095a59c7b572e802
4
- data.tar.gz: a1c830dddd4d52d8641665086ad6a63c294f00a7dd3370c7cd588c8c586db06e
3
+ metadata.gz: f178bd0539ca115a1da1191be8870c014198bfd19f0932e0c0aa4bbc4cde4ef4
4
+ data.tar.gz: e2e94ab2f8e93febbd583980e83bbf356a298b2e8f466a2a076b4ecd7ed1c969
5
5
  SHA512:
6
- metadata.gz: 239d29e6e221b6119be23af3dc92a7f28d4608dd71acf3f7ed03530953878ab42942903ed3f505a81051c3aa6903ba2a167b37867274b24ab7fc948b9006f08c
7
- data.tar.gz: c918c164b1da93699be34bef38291b3c43d3d43eb1d258919dc3de0bd84beb855a44318a8d6638d567543ddad7a2e647ca07a1fe12d14678b9c54bbde25a749a
6
+ metadata.gz: ffb1ae462f2f66a648f7353a327bfa42451f41bee1ffbd391f1de4089efa2a110908070e63b4a3aef4d55297afb10c615b2c4c173d135ec520522dc0ff3fb0fe
7
+ data.tar.gz: cf6c0763f817a72e9908cc899b22f03ca343016e29bdc696a87d04577836dd395fb8c975d2533a845ea649779b580aa9ba405125a026b7f6f993911c6e444497
data/.gitignore CHANGED
@@ -20,7 +20,7 @@ tmp
20
20
  *.o
21
21
  *.a
22
22
  mkmf.log
23
-
23
+ .vendor
24
24
  # Xcode
25
25
  #
26
26
  *.pbxuser
data/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v2.7.3
4
+
5
+ * Support Coveralls parallel runs
6
+ [paulz](https://github.com/paulz)
7
+ [#523](https://github.com/SlatherOrg/slather/pull/523)
8
+
9
+ * Update nokogiri version
10
+ [anil291987](https://github.com/anil291987)
11
+ [#518](https://github.com/SlatherOrg/slather/pull/518)
12
+ [#524](https://github.com/SlatherOrg/slather/pull/524)
13
+
14
+ ## v2.7.2
15
+
16
+ * Update xcodeproj version
17
+ [adamyanalunas](https://github.com/adamyanalunas)
18
+ [#502](https://github.com/SlatherOrg/slather/pull/502)
19
+
20
+ * Update nokogiri version
21
+ [jwelton](https://github.com/jwelton)
22
+ [#503](https://github.com/SlatherOrg/slather/pull/503)
23
+
24
+ * Support alternate CI systems in coveralls output
25
+ [fermoyadrop](https://github.com/fermoyadrop)
26
+ [#504](https://github.com/SlatherOrg/slather/pull/504)
27
+
28
+ * Add Bitrise support to coveralls output
29
+ [fermoyadrop](https://github.com/fermoyadrop)
30
+ [#504](https://github.com/SlatherOrg/slather/pull/505)
31
+
3
32
  ## v2.7.1
4
33
 
5
34
  * Support generating coverage for framework targets
@@ -30,7 +30,7 @@ class CoverageCommand < Clamp::Command
30
30
  option ["--scheme"], "SCHEME", "The scheme for which the coverage was generated"
31
31
  option ["--configuration"], "CONFIGURATION", "The configuration for test that the project was set"
32
32
  option ["--workspace"], "WORKSPACE", "The workspace that the project was built in"
33
- option ["--binary-file"], "BINARY_FILE", "The binary file against the which the coverage will be run", :multivalued => true
33
+ option ["--binary-file"], "BINARY_FILE", "The binary file against which the coverage will be run", :multivalued => true
34
34
  option ["--binary-basename"], "BINARY_BASENAME", "Basename of the file against which the coverage will be run", :multivalued => true
35
35
  option ["--arch"], "ARCH", "Architecture to use from universal binaries"
36
36
  option ["--source-files"], "SOURCE_FILES", "A Dir.glob compatible pattern used to limit the lookup to specific source files. Ignored in gcov mode.", :multivalued => true
@@ -41,6 +41,16 @@ module Slather
41
41
  end
42
42
  private :github_job_id
43
43
 
44
+ def bitrise_job_id
45
+ ENV['BITRISE_BUILD_NUMBER']
46
+ end
47
+ private :bitrise_job_id
48
+
49
+ def bitrise_pull_request
50
+ ENV['BITRISE_PULL_REQUEST']
51
+ end
52
+ private :bitrise_pull_request
53
+
44
54
  def github_pull_request
45
55
  ENV['CI_PULL_REQUEST'] || ""
46
56
  end
@@ -71,6 +81,11 @@ module Slather
71
81
  end
72
82
  private :github_branch_name
73
83
 
84
+ def bitrise_branch_name
85
+ ENV['BITRISE_GIT_BRANCH'] || `git ls-remote --heads origin | grep $(git rev-parse HEAD) | cut -d / -f 3-`.chomp
86
+ end
87
+ private :bitrise_branch_name
88
+
74
89
  def buildkite_job_id
75
90
  ENV['BUILDKITE_BUILD_NUMBER']
76
91
  end
@@ -151,16 +166,39 @@ module Slather
151
166
  end
152
167
  private :github_git_info
153
168
 
169
+ def bitrise_git_info
170
+ {
171
+ :head => {
172
+ :id => ENV['BITRISE_GIT_COMMIT'],
173
+ :committer_name => (ENV['GIT_CLONE_COMMIT_AUTHOR_NAME'] || `git log --format=%an -n 1 HEAD`.chomp || ""),
174
+ :committer_email => (ENV['GIT_CLONE_COMMIT_AUTHOR_EMAIL'] || `git log --format=%ae -n 1 HEAD`.chomp || ""),
175
+ :message => (ENV['BITRISE_GIT_MESSAGE'] || `git log --format=%s -n 1 HEAD`.chomp || "")
176
+ },
177
+ :branch => bitrise_branch_name
178
+ }
179
+ end
180
+ private :bitrise_git_info
181
+
154
182
  def github_build_url
155
183
  "https://github.com/" + ENV['GITHUB_REPOSITORY'] + "/actions/runs/" + ENV['GITHUB_RUN_ID']
156
184
  end
157
185
  private :github_build_url
158
186
 
187
+ def is_parallel
188
+ ENV['IS_PARALLEL'] != nil
189
+ end
190
+ private :is_parallel
191
+
192
+ def github_job_name
193
+ ENV['GITHUB_JOB']
194
+ end
195
+ private :github_job_name
196
+
159
197
  def coveralls_coverage_data
160
198
  if ci_service == :travis_ci || ci_service == :travis_pro
161
199
  if travis_job_id
162
200
  if ci_service == :travis_ci
163
-
201
+
164
202
  if coverage_access_token.to_s.strip.length > 0
165
203
  raise StandardError, "Access token is set. Uploading coverage data for public repositories doesn't require an access token."
166
204
  end
@@ -170,7 +208,7 @@ module Slather
170
208
  :service_name => "travis-ci",
171
209
  :source_files => coverage_files.map(&:as_json)
172
210
  }.to_json
173
- elsif ci_service == :travis_pro
211
+ elsif ci_service == :travis_pro
174
212
 
175
213
  if coverage_access_token.to_s.strip.length == 0
176
214
  raise StandardError, "Access token is not set. Uploading coverage data for private repositories requires an access token."
@@ -258,13 +296,42 @@ module Slather
258
296
  :source_files => coverage_files.map(&:as_json),
259
297
  :service_build_url => github_build_url,
260
298
  :service_pull_request => github_pull_request,
261
- :git => github_git_info
299
+ :git => github_git_info,
300
+ :parallel => is_parallel,
301
+ :flag_name => github_job_name
262
302
  }.to_json
263
303
  else
264
304
  raise StandardError, "Environment variable `GITHUB_RUN_ID` not set. Is this running on github build?"
265
305
  end
306
+ elsif ci_service == :bitrise
307
+ {
308
+ :service_job_id => bitrise_job_id,
309
+ :service_name => 'bitrise',
310
+ :repo_token => coverage_access_token,
311
+ :source_files => coverage_files.map(&:as_json),
312
+ :service_pull_request => bitrise_pull_request,
313
+ :service_branch => bitrise_branch_name,
314
+ :git => bitrise_git_info
315
+ }.to_json
266
316
  else
267
- raise StandardError, "No support for ci named #{ci_service}"
317
+ {
318
+ :service_job_id => ENV['CI_BUILD_NUMBER'],
319
+ :service_name => ENV['CI_NAME'] || ci_service,
320
+ :repo_token => coverage_access_token,
321
+ :source_files => coverage_files.map(&:as_json),
322
+ :service_build_url => ENV['CI_BUILD_URL'],
323
+ :service_pull_request => ENV['CI_PULL_REQUEST'],
324
+ :service_branch => ENV['CI_BRANCH'],
325
+ :git => {
326
+ :head => {
327
+ :id => ENV['CI_COMMIT'],
328
+ :committer_name => (`git log --format=%an -n 1 HEAD`.chomp || ""),
329
+ :committer_email => (`git log --format=%ae -n 1 HEAD`.chomp || ""),
330
+ :message => (`git log --format=%s -n 1 HEAD`.chomp || "")
331
+ },
332
+ :branch => ENV['CI_BRANCH']
333
+ }
334
+ }.to_json
268
335
  end
269
336
  end
270
337
  private :coveralls_coverage_data
@@ -277,8 +344,8 @@ module Slather
277
344
 
278
345
  curl_result = `curl -s --form json_file=@#{f.path} #{coveralls_api_jobs_path}`
279
346
 
280
- if curl_result.is_a? String
281
- curl_result_json = JSON.parse(curl_result)
347
+ if curl_result.is_a? String
348
+ curl_result_json = JSON.parse(curl_result)
282
349
 
283
350
  if curl_result_json["error"]
284
351
  error_message = curl_result_json["message"]
@@ -375,7 +375,7 @@ module Slather
375
375
  end
376
376
 
377
377
  def configure_ci_service
378
- self.ci_service ||= (self.class.yml["ci_service"] || :travis_ci)
378
+ self.ci_service ||= (ENV["CI_SERVICE"] || self.class.yml["ci_service"] || :other)
379
379
  end
380
380
 
381
381
  def configure_input_format
@@ -1,3 +1,3 @@
1
1
  module Slather
2
- VERSION = '2.7.1' unless defined?(Slather::VERSION)
2
+ VERSION = '2.7.3' unless defined?(Slather::VERSION)
3
3
  end
data/slather.gemspec CHANGED
@@ -28,8 +28,8 @@ Gem::Specification.new do |spec|
28
28
  spec.add_development_dependency 'equivalent-xml', '~> 0.6'
29
29
 
30
30
  spec.add_dependency 'clamp', '~> 1.3'
31
- spec.add_dependency 'xcodeproj', '~> 1.7'
32
- spec.add_dependency 'nokogiri', '~> 1.11'
31
+ spec.add_dependency 'xcodeproj', '~> 1.21'
32
+ spec.add_dependency 'nokogiri', '>= 1.13.9'
33
33
  spec.add_dependency 'CFPropertyList', '>= 2.2', '< 4'
34
34
 
35
35
  spec.add_runtime_dependency 'activesupport'
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: 2.7.1
4
+ version: 2.7.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: 2021-05-02 00:00:00.000000000 Z
11
+ date: 2022-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -156,28 +156,28 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '1.7'
159
+ version: '1.21'
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '1.7'
166
+ version: '1.21'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: nokogiri
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - "~>"
171
+ - - ">="
172
172
  - !ruby/object:Gem::Version
173
- version: '1.11'
173
+ version: 1.13.9
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - "~>"
178
+ - - ">="
179
179
  - !ruby/object:Gem::Version
180
- version: '1.11'
180
+ version: 1.13.9
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: CFPropertyList
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -341,7 +341,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
341
341
  - !ruby/object:Gem::Version
342
342
  version: '0'
343
343
  requirements: []
344
- rubygems_version: 3.1.3
344
+ rubygems_version: 3.2.22
345
345
  signing_key:
346
346
  specification_version: 4
347
347
  summary: Test coverage reports for Xcode projects