specbandit 1.3.0 → 1.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9934a98dc6ad0d278306da5cb4fdc818f56dceee9118e8581b49393f9d26150
4
- data.tar.gz: a783e737d7d478397c689e82952c8c6c67e0fbab71c4ddc3ccb6ea34fee2e8b6
3
+ metadata.gz: df38ee5f158f484e5e0952106172f864957d6a97af3ec73b7ce6c4214d264638
4
+ data.tar.gz: 39e6ad3ffc12353dca6f72f1286fdea1c4646349d5e230a3b926ce313ebf8bd4
5
5
  SHA512:
6
- metadata.gz: 5ab66609668cfd0d41cab6c243d94268da69f4659f9640f2391707dc74381e3566c459a6646010bc7c2197c7552c3818e78d4b066ba7c9f5e7727da2e0ffe50d
7
- data.tar.gz: f352d8beb6637eabd22b3e11c0d2c62bce44498ba5da20bdd050785b4588913ecdbb9dfe53c799471bd7b75b9e74722e1efb6f4aeb89e6f9779beb4cbb149f35
6
+ metadata.gz: 1c6969d9d69d6bb39ef3554c542681b9bffe4d77e78829180ecf85fa41560f2c2e07789fd0bff31dd628f15045aa8ce64d33f091798afdcc9cf8aa15abcfb04d
7
+ data.tar.gz: 5c9ab6cc2373c70daf21f040c5049013d5fd958c86ab06ef9a59f82326684eddc398f30233ff661359974aa6b7f614a0ee7d05551e503285c058215294d44f07
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Specbandit
4
- VERSION = '1.3.0'
4
+ VERSION = '1.3.1'
5
5
  end
@@ -240,7 +240,7 @@ module Specbandit
240
240
  data = JSON.parse(File.read(result.json_path))
241
241
  failed = data.fetch('examples', [])
242
242
  .select { |e| e['status'] == 'failed' }
243
- .filter_map { |e| e['file_path'] }
243
+ .filter_map { |e| spec_file_of(e) }
244
244
  .uniq
245
245
 
246
246
  failed.empty? ? nil : failed
@@ -248,6 +248,17 @@ module Specbandit
248
248
  nil
249
249
  end
250
250
 
251
+ # The spec file that defines an example's top-level group. RSpec's `file_path`
252
+ # is where the example block is written, which for shared examples is the
253
+ # support file: retrying that file runs zero examples and passes. The example
254
+ # `id` is `<rerun file>[<scoped id>]`, and its file is always the loaded spec.
255
+ def spec_file_of(example)
256
+ id = example['id']
257
+ return example['file_path'] unless id
258
+
259
+ id.sub(/\[[\d:]+\]\z/, '')
260
+ end
261
+
251
262
  # Process a BatchResult: store it, and for RSpec batches,
252
263
  # read the JSON output for rich reporting.
253
264
  def process_batch_result(result)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specbandit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ferran Basora
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  requirements: []
112
- rubygems_version: 4.0.16
112
+ rubygems_version: 4.0.20
113
113
  specification_version: 4
114
114
  summary: Distributed test runner using Redis as a work queue
115
115
  test_files: []