fast_rspec 0.0.1 → 0.1.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 +4 -4
- data/ext/fast_rspec/fast_rspec.c +5 -0
- data/lib/fast_rspec/version.rb +1 -1
- metadata +8 -7
- data/CHANGELOG.md +0 -5
- data/README.md +0 -87
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 89972595b2b1bf0d615f933e08d13f4610a47350f1cedc320182e4d8c9246726
|
|
4
|
+
data.tar.gz: 6b135baca4189687626c93abe05491ec5b8e54a62677a2ceec1b51261e79c678
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d5f2322d62c3d77b1d4f0ddd01fd47e9c981cbd153b9d0c52945139bb3e34557835debdd083de6d27b3ea4dcef4eed8864eaf8a50e639904a52a7f525968f215
|
|
7
|
+
data.tar.gz: 22e91eef652cc1b7ec8d0657e578a2b8bb55b6063534deff22691bb66726e2fc226d01e52cf4822c11a88fb33cc63868bcd3088af84049aed91d3755948b201e
|
data/ext/fast_rspec/fast_rspec.c
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/* Ruby 3.2's ruby/internal/stdbool.h defines bool only when the installed ruby/config.h
|
|
2
|
+
carries HAVE_STDBOOL_H; the 3.2.11 build CI uses has only HAVE__BOOL, so bool/true/false
|
|
3
|
+
stay undefined and every Ruby header fails to compile. Ruby 3.3+ includes <stdbool.h>
|
|
4
|
+
itself — the 3.2 floor must not rely on it. */
|
|
5
|
+
#include <stdbool.h>
|
|
1
6
|
#include <ruby.h>
|
|
2
7
|
|
|
3
8
|
/* FastRspec::Native — measured hot paths only. Must match FastRspec::PureRuby byte for byte. */
|
data/lib/fast_rspec/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fast_rspec
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- developerz.ai
|
|
@@ -9,9 +9,11 @@ bindir: exe
|
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies: []
|
|
12
|
-
description:
|
|
13
|
-
database_cleaner, shoulda, capybara and simplecov
|
|
14
|
-
(fork on CRuby, threads on JRuby/TruffleRuby).
|
|
12
|
+
description: Design-phase scaffold. The target is one gem line that replaces rspec-rails,
|
|
13
|
+
factory_bot, faker, vcr, webmock, database_cleaner, shoulda, capybara and simplecov,
|
|
14
|
+
running in parallel on every core (fork on CRuby, threads on JRuby/TruffleRuby).
|
|
15
|
+
The framework frontends, parallel pool and batteries are planned milestones (docs/idea/11-roadmap.md),
|
|
16
|
+
not shipped.
|
|
15
17
|
email:
|
|
16
18
|
- admin@developerz.ai
|
|
17
19
|
executables:
|
|
@@ -20,9 +22,7 @@ extensions:
|
|
|
20
22
|
- ext/fast_rspec/extconf.rb
|
|
21
23
|
extra_rdoc_files: []
|
|
22
24
|
files:
|
|
23
|
-
- CHANGELOG.md
|
|
24
25
|
- LICENSE
|
|
25
|
-
- README.md
|
|
26
26
|
- exe/fast_rspec
|
|
27
27
|
- ext/fast_rspec/extconf.rb
|
|
28
28
|
- ext/fast_rspec/fast_rspec.c
|
|
@@ -57,5 +57,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
57
57
|
requirements: []
|
|
58
58
|
rubygems_version: 3.6.9
|
|
59
59
|
specification_version: 4
|
|
60
|
-
summary:
|
|
60
|
+
summary: 'Target: lean drop-in RSpec + Minitest on one parallel engine with the test
|
|
61
|
+
stack bundled (design phase; scaffold only).'
|
|
61
62
|
test_files: []
|
data/CHANGELOG.md
DELETED
data/README.md
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
# FastRspec
|
|
2
|
-
|
|
3
|
-
**One gem line. Your whole test stack. Every core.**
|
|
4
|
-
|
|
5
|
-
Drop-in replacement for RSpec **and** Minitest (including Rails' `ActiveSupport::TestCase`), rebuilt lean: same API, a fraction of the overhead. Runs in parallel on all cores by default, and ships with batteries included and auto-configured: factories, Faker, VCR, WebMock, database cleaning, shoulda, time helpers, Capybara and coverage. Works with Rails and with plain Ruby. Runs on CRuby, JRuby and TruffleRuby.
|
|
6
|
-
|
|
7
|
-
> **Status: design phase (2026-10).** Gem skeleton only, nothing is implemented yet. See [`docs/idea/`](docs/idea/00-seed.md).
|
|
8
|
-
|
|
9
|
-
## Install
|
|
10
|
-
|
|
11
|
-
```ruby
|
|
12
|
-
# Gemfile
|
|
13
|
-
group :development, :test do
|
|
14
|
-
gem 'fast_rspec'
|
|
15
|
-
end
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Then delete the gems it replaces:
|
|
19
|
-
|
|
20
|
-
```diff
|
|
21
|
-
- gem 'rspec'
|
|
22
|
-
- gem 'rspec-rails'
|
|
23
|
-
- gem 'factory_bot_rails'
|
|
24
|
-
- gem 'faker'
|
|
25
|
-
- gem 'vcr'
|
|
26
|
-
- gem 'webmock'
|
|
27
|
-
- gem 'database_cleaner-active_record'
|
|
28
|
-
- gem 'simplecov'
|
|
29
|
-
- gem 'minitest-reporters'
|
|
30
|
-
+ gem 'fast_rspec'
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Run
|
|
34
|
-
|
|
35
|
-
Your commands stay the same:
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
bundle exec rspec # all cores
|
|
39
|
-
bin/rails test # all cores; `parallelize` is handled for you
|
|
40
|
-
bundle exec rake test # plain Ruby + Minitest
|
|
41
|
-
bundle exec fast_rspec # auto-detects RSpec / Minitest / both
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
You don't need to change any spec, test, `spec_helper.rb`, `rails_helper.rb`, `test_helper.rb` or `test/support/**` file. If you already configured something yourself, your configuration wins.
|
|
45
|
-
|
|
46
|
-
## What's included
|
|
47
|
-
|
|
48
|
-
✅ = FastRspec's own lean implementation of the upstream API (zero runtime dependencies). 🔌 = keep the upstream gem in your Gemfile; FastRspec auto-configures it.
|
|
49
|
-
|
|
50
|
-
| Battery | Same API as | Auto-configured |
|
|
51
|
-
|---|---|---|
|
|
52
|
-
| 🧪 RSpec ✅ | rspec-core, -expectations, -mocks, -rails | `.rspec` honoured, type inference on Rails |
|
|
53
|
-
| 🧪 Minitest ✅ | minitest 5 + 6, `ActiveSupport::TestCase` | `parallelize` routed to our pool |
|
|
54
|
-
| 🏭 Factories ✅ | factory_bot (+ rails) | definitions found, `create`/`build` included |
|
|
55
|
-
| 🎲 Fake data ✅ | faker | deterministic per `--seed`, unique reset per test |
|
|
56
|
-
| 📼 HTTP ✅ | vcr + webmock | cassettes in `spec/cassettes` or `test/cassettes`, real net blocked, localhost allowed |
|
|
57
|
-
| 🧹 DB ✅ | transactional tests + database_cleaner | per-worker DB, cloned from a template |
|
|
58
|
-
| 🔍 Matchers 🔌 | shoulda-matchers / -context | integrated with the framework in use |
|
|
59
|
-
| ⏱️ Time 🔌 | ActiveSupport `TimeHelpers` | included everywhere |
|
|
60
|
-
| 🌐 System 🔌 | capybara + cuprite | headless Chrome, unique port per worker |
|
|
61
|
-
| 📊 Coverage ✅ | simplecov | merged across workers (`COVERAGE=1`) |
|
|
62
|
-
| 🔐 Auth / jobs 🔌 | Devise, Sidekiq / Wurk, ActiveJob | test helpers, fake/inline modes, per-worker Redis DB |
|
|
63
|
-
|
|
64
|
-
Turn any of them off:
|
|
65
|
-
|
|
66
|
-
```ruby
|
|
67
|
-
FastRspec.configure { |c| c.batteries.disable :vcr, :capybara }
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
## Parallelism
|
|
71
|
-
|
|
72
|
-
| Ruby | How it runs |
|
|
73
|
-
|---|---|
|
|
74
|
-
| CRuby | boots once, forks N workers (copy-on-write), work-stealing queue, C extension on hot paths |
|
|
75
|
-
| JRuby / TruffleRuby | a real parallel thread pool (no GVL), using the pure-Ruby implementation |
|
|
76
|
-
|
|
77
|
-
`N` is the number of cores by default. Use `FAST_RSPEC_WORKERS=4` to change it, or `-n 1` for a serial run. Each worker gets its own database, Redis DB, tmp dir and ports. When a test fails, you get a one-line command that reproduces it, including the seed and the worker's files.
|
|
78
|
-
|
|
79
|
-
## Docs
|
|
80
|
-
|
|
81
|
-
- [`docs/idea/`](docs/idea/00-seed.md): design and roadmap
|
|
82
|
-
- [`AGENTS.md`](AGENTS.md): conventions for contributors and AI agents
|
|
83
|
-
- [`llms.txt`](llms.txt): one-file reference for coding agents (target contract; status per milestone)
|
|
84
|
-
|
|
85
|
-
## License
|
|
86
|
-
|
|
87
|
-
MIT
|