A kódbázis kommentek nélkül marad
Kérésre: minden magyarázó komment kikerült a forrásfájlokból — 89 Ruby, 16 TypeScript, 14 Vue, plusz a CSS/JS/CJS. Nem soralapú kereséssel: a Ruby-t a Ripper tokenizálta, a JS/TS/CSS-t állapotgép járta végig, hogy az URL-ekben, reguláris kifejezésekben és heredocokban álló // és # jelek helyükön maradjanak. Három komment maradt, mert nélkülük nem indul a kód: az entrypoint.sh shebangja, a vite-env.d.ts hármas perjeles referenciája, és a sanitize teszt @vitest-environment direktívája (ez utóbbi a magyarázó része nélkül). Egy helyen kódot is kellett írni: a CommandBlock másolás-hibaágán a komment volt a catch egyetlen tartalma, és üres blokkot az eslint nem enged — a copied jelző visszaállítása került a helyére. A yaml, Dockerfile, Makefile, erb és markdown fájlokat nem érintettem. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
require "rails_helper"
|
||||
|
||||
# Every response the engine serves carries the version that served it, so a client can
|
||||
# branch on the engine's age without asking a separate endpoint for it.
|
||||
RSpec.describe "the WarpEngine-Version header", type: :request do
|
||||
# The controller writes the name as a literal so that it cannot depend on a constant a
|
||||
# half-updated deploy might not have. This is what keeps the two in step.
|
||||
it "is the name the constant documents" do
|
||||
expect(WarpEngine::VERSION_HEADER).to eq("WarpEngine-Version")
|
||||
end
|
||||
@@ -18,9 +14,6 @@ RSpec.describe "the WarpEngine-Version header", type: :request do
|
||||
expect(response.headers["WarpEngine-Version"]).to eq(WarpEngine::VERSION)
|
||||
end
|
||||
|
||||
# The one a client needs most: something came back wrong, and it wants to know whether
|
||||
# the engine on the other end is old enough to explain it. `rescue_from` never reaches
|
||||
# an after_action, which is why the header is set before the action runs.
|
||||
it "is on an error response" do
|
||||
get "/api/image/999999"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user