From 7b4e7a1a2bdfc7fb650654d0a386a06c39653019 Mon Sep 17 00:00:00 2001 From: id774 Date: Sat, 5 Dec 2026 08:31:45 +0000 Subject: [PATCH] Use natural English in documentation and comments --- README.md | 2 +- lib/automatic/cli.rb | 17 ++++++++--------- lib/automatic/pipeline.rb | 10 ++++------ 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 927d594..09e3ff5 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ second user. The project began in February 2012 and this is the first release since 2015. The core, the Recipe format and the plugin contract are unchanged. What has changed is that it runs on a current Ruby, installs from a current RubyGems, and ships -a plugin set every part of which still has somewhere to talk to. See +a set of plugins that remain usable. See [`doc/VERSIONS`](doc/VERSIONS). ## 2. Features diff --git a/lib/automatic/cli.rb b/lib/automatic/cli.rb index 98dc599..bbb7b14 100644 --- a/lib/automatic/cli.rb +++ b/lib/automatic/cli.rb @@ -103,13 +103,11 @@ def usage(parser) EXIT_FAILURE end - # Automatic::OptionalDependencyError is one of the failures reported as a - # message here: a Recipe naming a plugin whose optional gem is not - # installed is an operator's mistake with an answer, and the answer is in - # the message rather than in a backtrace. A LoadError raised from inside a - # plugin's own load -- for a different, unrelated missing file -- is not - # this, and is left alone along with everything else the plugin itself - # raises. See doc/PLUGINS.md section 2.7. + # Report Automatic::OptionalDependencyError with an error message rather + # than a backtrace, so the operator can identify and install the missing + # optional gem required by a Recipe. A LoadError raised within a plugin + # because another file is missing is allowed to propagate, as are other + # exceptions raised by the plugin itself. See doc/PLUGINS.md section 2.7. def run_recipe(path) unless File.exist?(resolve_recipe(path)) @stderr.puts "automatic: no such recipe: #{path}" @@ -157,8 +155,9 @@ def missing_argument(name) # # `feedbag` is an optional dependency: two subcommands out of seven use it, # and neither running a Recipe nor any other subcommand does. It is - # required through Automatic.require_optional, so that not having it is a - # sentence rather than a backtrace. See doc/POLICY.md section 9.1. + # required through Automatic.require_optional so a missing dependency + # produces an error message instead of a backtrace. See doc/POLICY.md + # section 9.1. def subcommands { 'scaffold' => method(:scaffold), diff --git a/lib/automatic/pipeline.rb b/lib/automatic/pipeline.rb index 210cdf5..9f5387e 100644 --- a/lib/automatic/pipeline.rb +++ b/lib/automatic/pipeline.rb @@ -12,12 +12,10 @@ # plugins in order, each receiving the previous one's output. See # doc/BASIC_DESIGN.md section 4.6 and doc/PLUGINS.md section 3. # -# Every module the Recipe names is discovered before any plugin runs, so that -# an unknown module later in the Recipe is refused before an earlier plugin's -# side effect, not after it. Discovery only registers an autoload. It does not -# read a plugin's own source, which stays lazy until that plugin's turn to -# run. See doc/PLUGINS.md on unknown plugin being refused before any plugin -# runs. +# Discover every module named in the Recipe before running any plugin. This +# detects an unknown plugin before any earlier plugin can produce side effects. +# Discovery only registers an autoload. The plugin's source is loaded when +# the plugin is about to run. See doc/PLUGINS.md for this validation rule. require 'active_support/core_ext/string/inflections'