wile 0.9.261203
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 +7 -0
- data/.version +1 -0
- data/CREDITS.md +20 -0
- data/README.md +253 -0
- data/bin/wile +102 -0
- data/cache/.bin/pane +99 -0
- data/cache/.bin/panes +54 -0
- data/cache/.config.fish +2 -0
- data/cache/.dictionary +0 -0
- data/cache/.gemignore +16 -0
- data/cache/.gitignore +9 -0
- data/cache/.greeting.erb +1 -0
- data/cache/.irbrc +30 -0
- data/cache/.lexicon +0 -0
- data/cache/.prompt.erb +1 -0
- data/cache/.reek-strict.yml +1 -0
- data/cache/.reek.yml +1 -0
- data/cache/.rubocop-strict.yml +4 -0
- data/cache/.rubocop.yml +4 -0
- data/cache/.ruby-version-floor +1 -0
- data/cache/.ruby-version.erb +1 -0
- data/cache/.solargraph.yml +21 -0
- data/cache/.title.erb +1 -0
- data/cache/.version +1 -0
- data/cache/.wile/example.rb +56 -0
- data/cache/.wileignore +3 -0
- data/cache/CREDITS.md +10 -0
- data/cache/Gemfile +5 -0
- data/cache/Gemfile.lock +1 -0
- data/cache/History.txt +0 -0
- data/cache/README.md.erb +54 -0
- data/cache/TODO.md +3 -0
- data/cache/bin/project.erb +12 -0
- data/cache/cucumber.yml +1 -0
- data/cache/examples/README.md +3 -0
- data/cache/features/help.feature.erb +30 -0
- data/cache/features/step_definitions/command_steps.rb +171 -0
- data/cache/features/support/env.rb +11 -0
- data/cache/features/version.feature.erb +19 -0
- data/cache/git/hooks/pre-commit +93 -0
- data/cache/lib/project.rb.erb +4 -0
- data/cache/man/project.md.erb +24 -0
- data/cache/pkg/README.md +3 -0
- data/cache/test/cons.gz +0 -0
- data/cache/test/tc_comments +216 -0
- data/cache/test/tc_cucumber_slow +67 -0
- data/cache/test/tc_dependency_scrapes +126 -0
- data/cache/test/tc_dictionary +51 -0
- data/cache/test/tc_encoding +53 -0
- data/cache/test/tc_lexicon +34 -0
- data/cache/test/tc_lib_tests +37 -0
- data/cache/test/tc_lints +71 -0
- data/cache/test/tc_readme_rocket_check +128 -0
- data/cache/test/tc_reek +20 -0
- data/cache/test/tc_rubocop +20 -0
- data/cache/test/tc_ruby_syntax +28 -0
- data/cache/test/tc_tags +32 -0
- data/cache/test/tc_tasks_test +31 -0
- data/cache/test/tc_version +97 -0
- data/cache/test/tc_weird_filenames +23 -0
- data/cache/test/test_helper.rb +230 -0
- data/cache/tmp/README.md +8 -0
- data/data/command_version.tsv +281 -0
- data/dependencies.txt +70 -0
- data/lib/wile/autoloads/cache.rb +123 -0
- data/lib/wile/autoloads/code_content.rb +225 -0
- data/lib/wile/autoloads/code_data.rb +153 -0
- data/lib/wile/autoloads/code_data_function.rb +79 -0
- data/lib/wile/autoloads/code_data_valuation.rb +60 -0
- data/lib/wile/autoloads/code_stats.rb +185 -0
- data/lib/wile/autoloads/command_version.rb +119 -0
- data/lib/wile/autoloads/content.rb +196 -0
- data/lib/wile/autoloads/dependencies.rb +170 -0
- data/lib/wile/autoloads/gem_utils.rb +69 -0
- data/lib/wile/autoloads/gemspec.rb +163 -0
- data/lib/wile/autoloads/git.rb +59 -0
- data/lib/wile/autoloads/info.rb +91 -0
- data/lib/wile/autoloads/manpage.rb +44 -0
- data/lib/wile/autoloads/methods.rb +130 -0
- data/lib/wile/autoloads/nvim_files.rb +54 -0
- data/lib/wile/autoloads/options_dictionary.rb +345 -0
- data/lib/wile/autoloads/order_optimizer.rb +185 -0
- data/lib/wile/autoloads/project.rb +60 -0
- data/lib/wile/autoloads/readme.rb +137 -0
- data/lib/wile/autoloads/receivers.rb +101 -0
- data/lib/wile/autoloads/responds.rb +36 -0
- data/lib/wile/autoloads/test.rb +78 -0
- data/lib/wile/autoloads/thread_pool.rb +64 -0
- data/lib/wile/help.rb +41 -0
- data/lib/wile/requires.rb +7 -0
- data/lib/wile/run.rb +108 -0
- data/lib/wile/sysexits.rb +43 -0
- data/lib/wile/tasks/build.rb +46 -0
- data/lib/wile/tasks/bump.rb +61 -0
- data/lib/wile/tasks/compare.rb +139 -0
- data/lib/wile/tasks/content.rb +44 -0
- data/lib/wile/tasks/cp.rb +52 -0
- data/lib/wile/tasks/dependencies.rb +58 -0
- data/lib/wile/tasks/dictionary.rb +59 -0
- data/lib/wile/tasks/gemcheck.rb +142 -0
- data/lib/wile/tasks/gemfile.rb +60 -0
- data/lib/wile/tasks/help.rb +29 -0
- data/lib/wile/tasks/info.rb +77 -0
- data/lib/wile/tasks/install.rb +53 -0
- data/lib/wile/tasks/lexicon.rb +59 -0
- data/lib/wile/tasks/list.rb +97 -0
- data/lib/wile/tasks/methods.rb +154 -0
- data/lib/wile/tasks/mkdir.rb +19 -0
- data/lib/wile/tasks/note.rb +49 -0
- data/lib/wile/tasks/nvim.rb +60 -0
- data/lib/wile/tasks/order.rb +93 -0
- data/lib/wile/tasks/oscheck.rb +49 -0
- data/lib/wile/tasks/publish.rb +67 -0
- data/lib/wile/tasks/receivers.rb +34 -0
- data/lib/wile/tasks/review.rb +157 -0
- data/lib/wile/tasks/ruby.rb +38 -0
- data/lib/wile/tasks/tc.rb +114 -0
- data/lib/wile/tasks/test.rb +57 -0
- data/lib/wile/tasks/todo.rb +55 -0
- data/lib/wile/tasks/update.rb +67 -0
- data/lib/wile/tasks.rb +34 -0
- data/lib/wile/usage.rb +56 -0
- data/lib/wile/usage_error.rb +18 -0
- data/lib/wile/utilities.rb +283 -0
- data/lib/wile/utilities_refinements.rb +41 -0
- data/lib/wile/wile_refinements.rb +137 -0
- data/lib/wile.rb +39 -0
- data/man/wile.1 +1121 -0
- data/man/wile.md +786 -0
- data/pkg/README.md +3 -0
- metadata +399 -0
data/man/wile.md
ADDED
|
@@ -0,0 +1,786 @@
|
|
|
1
|
+
# wile
|
|
2
|
+
|
|
3
|
+
## NAME
|
|
4
|
+
|
|
5
|
+
wile -- prescriptive task dispatcher for Ruby gem projects
|
|
6
|
+
|
|
7
|
+
## SYNOPSIS
|
|
8
|
+
|
|
9
|
+
`wile [<task>] [<args>...] [:<options>...]`
|
|
10
|
+
|
|
11
|
+
`wile <options>...`
|
|
12
|
+
|
|
13
|
+
## DESCRIPTION
|
|
14
|
+
|
|
15
|
+
**Wile** is a prescriptive task dispatcher for Ruby gem projects,
|
|
16
|
+
built around a living project template.
|
|
17
|
+
|
|
18
|
+
It scaffolds new projects from the template, keeps existing ones
|
|
19
|
+
aligned with it, and automates workflow steps -- gemspec upkeep,
|
|
20
|
+
testing, and release.
|
|
21
|
+
|
|
22
|
+
## GET STARTED
|
|
23
|
+
|
|
24
|
+
- `wile`: Display manual page.
|
|
25
|
+
- `wile <options>...`: Query options dictionary for flag details.
|
|
26
|
+
- `wile list`: List all available tasks.
|
|
27
|
+
- `wile help [<task>]`: Show help for task(s).
|
|
28
|
+
- `wile test [<file> [<method>]]`: Run project test suites.
|
|
29
|
+
|
|
30
|
+
## GLOBAL OPTIONS
|
|
31
|
+
|
|
32
|
+
- `-h`, `--help`: Show help summary.
|
|
33
|
+
- `-v`, `--version`: Show version number.
|
|
34
|
+
- `-a`, `--all`: Apply to all targets.
|
|
35
|
+
- `--batch`: Run in non-interactive batch mode.
|
|
36
|
+
- `-c`, `--check`: Run in check-only mode.
|
|
37
|
+
- `-d`, `--dump`: Dump internal structure or data.
|
|
38
|
+
- `-f`, `--force`: Force execution without safety checks.
|
|
39
|
+
- `--format=WORD`: Output format.
|
|
40
|
+
- `-l`, `--list`: List items.
|
|
41
|
+
- `--name=WORD`: Filter or match by name.
|
|
42
|
+
- `--only=CSV`: Select only specified items.
|
|
43
|
+
- `-q`, `--quiet`: Suppress non-essential output.
|
|
44
|
+
- `-r`, `--raw`: Raw / unformatted output.
|
|
45
|
+
- `-s`, `--strict`: Enable strict mode.
|
|
46
|
+
- `-t`, `--trace`: Trace execution.
|
|
47
|
+
- `-y`, `--yes`: Answer yes to all prompts.
|
|
48
|
+
|
|
49
|
+
## TASKS
|
|
50
|
+
|
|
51
|
+
Run `wile list` to list all tasks, or `wile help <task>` for details.
|
|
52
|
+
|
|
53
|
+
- **build**: Build gem package (see **BUILD**).
|
|
54
|
+
- **bump**: Bump project version number (see **BUMP**).
|
|
55
|
+
- **compare**: Compare project files with template (see **COMPARE**).
|
|
56
|
+
- **content**: Inspect ruby file structure and methods (see **CONTENT**).
|
|
57
|
+
- **cp**: Copy template files into project (see **CP**).
|
|
58
|
+
- **dependencies**: List ruby and system dependencies (see **DEPENDENCIES**).
|
|
59
|
+
- **dictionary**: Manage spelling dictionary (see **DICTIONARY**).
|
|
60
|
+
- **gemcheck**: Check for missing gems across rbenv Rubies (see **GEMCHECK**).
|
|
61
|
+
- **gemfile**: Generate Gemfile from dependencies (see **GEMFILE**).
|
|
62
|
+
- **help**: Show detailed help for tasks (see **HELP**).
|
|
63
|
+
- **info**: Display project metadata and configuration (see **INFO**).
|
|
64
|
+
- **install**: Build and install gem locally (see **INSTALL**).
|
|
65
|
+
- **lexicon**: View and update vocabulary whitelist (see **LEXICON**).
|
|
66
|
+
- **list**: List all tasks or filter by pattern (see **LIST**).
|
|
67
|
+
- **methods**: Classify methods in your code (see **METHODS**).
|
|
68
|
+
- **mkdir**: Create project directory from template (see **MKDIR**).
|
|
69
|
+
- **note**: Scrape ruby files for NOTE comments (see **NOTE**).
|
|
70
|
+
- **nvim**: Open project files in Neovim (see **NVIM**).
|
|
71
|
+
- **order**: Suggest method ordering in ruby files (see **ORDER**).
|
|
72
|
+
- **oscheck**: Verify system commands and versions (see **OSCHECK**).
|
|
73
|
+
- **publish**: Publish new version to RubyGems (see **PUBLISH**).
|
|
74
|
+
- **receivers**: List variable and constant receiver types (see **RECEIVERS**).
|
|
75
|
+
- **review**: Interactively review project files (see **REVIEW**).
|
|
76
|
+
- **ruby**: List all ruby files in project or git (see **RUBY**).
|
|
77
|
+
- **tc**: List custom unit tests (see **TC**).
|
|
78
|
+
- **test**: Run test suites (see **TESTING**).
|
|
79
|
+
- **todo**: Display TODO.md or scrape files for TODO comments (see **TODO**).
|
|
80
|
+
- **update**: Update project files (see **UPDATE**).
|
|
81
|
+
|
|
82
|
+
## BUILD
|
|
83
|
+
|
|
84
|
+
Wile builds the gem package from the project gemspec into the working
|
|
85
|
+
directory (`<project>-<version>.gem`):
|
|
86
|
+
|
|
87
|
+
$ wile build # Build gem package
|
|
88
|
+
$ wile build --force # Build package even if checks fail
|
|
89
|
+
|
|
90
|
+
Pre-build checks:
|
|
91
|
+
|
|
92
|
+
Before building, Wile verifies that:
|
|
93
|
+
|
|
94
|
+
- Git working directory is clean (`git status` shows no uncommitted changes).
|
|
95
|
+
- No stale `.gem` file exists in the working directory.
|
|
96
|
+
- The project gemspec exists and has been modified within the last 5 minutes.
|
|
97
|
+
|
|
98
|
+
Passing `--force` bypasses these verification checks and invokes `gem build`
|
|
99
|
+
immediately.
|
|
100
|
+
|
|
101
|
+
Options:
|
|
102
|
+
|
|
103
|
+
- `-f`, `--force`: Force build even if Git status is dirty, a stale gem
|
|
104
|
+
package exists, or the gemspec has not been touched recently.
|
|
105
|
+
|
|
106
|
+
## BUMP
|
|
107
|
+
|
|
108
|
+
Wile bumps the project version number across `.version`, `lib/<project>.rb`,
|
|
109
|
+
`README.md`, and `<project>.gemspec`. Versions follow a date-based convention
|
|
110
|
+
of `major.minor.YYMMDD`:
|
|
111
|
+
|
|
112
|
+
$ wile bump # Re-stamp build segment to today
|
|
113
|
+
$ wile bump build # Same as default
|
|
114
|
+
$ wile bump minor # Step minor version (e.g. 0.5 -> 0.6)
|
|
115
|
+
$ wile bump major # Step major version (e.g. 0.5 -> 1.0)
|
|
116
|
+
|
|
117
|
+
Subcommands:
|
|
118
|
+
|
|
119
|
+
- `build` (or no argument): Re-stamps the build segment with today's date
|
|
120
|
+
as `%y%m%d`, keeping the major and minor version numbers unchanged.
|
|
121
|
+
- `minor`: Increments the minor version by 1 and updates the build segment
|
|
122
|
+
to today's date.
|
|
123
|
+
- `major`: Increments the major version by 1, resets the minor version to 0,
|
|
124
|
+
and updates the build segment to today's date.
|
|
125
|
+
|
|
126
|
+
The updated version is written to `.version` and substituted into the first
|
|
127
|
+
matching `\d+\.\d+\.\d+` pattern found in `lib/<project>.rb`, `README.md`, and
|
|
128
|
+
the project gemspec.
|
|
129
|
+
|
|
130
|
+
## COMPARE
|
|
131
|
+
|
|
132
|
+
Wile compares project files against the living template in `cache/`,
|
|
133
|
+
honoring `.wileignore`:
|
|
134
|
+
|
|
135
|
+
$ wile compare # Compare all template files
|
|
136
|
+
$ wile compare README # Show diff for matching files
|
|
137
|
+
$ wile compare lib/ test/ # Compare multiple paths
|
|
138
|
+
|
|
139
|
+
Markers indicate file status:
|
|
140
|
+
|
|
141
|
+
- `✓` (green): Project file is identical to the template.
|
|
142
|
+
- `Δ` (blue): Project file contains expected customizations (such as
|
|
143
|
+
`lib/`, `bin/`, `man/`, `README.md`, `Gemfile`, and dotfiles).
|
|
144
|
+
- `✗` (red): Project file drifted from template outside expected changes.
|
|
145
|
+
- `# Missing:` (red): Template files absent from the project.
|
|
146
|
+
|
|
147
|
+
When invoked with one or more match patterns, `compare` displays unified
|
|
148
|
+
diff lines indented beneath each matching file. Discrepancies are
|
|
149
|
+
informational, so `compare` exits 0 on drift or missing files.
|
|
150
|
+
|
|
151
|
+
Arguments:
|
|
152
|
+
|
|
153
|
+
- `<match>...`: Optional patterns filtering files to compare and diff.
|
|
154
|
+
|
|
155
|
+
## CONTENT
|
|
156
|
+
|
|
157
|
+
Wile inspects Ruby source files, displaying class, module, and method
|
|
158
|
+
definitions alongside their line counts and referenced dependency calls:
|
|
159
|
+
|
|
160
|
+
$ wile content lib/foo.rb # Inspect method line counts and calls
|
|
161
|
+
$ wile content lib/foo.rb --raw # Display raw line counts and definitions
|
|
162
|
+
$ wile content lib/foo.rb --dump # Dump parse tree as S-expressions
|
|
163
|
+
|
|
164
|
+
Output details:
|
|
165
|
+
|
|
166
|
+
- **Method line counts**: Beside each method definition, Wile displays the
|
|
167
|
+
number of lines in the method (in green). The count includes the `def` header
|
|
168
|
+
and all body lines, excluding only the closing `end` keyword.
|
|
169
|
+
- **Referenced dependencies**: Indented lines beneath a method show calls
|
|
170
|
+
and constants referenced within its body, color-coded by resolution.
|
|
171
|
+
|
|
172
|
+
Arguments and options:
|
|
173
|
+
|
|
174
|
+
- `<filename>+`: One or more Ruby source files to inspect.
|
|
175
|
+
- `--raw`: Display plain method line counts and definitions without color.
|
|
176
|
+
- `--dump`: Dump internal S-expression AST structure to stdout with source
|
|
177
|
+
header on stderr.
|
|
178
|
+
|
|
179
|
+
## CP
|
|
180
|
+
|
|
181
|
+
Wile copies template files from the living template cache into the project
|
|
182
|
+
directory, keeping scaffolded files synchronized with upstream enhancements:
|
|
183
|
+
|
|
184
|
+
$ wile cp # Copy all missing template files
|
|
185
|
+
$ wile cp test # Copy template files matching pattern
|
|
186
|
+
$ wile cp .rubocop.yml --force # Overwrite existing project file
|
|
187
|
+
$ wile cp --trace # Show skipped and copied files
|
|
188
|
+
|
|
189
|
+
Template behavior:
|
|
190
|
+
|
|
191
|
+
- **ERB templates**: Template files ending in `.erb` are evaluated in the
|
|
192
|
+
project context, replacing project placeholders and removing the `.erb`
|
|
193
|
+
extension upon copying.
|
|
194
|
+
- **Safety**: Existing project files are skipped by default. Pass `--force`
|
|
195
|
+
to overwrite existing files with fresh template copies.
|
|
196
|
+
|
|
197
|
+
Arguments and options:
|
|
198
|
+
|
|
199
|
+
- `<match>`: Optional pattern filtering which template files to copy.
|
|
200
|
+
- `-f`, `--force`: Overwrite existing files in the project.
|
|
201
|
+
- `-t`, `--trace`: Trace execution, displaying skipped files in grey and
|
|
202
|
+
copied files in green.
|
|
203
|
+
|
|
204
|
+
## DEPENDENCIES
|
|
205
|
+
|
|
206
|
+
Wile scrapes Git-tracked Ruby files and `.irbrc` to detect and list the
|
|
207
|
+
project's Ruby gem and system-command dependencies:
|
|
208
|
+
|
|
209
|
+
$ wile dependencies # List project dependencies
|
|
210
|
+
|
|
211
|
+
Dependencies are partitioned into four sections:
|
|
212
|
+
|
|
213
|
+
- `## runtime ##`: Runtime Ruby gems resolved via `gem which`.
|
|
214
|
+
- `## development ##`: Development Ruby gems (from files matched by
|
|
215
|
+
`.gemignore`).
|
|
216
|
+
- `## system-run ##`: Operating system commands executed at runtime.
|
|
217
|
+
- `## system-dev ##`: Operating system commands used during development.
|
|
218
|
+
|
|
219
|
+
Detection rules:
|
|
220
|
+
|
|
221
|
+
- **Gems**: Scraped from `require` and `autoload` statements in non-comment
|
|
222
|
+
code, as well as `# wile: require '<gem>'` directives.
|
|
223
|
+
- **Commands**: Declared via ``# wile: os `<cmd>[,<cmd>...]` `` directives
|
|
224
|
+
(audited against actual OS calls by `test/tc_comments`). Commands provided
|
|
225
|
+
by the project's own `bin` directories are excluded. Versions are resolved
|
|
226
|
+
via Wile's command version registry.
|
|
227
|
+
|
|
228
|
+
## DICTIONARY
|
|
229
|
+
|
|
230
|
+
Wile provides trigram-based spell checking across `README.md`, `bin/*`, and
|
|
231
|
+
`lib/**/*.rb` via `test/tc_dictionary`. Words not recognized by the trigram
|
|
232
|
+
model are compared against the `.dictionary` whitelist:
|
|
233
|
+
|
|
234
|
+
$ wile dictionary # Check spelling and prompt to update
|
|
235
|
+
$ wile dictionary --check # Check only; exit 1 on unrecognized words
|
|
236
|
+
$ wile dictionary --yes # Auto-accept new words into .dictionary
|
|
237
|
+
|
|
238
|
+
Options:
|
|
239
|
+
|
|
240
|
+
- `-c`, `--check`: Run in check-only mode without prompting.
|
|
241
|
+
- `-y`, `--yes`: Answer yes to confirmation prompt (auto-accept updates).
|
|
242
|
+
|
|
243
|
+
## GEMCHECK
|
|
244
|
+
|
|
245
|
+
Wile checks for missing gems in the currently running Ruby version compared to
|
|
246
|
+
installed versions managed by `rbenv`. By default, only the previous installed
|
|
247
|
+
version is searched; passing `--all` inspects all installed Ruby versions.
|
|
248
|
+
|
|
249
|
+
Major versions are tracked according to Semantic Versioning: for each gem in
|
|
250
|
+
the searched versions, each missing major version not currently installed is
|
|
251
|
+
reported with a pessimistic requirement (such as `~> 1`):
|
|
252
|
+
|
|
253
|
+
$ wile gemcheck # Check against previous Ruby version
|
|
254
|
+
$ wile gemcheck --all # Check across all installed Rubies
|
|
255
|
+
|
|
256
|
+
If missing gems are found, Wile displays the current Ruby version, the searched
|
|
257
|
+
versions, and the missing gems, then prompts to install them with their
|
|
258
|
+
respective version constraints:
|
|
259
|
+
|
|
260
|
+
Current Ruby version: 4.0.7
|
|
261
|
+
Searching versions: 4.0.0
|
|
262
|
+
Gems missing in current found in other versions:
|
|
263
|
+
reverse_markdown (~> 3): 4.0.0
|
|
264
|
+
solargraph (~> 0): 4.0.0
|
|
265
|
+
Would you like to install them all? (Y/n)
|
|
266
|
+
|
|
267
|
+
Options:
|
|
268
|
+
|
|
269
|
+
- `-a`, `--all`: Search across all installed Ruby versions instead of only
|
|
270
|
+
the previous version.
|
|
271
|
+
|
|
272
|
+
## GEMFILE
|
|
273
|
+
|
|
274
|
+
Wile generates a project `Gemfile` directly from dependencies. It
|
|
275
|
+
classifies gems into runtime and development groups based on `.gemignore`,
|
|
276
|
+
including the rubygems source and runtime/development gems:
|
|
277
|
+
|
|
278
|
+
$ wile gemfile # Generate or update project Gemfile
|
|
279
|
+
$ wile gemfile --dump # Print generated Gemfile to stdout
|
|
280
|
+
|
|
281
|
+
The generated file follows standard Bundler syntax:
|
|
282
|
+
|
|
283
|
+
source 'https://rubygems.org'
|
|
284
|
+
## runtime ##
|
|
285
|
+
gem 'colorize'
|
|
286
|
+
## development ##
|
|
287
|
+
gem 'reek'
|
|
288
|
+
gem 'rubocop'
|
|
289
|
+
|
|
290
|
+
## HELP
|
|
291
|
+
|
|
292
|
+
Wile scrapes task documentation directly from the header comments of
|
|
293
|
+
task source files in `.wile/*.rb` and `lib/wile/tasks/*.rb`:
|
|
294
|
+
|
|
295
|
+
$ wile help # Show help for help and list tasks
|
|
296
|
+
$ wile help build # Show detailed help for build task
|
|
297
|
+
$ wile help order review # Show help for multiple tasks
|
|
298
|
+
|
|
299
|
+
Arguments:
|
|
300
|
+
|
|
301
|
+
- `<task>...`: One or more task names or partial names to inspect. When
|
|
302
|
+
omitted, Wile displays help for `help` and `list`.
|
|
303
|
+
|
|
304
|
+
## INFO
|
|
305
|
+
|
|
306
|
+
Wile displays project metadata, description, and dependency configuration
|
|
307
|
+
synthesized from project dotfiles, `README.md`, and gemspec specifications:
|
|
308
|
+
|
|
309
|
+
$ wile info # Display project metadata and gems
|
|
310
|
+
|
|
311
|
+
Sections displayed:
|
|
312
|
+
|
|
313
|
+
- **Header**: Project name, version number, and author username.
|
|
314
|
+
- **Description**: Project summary extracted from the description section of
|
|
315
|
+
`README.md`.
|
|
316
|
+
- **Files**: Complete listing of tracked project files packaged into the gem.
|
|
317
|
+
- **Executables**: Executables located under `bin/`.
|
|
318
|
+
- **Runtime gems**: Third-party gems and versions required at runtime.
|
|
319
|
+
- **Development gems**: Dependencies required during development and testing.
|
|
320
|
+
|
|
321
|
+
`wile info` takes no arguments and must be executed from the project root.
|
|
322
|
+
|
|
323
|
+
## INSTALL
|
|
324
|
+
|
|
325
|
+
Wile builds the project gem and installs it into the local Ruby environment
|
|
326
|
+
using `gem install --no-document --local`. If the current version is already
|
|
327
|
+
installed, it uninstalls it first before installing the newly built gem,
|
|
328
|
+
then cleans up the temporary `.gem` package file:
|
|
329
|
+
|
|
330
|
+
$ wile install # Build and install gem locally
|
|
331
|
+
$ wile install --force # Bypass git cleanliness and gemspec checks
|
|
332
|
+
|
|
333
|
+
By default, Wile enforces that the Git working tree is clean, no leftover
|
|
334
|
+
`.gem` packages exist in the directory, and the gemspec has been updated
|
|
335
|
+
within the last 5 minutes. Passing `--force` bypasses these verification
|
|
336
|
+
checks.
|
|
337
|
+
|
|
338
|
+
Options:
|
|
339
|
+
|
|
340
|
+
- `-f`, `--force`: Force installation without requiring clean git status
|
|
341
|
+
or up-to-date gemspec checks.
|
|
342
|
+
|
|
343
|
+
## LEXICON
|
|
344
|
+
|
|
345
|
+
Wile enforces vocabulary control across `lib/**/*.rb` using AST parsing in
|
|
346
|
+
`test/tc_lexicon`. Every method name, identifier, and symbol is tracked in
|
|
347
|
+
`.lexicon` to prevent unintended API drift and subtle typos:
|
|
348
|
+
|
|
349
|
+
$ wile lexicon # Inspect vocabulary drift and prompt
|
|
350
|
+
$ wile lexicon --check # Check only; exit 1 on new vocabulary
|
|
351
|
+
$ wile lexicon --yes # Auto-accept new vocabulary into .lexicon
|
|
352
|
+
|
|
353
|
+
Options:
|
|
354
|
+
|
|
355
|
+
- `-c`, `--check`: Run in check-only mode without prompting.
|
|
356
|
+
- `-y`, `--yes`: Answer yes to confirmation prompt (auto-accept updates).
|
|
357
|
+
|
|
358
|
+
## LIST
|
|
359
|
+
|
|
360
|
+
Wile lists available built-in and custom tasks with optional pattern
|
|
361
|
+
filtering and multiple output formats:
|
|
362
|
+
|
|
363
|
+
$ wile list # List all tasks with usage syntax
|
|
364
|
+
$ wile list dict lex # Filter tasks matching patterns
|
|
365
|
+
$ wile list --format=name # Print task names only
|
|
366
|
+
$ wile list --format=dictionary # Print dictionary-style task summaries
|
|
367
|
+
|
|
368
|
+
Arguments and options:
|
|
369
|
+
|
|
370
|
+
- `<match>...`: Optional patterns filtering task names.
|
|
371
|
+
- `--format=WORD`: Output format (`USAGE`, `DICTIONARY`, `NAME`, or `CODE`).
|
|
372
|
+
Defaults to `USAGE`.
|
|
373
|
+
|
|
374
|
+
Formats:
|
|
375
|
+
|
|
376
|
+
- **USAGE**: Formatted task usage header with brief description comment
|
|
377
|
+
(default).
|
|
378
|
+
- **DICTIONARY**: Concise list in `+ <task>: <description>` format.
|
|
379
|
+
- **NAME**: Bare task names only, suitable for shell completion and scripts.
|
|
380
|
+
- **CODE**: Unformatted usage comment lines extracted from task source files.
|
|
381
|
+
|
|
382
|
+
## METHODS
|
|
383
|
+
|
|
384
|
+
Wile performs lightweight static analysis across tracked Ruby files under
|
|
385
|
+
`lib/` and classifies defined and called methods into seven categories:
|
|
386
|
+
|
|
387
|
+
$ wile methods # Display all method categories
|
|
388
|
+
$ wile methods Cache Info # Filter results by regex patterns
|
|
389
|
+
$ wile methods --name=unused # Display only categories matching name
|
|
390
|
+
$ wile methods Cache --name=un # Combine pattern and category filters
|
|
391
|
+
|
|
392
|
+
Arguments and options:
|
|
393
|
+
|
|
394
|
+
- `<match>...`: Optional regex patterns filtering displayed method names.
|
|
395
|
+
- `--name=PATTERN`: Optional case-insensitive pattern selecting which
|
|
396
|
+
category lists to display (e.g. `unused`, `undef`, `shared`).
|
|
397
|
+
|
|
398
|
+
Categories:
|
|
399
|
+
|
|
400
|
+
- **Undefined**: External method calls not resolved to a project definition,
|
|
401
|
+
common Ruby/Object method, or skipped receiver. Standard library calls are
|
|
402
|
+
marked with `☰` and `Object` methods with `◇`.
|
|
403
|
+
- **Implicit**: `.new` calls on project classes that have no explicit
|
|
404
|
+
`initialize` method.
|
|
405
|
+
- **Unused**: Defined methods (including `attr_*` and `Struct` accessors)
|
|
406
|
+
with no statically detected callers.
|
|
407
|
+
- **Independent**: Methods that do not depend on any other project methods.
|
|
408
|
+
- **Isolate**: Methods that are both unused and independent.
|
|
409
|
+
- **Shared**: Methods called from files other than the file defining them.
|
|
410
|
+
- **Reused**: Method names defined in more than one class or module
|
|
411
|
+
(excluding `initialize`).
|
|
412
|
+
|
|
413
|
+
Receiver conventions:
|
|
414
|
+
|
|
415
|
+
- Duck-typed calls (e.g. `foo#bar` or chained `*#bar`) are matched against
|
|
416
|
+
defined project method names to record dependencies.
|
|
417
|
+
- Receivers named `options`, `it`, or ending in a trailing underscore
|
|
418
|
+
(e.g. `node_`, `sym_`) are skipped from **Undefined** when unresolved,
|
|
419
|
+
allowing intentional opt-out for dynamic or third-party AST objects.
|
|
420
|
+
|
|
421
|
+
## MKDIR
|
|
422
|
+
|
|
423
|
+
Wile creates a new Ruby gem project directory scaffolded from the living
|
|
424
|
+
template in `cache/`:
|
|
425
|
+
|
|
426
|
+
$ wile mkdir my_gem # Create new project directory
|
|
427
|
+
|
|
428
|
+
Arguments:
|
|
429
|
+
|
|
430
|
+
- `<dirname>`: Exactly one argument specifying the new project directory
|
|
431
|
+
name. Must contain only letters, numbers, underscores, or hyphens
|
|
432
|
+
(`[a-zA-Z0-9_-]`).
|
|
433
|
+
|
|
434
|
+
Scaffolding steps:
|
|
435
|
+
|
|
436
|
+
1. **Safety Check**: Verifies that `<dirname>` does not already exist in the
|
|
437
|
+
target path.
|
|
438
|
+
2. **Template Copy**: Copies the template structure from `cache/` into the
|
|
439
|
+
new project directory.
|
|
440
|
+
3. **Template Evaluation**: Evaluates all `.erb` files (such as
|
|
441
|
+
`README.md.erb`, `bin/project.erb`, and `lib/project.rb.erb`), substituting
|
|
442
|
+
the project name, PascalCase module name, Git author credentials, year, and
|
|
443
|
+
date.
|
|
444
|
+
4. **Path Renaming**: Renames template source and executable files (e.g.
|
|
445
|
+
`bin/project` and `lib/project.rb`) to match the project name, and deletes
|
|
446
|
+
the `.erb` templates.
|
|
447
|
+
5. **Git Initialization**: Initializes a new Git repository (`git init`) and
|
|
448
|
+
installs template Git hooks (such as `.git/hooks/pre-commit`).
|
|
449
|
+
|
|
450
|
+
## NOTE
|
|
451
|
+
|
|
452
|
+
Wile scrapes project Ruby source files and prints every line containing
|
|
453
|
+
a `# NOTE` comment:
|
|
454
|
+
|
|
455
|
+
$ wile note # Scrape NOTE comments in all Ruby files
|
|
456
|
+
$ wile note order # Scrape NOTE comments in matching files
|
|
457
|
+
|
|
458
|
+
Arguments:
|
|
459
|
+
|
|
460
|
+
- `<match>...`: Optional patterns filtering Ruby file paths. When omitted,
|
|
461
|
+
all project Ruby files are inspected.
|
|
462
|
+
|
|
463
|
+
## NVIM
|
|
464
|
+
|
|
465
|
+
Wile opens the project's standard files in Neovim, ordered by internal
|
|
466
|
+
dependency rank (`README.md`, executable `bin/*` scripts, then `lib/**/*.rb`
|
|
467
|
+
in load order):
|
|
468
|
+
|
|
469
|
+
$ wile nvim # Open all standard files in Neovim
|
|
470
|
+
$ wile nvim tasks # Open files matching "tasks"
|
|
471
|
+
$ wile nvim --list # List matching files without opening
|
|
472
|
+
$ wile nvim tasks --list # List files matching "tasks"
|
|
473
|
+
|
|
474
|
+
Arguments and options:
|
|
475
|
+
|
|
476
|
+
- `<match>...`: Optional patterns filtering file paths.
|
|
477
|
+
- `-l`, `--list`: Print file paths to stdout instead of launching Neovim.
|
|
478
|
+
|
|
479
|
+
## ORDER
|
|
480
|
+
|
|
481
|
+
Wile analyzes call dependencies and method line lengths within a Ruby
|
|
482
|
+
source file to suggest an optimal top-to-bottom method order. The
|
|
483
|
+
optimization minimizes the line distance between callers and their
|
|
484
|
+
dependencies (preferring callees above callers) and breaks ties with
|
|
485
|
+
alphabetical ordering:
|
|
486
|
+
|
|
487
|
+
$ wile order lib/foo.rb # Suggest method order using default (bcmv)
|
|
488
|
+
$ wile order lib/foo.rb bprm # Suggest order using best permutation
|
|
489
|
+
$ wile order lib/foo.rb dump # Dump method data and index as JSON
|
|
490
|
+
$ wile order lib/foo.rb qc # Check dependency integrity and cycles
|
|
491
|
+
|
|
492
|
+
When suggestions are found, Wile prints each method name alongside
|
|
493
|
+
movement indicators:
|
|
494
|
+
|
|
495
|
+
- `↑N` (arrow up): Method moved up by N positions from its original place.
|
|
496
|
+
- `↓N` (arrow down): Method moved down by N positions from its original place.
|
|
497
|
+
|
|
498
|
+
Wile exits 0 when the file is already in optimal order, or 1 when reordering
|
|
499
|
+
is suggested.
|
|
500
|
+
|
|
501
|
+
Sort methods:
|
|
502
|
+
|
|
503
|
+
- **bcmv** (default): Best combination move. Evaluates relocating any
|
|
504
|
+
method to any position (insert and shift), committing the single best
|
|
505
|
+
move per round until no move reduces total distance.
|
|
506
|
+
- **nswp**: Neighbor swap. Fast first-improvement pass that sweeps
|
|
507
|
+
forward and backward through adjacent method pairs, swapping immediately
|
|
508
|
+
upon any score improvement.
|
|
509
|
+
- **cswp**: Combination swap. First-improvement pass that tests all pairs
|
|
510
|
+
`(i, j)` and swaps them immediately upon any score improvement.
|
|
511
|
+
- **bnswp**: Best neighbor swap. Evaluates all adjacent pairs `(i, i+1)`
|
|
512
|
+
and commits the single best adjacent swap per round.
|
|
513
|
+
- **bcswp**: Best combination swap. Evaluates all possible pairs `(i, j)`
|
|
514
|
+
across the file and commits the single best swap per round.
|
|
515
|
+
- **bprm**: Best permutation. Exhaustive search across a sliding window of
|
|
516
|
+
7 methods (5,040 permutations per step) sweeping forward and backward
|
|
517
|
+
until convergence. Reaches global optimum for files with <= 7 methods.
|
|
518
|
+
|
|
519
|
+
Special subcommands:
|
|
520
|
+
|
|
521
|
+
- **dump**: Print parsed method definitions, sizes, and dependency index
|
|
522
|
+
as formatted JSON.
|
|
523
|
+
- **index**: Print method call-site line offsets for each dependency.
|
|
524
|
+
- **isolate**: Print methods that neither call nor are called by other
|
|
525
|
+
methods in the file.
|
|
526
|
+
- **total**: Print the file's total valuation score with a detailed trace
|
|
527
|
+
of alphabetical and dependency distances.
|
|
528
|
+
- **qc**: Quality check dependency symmetry and detect circular
|
|
529
|
+
dependencies. Exits 65 (EX_DATAERR) if errors are found.
|
|
530
|
+
|
|
531
|
+
Arguments:
|
|
532
|
+
|
|
533
|
+
- `<filename>`: Path to the Ruby source file to analyze.
|
|
534
|
+
- `<sort-type|special>`: Optional sort algorithm or special subcommand.
|
|
535
|
+
Defaults to `bcmv`.
|
|
536
|
+
|
|
537
|
+
## OSCHECK
|
|
538
|
+
|
|
539
|
+
Wile checks system commands known to Wile against the host operating
|
|
540
|
+
system and reports their installed versions. Probes are defined in Wile's
|
|
541
|
+
command version registry and support standard command-line flags, man pages,
|
|
542
|
+
and Fish plugins.
|
|
543
|
+
|
|
544
|
+
By default, Wile reports only commands that are installed on the host:
|
|
545
|
+
|
|
546
|
+
$ wile oscheck # Report installed system commands
|
|
547
|
+
|
|
548
|
+
Passing `--all` audits all known commands, displaying installed commands with
|
|
549
|
+
their detected versions and missing commands with `-` in red. If any commands
|
|
550
|
+
are missing in `--all` mode, Wile exits with status 2 (`EX_STOP`):
|
|
551
|
+
|
|
552
|
+
$ wile oscheck --all # Audit all known commands (exit 2 if missing)
|
|
553
|
+
|
|
554
|
+
Options:
|
|
555
|
+
|
|
556
|
+
- `--all`: Audit all known commands, including missing commands, and exit 2
|
|
557
|
+
(`EX_STOP`) if any command is missing.
|
|
558
|
+
|
|
559
|
+
## PUBLISH
|
|
560
|
+
|
|
561
|
+
Wile verifies project readiness, builds and pushes a new gem version to
|
|
562
|
+
RubyGems, archives the package, and records the release in Git:
|
|
563
|
+
|
|
564
|
+
$ wile publish 0.7.261121 # Publish version 0.7.261121
|
|
565
|
+
|
|
566
|
+
Arguments:
|
|
567
|
+
|
|
568
|
+
- `<version>`: Exactly one version argument matching `X.Y.Z`
|
|
569
|
+
(`/^\d+\.\d+\.\d+$/`), which must match `.version` and not already exist as
|
|
570
|
+
a Git tag.
|
|
571
|
+
|
|
572
|
+
Pre-publish checks:
|
|
573
|
+
|
|
574
|
+
1. **Project Root**: Verifies required project root files are present.
|
|
575
|
+
2. **Version & Tag**: Verifies `<version>` matches `.version` and has not
|
|
576
|
+
already been tagged in Git.
|
|
577
|
+
3. **Git & Gemspec**: Verifies `git status` is clean, no `.gem` file is
|
|
578
|
+
present in the working directory, and the gemspec has been touched within
|
|
579
|
+
the last 5 minutes.
|
|
580
|
+
4. **Test Suite**: Runs the full test suite (`Test.test!`) and aborts on any
|
|
581
|
+
failure.
|
|
582
|
+
|
|
583
|
+
Release steps:
|
|
584
|
+
|
|
585
|
+
1. **Build & Push**: Builds `<project>-<version>.gem` and runs `gem push`.
|
|
586
|
+
If `gem push` fails, the `.gem` file remains in the working directory for
|
|
587
|
+
inspection.
|
|
588
|
+
2. **Archive**: Moves the `.gem` file into `pkg/` and appends a timestamp and
|
|
589
|
+
`md5sum` entry to `History.txt`.
|
|
590
|
+
3. **Commit, Tag & Push**: Stages `History.txt`, commits with `--no-verify`
|
|
591
|
+
(since tests already ran), creates an annotated Git tag for `<version>`,
|
|
592
|
+
and runs `git push --follow-tags`.
|
|
593
|
+
|
|
594
|
+
## RECEIVERS
|
|
595
|
+
|
|
596
|
+
Wile scans Ruby source files under `lib/**/*.rb` with Prism and lists variable
|
|
597
|
+
and constant names whose assignments resolve to known built-in Ruby receiver
|
|
598
|
+
types:
|
|
599
|
+
|
|
600
|
+
$ wile receivers # List variables and constants by type
|
|
601
|
+
|
|
602
|
+
Detected types:
|
|
603
|
+
|
|
604
|
+
- **Array**: Array literals (`[...]`, `%w[...]`, `%i[...]`), `Array.new`,
|
|
605
|
+
`Array[...]`, and `Array(...)`.
|
|
606
|
+
- **Float**: Float literals and `Float(...)`.
|
|
607
|
+
- **Hash**: Hash literals (`{...}`), `Hash.new`, `Hash[...]`, and `Hash(...)`.
|
|
608
|
+
- **Integer**: Integer literals and `Integer(...)`.
|
|
609
|
+
- **Set**: `Set.new` and `Set[...]`.
|
|
610
|
+
- **String**: String and interpolated string literals, `String.new`, and
|
|
611
|
+
`String(...)`.
|
|
612
|
+
- **Time**: `Time.new`, `Time.now`, `Time.at`, `Time.utc`, `Time.gm`,
|
|
613
|
+
`Time.local`, `Time.mktime`, `Time.parse`, `Time.strptime`, and
|
|
614
|
+
`Time.iso8601`.
|
|
615
|
+
|
|
616
|
+
Assignments include local, instance, class, global, and constant writes (`=`
|
|
617
|
+
and `||=`), unwrapping trailing `.freeze` calls. Empty type tables are
|
|
618
|
+
omitted.
|
|
619
|
+
|
|
620
|
+
## REVIEW
|
|
621
|
+
|
|
622
|
+
Wile interactively reviews project files using `content`, `order`, `reek`,
|
|
623
|
+
and `rubocop`. By default, it pauses after each file; passing `--all` enables
|
|
624
|
+
auto-advance mode, advancing through files that pass all checks and stopping
|
|
625
|
+
only when an issue or offense is detected.
|
|
626
|
+
|
|
627
|
+
$ wile review # Review all lib files interactively
|
|
628
|
+
$ wile review --all # Auto-advance, stopping only on errors
|
|
629
|
+
$ wile review gemcheck # Filter to files matching gemcheck
|
|
630
|
+
$ wile review --only=rubocop # Run only rubocop check
|
|
631
|
+
$ wile review --strict # Use strict linter configurations
|
|
632
|
+
|
|
633
|
+
Arguments:
|
|
634
|
+
|
|
635
|
+
- `<target>`: Optional file path, directory path, or regex pattern filtering
|
|
636
|
+
the files to review. When omitted, all project files in `lib/` are reviewed.
|
|
637
|
+
|
|
638
|
+
Options:
|
|
639
|
+
|
|
640
|
+
- `-a`, `--all`: Auto-advance through passing files, stopping only on errors.
|
|
641
|
+
- `-s`, `--strict`: Use strict linter configurations (`.reek-strict.yml` and
|
|
642
|
+
`.rubocop-strict.yml`).
|
|
643
|
+
- `--only=CSV`: Comma-separated list of checks to run (`content`, `order`,
|
|
644
|
+
`reek`, `rubocop`).
|
|
645
|
+
|
|
646
|
+
## RUBY
|
|
647
|
+
|
|
648
|
+
Wile lists all Ruby files in the project tracked by Git, including `.rb` source
|
|
649
|
+
files and executable scripts with a Ruby shebang:
|
|
650
|
+
|
|
651
|
+
$ wile ruby # List all project Ruby files
|
|
652
|
+
$ wile ruby tasks # Filter files matching tasks
|
|
653
|
+
|
|
654
|
+
Arguments:
|
|
655
|
+
|
|
656
|
+
- `<match>...`: Optional patterns filtering file paths.
|
|
657
|
+
|
|
658
|
+
## TC
|
|
659
|
+
|
|
660
|
+
Wile discovers and lists test cases located in `test/tc_*`:
|
|
661
|
+
|
|
662
|
+
$ wile tc # List project custom unit tests
|
|
663
|
+
$ wile tc wile # List Wile template quality gates
|
|
664
|
+
$ wile tc all # List project and Wile tests
|
|
665
|
+
$ wile tc all --raw # Suppress headers and spaces
|
|
666
|
+
$ wile tc help # Filter project tests matching "help"
|
|
667
|
+
$ wile tc all rubo # Filter across all tests
|
|
668
|
+
|
|
669
|
+
Arguments and options:
|
|
670
|
+
|
|
671
|
+
- `<scope>`: Optional target category: `project` (default), `wile`
|
|
672
|
+
(template quality gates), or `all` (both categories).
|
|
673
|
+
- `<match>...`: Optional patterns filtering test file paths.
|
|
674
|
+
- `-r`, `--raw`: Suppress section headings and blank lines in `all` scope
|
|
675
|
+
for piping to other commands.
|
|
676
|
+
|
|
677
|
+
When listing `project` tests, domain unit tests corresponding to ranked
|
|
678
|
+
`lib/` files (following the `tc_ut_<module>` convention) are listed first
|
|
679
|
+
in rank order, followed by any remaining custom unit tests. When `all` is
|
|
680
|
+
selected without `--raw`, tests are grouped under `# Project:` and
|
|
681
|
+
`# Wile:` headings.
|
|
682
|
+
|
|
683
|
+
## TESTING
|
|
684
|
+
|
|
685
|
+
Wile executes project test suites located in `test/**/tc_*`. The `test`
|
|
686
|
+
task supports targeted filtering by test file and test method name:
|
|
687
|
+
|
|
688
|
+
$ wile test # Run all test suites
|
|
689
|
+
$ wile test --batch # Run tests in parallel batch mode
|
|
690
|
+
$ wile test usage # Run test files matching "usage"
|
|
691
|
+
$ wile test usage init # Run test methods matching "init"
|
|
692
|
+
$ wile test --list # List matching test files only
|
|
693
|
+
$ wile test -q # Fault-only output (suppress dots)
|
|
694
|
+
|
|
695
|
+
Arguments and options:
|
|
696
|
+
|
|
697
|
+
- `<filematch>`: Optional pattern filtering test file paths.
|
|
698
|
+
- `<methodmatch>`: Optional pattern filtering test method names.
|
|
699
|
+
- `--batch`: Run tests concurrently in a thread pool, suppressing output.
|
|
700
|
+
- `-l`, `--list`: Print matching test files without running them.
|
|
701
|
+
- `-q`, `--quiet`: Run with fault-only progress style.
|
|
702
|
+
|
|
703
|
+
## TODO
|
|
704
|
+
|
|
705
|
+
Wile displays project tasks from `TODO.md` or scrapes `# TODO` comments
|
|
706
|
+
from Ruby source files:
|
|
707
|
+
|
|
708
|
+
$ wile todo # Display TODO.md items
|
|
709
|
+
$ wile todo order # Scrape TODO comments in matching files
|
|
710
|
+
$ wile todo . # Scrape TODO comments across all files
|
|
711
|
+
|
|
712
|
+
When invoked without arguments, Wile displays `TODO.md` formatted with
|
|
713
|
+
`colora`. When invoked with one or more match patterns, Wile inspects
|
|
714
|
+
project Ruby files matching the patterns and prints their `# TODO` comments.
|
|
715
|
+
|
|
716
|
+
Arguments:
|
|
717
|
+
|
|
718
|
+
- `<match>...`: Optional patterns filtering Ruby file paths. When omitted,
|
|
719
|
+
`TODO.md` is displayed.
|
|
720
|
+
|
|
721
|
+
## UPDATE
|
|
722
|
+
|
|
723
|
+
Wile synchronizes and regenerates project metadata files, keeping the
|
|
724
|
+
`README.md` version, copyright notice, active console output blocks,
|
|
725
|
+
gemspec specification, and man page documentation in sync:
|
|
726
|
+
|
|
727
|
+
$ wile update # Update README, gemspec, and man page
|
|
728
|
+
$ wile update README # Update only README.md
|
|
729
|
+
$ wile update gemspec # Update only <project>.gemspec
|
|
730
|
+
$ wile update man # Update only man page roff files
|
|
731
|
+
$ wile update --force # Update despite uncommitted git changes
|
|
732
|
+
|
|
733
|
+
When updating `README.md`, Wile synchronizes the first version number with the
|
|
734
|
+
current project version, updates the copyright year and author, and refreshes
|
|
735
|
+
any active console blocks. Active console blocks are `console` code blocks
|
|
736
|
+
whose first line begins with `$ <project> ` and ends with ` #>>`. When
|
|
737
|
+
`bin/<project>` exists, Wile executes the command and replaces the block
|
|
738
|
+
contents with the latest command output.
|
|
739
|
+
|
|
740
|
+
When updating the gemspec, Wile regenerates `<project>.gemspec` from Git
|
|
741
|
+
tracked files, runtime dependencies, development dependencies, and the
|
|
742
|
+
summary and description parsed from `README.md`.
|
|
743
|
+
|
|
744
|
+
When updating man pages, Wile compiles `man/<project>.md` to
|
|
745
|
+
`man/<project>.1` using `pandoc` if available.
|
|
746
|
+
|
|
747
|
+
By default, Wile requires a clean Git working tree before applying updates.
|
|
748
|
+
If changes are generated, Wile displays a git diff of the modified targets
|
|
749
|
+
and prompts to verify the changes.
|
|
750
|
+
|
|
751
|
+
Arguments:
|
|
752
|
+
|
|
753
|
+
- `[README|gemspec|man]`: Optional target file to update. When omitted, all
|
|
754
|
+
three targets are updated.
|
|
755
|
+
|
|
756
|
+
Options:
|
|
757
|
+
|
|
758
|
+
- `-f`, `--force`: Proceed with updates even if the Git working tree has
|
|
759
|
+
uncommitted changes.
|
|
760
|
+
|
|
761
|
+
## OPTIONS DICTIONARY
|
|
762
|
+
|
|
763
|
+
Wile maintains a canonical dictionary of CLI options and conventions.
|
|
764
|
+
When invoked with one or more options and no task, Wile queries this
|
|
765
|
+
dictionary:
|
|
766
|
+
|
|
767
|
+
$ wile --format=json
|
|
768
|
+
--format=json
|
|
769
|
+
Description: Output format
|
|
770
|
+
Pattern: WORD (/\A[\w-]+\z/)
|
|
771
|
+
Commands: rubocop, reek, cucumber
|
|
772
|
+
|
|
773
|
+
For each flag, the dictionary reports:
|
|
774
|
+
|
|
775
|
+
- **Description**: The standard purpose of the flag.
|
|
776
|
+
- **Pattern**: The type name and regular expression (for flags taking a
|
|
777
|
+
value).
|
|
778
|
+
- **Commands**: Established tools or tasks that use the flag.
|
|
779
|
+
|
|
780
|
+
Both active task flags and reserved flags for custom tasks can be
|
|
781
|
+
inspected. If an unrecognized flag is passed or an option value fails
|
|
782
|
+
pattern validation, an error is reported.
|
|
783
|
+
|
|
784
|
+
## SEE ALSO
|
|
785
|
+
|
|
786
|
+
`ruby`(1), `fish`(1), `tmux`(1)
|