milestoner 18.12.0 → 19.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/README.adoc +82 -68
  4. data/lib/milestoner/builders/adoc/container.rb +15 -0
  5. data/lib/milestoner/builders/adoc/dependencies.rb +9 -0
  6. data/lib/milestoner/builders/adoc/indexer.rb +28 -0
  7. data/lib/milestoner/builders/adoc/pager.rb +35 -0
  8. data/lib/milestoner/builders/ascii_doc.rb +10 -18
  9. data/lib/milestoner/builders/{import.rb → dependencies.rb} +1 -1
  10. data/lib/milestoner/builders/feed.rb +6 -15
  11. data/lib/milestoner/builders/markdown.rb +10 -18
  12. data/lib/milestoner/builders/md/container.rb +15 -0
  13. data/lib/milestoner/builders/md/dependencies.rb +9 -0
  14. data/lib/milestoner/builders/md/indexer.rb +28 -0
  15. data/lib/milestoner/builders/md/pager.rb +35 -0
  16. data/lib/milestoner/builders/path_resolver.rb +23 -0
  17. data/lib/milestoner/builders/site/container.rb +16 -0
  18. data/lib/milestoner/builders/site/dependencies.rb +9 -0
  19. data/lib/milestoner/builders/site/indexer.rb +33 -0
  20. data/lib/milestoner/builders/site/pager.rb +35 -0
  21. data/lib/milestoner/builders/site/styler.rb +47 -0
  22. data/lib/milestoner/builders/stream.rb +3 -3
  23. data/lib/milestoner/builders/syndication/builder.rb +125 -0
  24. data/lib/milestoner/builders/syndication/indexer.rb +29 -0
  25. data/lib/milestoner/builders/syndication/refine.rb +27 -0
  26. data/lib/milestoner/builders/syndication/shared.rb +27 -0
  27. data/lib/milestoner/builders/web.rb +11 -43
  28. data/lib/milestoner/cli/actions/build/basename.rb +1 -1
  29. data/lib/milestoner/cli/actions/build/format.rb +1 -1
  30. data/lib/milestoner/cli/actions/build/index.rb +26 -0
  31. data/lib/milestoner/cli/actions/build/label.rb +1 -1
  32. data/lib/milestoner/cli/actions/build/layout.rb +1 -1
  33. data/lib/milestoner/cli/actions/build/max.rb +1 -1
  34. data/lib/milestoner/cli/actions/build/output.rb +25 -0
  35. data/lib/milestoner/cli/actions/build/stylesheet.rb +5 -7
  36. data/lib/milestoner/cli/actions/build/tail.rb +1 -1
  37. data/lib/milestoner/cli/actions/build/version.rb +1 -1
  38. data/lib/milestoner/cli/actions/cache/create.rb +1 -1
  39. data/lib/milestoner/cli/actions/cache/delete.rb +1 -1
  40. data/lib/milestoner/cli/actions/cache/find.rb +1 -1
  41. data/lib/milestoner/cli/actions/cache/info.rb +1 -1
  42. data/lib/milestoner/cli/actions/cache/list.rb +1 -1
  43. data/lib/milestoner/cli/actions/next.rb +1 -1
  44. data/lib/milestoner/cli/actions/publish.rb +1 -1
  45. data/lib/milestoner/cli/commands/build.rb +4 -3
  46. data/lib/milestoner/cli/commands/cache.rb +1 -1
  47. data/lib/milestoner/cli/shell.rb +1 -1
  48. data/lib/milestoner/commits/categorizer.rb +7 -5
  49. data/lib/milestoner/commits/collector.rb +1 -1
  50. data/lib/milestoner/commits/enricher.rb +7 -5
  51. data/lib/milestoner/commits/enrichers/author.rb +1 -1
  52. data/lib/milestoner/commits/enrichers/body.rb +1 -1
  53. data/lib/milestoner/commits/enrichers/colleague.rb +1 -1
  54. data/lib/milestoner/commits/enrichers/container.rb +2 -2
  55. data/lib/milestoner/commits/enrichers/{import.rb → dependencies.rb} +1 -1
  56. data/lib/milestoner/commits/enrichers/format.rb +1 -1
  57. data/lib/milestoner/commits/enrichers/issue.rb +1 -1
  58. data/lib/milestoner/commits/enrichers/milestone.rb +1 -1
  59. data/lib/milestoner/commits/enrichers/note.rb +1 -1
  60. data/lib/milestoner/commits/enrichers/review.rb +1 -1
  61. data/lib/milestoner/commits/enrichers/uri.rb +1 -1
  62. data/lib/milestoner/commits/versioner.rb +1 -1
  63. data/lib/milestoner/configuration/contract.rb +6 -2
  64. data/lib/milestoner/configuration/defaults.yml +10 -4
  65. data/lib/milestoner/configuration/model.rb +5 -1
  66. data/lib/milestoner/configuration/transformers/gems/description.rb +1 -1
  67. data/lib/milestoner/configuration/transformers/gems/label.rb +2 -2
  68. data/lib/milestoner/configuration/transformers/gems/name.rb +1 -1
  69. data/lib/milestoner/configuration/transformers/gems/uri.rb +1 -1
  70. data/lib/milestoner/configuration/transformers/generator/label.rb +1 -1
  71. data/lib/milestoner/configuration/transformers/generator/uri.rb +1 -1
  72. data/lib/milestoner/configuration/transformers/generator/version.rb +1 -1
  73. data/lib/milestoner/configuration/transformers/project/author.rb +1 -1
  74. data/lib/milestoner/container.rb +2 -1
  75. data/lib/milestoner/{import.rb → dependencies.rb} +1 -1
  76. data/lib/milestoner/durationer.rb +25 -0
  77. data/lib/milestoner/models/commit.rb +2 -1
  78. data/lib/milestoner/renderers/universal.rb +1 -1
  79. data/lib/milestoner/tags/builder.rb +40 -0
  80. data/lib/milestoner/tags/creator.rb +7 -9
  81. data/lib/milestoner/{commits/tagger.rb → tags/enricher.rb} +27 -15
  82. data/lib/milestoner/tags/publisher.rb +1 -1
  83. data/lib/milestoner/tags/pusher.rb +1 -1
  84. data/lib/milestoner/templates/layouts/page.adoc.erb +4 -0
  85. data/lib/milestoner/templates/layouts/page.git.erb +1 -0
  86. data/lib/milestoner/templates/layouts/page.html.erb +17 -10
  87. data/lib/milestoner/templates/layouts/page.md.erb +3 -0
  88. data/lib/milestoner/templates/layouts/page.stream.erb +2 -1
  89. data/lib/milestoner/templates/layouts/page.xml.erb +4 -0
  90. data/lib/milestoner/templates/milestones/_commit.adoc.erb +4 -4
  91. data/lib/milestoner/templates/milestones/_commit.html.erb +7 -4
  92. data/lib/milestoner/templates/milestones/_commit.stream.erb +1 -1
  93. data/lib/milestoner/templates/milestones/_commit.xml.erb +2 -6
  94. data/lib/milestoner/templates/milestones/_logo.adoc.erb +1 -1
  95. data/lib/milestoner/templates/milestones/_logo.html.erb +1 -1
  96. data/lib/milestoner/templates/milestones/index.adoc.erb +13 -0
  97. data/lib/milestoner/templates/milestones/index.html.erb +31 -0
  98. data/lib/milestoner/templates/milestones/index.md.erb +13 -0
  99. data/lib/milestoner/templates/milestones/show.adoc.erb +17 -1
  100. data/lib/milestoner/templates/milestones/show.git.erb +8 -0
  101. data/lib/milestoner/templates/milestones/show.html.erb +119 -1
  102. data/lib/milestoner/templates/milestones/show.md.erb +16 -1
  103. data/lib/milestoner/templates/milestones/show.stream.erb +17 -1
  104. data/lib/milestoner/templates/milestones/show.xml.erb +22 -1
  105. data/lib/milestoner/templates/public/page.css.erb +402 -299
  106. data/lib/milestoner/views/context.rb +2 -1
  107. data/lib/milestoner/views/milestones/index.rb +23 -0
  108. data/lib/milestoner/views/milestones/show.rb +2 -2
  109. data/lib/milestoner/views/parts/commit.rb +47 -37
  110. data/lib/milestoner/views/parts/tag.rb +25 -17
  111. data/lib/milestoner/views/parts/user.rb +1 -1
  112. data/lib/milestoner.rb +5 -1
  113. data/milestoner.gemspec +18 -18
  114. data.tar.gz.sig +0 -0
  115. metadata +68 -57
  116. metadata.gz.sig +0 -0
  117. data/lib/milestoner/cli/actions/build/root.rb +0 -25
  118. data/lib/milestoner/configuration/transformers/build/root.rb +0 -21
  119. data/lib/milestoner/syndication/builder.rb +0 -123
  120. data/lib/milestoner/syndication/refine.rb +0 -25
  121. data/lib/milestoner/syndication/shared.rb +0 -25
  122. data/lib/milestoner/templates/milestones/_tag.adoc.erb +0 -13
  123. data/lib/milestoner/templates/milestones/_tag.html.erb +0 -56
  124. data/lib/milestoner/templates/milestones/_tag.md.erb +0 -14
  125. data/lib/milestoner/templates/milestones/_tag.stream.erb +0 -15
  126. data/lib/milestoner/templates/milestones/_tag.xml.erb +0 -22
@@ -6,42 +6,54 @@ require "refinements/struct"
6
6
  require "versionaire"
7
7
 
8
8
  module Milestoner
9
- module Commits
10
- # Assembles all commits for a tag.
11
- class Tagger
12
- include Milestoner::Import[:git, :settings, :logger]
13
- include Enrichers::Import[author_enricher: :author]
9
+ module Tags
10
+ # Builds a collection of enriched tags and associated commits.
11
+ class Enricher
12
+ include Milestoner::Dependencies[:git, :settings, :logger]
13
+ include Commits::Enrichers::Dependencies[author_enricher: :author]
14
14
  include Dry::Monads[:result]
15
15
 
16
16
  using Refinements::Pathname
17
17
  using Versionaire::Cast
18
18
  using Refinements::Struct
19
19
 
20
- def initialize(enricher: Commits::Enricher.new, model: Models::Tag, **)
20
+ def initialize(committer: Commits::Enricher.new, model: Models::Tag, **)
21
21
  super(**)
22
- @enricher = enricher
22
+ @committer = committer
23
23
  @model = model
24
24
  end
25
25
 
26
26
  def call
27
- collect.fmap { |tags| tail tags.last(settings.build_max).map(&:version) }
27
+ collect.fmap { |tags| adjust tags }
28
28
  .fmap { |references| slice(references).reverse }
29
29
  .bind { |tags| tags.empty? ? Failure("No tags or commits.") : Success(tags) }
30
30
  end
31
31
 
32
32
  private
33
33
 
34
- attr_reader :enricher, :model
34
+ attr_reader :committer, :model
35
35
 
36
36
  def collect = git.tagged? ? git.tags("--sort=taggerdate") : placeholder_with_commits
37
37
 
38
- # :reek:FeatureEnvy
39
- def tail references
40
- references.append "HEAD" if settings.build_tail == "head"
41
- references.prepend nil if references.one?
38
+ def adjust tags
39
+ references = tags.last(settings.build_max).map(&:version)
40
+
41
+ maybe_append_head references
42
+ maybe_prepend_nil references, tags
42
43
  references
43
44
  end
44
45
 
46
+ def maybe_append_head references
47
+ references.append "HEAD" if settings.build_tail == "head"
48
+ end
49
+
50
+ def maybe_prepend_nil references, tags
51
+ max = settings.build_max
52
+ tail = settings.build_tail
53
+
54
+ references.prepend nil if references.one? || (tail == "tag" && max >= tags.size)
55
+ end
56
+
45
57
  def slice references
46
58
  references.each_cons(2).with_object [] do |(min, max), entries|
47
59
  add_enrichment entries, min, max
@@ -51,7 +63,7 @@ module Milestoner
51
63
  def add_enrichment(all, *) = enrich(*).bind { |entry| all.append entry }
52
64
 
53
65
  def enrich min, max
54
- enricher.call(min:, max:).bind { |commits| build_record git.tag_show(max), commits }
66
+ committer.call(min:, max:).bind { |commits| build_record git.tag_show(max), commits }
55
67
  end
56
68
 
57
69
  def build_record result, commits
@@ -72,7 +84,7 @@ module Milestoner
72
84
  ]
73
85
  end
74
86
 
75
- def placeholder_with_commits = enricher.call.fmap { |commits| placeholder_for commits }
87
+ def placeholder_with_commits = committer.call.fmap { |commits| placeholder_for commits }
76
88
 
77
89
  def placeholder_for commits
78
90
  return commits if commits.empty?
@@ -6,7 +6,7 @@ module Milestoner
6
6
  module Tags
7
7
  # Handles the tagging and pushing of a tag to a remote repository.
8
8
  class Publisher
9
- include Import[:logger]
9
+ include Dependencies[:logger]
10
10
  include Dry::Monads[:result]
11
11
 
12
12
  def initialize(creator: Tags::Creator.new, pusher: Tags::Pusher.new, **)
@@ -6,7 +6,7 @@ module Milestoner
6
6
  module Tags
7
7
  # Handles publishing of tags to a remote repository.
8
8
  class Pusher
9
- include Import[:git, :logger]
9
+ include Dependencies[:git, :logger]
10
10
  include Dry::Monads[:result]
11
11
 
12
12
  def call version
@@ -1,2 +1,6 @@
1
+ [.text-center]
2
+ <%= scope(:logo).call %>
3
+
1
4
  <%= yield %>
5
+
2
6
  _Generated by link:<%= generator_uri %>[<%= generator_label %> <%= generator_version %>]._
@@ -0,0 +1 @@
1
+ <%= yield %>
@@ -25,28 +25,35 @@
25
25
  sizes="200x200">
26
26
  <% end %>
27
27
 
28
- <% if build_stylesheet %>
29
- <link title="<%= project_label %>: Stylesheet"
30
- rel="stylesheet"
31
- href="<%= build_stylesheet %>.css"
32
- type="text/css">
33
- <% end %>
28
+ <link title="<%= project_label %>: Stylesheet"
29
+ rel="stylesheet"
30
+ href="<%= stylesheet_uri %>.css"
31
+ type="text/css">
34
32
 
35
33
  <script src="https://unpkg.com/alpinejs@3.14.3"
36
34
  integrity="sha384-iZD2X8o1Zdq0HR5H/7oa8W30WS4No+zWCKUPD7fHRay9I1Gf+C4F8sVmw7zec1wW"
37
35
  crossorigin="anonymous"
38
36
  defer>
39
37
  </script>
38
+
39
+ <script src="https://unpkg.com/htmx.org@2.0.4"
40
+ integrity="sha384-HGfztofotfshcF7+8n44JQL2oJmowVChPTg48S+jvZoztPfvwD79OC/LTtG6dMp+"
41
+ crossorigin="anonymous">
42
+ </script>
40
43
  </head>
41
44
 
42
- <body>
43
- <main>
45
+ <body class="milestoner">
46
+ <header class="page-header">
47
+ <%= scope(:logo).call %>
48
+ </header>
49
+
50
+ <main class="page-body">
44
51
  <%= yield %>
45
52
  </main>
46
53
 
47
- <footer class="footer">
54
+ <footer class="page-footer">
48
55
  <p class="generator">
49
- Generated by <a href="<%= generator_uri %>" class="link"><%= generator_label %> <%= generator_version %></a>.
56
+ Generated by <a href="<%= generator_uri %>"><%= generator_label %> <%= generator_version %></a>.
50
57
  </p>
51
58
  </footer>
52
59
  </body>
@@ -1,2 +1,5 @@
1
+ <%= scope(:logo).call %>
2
+
1
3
  <%= yield %>
4
+
2
5
  *Generated by [<%= generator_label %> <%= generator_version %>](<%= generator_uri %>).*
@@ -1 +1,2 @@
1
- <%= yield %>Generated by <%= generator_label %> <%= generator_version %>.
1
+ <%= yield %>
2
+ Generated by <%= generator_label %> <%= generator_version %>.
@@ -1,4 +1,8 @@
1
1
  <article>
2
+ <header>
3
+ <%= scope(:logo).call %>
4
+ </header>
5
+
2
6
  <%= yield %>
3
7
 
4
8
  <hr/>
@@ -3,11 +3,11 @@
3
3
  ====
4
4
  *Message*
5
5
 
6
- <%= scope(:content, content: Array(commit.body_lines).join("\n")).call %>
6
+ <%= scope(:content, content: commit.body).call %>
7
7
 
8
8
  *Notes*
9
9
 
10
- <%= scope(:content, content: commit.safe_notes).call %>
10
+ <%= scope(:content, content: commit.notes).call %>
11
11
 
12
12
  *Author*
13
13
 
@@ -29,6 +29,6 @@
29
29
  * Lines: <%= commit.total_deletions %>/<%= commit.total_insertions %>
30
30
  * Issue: link:<%= commit.issue.uri %>[<%= commit.issue.id %>]
31
31
  * Review: link:<%= commit.review.uri %>[<%= commit.review.id %>]
32
-
33
- _<%= commit.datetime %>_
32
+ * Created: <%= commit.created_at_human %>
33
+ * Updated: <%= commit.updated_at_human %>
34
34
  ====
@@ -77,10 +77,13 @@
77
77
  <h3 class="label">Created</h3>
78
78
 
79
79
  <p class="line at">
80
- <time datetime="<%= commit.at %>" class="date"><%= commit.date %></time>
81
- <time datetime="<%= commit.at %>" class="weekday"><%= commit.weekday %></time>
82
- <time datetime="<%= commit.at %>" class="time"><%= commit.time %></time>
83
- <time datetime="<%= commit.at %>" class="zone"><%= commit.zone %></time>
80
+ <time datetime="<%= commit.created_at_machine %>"><%= commit.created_at_human %></time>
81
+ </p>
82
+
83
+ <h3 class="label">Updated</h3>
84
+
85
+ <p class="line at">
86
+ <time datetime="<%= commit.updated_at_machine %>"><%= commit.updated_at_human %></time>
84
87
  </p>
85
88
  </div>
86
89
  </div>
@@ -1 +1 @@
1
- <%= commit.emoji %> <%= commit.subject %> - <%= commit.author.name %>
1
+ <%= commit.colored_sha %> <%= commit.signature_emoji %> <%= commit.milestone_emoji %> <%= commit.emoji %> <%= commit.subject %> <%= commit.colored_author %> <%= commit.colored_created_relative_at %> <%= commit.colored_updated_relative_at %>
@@ -40,13 +40,9 @@
40
40
 
41
41
  <li>Issue: <a href="<%= commit.issue.uri %>"><%= commit.issue.id %></a></li>
42
42
  <li>Review: <a href="<%= commit.review.uri %>"><%= commit.review.id %></a></li>
43
+ <li>Created: <%= commit.created_at_human %></li>
44
+ <li>Updated: <%= commit.updated_at_human %></li>
43
45
  </ul>
44
46
 
45
- <p>
46
- <em style="display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1rem;">
47
- <%= commit.datetime %>
48
- </em>
49
- </p>
50
-
51
47
  <hr/>
52
48
  </details>
@@ -1 +1 @@
1
- image:<%= project_uri_logo %>[Logo,50,50]pass:[ ]
1
+ image:<%= project_uri_logo %>[Logo,100,100]
@@ -1 +1 @@
1
- <img src="<%= project_uri_logo %>" alt="Logo" width="30" height="30">
1
+ <img src="<%= project_uri_logo %>" alt="Logo" width="100" height="100">
@@ -0,0 +1,13 @@
1
+ == link:<%= project_uri_home %>[<%= project_label %>] Versions
2
+
3
+ All versions adhere to the link:https://alchemists.io/articles/strict_semantic_versioning[Strict Semantic Versioning] as enforced with link:https://alchemists.io/projects/versionaire[Versionaire] and automated by link:<%= generator_uri %>[<%= generator_label %>]. Briefly, this means:
4
+
5
+ * *Major* (X.y.z): Incremented for any backwards incompatible public API changes.
6
+ * *Minor* (x.Y.z): Incremented for new, backwards compatible, public API enhancements/fixes.
7
+ * *Patch* (x.y.Z): Incremented for small, backwards compatible, bug fixes.
8
+
9
+ === History
10
+
11
+ <% tags.each do |tag| %>
12
+ * link:<%= tag.version %>[<%= tag.version %>] (<%= tag.committed_date %>)
13
+ <% end %>
@@ -0,0 +1,31 @@
1
+ <section class="milestones">
2
+ <h1 class="title">
3
+ <a href="<%= project_uri_home %>" class="label"><%= project_label %></a> Versions
4
+ </h1>
5
+
6
+ <p>All versions adhere to the <a href="https://alchemists.io/articles/strict_semantic_versioning">Strict Semantic Versioning</a> as enforced with <a href="https://alchemists.io/projects/versionaire">Versionaire</a> and automated by <a href="<%= generator_uri %>"><%= generator_label %></a>. Briefly, this means:</p>
7
+
8
+ <ul>
9
+ <li><strong>Major</strong> (X.y.z): Incremented for any backwards incompatible public API changes.</li>
10
+ <li><strong>Minor</strong> (x.Y.z): Incremented for new, backwards compatible, public API enhancements/fixes.</li>
11
+ <li><strong>Patch</strong> (x.y.Z): Incremented for small, backwards compatible, bug fixes.</li>
12
+ </ul>
13
+
14
+ <ul class="list">
15
+ <% tags.each do |tag| %>
16
+ <li class="item">
17
+ <a href="<%= tag.version %>"
18
+ class="version"
19
+ hx-get="<%= tag.version %>"
20
+ hx-select=".milestone"
21
+ hx-target=".milestones"
22
+ hx-swap="outerHTML"
23
+ hx-push-url="true">
24
+ <%= tag.version %>
25
+ </a>
26
+
27
+ <span class="date"><%= tag.committed_date %></span>
28
+ </li>
29
+ <% end %>
30
+ </ul>
31
+ </section>
@@ -0,0 +1,13 @@
1
+ # [<%= project_label %>](<%= project_uri_home %>) Versions
2
+
3
+ All versions adhere to the [Strict Semantic Versioning](https://alchemists.io/articles/strict_semantic_versioning) as enforced with [Versionaire](https://alchemists.io/projects/versionaire) and automated by [<%= generator_label %>](<%= generator_uri %>). Briefly, this means:
4
+
5
+ - **Major** (X.y.z): Incremented for any backwards incompatible public API changes.
6
+ - **Minor** (x.Y.z): Incremented for new, backwards compatible, public API enhancements/fixes.
7
+ - **Patch** (x.y.Z): Incremented for small, backwards compatible, bug fixes.
8
+
9
+ ## History
10
+
11
+ <% tags.each do |tag| %>
12
+ - [<%= tag.version %>](<%= tag.version %>) (<%= tag.committed_date %>)
13
+ <% end %>
@@ -1 +1,17 @@
1
- <%= tag.render :tag %>
1
+ <% if tag.empty? %>
2
+ == link:<%= project_uri_home %>[<%= project_label %>] (<%= tag.committed_date %>)
3
+
4
+ *<%= tag.total_commits %>. <%= tag.total_files %>. <%= tag.total_deletions %>. <%= tag.total_insertions %>.*
5
+ *<%= tag.total_duration %>.*
6
+ <% else %>
7
+ == link:<%= project_uri_home %>[<%= project_label %>] <%= tag.version %> (<%= tag.committed_date %>)
8
+
9
+ <%= render :user, user: tag.author %> | <%= tag.security %>
10
+
11
+ <% tag.commits.each do |commit| %><%= commit.render :commit %><% end %>
12
+
13
+ *<%= tag.total_commits %>. <%= tag.total_files %>. <%= tag.total_deletions %>. <%= tag.total_insertions %>.* +
14
+ *<%= tag.total_duration %>.*
15
+
16
+ link:<%= past.version %>[Previous (<%= past.version %>)] | link:<%= future.version %>[Next (<%= future.version %>)]
17
+ <% end %>
@@ -0,0 +1,8 @@
1
+ Generated by <%= generator_label %> <%= generator_version %>.
2
+
3
+ Commits: <%= tag.commit_count %>
4
+ Deletions: <%= tag.deletion_count %>
5
+ Duration: <%= tag.duration %>
6
+ Files: <%= tag.file_count %>
7
+ Insertions: <%= tag.insertion_count %>
8
+ URI: <%= tag.uri %>
@@ -1 +1,119 @@
1
- <%= tag.render :tag %>
1
+ <article class="milestone">
2
+ <header class="header">
3
+ <% if tag.index? %>
4
+ <a href="../"
5
+ class="root"
6
+ hx-get="../"
7
+ hx-select=".milestones"
8
+ hx-trigger="click, keyup[key=='v'] from:body"
9
+ hx-target=".milestone"
10
+ hx-swap="outerHTML"
11
+ hx-push-url="true">
12
+ Versions
13
+ </a>
14
+ <% end %>
15
+
16
+ <h1 class="title">
17
+ <a href="<%= project_uri_home %>" class="label">
18
+ <%= project_label %>
19
+ </a>
20
+
21
+ <% if tag.commits.any? %>
22
+ <span class="version"><%= tag.version %></span>
23
+ <% end %>
24
+ </h1>
25
+
26
+ <time datetime="<%= tag.committed_datetime %>" class="date"><%= tag.committed_date %></time>
27
+ </header>
28
+
29
+ <% if tag.empty? %>
30
+ <p class="dormant"></p>
31
+ <% else %>
32
+ <section class="body" x-data="{open: false}">
33
+ <div class="overview">
34
+ <div class="owner">
35
+ <%= render :user, user: tag.author %>
36
+ </div>
37
+
38
+ <%= scope(:tag_signature, tag:).call %>
39
+
40
+ <div class="actions">
41
+ <button class="button toggle" x-on:click="open = true">Expand</button>
42
+ <button class="button toggle" x-on:click="open = false">Collapse</button>
43
+ </div>
44
+ </div>
45
+
46
+ <div class="columns">
47
+ <span class="label">Commit</span>
48
+ <span class="label">Author</span>
49
+ <span class="label">Files</span>
50
+ <span class="label">Lines</span>
51
+ <span class="label">Issue</span>
52
+ <span class="label">Review</span>
53
+ </div>
54
+
55
+ <% tag.commits.each do |commit| %>
56
+ <%= commit.render :commit %>
57
+ <% end %>
58
+ </section>
59
+ <% end %>
60
+
61
+ <footer class="footer">
62
+ <p class="totals">
63
+ <span class="commits"><%= tag.total_commits %>.</span>
64
+ <span class="files"><%= tag.total_files %>.</span>
65
+ <span class="deletions"><%= tag.total_deletions %>.</span>
66
+ <span class="insertions"><%= tag.total_insertions %>.</span>
67
+ </p>
68
+
69
+ <p class="totals">
70
+ <span class="duration"><%= tag.total_duration %>.</span>
71
+ </p>
72
+
73
+ <ul class="actions">
74
+ <li>
75
+ <a href="/<%= past.version %>"
76
+ class="action"
77
+ data-direction="previous"
78
+ hx-get="/<%= past.version %>"
79
+ hx-select=".milestone"
80
+ hx-trigger="click, keyup[key=='ArrowLeft'] from:body"
81
+ hx-target=".milestone"
82
+ hx-swap="outerHTML"
83
+ hx-push-url="true">
84
+ Previous
85
+ (<%= past.version %>)
86
+ </a>
87
+ </li>
88
+
89
+ <li>
90
+ <button class="help" popovertarget="po-shortcuts">ℹ️</button>
91
+
92
+ <div id="po-shortcuts" class="popover" popover="auto">
93
+ <h2 class="label">Keyboard Shortcuts</h2>
94
+
95
+ <ul>
96
+ <li class="shortcut"><kbd class="key">v</kbd>: View versions.</li>
97
+ <li class="shortcut"><kbd class="key">←</kbd>: View previous version.</li>
98
+ <li class="shortcut"><kbd class="key">→</kbd>: View next version.</li>
99
+ </ul>
100
+ </div>
101
+ </li>
102
+
103
+ <li>
104
+ <a href="/<%= future.version %>"
105
+ class="action"
106
+ data-direction="next"
107
+ hx-get="/<%= future.version %>"
108
+ hx-select=".milestone"
109
+ hx-trigger="click, keyup[key=='ArrowRight'] from:body"
110
+ hx-target=".milestone"
111
+ hx-swap="outerHTML"
112
+ hx-push-url="true">
113
+ Next
114
+ (<%= future.version %>)
115
+ </a>
116
+ </li>
117
+ </ul>
118
+ </footer>
119
+ </article>
@@ -1 +1,16 @@
1
- <%= tag.render :tag %>
1
+ <% if tag.empty? %>
2
+ # [<%= project_label %>](<%= project_uri_home %>) (<%= tag.committed_date %>)
3
+
4
+ **<%= tag.total_commits %>. <%= tag.total_files %>. <%= tag.total_deletions %>. <%= tag.total_insertions %>.**
5
+ **<%= tag.total_duration %>.**
6
+ <% else %>
7
+ # [<%= project_label %>](<%= project_uri_home %>) <%= tag.version %> (<%= tag.committed_date %>)
8
+ <%= render :user, user: tag.author %> | <%= tag.security %>
9
+
10
+ <% tag.commits.each do |commit| %><%= commit.render :commit %><% end %>
11
+
12
+ **<%= tag.total_commits %>. <%= tag.total_files %>. <%= tag.total_deletions %>. <%= tag.total_insertions %>.**
13
+ **<%= tag.total_duration %>.**
14
+
15
+ [Previous (<%= past.version %>)](<%= past.version %>) | [Next (<%= future.version %>)](<%= future.version %>)
16
+ <% end %>
@@ -1 +1,17 @@
1
- <%= tag.render :tag %>
1
+ <% if tag.empty? %>
2
+ <%= project_label %> (<%= tag.committed_date %>)
3
+
4
+ <%= tag.total_commits %>. <%= tag.total_files %>. <%= tag.colored_total_deletions %>. <%= tag.colored_total_insertions %>.
5
+ <%= tag.total_duration %>.
6
+ <% else %>
7
+ <%= project_label %> <%= tag.version %> (<%= tag.committed_date %>)
8
+ <% if tag.version != project_version %>
9
+
10
+ <%= tag.author.name %> | <%= tag.security %>
11
+ <% end %>
12
+
13
+ <% tag.commits.each do |commit| %><%= commit.render :commit %><% end %>
14
+
15
+ <%= tag.total_commits %>. <%= tag.total_files %>. <%= tag.colored_total_deletions %>. <%= tag.colored_total_insertions %>.
16
+ <%= tag.total_duration %>.
17
+ <% end %>
@@ -1 +1,22 @@
1
- <%= tag.render :tag %>
1
+ <section>
2
+ <% unless tag.empty? %>
3
+ <p style="display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;">
4
+ <%= render :user, user: tag.author %> | <%= tag.security %>
5
+ </p>
6
+
7
+ <% tag.commits.each do |commit| %>
8
+ <%= commit.render :commit %>
9
+ <% end %>
10
+ <% end %>
11
+
12
+ <p>
13
+ <strong>
14
+ <span><%= tag.total_commits %>.</span>
15
+ <span><%= tag.total_files %>.</span>
16
+ <span><%= tag.total_deletions %>.</span>
17
+ <span><%= tag.total_insertions %>.</span>
18
+ </strong>
19
+ </p>
20
+
21
+ <p><strong><%= tag.total_duration %>.</strong></p>
22
+ </section>