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,14 +1,9 @@
|
||||
require "rails_helper"
|
||||
require "tmpdir"
|
||||
|
||||
# The access seam, from both sides: what the catalog says about a title, and whether an
|
||||
# artifact is handed over. The load-bearing case is the *default* one — a catalog with
|
||||
# no policy configured has to behave exactly as it did before this existed.
|
||||
RSpec.describe "The access policy" do
|
||||
let(:tmpdir) { Dir.mktmpdir }
|
||||
|
||||
# A policy that gates everything except what the subject is named after. Small enough
|
||||
# to read, and it exercises every method of the contract.
|
||||
let(:gating_policy) do
|
||||
Class.new do
|
||||
def initialize(open_name) = @open_name = open_name
|
||||
@@ -153,8 +148,6 @@ RSpec.describe "The access policy" do
|
||||
|
||||
before { allow(WarpEngine.config).to receive(:access_policy).and_return(broken_policy) }
|
||||
|
||||
# The direction of the failure is the point. A broken gatekeeper must not become an
|
||||
# open one: an empty catalog is recoverable, a paid title given away is not.
|
||||
it "empties the catalog rather than leaking it" do
|
||||
create(:software, status: "released")
|
||||
|
||||
|
||||
@@ -64,8 +64,6 @@ RSpec.describe WarpEngine::PublishService do
|
||||
allow(WarpEngine::Platforms::Tic80::Service).to receive(:new).and_return(mock_service)
|
||||
end
|
||||
|
||||
# The host reacts to a new build through this event instead of hanging a
|
||||
# callback on the Release model.
|
||||
it "emits warp_engine.publish with the release in the payload" do
|
||||
payloads = []
|
||||
ActiveSupport::Notifications.subscribe(described_class::NOTIFICATION) do |*, payload|
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
require "rails_helper"
|
||||
require "tmpdir"
|
||||
|
||||
# The serving side (FileService, DownloadService) goes through the storage
|
||||
# adapter. With :local nothing changes; with a custom adapter the same call
|
||||
# can hand back a redirect instead of a file.
|
||||
RSpec.describe "Serving through the storage adapter" do
|
||||
let(:tmpdir) { Dir.mktmpdir }
|
||||
|
||||
# Minimal adapter answering the documented contract.
|
||||
let(:signing_adapter) do
|
||||
Class.new do
|
||||
def file?(_relative) = true
|
||||
|
||||
Reference in New Issue
Block a user