Commit c5b9eb8
committed
v0.2.0: Canonical block synchronization and source skimming features
This merge combines all feature development from the dev/0.2 branch into a single canonical update for v0.2.0.
Highlights include the new `Sourcerer::Sync` engine, the `Sourcerer::SourceSkim` document inspection API,
and utilities for inferring paths from strings and for runtime amendment of `Array<String>` lists.
- **Sourcerer::Sync**: A new engine for synchronizing content blocks between template sources and target files
using configurable tag markers. Includes:
- `BlockParser`: Format-agnostic tagged-region parser supporting AsciiDoc, Ruby, Shell, and HTML comments.
- `Cast`: Operations for initializing new files from Liquid templates or updating existing blocks.
- Support for "canonical prefixes" (e.g., `universal-`) to distinguish managed content.
- **Sourcerer::SourceSkim**: A machine-oriented document inspection API that produces structured representations of AsciiDoc source files.
- Extracts section hierarchies (tree or flat), attributes, images, includes, tables, and blocks.
- Includes an `Asciidoctor::TreeProcessor` extension for integration into generic conversion pipelines.
- SChema and sample file added to help tools infer skim output structure:
- `specs/data/asciidoc-source-skim-model.yaml` (representative structure w/ comments)
- `specs/data/asciidoc-source-skim.schema.json` (JSON Schema definition of full skim output)
- **Two Example Scripts**: New CLI utilities (`scripts/mark_down_grade.rb` and `scripts/skim_asciidoc.rb`).
- `Sourcerer::Util::Pathifier`: Unified path resolution supporting files, directories (with recursive search), and glob patterns.
- `Sourcerer::Util::ListAmend`: Implements a +/- amendment syntax for merging user-supplied lists into library defaults.
- `Sourcerer::AttributesFilter`: Shared utility for partitioning builtin vs. user-defined Asciidoctor attributes.
- Version bumped 0.1.0 -> 0.2.0.
- Added `AsciiSourcerer::Sync` alias for namespace parity.
- Updated main `Sourcerer` facade with new autoloads and logic.
- Comprehensive test suite expansion (approx. 150+ new RSpec examples).
- 17-example `block_parser_spec.rb` and 23-example `cast_spec.rb` added.
- 5 fixture files added under `specs/tests/fixtures/sync/`.
- `ascii_sourcerer_alias_spec.rb` version assertion updated to `0.2.0`.
- RuboCop baseline updated for new modules.
- README.adoc updated with new documentation for all features.
- Existing Bash scripts updated with proper shebang statments.1 parent 165f454 commit c5b9eb8
36 files changed
Lines changed: 3955 additions & 51 deletions
File tree
- .config
- lib
- asciidoctor/extensions/source-skim-tree-processor
- sourcerer
- source_skim
- sync
- util
- scripts
- specs
- data
- tests
- fixtures
- sync
- rspec
- sourcerer
- sync
- util
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
30 | 46 | | |
31 | 47 | | |
32 | 48 | | |
| |||
35 | 51 | | |
36 | 52 | | |
37 | 53 | | |
38 | | - | |
39 | | - | |
40 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
41 | 58 | | |
| 59 | + | |
| 60 | + | |
42 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
0 commit comments