rspec-turbo 0.1.1 → 0.1.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 +16 -0
- data/lib/rspec_turbo/db_setup.rb +8 -1
- data/lib/rspec_turbo/progress_reporter.rb +20 -2
- data/lib/rspec_turbo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 455e548802384d8f96139d09af290e9d76dcd5f7d3739669a77dfcb2ad55d2bd
|
|
4
|
+
data.tar.gz: 916b2fade601b8cae5f6b46248b91ce6d4820ebe330f9dec7523657db52b0a99
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1459826357e5e9ac091511916c1c1c71af7d9af6687c660001e4e28f3ca18dbf7d259b943f9423be5a95e096c9be4395f2caaa04125b431c03a2fb141ae5595f
|
|
7
|
+
data.tar.gz: 05be1a74d923db34f516992994a8388c9311c55b2e0bc6897bbe57325a502fcfb8fd8e2b2f775031c1040809ca1d8bb25641c7b55cba8ad97c40521f5fe58cc5
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.3] - 2026-06-12
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- Live progress counter stuck at zero on some projects: the per-worker reporter
|
|
7
|
+
now registers the three terminal notifications (`:example_passed`,
|
|
8
|
+
`:example_failed`, `:example_pending`) instead of `:example_finished`, which
|
|
9
|
+
older rspec-core versions don't dispatch to formatters. Mirrors the built-in
|
|
10
|
+
progress formatter, so it counts everywhere.
|
|
11
|
+
|
|
12
|
+
## [0.1.2] - 2026-06-12
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- `DbSetup` sets `DISABLE_DATABASE_ENVIRONMENT_CHECK=1`, so `db:drop` no longer
|
|
16
|
+
fails with `ActiveRecord::NoEnvironmentInSchemaError` on databases missing
|
|
17
|
+
environment metadata (the production guard is irrelevant for the test DBs).
|
|
18
|
+
|
|
3
19
|
## [0.1.1] - 2026-06-12
|
|
4
20
|
|
|
5
21
|
### Added
|
data/lib/rspec_turbo/db_setup.rb
CHANGED
|
@@ -39,7 +39,14 @@ module RSpecTurbo
|
|
|
39
39
|
(1..@n).map do |slot|
|
|
40
40
|
log = Config.setup_log_path(slot)
|
|
41
41
|
pid = Process.spawn(
|
|
42
|
-
{
|
|
42
|
+
{
|
|
43
|
+
"TEST_ENV_NUMBER" => slot.to_s,
|
|
44
|
+
"RAILS_ENV" => "test",
|
|
45
|
+
# db:drop runs db:check_protected_environments, which raises
|
|
46
|
+
# NoEnvironmentInSchemaError when a DB has no environment metadata.
|
|
47
|
+
# We always operate on the test DBs, so skip that production guard.
|
|
48
|
+
"DISABLE_DATABASE_ENVIRONMENT_CHECK" => "1"
|
|
49
|
+
},
|
|
43
50
|
*SETUP_COMMAND,
|
|
44
51
|
out: log, err: [:child, :out]
|
|
45
52
|
)
|
|
@@ -12,7 +12,11 @@ module RSpecTurbo
|
|
|
12
12
|
# be required by absolute path inside the spawned `rspec` process. The slowest
|
|
13
13
|
# files report is produced separately by slow_profile.rb.
|
|
14
14
|
class ProgressReporter < RSpec::Core::Formatters::BaseFormatter
|
|
15
|
-
|
|
15
|
+
# Register the three terminal notifications (exactly one fires per example)
|
|
16
|
+
# instead of :example_finished, which older rspec-core versions don't
|
|
17
|
+
# dispatch to formatters — that left the counter stuck at zero on some
|
|
18
|
+
# projects. This mirrors the built-in progress formatter.
|
|
19
|
+
RSpec::Core::Formatters.register self, :example_passed, :example_failed, :example_pending
|
|
16
20
|
|
|
17
21
|
def initialize(output)
|
|
18
22
|
super
|
|
@@ -20,7 +24,21 @@ module RSpecTurbo
|
|
|
20
24
|
@progress_file = ENV["RSPEC_TURBO_PROGRESS_FILE"]
|
|
21
25
|
end
|
|
22
26
|
|
|
23
|
-
def
|
|
27
|
+
def example_passed(_notification)
|
|
28
|
+
record
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def example_failed(_notification)
|
|
32
|
+
record
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def example_pending(_notification)
|
|
36
|
+
record
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
private
|
|
40
|
+
|
|
41
|
+
def record
|
|
24
42
|
@count += 1
|
|
25
43
|
return unless @progress_file
|
|
26
44
|
|
data/lib/rspec_turbo/version.rb
CHANGED