specbandit 0.1.0 → 0.4.0

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: bc3e7d15445689d7dfb61865891f47958e87c89cf65052b7351c4ec788bec5d2
4
- data.tar.gz: 2b54637983a2e0cac8beb4d4521d0f7722819a0ef211b5089dc51915275c26e8
3
+ metadata.gz: 71f7dd0be00bb60fb8a8c09864f1f3a2545edea4e31efe8436065ef621bd0bac
4
+ data.tar.gz: ec658ea6137ada721f37e2a1d31acffc1eba290045e58c83ab3e6dc80afe251d
5
5
  SHA512:
6
- metadata.gz: 3268930d24a06356a28c8fe472a180d8ae0a84c4cd1ee7fbf33e9ae36f2cfe5b34d2d86746c1a165e7a284e0e2ba731f52036210198d1073da96cf5313a9ec89
7
- data.tar.gz: 22bd3603d6038e55d8540fc1a155182e71dfe95bdb21328a3c369e677185931a4fe9427b5d12286dcf2113f492323c199c97577fac8691f3e5bcbbc94f8f9ef7
6
+ metadata.gz: 0a9425785bbfb9a5fcad00c7cbd8c19c9050dbbd141d69c76e258fc0318105910378ef0bce4080a7af5963c8a3653ff6415666c6d920b56067acbd4f09ed4425
7
+ data.tar.gz: 685376873d376c2f7763859b9c5c4d55dd2194684668386bf2cb6b0749baa1f59d9e0c00224b686ba8721c5e71afb1fd2814c86cad297f90f3a711c7c1dd0207
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'io/wait'
4
+
3
5
  module Specbandit
4
6
  class Publisher
5
7
  attr_reader :queue, :key, :key_ttl, :output
@@ -32,8 +34,11 @@ module Specbandit
32
34
  private
33
35
 
34
36
  def resolve_files(files:, pattern:)
35
- # Priority 1: stdin (if not a TTY)
36
- return $stdin.each_line.map(&:strip).reject(&:empty?) unless $stdin.tty?
37
+ # Priority 1: stdin (only when data is actually piped in)
38
+ if !$stdin.tty? && $stdin.ready?
39
+ stdin_files = $stdin.each_line.map(&:strip).reject(&:empty?)
40
+ return stdin_files if stdin_files.any?
41
+ end
37
42
 
38
43
  # Priority 2: --pattern flag (Dir.glob in Ruby, no shell expansion)
39
44
  return Dir.glob(pattern).sort if pattern && !pattern.empty?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Specbandit
4
- VERSION = '0.1.0'
4
+ VERSION = '0.4.0'
5
5
  end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'stringio'
3
4
  require 'rspec/core'
4
5
 
5
6
  module Specbandit
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specbandit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ferran Basora
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2026-04-08 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: redis
@@ -75,7 +74,6 @@ dependencies:
75
74
  description: A work-stealing distributed RSpec runner. Push spec file paths to a Redis
76
75
  list, then multiple CI runners atomically steal batches and execute them in-process
77
76
  via RSpec::Core::Runner.
78
- email:
79
77
  executables:
80
78
  - specbandit
81
79
  extensions: []
@@ -94,7 +92,6 @@ homepage: https://github.com/factorialco/specbandit
94
92
  licenses:
95
93
  - MIT
96
94
  metadata: {}
97
- post_install_message:
98
95
  rdoc_options: []
99
96
  require_paths:
100
97
  - lib
@@ -109,8 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
106
  - !ruby/object:Gem::Version
110
107
  version: '0'
111
108
  requirements: []
112
- rubygems_version: 3.5.16
113
- signing_key:
109
+ rubygems_version: 4.0.6
114
110
  specification_version: 4
115
111
  summary: Distributed RSpec runner using Redis as a work queue
116
112
  test_files: []