milestoner 18.5.0 → 18.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/README.adoc +47 -30
  4. data/lib/milestoner/templates/milestones/_avatar.adoc.erb +1 -1
  5. data/lib/milestoner/templates/milestones/_avatar.html.erb +6 -5
  6. data/lib/milestoner/templates/milestones/_avatar.md.erb +1 -2
  7. data/lib/milestoner/templates/milestones/_avatar.xml.erb +1 -5
  8. data/lib/milestoner/templates/milestones/_commit.adoc.erb +6 -20
  9. data/lib/milestoner/templates/milestones/_commit.html.erb +32 -53
  10. data/lib/milestoner/templates/milestones/_commit.md.erb +1 -1
  11. data/lib/milestoner/templates/milestones/_commit.xml.erb +13 -41
  12. data/lib/milestoner/templates/milestones/_content.adoc.erb +1 -0
  13. data/lib/milestoner/templates/milestones/_content.html.erb +1 -0
  14. data/lib/milestoner/templates/milestones/_content.xml.erb +1 -0
  15. data/lib/milestoner/templates/milestones/_logo.adoc.erb +1 -0
  16. data/lib/milestoner/templates/milestones/_logo.html.erb +1 -0
  17. data/lib/milestoner/templates/milestones/_logo.md.erb +3 -0
  18. data/lib/milestoner/templates/milestones/_logo.xml.erb +3 -0
  19. data/lib/milestoner/templates/milestones/_none.adoc.erb +1 -0
  20. data/lib/milestoner/templates/milestones/_none.html.erb +1 -0
  21. data/lib/milestoner/templates/milestones/_none.xml.erb +1 -0
  22. data/lib/milestoner/templates/milestones/_profile.adoc.erb +1 -1
  23. data/lib/milestoner/templates/milestones/_profile.html.erb +1 -5
  24. data/lib/milestoner/templates/milestones/_profile.md.erb +1 -1
  25. data/lib/milestoner/templates/milestones/_profile.xml.erb +1 -5
  26. data/lib/milestoner/templates/milestones/_tag-insecure.html.erb +8 -0
  27. data/lib/milestoner/templates/milestones/_tag-secure.html.erb +13 -0
  28. data/lib/milestoner/templates/milestones/_tag.adoc.erb +3 -3
  29. data/lib/milestoner/templates/milestones/_tag.html.erb +3 -29
  30. data/lib/milestoner/templates/milestones/_tag.md.erb +2 -6
  31. data/lib/milestoner/templates/milestones/_tag.xml.erb +2 -7
  32. data/lib/milestoner/templates/milestones/_user.adoc.erb +1 -0
  33. data/lib/milestoner/templates/milestones/_user.html.erb +1 -0
  34. data/lib/milestoner/templates/milestones/_user.md.erb +1 -0
  35. data/lib/milestoner/templates/milestones/_user.xml.erb +1 -0
  36. data/lib/milestoner/templates/milestones/_users.adoc.erb +3 -0
  37. data/lib/milestoner/templates/milestones/_users.html.erb +7 -0
  38. data/lib/milestoner/templates/milestones/_users.md.erb +3 -0
  39. data/lib/milestoner/templates/milestones/_users.xml.erb +7 -0
  40. data/lib/milestoner/templates/public/page.css.erb +49 -21
  41. data/lib/milestoner/views/context.rb +1 -1
  42. data/lib/milestoner/views/milestones/show.rb +2 -0
  43. data/lib/milestoner/views/parts/commit.rb +27 -3
  44. data/lib/milestoner/views/parts/tag.rb +15 -4
  45. data/lib/milestoner/views/parts/user.rb +32 -0
  46. data/lib/milestoner/views/scope_builder.rb +40 -0
  47. data/lib/milestoner/views/scopes/content.rb +17 -0
  48. data/lib/milestoner/views/scopes/logo.rb +15 -0
  49. data/lib/milestoner/views/scopes/tag_signature.rb +27 -0
  50. data/lib/milestoner/views/scopes/users.rb +14 -0
  51. data/milestoner.gemspec +2 -2
  52. data.tar.gz.sig +0 -0
  53. metadata +31 -9
  54. metadata.gz.sig +0 -0
  55. data/lib/milestoner/templates/milestones/_icon.adoc.erb +0 -1
  56. data/lib/milestoner/templates/milestones/_icon.html.erb +0 -6
  57. data/lib/milestoner/templates/milestones/_icon.md.erb +0 -5
  58. data/lib/milestoner/templates/milestones/_icon.xml.erb +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 013c7206025524458c33b20bceec9005313ae98a1ae4c6f93030548886bf24c2
4
- data.tar.gz: 95a22be79d0443573db5b347a1f519c99ea2eab1c0298f8098824a1171e0d104
3
+ metadata.gz: acc8c51f0fa0cacdf7e8bc0e871a697520ce09c2b7af09c1dba01c1632b06671
4
+ data.tar.gz: 164ef1e821b63b7b382cbcb4dda7a9450c7d0493dfb92436b2161fcc983599f3
5
5
  SHA512:
6
- metadata.gz: ef5612eea45a857439702238c5fc40a5ecdc01d024a60815b07d69ba9eea1fe4eced7e88fc4f62574445dd92df4e6916ec3522d062153280c03c7bdee9fcc111
7
- data.tar.gz: e6f69f7dea0b85b11af8ee52060692141e27cff663ace8313694ed48745f31671026a9ef5f0afcabc9bdb089e7d5edf5c236b219b28f366a18fc5f0fa1a879d6
6
+ metadata.gz: a999795a124cc155086e5826bd64880f9838d415e941b455cab6141bd66a05713e47009afbc11749809ff7692aced45bb13878f4a6fc0620ec520536f5741d0d
7
+ data.tar.gz: f2e01fb0744c54b2d1b6c87f7bd7932c71bde127a5509a101e05b37c87cc340371af596fd3bcf5edf72dfbcd25a99505a54925e323ed88a489af4672c7ebe3e2
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=1149,height=830,role=focal_point]
59
+ image:https://alchemists.io/images/projects/milestoner/screenshots/build-ascii_doc-collapsed.png[Release Notes,width=1160,height=831,role=focal_point]
60
60
 
61
- image:https://alchemists.io/images/projects/milestoner/screenshots/build-ascii_doc-expanded.png[Release Notes,width=1149,height=1054,role=focal_point]
61
+ image:https://alchemists.io/images/projects/milestoner/screenshots/build-ascii_doc-expanded.png[Release Notes,width=1160,height=1335,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=1109,height=1143,role=focal_point]
68
+ image:https://alchemists.io/images/projects/milestoner/screenshots/build-feed-collapsed.png[Release Notes,width=1275,height=954,role=focal_point]
69
69
 
70
- image:https://alchemists.io/images/projects/milestoner/screenshots/build-feed-expanded.png[Release Notes,width=1109,height=1143,role=focal_point]
70
+ image:https://alchemists.io/images/projects/milestoner/screenshots/build-feed-expanded.png[Release Notes,width=1275,height=1613,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=789,height=718,role=focal_point]
77
+ image:https://alchemists.io/images/projects/milestoner/screenshots/build-markdown.png[Release Notes,width=796,height=703,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=586,height=341,role=focal_point]
84
+ image:https://alchemists.io/images/projects/milestoner/screenshots/build-stream.png[Release Notes,width=566,height=320,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=1195,height=878,role=focal_point]
91
+ image:https://alchemists.io/images/projects/milestoner/screenshots/build-web-collapsed.png[Release Notes,width=1296,height=647,role=focal_point]
92
92
 
93
- image:https://alchemists.io/images/projects/milestoner/screenshots/build-web-expanded.png[Release Notes,width=1195,height=878,role=focal_point]
93
+ image:https://alchemists.io/images/projects/milestoner/screenshots/build-web-expanded.png[Release Notes,width=1296,height=1032,role=focal_point]
94
94
 
95
95
  * *Command*: `milestoner build --format web`
96
96
  * *Renderer*: {firefox_link}
@@ -111,10 +111,10 @@ image:https://alchemists.io/images/projects/milestoner/screenshots/build-web-exp
111
111
  * Provides automatic versioning based on last {git_link} tag and {git_trailers_link}. See {git_commit_anatomy_link} for details.
112
112
  * Supports multiple build formats:
113
113
  ** {ascii_doc_link}
114
- ** {syndication_link}
114
+ ** {syndication_link} (feed)
115
115
  ** {markdown_link}
116
116
  ** Stream (console)
117
- ** link:https://html.spec.whatwg.org/multipage[Web]
117
+ ** link:https://html.spec.whatwg.org/multipage[Web] (HTML)
118
118
  * Supports {git_notes_link}.
119
119
  * Supports customization via your personal {xdg_link}, {runcom_link}, and/or {hanami_views_link} configuration.
120
120
 
@@ -277,7 +277,7 @@ The above can be customized as follows:
277
277
  *** `mime`: Required. The mime type. Defaults to HTML and XML.
278
278
  *** `relation`: Required. Identifies the relation of the link which can either be `self` (i.e. XML) or `alternate` (i.e. HTML).
279
279
  *** `uri`: Required. The link URI to follow for more information. Defaults to dynamic string formatting based on existing configuration values.
280
- * `tracker`: Required. Managed issue tracker details.
280
+ * `tracker`: Required. Manages issue tracker details.
281
281
  ** `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
282
 
283
283
  As hinted at above, all URIs (including syndication), support {string_formats_link}. This means you can use the `%<key>s` format -- replacing `key` with the key of your choice -- to customize your configuration further.
@@ -296,7 +296,7 @@ image:https://alchemists.io/images/projects/milestoner/screenshots/usage-cache.p
296
296
 
297
297
  Milestoner's cache allows you to enrich user information (i.e. authors, collaborators, etc) by storing information in a `PStore` database as managed by the {lode_link} gem. Cache location, as with the Config, is managed by the {runcom_link} gem.
298
298
 
299
- User information should be sourced from whatever service you use for managing your source code. For example, when using GitHub, your workflow might look like this:
299
+ User information should be sourced from whatever service used for managing your source code. For example, when using GitHub, your workflow might look like this:
300
300
 
301
301
  [source,bash]
302
302
  ----
@@ -393,9 +393,11 @@ Check out the help documentation (i.e. `milestoner build --help`) for addition u
393
393
 
394
394
  ==== Commits
395
395
 
396
- By default, all {git_link} commit messages support {ascii_doc_link} syntax but you can use {markdown_link} if customized.
396
+ By default, all {git_link} commit messages support {ascii_doc_link} syntax but you can use {markdown_link} too.
397
397
 
398
- {ascii_doc_link} is rendered using the {ascii_doctor_link} gem while {markdown_link} is rendered using the {redcarpet_link} gem. Regardless of what renderer you choose, each supports syntax highlighting via the {rouge_link} gem. This also means you can customize the {rouge_style} stylesheet as documented in the xref:_templates[Templates] section below.
398
+ {ascii_doc_link} is rendered using the {ascii_doctor_link} gem while {markdown_link} is rendered using the {redcarpet_link} gem. Regardless of what renderer you choose, each supports syntax highlighting via the {rouge_link} gem. This also means you can customize the {rouge_link} styles via the `page.css` template as documented in the xref:_templates[Templates] section below.
399
+
400
+ ℹ️ The {rouge_link} CSS classes are slightly cryptic in terms of readability but you can see how they are applied when inspecting the HTML DOM.
399
401
 
400
402
  Here's a couple examples of commit messages using {ascii_doc_link} and {markdown_link} syntax:
401
403
 
@@ -461,7 +463,7 @@ The following attributes are limited to only a few elements like `a`, `abbr`, an
461
463
 
462
464
  * link:https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title[title]
463
465
 
464
- Other attributes are allowed as well but are specific to each element. Ultimately, if you don't see an attribute being rendered then it's because it's not allowed.
466
+ An additional set of attributes are allowed but are specific to each element and fairly limited. Ultimately, if you don't see an attribute being rendered then it's not allowed.
465
467
 
466
468
  ==== Trailers
467
469
 
@@ -536,7 +538,7 @@ Given the above, the resulting version would be: 2.0.0. This is because the high
536
538
 
537
539
  ==== Templates
538
540
 
539
- Build template functionality is powered by {hanami_views_link} which means you can completely customize _all_ build formats, templates, partials, stylesheets, images, and so much more.
541
+ Template functionality is powered by {hanami_views_link} which means you can completely customize _all_ build formats, templates, partials, stylesheets, images, and much more.
540
542
  The quickest way to start customization is to copy the `templates` folder structure -- included with this gem -- to your preferred {runcom_link} configuration (i.e. global or local). For example, this gem's template structure is:
541
543
 
542
544
  ....
@@ -557,19 +559,34 @@ lib/milestoner/templates
557
559
  │ ├── _commit.md.erb
558
560
  │ ├── _commit.stream.erb
559
561
  │ ├── _commit.xml.erb
560
- │ ├── _icon.adoc.erb
561
- │ ├── _icon.html.erb
562
- │ ├── _icon.md.erb
563
- │ ├── _icon.xml.erb
562
+ │ ├── _content.adoc.erb
563
+ │ ├── _content.html.erb
564
+ │ ├── _content.xml.erb
565
+ │ ├── _logo.adoc.erb
566
+ │ ├── _logo.html.erb
567
+ │ ├── _logo.md.erb
568
+ │ ├── _logo.xml.erb
569
+ │ ├── _none.adoc.erb
570
+ │ ├── _none.html.erb
571
+ │ ├── _none.xml.erb
564
572
  │ ├── _profile.adoc.erb
565
573
  │ ├── _profile.html.erb
566
574
  │ ├── _profile.md.erb
567
575
  │ ├── _profile.xml.erb
576
+ │ ├── _tag-insecure.html.erb
577
+ │ ├── _tag-secure.html.erb
568
578
  │ ├── _tag.adoc.erb
569
579
  │ ├── _tag.html.erb
570
580
  │ ├── _tag.md.erb
571
581
  │ ├── _tag.stream.erb
572
582
  │ ├── _tag.xml.erb
583
+ │ ├── _user.adoc.erb
584
+ │ ├── _user.html.erb
585
+ │ ├── _user.md.erb
586
+ │ ├── _user.xml.erb
587
+ │ ├── _users.adoc.erb
588
+ │ ├── _users.html.erb
589
+ │ ├── _users.xml.erb
573
590
  │ ├── show.adoc.erb
574
591
  │ ├── show.html.erb
575
592
  │ ├── show.md.erb
@@ -592,29 +609,29 @@ Milestoner searches your {runcom_link} configuration first and, if templates are
592
609
 
593
610
  Of all build formats supported, the web format is the most powerful and feature rich. The following showcases _some_ of the information rendered in this format based on commit activity.
594
611
 
595
- *With Basic Git Commit*
612
+ *Overview*
596
613
 
597
- image:https://alchemists.io/images/projects/milestoner/screenshots/web_format-overview.png[Overview,width=1119,height=902,role=focal_point]
614
+ image:https://alchemists.io/images/projects/milestoner/screenshots/web_format-overview.png[ASCII Doc,width=1157,height=843,role=focal_point]
598
615
 
599
- *With Collaborators and Signers*
616
+ *With Valid Commit Signature*
600
617
 
601
- image:https://alchemists.io/images/projects/milestoner/screenshots/web_format-collaborators_and_signers.png[Collaborators and Signers,width=903,height=903,role=focal_point]
618
+ image:https://alchemists.io/images/projects/milestoner/screenshots/web_format-commit_valid.png[ASCII Doc,width=1235,height=950,role=focal_point]
602
619
 
603
- *With Invalid Tag*
620
+ *With Invalid Commit Signature*
604
621
 
605
- image:https://alchemists.io/images/projects/milestoner/screenshots/web_format-tag_invalid.png[Invalid Tag,width=881,height=403,role=focal_point]
622
+ image:https://alchemists.io/images/projects/milestoner/screenshots/web_format-commit_invalid.png[ASCII Doc,width=1235,height=950,role=focal_point]
606
623
 
607
624
  *With Valid Tag*
608
625
 
609
- image:https://alchemists.io/images/projects/milestoner/screenshots/web_format-tag_valid.png[Valid Tag,width=688,height=771,role=focal_point]
626
+ image:https://alchemists.io/images/projects/milestoner/screenshots/web_format-tag_valid.png[ASCII Doc,width=1089,height=1084,role=focal_point]
610
627
 
611
- *With Notes*
628
+ *With Invalid Tag*
612
629
 
613
- image:https://alchemists.io/images/projects/milestoner/screenshots/web_format-notes.png[Notes,width=903,height=757,role=focal_point]
630
+ image:https://alchemists.io/images/projects/milestoner/screenshots/web_format-tag_invalid.png[ASCII Doc,width=978,height=571,role=focal_point]
614
631
 
615
632
  *With ASCII Doc/Markdown*
616
633
 
617
- image:https://alchemists.io/images/projects/milestoner/screenshots/web_format-asdcii_doc[ASCII Doc,width=908,height=1938,role=focal_point]
634
+ image:https://alchemists.io/images/projects/milestoner/screenshots/web_format-ascii_doc.png[ASCII Doc,width=908,height=1938,role=focal_point]
618
635
 
619
636
  💡 See {git_notes_link} to learn more.
620
637
 
@@ -1 +1 @@
1
- <% if name %>image:<%= url %>[<%= name %>,24,24]<% else %><%= render :icon, name: "missing", alt: "Unknown" %><% end %>
1
+ image:<%= user.avatar_url %>[<%= user.image_alt %>,24,24]
@@ -1,5 +1,6 @@
1
- <% if name %>
2
- <img src="<%= url %>" alt="<%= name %>" class="avatar" width="24" height="24" loading="lazy">
3
- <% else %>
4
- <%= render :icon, name: "missing", alt: "Unknown" %>
5
- <% end %>
1
+ <img src="<%= user.avatar_url %>"
2
+ alt="<%= user.image_alt %>"
3
+ class="avatar"
4
+ width="24"
5
+ height="24"
6
+ loading="lazy">
@@ -1,2 +1 @@
1
- <% if name %><img src="<%= url %>" alt="<%= name %>" width="24" height="24" loading="lazy"><% else %>
2
- <%= render :icon, name: "missing", alt: "Unknown" %><% end %>
1
+ <img src="<%= user.avatar_url %>" alt="<%= user.image_alt %>" width="24" height="24" loading="lazy">
@@ -1,5 +1 @@
1
- <% if name %>
2
- <img src="<%= url %>" alt="<%= name %>" width="24" height="24" loading="lazy">
3
- <% else %>
4
- <%= render :icon, name: "missing", alt: "Unknown" %>
5
- <% end %>
1
+ <img src="<%= user.avatar_url %>" alt="<%= user.image_alt %>" width="24" height="24" loading="lazy">
@@ -1,39 +1,25 @@
1
- .<%= commit.emoji %> <%= commit.subject %> - <%= render :profile, name: commit.author.name, url: commit.profile_url(commit.author) %>
1
+ .<%= commit.emoji %> <%= commit.subject %> - <%= render(:profile, user: commit.author).strip %>
2
2
  [%collapsible]
3
3
  ====
4
4
  *Message*
5
5
 
6
- <% if commit.body_lines && commit.body_lines.any? %>
7
- <%= commit.body_lines.join "\n" %>
8
- <% else %>
9
- None.
10
- <% end %>
6
+ <%= scope(:content, content: Array(commit.body_lines).join("\n")).call %>
11
7
 
12
- <% unless commit.notes.empty? %>
13
8
  *Notes*
14
9
 
15
- _Notes are detected but can't be rendered at the moment. Support will be added in the next Milestoner version._
16
- <% end %>
10
+ <%= scope(:content, content: commit.safe_notes).call %>
17
11
 
18
12
  *Author*
19
13
 
20
- <%= render :avatar, name: commit.author.name, url: commit.avatar_url(commit.author) %> <%= render :profile, name: commit.author.name, url: commit.profile_url(commit.author) %>
14
+ <%= render :user, user: commit.author %>
21
15
 
22
- <% if commit.collaborators.any? %>
23
16
  *Collaborators*
24
17
 
25
- <% commit.collaborators.each do |collaborator| %>
26
- * <%= render :avatar, name: collaborator.name, url: commit.avatar_url(collaborator) %> <%= render :profile, name: collaborator.name, url: commit.profile_url(collaborator) %>
27
- <% end %>
28
- <% end %>
18
+ <%= scope(:users, users: commit.collaborators).call %>
29
19
 
30
- <% if commit.signers.any? %>
31
20
  *Signers*
32
21
 
33
- <% commit.signers.each do |signer| %>
34
- * <%= render :avatar, name: signer.name, url: commit.avatar_url(signer) %> <%= render :profile, name: signer.name, url: commit.profile_url(signer) %>
35
- <% end %>
36
- <% end %>
22
+ <%= scope(:users, users: commit.signers).call %>
37
23
 
38
24
  *Details*
39
25
 
@@ -1,12 +1,17 @@
1
1
  <details id="<%= commit.sha %>" class="row" x-bind:open="open">
2
2
  <summary class="summary <%= commit.kind %>">
3
3
  <div class="title">
4
- <%= render :icon, name: commit.icon, alt: commit.kind %>
4
+ <img src="https://alchemists.io/images/projects/milestoner/icons/<%= commit.icon %>.png"
5
+ alt="<%= commit.kind %>"
6
+ class="icon"
7
+ width="24"
8
+ height="24"
9
+ loading="lazy">
5
10
  <span class="subject"><%= commit.subject %></span>
6
11
  </div>
7
12
 
8
- <a href="<%= commit.profile_url commit.author %>" class="author">
9
- <%= render :avatar, name: commit.author.name, url: commit.avatar_url(commit.author) %>
13
+ <a href="<%= commit.author.profile_url %>" class="author">
14
+ <%= render :avatar, user: commit.author %>
10
15
  </a>
11
16
 
12
17
  <a href="<%= commit.uri %>" class="files"><%= commit.files_changed %></a>
@@ -26,74 +31,48 @@
26
31
 
27
32
  <div class="message">
28
33
  <h1 class="bar">Message</h1>
29
-
30
34
  <div class="content">
31
- <% if commit.body.empty? %>
32
- <p>None.</p>
33
- <% else %>
34
- <%= commit.safe_body %>
35
- <% end %>
35
+ <%= scope(:content, content: commit.safe_body).call %>
36
36
  </div>
37
37
  </div>
38
38
 
39
- <% unless commit.notes.empty? %>
40
- <div class="notes">
41
- <h2 class="bar">Notes</h2>
42
-
43
- <div class="content">
44
- <%= commit.notes.html_safe %>
45
- </div>
39
+ <div class="notes">
40
+ <h2 class="bar">Notes</h2>
41
+ <div class="content">
42
+ <%= scope(:content, content: commit.safe_notes).call %>
46
43
  </div>
47
- <% end %>
44
+ </div>
48
45
 
49
46
  <div class="info">
50
47
  <h2 class="bar">Info</h2>
51
48
 
52
49
  <div class="panel">
53
50
  <h3 class="label">Author</h3>
51
+ <p class="line"><%= render :user, user: commit.author %></p>
54
52
 
55
- <p class="line">
56
- <%= render :avatar, name: commit.author.name, url: commit.avatar_url(commit.author) %>
57
- <%= render :profile, name: commit.author.name, url: commit.profile_url(commit.author) %>
58
- </p>
59
-
60
- <% if commit.collaborators.any? %>
61
- <h3 class="label">Collaborators</h3>
62
-
63
- <% commit.collaborators.each do |collaborator| %>
64
- <p class="line">
65
- <%= render :avatar, name: collaborator.name, url: commit.avatar_url(collaborator) %>
66
- <%= render :profile, name: collaborator.name, url: commit.profile_url(collaborator) %>
67
- </p>
68
- <% end %>
69
- <% end %>
70
-
71
- <% if commit.signers.any? %>
72
- <h3 class="label">Signers</h3>
53
+ <h3 class="label">Collaborators</h3>
54
+ <%= scope(:users, users: commit.collaborators).call %>
73
55
 
74
- <% commit.signers.each do |signer| %>
75
- <p class="line">
76
- <%= render :avatar, name: signer.name, url: commit.avatar_url(signer) %>
77
- <%= render :profile, name: signer.name, url: commit.profile_url(signer) %>
78
- </p>
79
- <% end %>
80
- <% end %>
56
+ <h3 class="label">Signers</h3>
57
+ <%= scope(:users, users: commit.signers).call %>
81
58
 
82
59
  <h3 class="label">Signature</h3>
83
60
 
84
- <p class="line pill <%= commit.security %>">
85
- <span class="signature"><%= commit.signature %></span>
86
- </p>
61
+ <button class="button line <%= commit.security %>" popovertarget="<%= commit.popover_id %>">
62
+ <span class="signature"><%= commit.signature_label %></span>
63
+ </button>
64
+
65
+ <dialog id="<%= commit.popover_id %>" class="popover <%= commit.security %>" popover="auto">
66
+ <h2 class="sublabel">SHA</h2>
67
+ <pre><%= commit.sha %></pre>
87
68
 
88
- <% unless String(commit.fingerprint).empty? %>
89
- <h3 class="label">Fingerprint</h3>
90
- <p class="line"><%= commit.fingerprint %></p>
91
- <% end %>
69
+ <h2 class="sublabel">Fingerprint</h2>
70
+ <pre><%= commit.fingerprint %></pre>
92
71
 
93
- <% unless String(commit.fingerprint_key).empty? %>
94
- <h3 class="label">Fingerprint Primary Key</h3>
95
- <p class="line"><%= commit.fingerprint_key %></p>
96
- <% end %>
72
+ <h2 class="sublabel">Fingerprint Primary Key</h2>
73
+ <pre><%= commit.fingerprint_key %></pre>
74
+ </p>
75
+ </dialog>
97
76
 
98
77
  <h3 class="label">Created</h3>
99
78
 
@@ -1 +1 @@
1
- - <%= commit.emoji %> <%= commit.subject %> - <%= render :profile, name: commit.author.name, url: commit.profile_url(commit.author) %>
1
+ - <%= commit.emoji %> <%= commit.subject %> - <%= render(:profile, user: commit.author).strip %>
@@ -1,56 +1,28 @@
1
1
  <details>
2
2
  <summary style="display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;">
3
- <%= render :icon, name: commit.icon, alt: commit.kind %>
3
+ <img src="https://alchemists.io/images/projects/milestoner/icons/<%= commit.icon %>.png"
4
+ alt="<%= commit.kind %>"
5
+ width="24"
6
+ height="24"
7
+ loading="lazy">
4
8
  <%= commit.subject %>
5
9
  </summary>
6
10
 
7
11
  <h4>Message</h4>
12
+ <%= scope(:content, content: commit.safe_body).call %>
8
13
 
9
- <% if commit.body.empty? %>
10
- <p>None.</p>
11
- <% else %>
12
- <%= commit.safe_body %>
13
- <% end %>
14
-
15
- <% unless commit.notes.empty? %>
16
- <details>
17
- <summary>Notes</summary>
18
- <%= commit.notes.html_safe %>
19
- </details>
20
- <% end %>
14
+ <h4>Notes</h4>
15
+ <%= scope(:content, content: commit.safe_notes).call %>
21
16
 
22
17
  <h4>Author</h4>
23
18
 
24
- <span style="display: inline-flex; align-items: center; gap: 0.5rem;">
25
- <%= render :avatar, name: commit.author.name, url: commit.avatar_url(commit.author) %>
26
- <%= render :profile, name: commit.author.name, url: commit.profile_url(commit.author) %>
27
- </span>
28
-
29
- <% if commit.collaborators.any? %>
30
- <h4>Collaborators</h4>
31
-
32
- <ul>
33
- <% commit.collaborators.each do |collaborator| %>
34
- <li style="display: inline-flex; align-items: center; gap: 0.5rem;">
35
- <%= render :avatar, name: collaborator.name, url: commit.avatar_url(collaborator) %>
36
- <%= render :profile, name: collaborator.name, url: commit.profile_url(collaborator) %>
37
- </li>
38
- <% end %>
39
- </ul>
40
- <% end %>
19
+ <p><%= render :user, user: commit.author %></p>
41
20
 
42
- <% if commit.signers.any? %>
43
- <h4>Signers</h4>
21
+ <h4>Collaborators</h4>
22
+ <%= scope(:users, users: commit.collaborators).call %>
44
23
 
45
- <ul>
46
- <% commit.signers.each do |signer| %>
47
- <li style="display: inline-flex; align-items: center; gap: 0.5rem;">
48
- <%= render :avatar, name: signer.name, url: commit.avatar_url(signer) %>
49
- <%= render :profile, name: signer.name, url: commit.profile_url(signer) %>
50
- </li>
51
- <% end %>
52
- </ul>
53
- <% end %>
24
+ <h4>Signers</h4>
25
+ <%= scope(:users, users: commit.signers).call %>
54
26
 
55
27
  <h4>Details</h4>
56
28
 
@@ -0,0 +1 @@
1
+ <%= content %>
@@ -0,0 +1 @@
1
+ <%= content %>
@@ -0,0 +1 @@
1
+ <p><%= content %></p>
@@ -0,0 +1 @@
1
+ image:<%= project_uri_logo %>[Logo,50,50]pass:[ ]
@@ -0,0 +1 @@
1
+ <img src="<%= project_uri_logo %>" alt="Logo" width="30" height="30">
@@ -0,0 +1,3 @@
1
+ <p align="center">
2
+ <img src="<%= project_uri_logo %>" alt="Logo" width="100" height="100">
3
+ </p>
@@ -0,0 +1,3 @@
1
+ <p style="display: flex; align-items: center; justify-content: center;">
2
+ <img src="<%= project_uri_logo %>" alt="Logo" height=100 width=100>
3
+ </p>
@@ -0,0 +1 @@
1
+ <p class="line">None.</p>
@@ -0,0 +1 @@
1
+ <p>None.</p>
@@ -1 +1 @@
1
- <% if name %>link:<%= url %>[<%= name %>]<% else %>Unknown<% end %>
1
+ link:<%= user.profile_url %>[<%= user.name %>]
@@ -1,5 +1 @@
1
- <% if name %>
2
- <a href="<%= url %>"><%= name %></a>
3
- <% else %>
4
- <span>Unknown</span>
5
- <% end %>
1
+ <a href="<%= user.profile_url %>"><%= user.name %></a>
@@ -1 +1 @@
1
- <% if name %>[<%= name %>](<%= url %>)<% else %>Unknown<% end %>
1
+ [<%= user.name %>](<%= user.profile_url %>)
@@ -1,5 +1 @@
1
- <% if name %>
2
- <a href="<%= url %>"><%= name %></a>
3
- <% else %>
4
- <span>Unknown</span>
5
- <% end %>
1
+ <a href="<%= user.profile_url %>"><%= user.name %></a>
@@ -0,0 +1,8 @@
1
+ <button class="button insecure" popovertarget="po-tag">
2
+ <span class="signature"><%= tag.security %></span>
3
+ </button>
4
+
5
+ <div id="po-tag" class="popover insecure" popover="auto">
6
+ <h1 class="label">Version <%= tag.version %></h1>
7
+ <p>No signature found.</p>
8
+ </div>
@@ -0,0 +1,13 @@
1
+ <button class="button secure" popovertarget="po-tag">
2
+ <span class="signature"><%= tag.security %></span>
3
+ </button>
4
+
5
+ <div id="po-tag" class="popover secure" popover="auto">
6
+ <h1 class="label">Version <%= tag.version %></h1>
7
+
8
+ <h2 class="sublabel">SHA</h2>
9
+ <pre><%= tag.sha %></pre>
10
+
11
+ <h2 class="sublabel">Signature</h2>
12
+ <pre><%= tag.signature %></pre>
13
+ </div>
@@ -1,11 +1,11 @@
1
1
  <% if tag.empty? %>
2
- = pass:[ ]<% if project_uri_logo %>image:<%= project_uri_logo %>[Logo,50,50]pass:[ ]<% end %>link:<%= project_uri_home %>[<%= project_label %>] (<%= tag.committed_date %>)
2
+ = pass:[ ]<%= scope(:logo).call.strip %>link:<%= project_uri_home %>[<%= project_label %>] (<%= tag.committed_date %>)
3
3
 
4
4
  *<%= tag.total_commits %>. <%= tag.total_files %>. <%= tag.total_deletions %>. <%= tag.total_insertions %>.*
5
5
  <% else %>
6
- = pass:[ ]<% if project_uri_logo %>image:<%= project_uri_logo %>[Logo,50,50]pass:[ ]<% end %>link:<%= project_uri_home %>[<%= project_label %>] <%= tag.version %> (<%= tag.committed_date %>)
6
+ = pass:[ ]<%= scope(:logo).call.strip %>link:<%= project_uri_home %>[<%= project_label %>] <%= tag.version %> (<%= tag.committed_date %>)
7
7
 
8
- <%= render :avatar, name: tag.author.name, url: tag.avatar_url(tag.author) %> <%= render :profile, name: tag.author.name, url: tag.profile_url(tag.author) %> | <%= tag.security %>
8
+ <%= render :user, user: tag.author %> | <%= tag.security %>
9
9
 
10
10
  <% tag.commits.each do |commit| %><%= commit.render :commit %><% end %>
11
11
 
@@ -1,9 +1,7 @@
1
1
  <article class="milestone">
2
2
  <header class="header">
3
3
  <h1 class="title">
4
- <% if project_uri_logo %>
5
- <img src="<%= project_uri_logo %>" alt="Logo" width="30" height="30">
6
- <% end %>
4
+ <%= scope(:logo).call %>
7
5
 
8
6
  <a href="<%= project_uri_home %>" class="label"><%= project_label %></a>
9
7
 
@@ -21,34 +19,10 @@
21
19
  <section class="body" x-data="{open: false}">
22
20
  <div class="overview">
23
21
  <div class="owner">
24
- <%= render :avatar, name: tag.author.name, url: tag.avatar_url(tag.author) %>
25
- <%= render :profile, name: tag.author.name, url: tag.profile_url(tag.author) %>
22
+ <%= render :user, user: tag.author %>
26
23
  </div>
27
24
 
28
- <% if tag.signature %>
29
- <button class="button secure" popovertarget="po-tag">
30
- <span class="signature">Tag (valid)</span>
31
- </button>
32
-
33
- <dialog id="po-tag" class="popover" popover="auto">
34
- <h1 class="label">Version <%= tag.version %></h1>
35
-
36
- <h2 class="sublabel">SHA</h2>
37
- <p><%= tag.sha %></p>
38
-
39
- <h2 class="sublabel">Signature</h2>
40
- <pre><%= tag.signature %></pre>
41
- </dialog>
42
- <% else %>
43
- <button class="button insecure" popovertarget="po-tag">
44
- <span class="signature">Tag (invalid)</span>
45
- </button>
46
-
47
- <dialog id="po-tag" class="popover" popover="auto">
48
- <h1 class="label">Version <%= tag.version %></h1>
49
- <p>No security. Signature not detected.</p>
50
- </dialog>
51
- <% end %>
25
+ <%= scope(:tag_signature, tag:).call %>
52
26
 
53
27
  <div class="actions">
54
28
  <button class="button toggle" x-on:click="open = true">Expand</button>