milestoner 18.12.0 → 19.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +82 -68
- data/lib/milestoner/builders/adoc/container.rb +15 -0
- data/lib/milestoner/builders/adoc/dependencies.rb +9 -0
- data/lib/milestoner/builders/adoc/indexer.rb +28 -0
- data/lib/milestoner/builders/adoc/pager.rb +35 -0
- data/lib/milestoner/builders/ascii_doc.rb +10 -18
- data/lib/milestoner/builders/{import.rb → dependencies.rb} +1 -1
- data/lib/milestoner/builders/feed.rb +6 -15
- data/lib/milestoner/builders/markdown.rb +10 -18
- data/lib/milestoner/builders/md/container.rb +15 -0
- data/lib/milestoner/builders/md/dependencies.rb +9 -0
- data/lib/milestoner/builders/md/indexer.rb +28 -0
- data/lib/milestoner/builders/md/pager.rb +35 -0
- data/lib/milestoner/builders/path_resolver.rb +23 -0
- data/lib/milestoner/builders/site/container.rb +16 -0
- data/lib/milestoner/builders/site/dependencies.rb +9 -0
- data/lib/milestoner/builders/site/indexer.rb +33 -0
- data/lib/milestoner/builders/site/pager.rb +35 -0
- data/lib/milestoner/builders/site/styler.rb +47 -0
- data/lib/milestoner/builders/stream.rb +3 -3
- data/lib/milestoner/builders/syndication/builder.rb +125 -0
- data/lib/milestoner/builders/syndication/indexer.rb +29 -0
- data/lib/milestoner/builders/syndication/refine.rb +27 -0
- data/lib/milestoner/builders/syndication/shared.rb +27 -0
- data/lib/milestoner/builders/web.rb +11 -43
- data/lib/milestoner/cli/actions/build/basename.rb +1 -1
- data/lib/milestoner/cli/actions/build/format.rb +1 -1
- data/lib/milestoner/cli/actions/build/index.rb +26 -0
- data/lib/milestoner/cli/actions/build/label.rb +1 -1
- data/lib/milestoner/cli/actions/build/layout.rb +1 -1
- data/lib/milestoner/cli/actions/build/max.rb +1 -1
- data/lib/milestoner/cli/actions/build/output.rb +25 -0
- data/lib/milestoner/cli/actions/build/stylesheet.rb +5 -7
- data/lib/milestoner/cli/actions/build/tail.rb +1 -1
- data/lib/milestoner/cli/actions/build/version.rb +1 -1
- data/lib/milestoner/cli/actions/cache/create.rb +1 -1
- data/lib/milestoner/cli/actions/cache/delete.rb +1 -1
- data/lib/milestoner/cli/actions/cache/find.rb +1 -1
- data/lib/milestoner/cli/actions/cache/info.rb +1 -1
- data/lib/milestoner/cli/actions/cache/list.rb +1 -1
- data/lib/milestoner/cli/actions/next.rb +1 -1
- data/lib/milestoner/cli/actions/publish.rb +1 -1
- data/lib/milestoner/cli/commands/build.rb +4 -3
- data/lib/milestoner/cli/commands/cache.rb +1 -1
- data/lib/milestoner/cli/shell.rb +1 -1
- data/lib/milestoner/commits/categorizer.rb +7 -5
- data/lib/milestoner/commits/collector.rb +1 -1
- data/lib/milestoner/commits/enricher.rb +7 -5
- data/lib/milestoner/commits/enrichers/author.rb +1 -1
- data/lib/milestoner/commits/enrichers/body.rb +1 -1
- data/lib/milestoner/commits/enrichers/colleague.rb +1 -1
- data/lib/milestoner/commits/enrichers/container.rb +2 -2
- data/lib/milestoner/commits/enrichers/{import.rb → dependencies.rb} +1 -1
- data/lib/milestoner/commits/enrichers/format.rb +1 -1
- data/lib/milestoner/commits/enrichers/issue.rb +1 -1
- data/lib/milestoner/commits/enrichers/milestone.rb +1 -1
- data/lib/milestoner/commits/enrichers/note.rb +1 -1
- data/lib/milestoner/commits/enrichers/review.rb +1 -1
- data/lib/milestoner/commits/enrichers/uri.rb +1 -1
- data/lib/milestoner/commits/versioner.rb +1 -1
- data/lib/milestoner/configuration/contract.rb +6 -2
- data/lib/milestoner/configuration/defaults.yml +10 -4
- data/lib/milestoner/configuration/model.rb +5 -1
- data/lib/milestoner/configuration/transformers/gems/description.rb +1 -1
- data/lib/milestoner/configuration/transformers/gems/label.rb +2 -2
- data/lib/milestoner/configuration/transformers/gems/name.rb +1 -1
- data/lib/milestoner/configuration/transformers/gems/uri.rb +1 -1
- data/lib/milestoner/configuration/transformers/generator/label.rb +1 -1
- data/lib/milestoner/configuration/transformers/generator/uri.rb +1 -1
- data/lib/milestoner/configuration/transformers/generator/version.rb +1 -1
- data/lib/milestoner/configuration/transformers/project/author.rb +1 -1
- data/lib/milestoner/container.rb +2 -1
- data/lib/milestoner/{import.rb → dependencies.rb} +1 -1
- data/lib/milestoner/durationer.rb +25 -0
- data/lib/milestoner/models/commit.rb +2 -1
- data/lib/milestoner/renderers/universal.rb +1 -1
- data/lib/milestoner/tags/builder.rb +40 -0
- data/lib/milestoner/tags/creator.rb +7 -9
- data/lib/milestoner/{commits/tagger.rb → tags/enricher.rb} +27 -15
- data/lib/milestoner/tags/publisher.rb +1 -1
- data/lib/milestoner/tags/pusher.rb +1 -1
- data/lib/milestoner/templates/layouts/page.adoc.erb +4 -0
- data/lib/milestoner/templates/layouts/page.git.erb +1 -0
- data/lib/milestoner/templates/layouts/page.html.erb +17 -10
- data/lib/milestoner/templates/layouts/page.md.erb +3 -0
- data/lib/milestoner/templates/layouts/page.stream.erb +2 -1
- data/lib/milestoner/templates/layouts/page.xml.erb +4 -0
- data/lib/milestoner/templates/milestones/_commit.adoc.erb +4 -4
- data/lib/milestoner/templates/milestones/_commit.html.erb +7 -4
- data/lib/milestoner/templates/milestones/_commit.stream.erb +1 -1
- data/lib/milestoner/templates/milestones/_commit.xml.erb +2 -6
- data/lib/milestoner/templates/milestones/_logo.adoc.erb +1 -1
- data/lib/milestoner/templates/milestones/_logo.html.erb +1 -1
- data/lib/milestoner/templates/milestones/index.adoc.erb +13 -0
- data/lib/milestoner/templates/milestones/index.html.erb +31 -0
- data/lib/milestoner/templates/milestones/index.md.erb +13 -0
- data/lib/milestoner/templates/milestones/show.adoc.erb +17 -1
- data/lib/milestoner/templates/milestones/show.git.erb +8 -0
- data/lib/milestoner/templates/milestones/show.html.erb +119 -1
- data/lib/milestoner/templates/milestones/show.md.erb +16 -1
- data/lib/milestoner/templates/milestones/show.stream.erb +17 -1
- data/lib/milestoner/templates/milestones/show.xml.erb +22 -1
- data/lib/milestoner/templates/public/page.css.erb +402 -299
- data/lib/milestoner/views/context.rb +2 -1
- data/lib/milestoner/views/milestones/index.rb +23 -0
- data/lib/milestoner/views/milestones/show.rb +2 -2
- data/lib/milestoner/views/parts/commit.rb +47 -37
- data/lib/milestoner/views/parts/tag.rb +25 -17
- data/lib/milestoner/views/parts/user.rb +1 -1
- data/lib/milestoner.rb +5 -1
- data/milestoner.gemspec +18 -18
- data.tar.gz.sig +0 -0
- metadata +68 -57
- metadata.gz.sig +0 -0
- data/lib/milestoner/cli/actions/build/root.rb +0 -25
- data/lib/milestoner/configuration/transformers/build/root.rb +0 -21
- data/lib/milestoner/syndication/builder.rb +0 -123
- data/lib/milestoner/syndication/refine.rb +0 -25
- data/lib/milestoner/syndication/shared.rb +0 -25
- data/lib/milestoner/templates/milestones/_tag.adoc.erb +0 -13
- data/lib/milestoner/templates/milestones/_tag.html.erb +0 -56
- data/lib/milestoner/templates/milestones/_tag.md.erb +0 -14
- data/lib/milestoner/templates/milestones/_tag.stream.erb +0 -15
- data/lib/milestoner/templates/milestones/_tag.xml.erb +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb9c88f85ee84022276a2ef4f5ebb9a4c1f6cd63551fb7e67ae485b625330441
|
4
|
+
data.tar.gz: 0ae364c293ad1b41cd5176fc072d063c6d07e8cc43e9d4b68bd74a6b054d66b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7158fa4011bcb552f0f812c9018263125d82181c0cfe2db6b552ec073c68a1943d9755d251f9b755edcca37c8d987feef8f12fb94c7d5912704cf5dbd13b4e4a
|
7
|
+
data.tar.gz: b8f252c5994c5e7b14949016a6a3ad8a41ac1ea71edad6477bc0a4afa07a0c5dd93623a041d8fd51593e99b514e844cab35df85d4d5ef187bbf5790295335aaf
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -56,41 +56,41 @@ The following are screenshots of using this gem to render release notes for the
|
|
56
56
|
|
57
57
|
=== ASCII Doc
|
58
58
|
|
59
|
-
image:https://alchemists.io/images/projects/milestoner/screenshots/build-ascii_doc-collapsed.png[Release Notes,width=
|
59
|
+
image:https://alchemists.io/images/projects/milestoner/screenshots/build-ascii_doc-collapsed.png[Release Notes,width=924,height=1224,role=focal_point]
|
60
60
|
|
61
|
-
image:https://alchemists.io/images/projects/milestoner/screenshots/build-ascii_doc-expanded.png[Release Notes,width=
|
61
|
+
image:https://alchemists.io/images/projects/milestoner/screenshots/build-ascii_doc-expanded.png[Release Notes,width=924,height=1552,role=focal_point]
|
62
62
|
|
63
63
|
* *Command*: `milestoner build --format ascii_doc`
|
64
64
|
* *Renderer*: {ascii_doc_link}
|
65
65
|
|
66
66
|
=== Feed
|
67
67
|
|
68
|
-
image:https://alchemists.io/images/projects/milestoner/screenshots/build-feed-collapsed.png[Release Notes,width=
|
68
|
+
image:https://alchemists.io/images/projects/milestoner/screenshots/build-feed-collapsed.png[Release Notes,width=1450,height=972,role=focal_point]
|
69
69
|
|
70
|
-
image:https://alchemists.io/images/projects/milestoner/screenshots/build-feed-expanded.png[Release Notes,width=
|
70
|
+
image:https://alchemists.io/images/projects/milestoner/screenshots/build-feed-expanded.png[Release Notes,width=1350,height=1731,role=focal_point]
|
71
71
|
|
72
72
|
* *Command*: `milestoner build --format feed`
|
73
73
|
* *Renderer*: {net_news_wire_link}
|
74
74
|
|
75
75
|
=== Markdown Format
|
76
76
|
|
77
|
-
image:https://alchemists.io/images/projects/milestoner/screenshots/build-markdown.png[Release Notes,width=
|
77
|
+
image:https://alchemists.io/images/projects/milestoner/screenshots/build-markdown.png[Release Notes,width=967,height=919,role=focal_point]
|
78
78
|
|
79
79
|
* *Command*: `milestoner build --format markdown`
|
80
80
|
* *Renderer*: {marked_link}
|
81
81
|
|
82
82
|
=== Stream
|
83
83
|
|
84
|
-
image:https://alchemists.io/images/projects/milestoner/screenshots/build-stream.png[Release Notes,width=
|
84
|
+
image:https://alchemists.io/images/projects/milestoner/screenshots/build-stream.png[Release Notes,width=1001,height=407,role=focal_point]
|
85
85
|
|
86
86
|
* *Command*: `milestoner build --format stream`
|
87
87
|
* *Renderer*: {iterm_link}
|
88
88
|
|
89
89
|
=== Web
|
90
90
|
|
91
|
-
image:https://alchemists.io/images/projects/milestoner/screenshots/build-web-collapsed.png[Release Notes,width=
|
91
|
+
image:https://alchemists.io/images/projects/milestoner/screenshots/build-web-collapsed.png[Release Notes,width=1323,height=1048,role=focal_point]
|
92
92
|
|
93
|
-
image:https://alchemists.io/images/projects/milestoner/screenshots/build-web-expanded.png[Release Notes,width=
|
93
|
+
image:https://alchemists.io/images/projects/milestoner/screenshots/build-web-expanded.png[Release Notes,width=1323,height=1540,role=focal_point]
|
94
94
|
|
95
95
|
* *Command*: `milestoner build --format web`
|
96
96
|
* *Renderer*: {firefox_link}
|
@@ -102,9 +102,9 @@ image:https://alchemists.io/images/projects/milestoner/screenshots/build-web-exp
|
|
102
102
|
** Example: `0.0.0`.
|
103
103
|
* Defaults to including {git_link} commits since last tag (or initialization of repository) when building release notes. This can be customized further if desired.
|
104
104
|
* Ensures {git_link} commit messages are grouped by prefix, in order defined, for categorization. For more details, see link:https://alchemists.io/projects/git-lint/#_commit_subject_prefix[Git Lint Commit Subject Prefix]. Defaults (can be customized):
|
105
|
-
** image:https://alchemists.io/images/projects/milestoner/icons/fixed.png[Fixed] Fixed
|
106
105
|
** image:https://alchemists.io/images/projects/milestoner/icons/added.png[Added] Added
|
107
106
|
** image:https://alchemists.io/images/projects/milestoner/icons/updated.png[Updated] Updated
|
107
|
+
** image:https://alchemists.io/images/projects/milestoner/icons/fixed.png[Fixed] Fixed
|
108
108
|
** image:https://alchemists.io/images/projects/milestoner/icons/removed.png[Removed] Removed
|
109
109
|
** image:https://alchemists.io/images/projects/milestoner/icons/refactored.png[Refactored] Refactored
|
110
110
|
* Ensures {git_link} commit messages are alphabetically sorted for release note categorization and readability.
|
@@ -169,19 +169,20 @@ avatar:
|
|
169
169
|
build:
|
170
170
|
basename: "index"
|
171
171
|
format: "stream"
|
172
|
+
index: true
|
172
173
|
layout: "page"
|
173
174
|
max: 1
|
174
|
-
|
175
|
-
stylesheet:
|
175
|
+
output: "tmp/milestones"
|
176
|
+
stylesheet: true
|
176
177
|
tail: "head"
|
177
178
|
commit:
|
178
179
|
categories:
|
179
|
-
- emoji: "✅"
|
180
|
-
label: "Fixed"
|
181
180
|
- emoji: "🟢"
|
182
181
|
label: "Added"
|
183
182
|
- emoji: "🔼"
|
184
183
|
label: "Updated"
|
184
|
+
- emoji: "✅"
|
185
|
+
label: "Fixed"
|
185
186
|
- emoji: "⛔️"
|
186
187
|
label: "Removed"
|
187
188
|
- emoji: "🔁"
|
@@ -200,6 +201,9 @@ project:
|
|
200
201
|
version: "%<project_uri_home>s/versions/%<id>s"
|
201
202
|
review:
|
202
203
|
uri: "https://github.com/%<project_owner>s/%<project_name>s/pulls/%<id>s"
|
204
|
+
stylesheet:
|
205
|
+
path: "page.css"
|
206
|
+
uri: "../page"
|
203
207
|
syndication:
|
204
208
|
categories:
|
205
209
|
- label: "Milestones"
|
@@ -218,6 +222,8 @@ syndication:
|
|
218
222
|
mime: "application/atom+xml"
|
219
223
|
relation: "self"
|
220
224
|
uri: "%<project_uri_home>s/versions.xml"
|
225
|
+
tag:
|
226
|
+
subject: "Version %<project_version>s"
|
221
227
|
tracker:
|
222
228
|
uri: "https://github.com/%<project_owner>s/%<project_name>s/issues/%<id>s"
|
223
229
|
----
|
@@ -229,10 +235,11 @@ The above can be customized as follows:
|
|
229
235
|
* `build`: Manages build details.
|
230
236
|
** `basename`: Required. The build file basename. Default: `index`. Used to customize the built file name.
|
231
237
|
** `format`: Required. The build output format. Default: `stream`. Used to determine what format to build the release notes as. Multiple formats are supported.
|
238
|
+
** `index`: Required. Enables (or disables) building the versions index page for web format only. Default: true.
|
232
239
|
** `layout`: Required. The {hanami_views_link} layout used when building release notes. Default: page. This can be disabled when using `false` or customized further -- via your own {xdg_link} configuration -- when providing your own templates and/or partials.
|
233
240
|
** `max`: Required. The maximum number of {git_link} tags to build. Default: 1. By default, you are limited to building release notes for changes (commits) since the last tag but you can increase the maximum to build release notes for as many tags as you like.
|
234
|
-
** `
|
235
|
-
** `stylesheet`: Required.
|
241
|
+
** `output`: Required. The the directory for all generated output. Default: `tmp/milestones`. This can be a relative or absolute path and defaults to the current working directory. The path is automatically created if missing.
|
242
|
+
** `stylesheet`: Required. Enables (or disables) building the stylesheet for web format only. Default: true.
|
236
243
|
* `commit`: Manages commit categories, emojis, hyperlinks, and formatting.
|
237
244
|
** `categories`: Required. Defaults to five categories which pairs well with the {git_lint_link} gem. Category order is important with the first taking precedence over the second and so forth. Special characters are allowed for prefixes but should be enclosed in quotes. To disable categories, use an empty array. Example: `categories: []`.
|
238
245
|
*** `emoji`: Required. The emoji associated with the label for output purposes. _Used by the {ascii_doc_link}, {markdown_link}, and stream build formats_. Defaults to the provided emojis.
|
@@ -263,6 +270,9 @@ The above can be customized as follows:
|
|
263
270
|
** `version`: Required. The project version. Dynamically calculated based on the last {git_link} tag of your project and {git_link} `Milestone` commit trailer metadata. The default is: `0.0.0`. For more on this see, the _Automatic Versioning_ section below. You can configure a value but is _not recommended_ since any custom value you supply will be used for _all_ deployments and release notes. You're better off letting this gem compute this for you.
|
264
271
|
* `review`: Manages code review details.
|
265
272
|
** `uri`: Required. The URI format for linking to code reviews as formatted using {string_formats_link}. Default: GitHub. The `id` is currently a _placeholder_ for future feature support when API support is added. For now this links to _all_ code reviews with the goal to link to individual code reviews based on {git_trailers_link}.
|
273
|
+
* `stylesheet`: Manages stylesheet configuration for `web` build format.
|
274
|
+
** `path`: Required. The relative (or absolute) path to where the stylesheet is built. Default: `page.css`. The path is automatically created if non-existing. A relative path is always relative to the build root as configured above.
|
275
|
+
** `uri`: Required. The relative (or absolute) path for linking to the stylesheet within the page layout. Default: "../page".
|
266
276
|
* `syndication`: Manages syndicated feed details when used with the `feed` build format.
|
267
277
|
** `categories`: Required. Manages category details.
|
268
278
|
*** `label`: Required. The category label. Default: Milestones.
|
@@ -277,6 +287,8 @@ The above can be customized as follows:
|
|
277
287
|
*** `mime`: Required. The mime type. Defaults to HTML and XML.
|
278
288
|
*** `relation`: Required. Identifies the relation of the link which can either be `self` (i.e. XML) or `alternate` (i.e. HTML).
|
279
289
|
*** `uri`: Required. The link URI to follow for more information. Defaults to dynamic string formatting based on existing configuration values.
|
290
|
+
* `tag`: Required. Manages tag creation.
|
291
|
+
** `subject`: Required. The tag subject. Default: `+Version %<project_version>s+`. Example: "Version 1.2.3". You can use a string literal or include any configuration key for a dynamic subject. In the case of `project_version` this is calculated at runtime.
|
280
292
|
* `tracker`: Required. Manages issue tracker details.
|
281
293
|
** `uri`: Required. The URI format for linking to issues as formatted using {string_formats_link}. Default: GitHub. The `id` is dynamically calculated via the commit `Issue` trailer as linted by {git_lint_link}. When no ID can be found, this will default to _All_ issues.
|
282
294
|
|
@@ -341,11 +353,11 @@ Once team member information is stored in your cache, you'll be able to build re
|
|
341
353
|
|
342
354
|
If you don't use the cache, your release notes use a question mark (?) and _unknown_ for team members as highlighted below:
|
343
355
|
|
344
|
-
image:https://alchemists.io/images/projects/milestoner/screenshots/no_cache.png[Usage,width=
|
356
|
+
image:https://alchemists.io/images/projects/milestoner/screenshots/no_cache.png[Usage,width=978,height=618,role=focal_point]
|
345
357
|
|
346
358
|
=== Build
|
347
359
|
|
348
|
-
image:https://alchemists.io/images/projects/milestoner/screenshots/usage-build.png[Usage,width=
|
360
|
+
image:https://alchemists.io/images/projects/milestoner/screenshots/usage-build.png[Usage,width=787,height=675,role=focal_point]
|
349
361
|
|
350
362
|
The build command allows you to quickly build release notes to check the current status of your project or deploy a new milestone. By default, the build command uses either the default or custom configuration as documented in the _Configuration_ section above. This means, when using the defaults, you can immediately build the release notes for your project in a temporary directory:
|
351
363
|
|
@@ -353,8 +365,8 @@ The build command allows you to quickly build release notes to check the current
|
|
353
365
|
----
|
354
366
|
milestoner build --format web
|
355
367
|
# 🟢 [milestoner] Building Milestoner (web)...
|
356
|
-
# 🟢 [milestoner]
|
357
|
-
# 🟢 [milestoner]
|
368
|
+
# 🟢 [milestoner] Created: /Users/bkuhlmann/Engineering/OSS/milestoner/tmp/milestones/page.css.
|
369
|
+
# 🟢 [milestoner] Created: /Users/bkuhlmann/Engineering/OSS/milestoner/tmp/milestones/index.html.
|
358
370
|
----
|
359
371
|
|
360
372
|
The above command is so useful that I use the following `msw` (i.e. Milestoner Web) Bash alias to build current release notes or release notes for several tags:
|
@@ -378,7 +390,7 @@ msw() {
|
|
378
390
|
open "$path"
|
379
391
|
fi
|
380
392
|
else
|
381
|
-
milestoner build --max "$max" --
|
393
|
+
milestoner build --max "$max" --format web
|
382
394
|
|
383
395
|
if [[ -d "$root" ]]; then
|
384
396
|
ruby -run -e httpd "tmp/milestones" --port 3030 &
|
@@ -544,56 +556,58 @@ The quickest way to start customization is to copy the `templates` folder struct
|
|
544
556
|
....
|
545
557
|
lib/milestoner/templates
|
546
558
|
├── layouts
|
547
|
-
│
|
548
|
-
│
|
549
|
-
│
|
550
|
-
│
|
551
|
-
│
|
559
|
+
│ ├── page.adoc.erb
|
560
|
+
│ ├── page.git.erb
|
561
|
+
│ ├── page.html.erb
|
562
|
+
│ ├── page.md.erb
|
563
|
+
│ ├── page.stream.erb
|
564
|
+
│ └── page.xml.erb
|
552
565
|
├── milestones
|
553
|
-
│
|
554
|
-
│
|
555
|
-
│
|
556
|
-
│
|
557
|
-
│
|
558
|
-
│
|
559
|
-
│
|
560
|
-
│
|
561
|
-
│
|
562
|
-
│
|
563
|
-
│
|
564
|
-
│
|
565
|
-
│
|
566
|
-
│
|
567
|
-
│
|
568
|
-
│
|
569
|
-
│
|
570
|
-
│
|
571
|
-
│
|
572
|
-
│
|
573
|
-
│
|
574
|
-
│
|
575
|
-
│
|
576
|
-
│
|
577
|
-
│
|
578
|
-
│
|
579
|
-
│
|
580
|
-
│
|
581
|
-
│
|
582
|
-
│
|
583
|
-
│
|
584
|
-
│
|
585
|
-
│
|
586
|
-
│
|
587
|
-
│
|
588
|
-
│
|
589
|
-
│
|
590
|
-
│
|
591
|
-
│
|
592
|
-
│
|
593
|
-
│
|
594
|
-
│
|
566
|
+
│ ├── _avatar.adoc.erb
|
567
|
+
│ ├── _avatar.html.erb
|
568
|
+
│ ├── _avatar.md.erb
|
569
|
+
│ ├── _avatar.xml.erb
|
570
|
+
│ ├── _commit.adoc.erb
|
571
|
+
│ ├── _commit.git.erb
|
572
|
+
│ ├── _commit.html.erb
|
573
|
+
│ ├── _commit.md.erb
|
574
|
+
│ ├── _commit.stream.erb
|
575
|
+
│ ├── _commit.xml.erb
|
576
|
+
│ ├── _content.adoc.erb
|
577
|
+
│ ├── _content.html.erb
|
578
|
+
│ ├── _content.xml.erb
|
579
|
+
│ ├── _logo.adoc.erb
|
580
|
+
│ ├── _logo.html.erb
|
581
|
+
│ ├── _logo.md.erb
|
582
|
+
│ ├── _logo.xml.erb
|
583
|
+
│ ├── _none.adoc.erb
|
584
|
+
│ ├── _none.html.erb
|
585
|
+
│ ├── _none.xml.erb
|
586
|
+
│ ├── _profile.adoc.erb
|
587
|
+
│ ├── _profile.html.erb
|
588
|
+
│ ├── _profile.md.erb
|
589
|
+
│ ├── _profile.xml.erb
|
590
|
+
│ ├── _tag-insecure.html.erb
|
591
|
+
│ ├── _tag-secure.html.erb
|
592
|
+
│ ├── _user.adoc.erb
|
593
|
+
│ ├── _user.html.erb
|
594
|
+
│ ├── _user.md.erb
|
595
|
+
│ ├── _user.xml.erb
|
596
|
+
│ ├── _users.adoc.erb
|
597
|
+
│ ├── _users.html.erb
|
598
|
+
│ ├── _users.md.erb
|
599
|
+
│ ├── _users.xml.erb
|
600
|
+
│ ├── index.adoc.erb
|
601
|
+
│ ├── index.html.erb
|
602
|
+
│ ├── index.md.erb
|
603
|
+
│ ├── show.adoc.erb
|
604
|
+
│ ├── show.git.erb
|
605
|
+
│ ├── show.html.erb
|
606
|
+
│ ├── show.md.erb
|
607
|
+
│ ├── show.stream.erb
|
608
|
+
│ └── show.xml.erb
|
595
609
|
└── public
|
596
|
-
|
610
|
+
└── page.css.erb
|
597
611
|
....
|
598
612
|
|
599
613
|
This means you could, for example, copy all of Milestoner's default templates to your own {runcom_link} configuration and customize as you see fit. Example (using global configuration):
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Milestoner
|
4
|
+
module Builders
|
5
|
+
module ADoc
|
6
|
+
# Defines ASCII Doc dependencies.
|
7
|
+
module Container
|
8
|
+
extend Containable
|
9
|
+
|
10
|
+
register(:indexer) { Indexer.new }
|
11
|
+
register(:pager) { Pager.new }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Milestoner
|
4
|
+
module Builders
|
5
|
+
module ADoc
|
6
|
+
# Builds ASCII Doc index.
|
7
|
+
class Indexer
|
8
|
+
include Milestoner::Dependencies[:settings, :logger]
|
9
|
+
|
10
|
+
def initialize(path_resolver: PathResolver, view: Views::Milestones::Index.new, **)
|
11
|
+
super(**)
|
12
|
+
@path_resolver = path_resolver
|
13
|
+
@view = view
|
14
|
+
end
|
15
|
+
|
16
|
+
def call tags
|
17
|
+
path_resolver.call settings.build_output.join("index.adoc"), logger: do |path|
|
18
|
+
path.write view.call(tags:, layout: settings.build_layout, format: :adoc)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
attr_reader :path_resolver, :view
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Milestoner
|
4
|
+
module Builders
|
5
|
+
module ADoc
|
6
|
+
# Builds ASCII Doc version.
|
7
|
+
class Pager
|
8
|
+
include Milestoner::Dependencies[:settings, :logger]
|
9
|
+
|
10
|
+
def initialize(path_resolver: PathResolver, view: Views::Milestones::Show.new, **)
|
11
|
+
super(**)
|
12
|
+
@path_resolver = path_resolver
|
13
|
+
@view = view
|
14
|
+
end
|
15
|
+
|
16
|
+
def call past, tag, future
|
17
|
+
settings.project_version = tag.version
|
18
|
+
write past, tag, future
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
attr_reader :path_resolver, :view
|
24
|
+
|
25
|
+
def write past, tag, future
|
26
|
+
path = settings.build_output.join(tag.version, settings.build_basename).sub_ext ".adoc"
|
27
|
+
|
28
|
+
path_resolver.call path, logger: do
|
29
|
+
path.write view.call(past:, tag:, future:, layout: settings.build_layout, format: :adoc)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -1,19 +1,22 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "refinements/array"
|
3
4
|
require "refinements/pathname"
|
4
5
|
|
5
6
|
module Milestoner
|
6
7
|
module Builders
|
7
|
-
# Builds ASCII Doc
|
8
|
+
# Builds ASCII Doc files.
|
8
9
|
class ASCIIDoc
|
9
|
-
include Milestoner::
|
10
|
+
include Milestoner::Dependencies[:settings, :logger]
|
11
|
+
include ADoc::Dependencies[:indexer, :pager]
|
10
12
|
|
13
|
+
using Refinements::Array
|
11
14
|
using Refinements::Pathname
|
12
15
|
|
13
|
-
def initialize(tagger:
|
16
|
+
def initialize(tagger: Tags::Enricher.new, view: Views::Milestones::Show.new, **)
|
17
|
+
super(**)
|
14
18
|
@tagger = tagger
|
15
19
|
@view = view
|
16
|
-
super(**)
|
17
20
|
end
|
18
21
|
|
19
22
|
def call
|
@@ -27,20 +30,9 @@ module Milestoner
|
|
27
30
|
attr_reader :tagger, :view
|
28
31
|
|
29
32
|
def build tags
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
def write tag
|
35
|
-
path = make_path tag
|
36
|
-
|
37
|
-
path.write view.call(tag:, layout: settings.build_layout, format: :adoc)
|
38
|
-
logger.info { "Built: #{path}." }
|
39
|
-
end
|
40
|
-
|
41
|
-
def make_path tag
|
42
|
-
version = settings.build_max == 1 ? "" : tag.version
|
43
|
-
settings.build_root.join(version, settings.build_basename).make_ancestors.sub_ext ".adoc"
|
33
|
+
indexer.call tags
|
34
|
+
tags.ring { |future, present, past| pager.call past, present, future }
|
35
|
+
settings.build_output
|
44
36
|
end
|
45
37
|
|
46
38
|
def failure message
|
@@ -6,34 +6,25 @@ module Milestoner
|
|
6
6
|
module Builders
|
7
7
|
# Builds syndicated feed output.
|
8
8
|
class Feed
|
9
|
-
include Milestoner::
|
9
|
+
include Milestoner::Dependencies[:logger]
|
10
10
|
|
11
11
|
using Refinements::Pathname
|
12
12
|
|
13
|
-
def initialize(tagger:
|
14
|
-
@tagger = tagger
|
15
|
-
@syndicator = syndicator
|
13
|
+
def initialize(tagger: Tags::Enricher.new, indexer: Syndication::Indexer.new, **)
|
16
14
|
super(**)
|
15
|
+
@tagger = tagger
|
16
|
+
@indexer = indexer
|
17
17
|
end
|
18
18
|
|
19
19
|
def call
|
20
20
|
tagger.call
|
21
|
-
.bind { |tags|
|
22
|
-
.fmap { |body| write body }
|
21
|
+
.bind { |tags| indexer.call tags }
|
23
22
|
.alt_map { |message| failure message }
|
24
23
|
end
|
25
24
|
|
26
25
|
private
|
27
26
|
|
28
|
-
attr_reader :tagger, :
|
29
|
-
|
30
|
-
def write body
|
31
|
-
root = settings.build_root
|
32
|
-
path = root.join(settings.build_basename).make_ancestors.sub_ext(".xml").write body
|
33
|
-
|
34
|
-
logger.info { "Built: #{path}." }
|
35
|
-
root
|
36
|
-
end
|
27
|
+
attr_reader :tagger, :indexer
|
37
28
|
|
38
29
|
def failure message
|
39
30
|
logger.error { message }
|
@@ -1,19 +1,22 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "refinements/array"
|
3
4
|
require "refinements/pathname"
|
4
5
|
|
5
6
|
module Milestoner
|
6
7
|
module Builders
|
7
|
-
# Builds Markdown
|
8
|
+
# Builds Markdown files.
|
8
9
|
class Markdown
|
9
|
-
include Milestoner::
|
10
|
+
include Milestoner::Dependencies[:settings, :logger]
|
11
|
+
include MD::Dependencies[:indexer, :pager]
|
10
12
|
|
13
|
+
using Refinements::Array
|
11
14
|
using Refinements::Pathname
|
12
15
|
|
13
|
-
def initialize(tagger:
|
16
|
+
def initialize(tagger: Tags::Enricher.new, view: Views::Milestones::Show.new, **)
|
17
|
+
super(**)
|
14
18
|
@tagger = tagger
|
15
19
|
@view = view
|
16
|
-
super(**)
|
17
20
|
end
|
18
21
|
|
19
22
|
def call
|
@@ -27,20 +30,9 @@ module Milestoner
|
|
27
30
|
attr_reader :tagger, :view
|
28
31
|
|
29
32
|
def build tags
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
def write tag
|
35
|
-
path = make_path tag
|
36
|
-
|
37
|
-
path.write view.call(tag:, layout: settings.build_layout, format: :md)
|
38
|
-
logger.info { "Built: #{path}." }
|
39
|
-
end
|
40
|
-
|
41
|
-
def make_path tag
|
42
|
-
version = settings.build_max == 1 ? "" : tag.version
|
43
|
-
settings.build_root.join(version, settings.build_basename).make_ancestors.sub_ext ".md"
|
33
|
+
indexer.call tags
|
34
|
+
tags.ring { |future, present, past| pager.call past, present, future }
|
35
|
+
settings.build_output
|
44
36
|
end
|
45
37
|
|
46
38
|
def failure message
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Milestoner
|
4
|
+
module Builders
|
5
|
+
module MD
|
6
|
+
# Defines Markdown dependencies.
|
7
|
+
module Container
|
8
|
+
extend Containable
|
9
|
+
|
10
|
+
register(:indexer) { Indexer.new }
|
11
|
+
register(:pager) { Pager.new }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Milestoner
|
4
|
+
module Builders
|
5
|
+
module MD
|
6
|
+
# Builds Markdown index.
|
7
|
+
class Indexer
|
8
|
+
include Milestoner::Dependencies[:settings, :logger]
|
9
|
+
|
10
|
+
def initialize(path_resolver: PathResolver, view: Views::Milestones::Index.new, **)
|
11
|
+
super(**)
|
12
|
+
@path_resolver = path_resolver
|
13
|
+
@view = view
|
14
|
+
end
|
15
|
+
|
16
|
+
def call tags
|
17
|
+
path_resolver.call settings.build_output.join("index.md"), logger: do |path|
|
18
|
+
path.write view.call(tags:, layout: settings.build_layout, format: :md)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
attr_reader :path_resolver, :view
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Milestoner
|
4
|
+
module Builders
|
5
|
+
module MD
|
6
|
+
# Builds Markdown version.
|
7
|
+
class Pager
|
8
|
+
include Milestoner::Dependencies[:settings, :logger]
|
9
|
+
|
10
|
+
def initialize(path_resolver: PathResolver, view: Views::Milestones::Show.new, **)
|
11
|
+
super(**)
|
12
|
+
@path_resolver = path_resolver
|
13
|
+
@view = view
|
14
|
+
end
|
15
|
+
|
16
|
+
def call past, tag, future
|
17
|
+
settings.project_version = tag.version
|
18
|
+
write past, tag, future
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
attr_reader :path_resolver, :view
|
24
|
+
|
25
|
+
def write past, tag, future
|
26
|
+
path = settings.build_output.join(tag.version, settings.build_basename).sub_ext ".md"
|
27
|
+
|
28
|
+
path_resolver.call path, logger: do
|
29
|
+
path.write view.call(past:, tag:, future:, layout: settings.build_layout, format: :md)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "dry/monads"
|
4
|
+
require "refinements/pathname"
|
5
|
+
|
6
|
+
module Milestoner
|
7
|
+
# Safely handles file paths which may or may not exist.
|
8
|
+
module Builders
|
9
|
+
using Refinements::Pathname
|
10
|
+
|
11
|
+
PathResolver = lambda do |path, logger:, &block|
|
12
|
+
if path.exist?
|
13
|
+
logger.warn { "Skipped (exists): #{path}." }
|
14
|
+
else
|
15
|
+
path.make_ancestors
|
16
|
+
block.call path if block
|
17
|
+
logger.info { "Created: #{path}." }
|
18
|
+
end
|
19
|
+
|
20
|
+
Dry::Monads::Success path
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|