milestoner 18.0.0 → 18.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 76e4ef8c308033e3c5cba943cb70576e5d007e9ece3c4fa7f04bfd3f850e375d
4
- data.tar.gz: 62337b7d1b1b2a6a1dcc86c4ea56561e8c0366340b5a26acfda02db9df08025b
3
+ metadata.gz: 9888c9ada1acc15633b75033d7fa867f9ce726de015e8eecdd61bf17c65d1db9
4
+ data.tar.gz: 3dc30214f99ac8da3f7245c953cec6e4af593bd18283543f760b9ceec1e3fea5
5
5
  SHA512:
6
- metadata.gz: 4746fbaef4b0e92976ab68a072f034caa50d1e72d0c7719e922cbd9b2740dafb47adae19bdf31d097a048e34c7a9f3ba7b40da64266b592ba4548ee5442c6926
7
- data.tar.gz: accaea8fc8770d2fe8c7129140b634f7787352055359fe592f8412025860c9c26e25eceb07fcb2e2a97d8796899367e5f0e9779799585f7cc5138142e6f33d4f
6
+ metadata.gz: f120d8414ac38e182b72eead7588c2ef3ec6fec02f1d781ed7e90783ee478eedec9c985311617bf2438d7b3775f6a45ad875374f0e84f550dd2b5c5a2593e5bd
7
+ data.tar.gz: 0fc33409f7fd90d29b9187c226a63544e8189442c28ee4908543b6ffdb03ffb5321c9c7844adb5f4a60ad93ded831cf59a837dcc77ffd593175ecb9e100ab4b3
checksums.yaml.gz.sig CHANGED
Binary file
@@ -18,7 +18,7 @@ module Milestoner
18
18
 
19
19
  def call
20
20
  tagger.call
21
- .fmap { |tags| build tags }
21
+ .fmap { |tags| write tags }
22
22
  .alt_map { |message| failure message }
23
23
  end
24
24
 
@@ -26,12 +26,14 @@ module Milestoner
26
26
 
27
27
  attr_reader :tagger, :view
28
28
 
29
+ def write(tags) = build(tags).tap { |content| io.write content }
30
+
29
31
  def build tags
30
- tags.each { |tag| write tag }
31
- io
32
+ tags.reduce([]) { |content, tag| content.append render(tag) }
33
+ .join(%(\n\n))
32
34
  end
33
35
 
34
- def write(tag) = io.write view.call(tag:, layout: settings.build_layout, format: :stream)
36
+ def render(tag) = view.call tag:, layout: settings.build_layout, format: :stream
35
37
 
36
38
  def failure message
37
39
  logger.error { message }
@@ -28,6 +28,8 @@ module Milestoner
28
28
  end
29
29
 
30
30
  def call version = nil
31
+ settings.build_max = 1
32
+
31
33
  case publisher.call Version(version || default)
32
34
  in Success(version) then version
33
35
  in Failure(message) then log_error message
@@ -2,7 +2,6 @@
2
2
 
3
3
  require "core"
4
4
  require "dry/monads"
5
- require "refinements/string_io"
6
5
 
7
6
  module Milestoner
8
7
  module Tags
@@ -11,8 +10,6 @@ module Milestoner
11
10
  include Import[:git, :logger]
12
11
  include Dry::Monads[:result]
13
12
 
14
- using Refinements::StringIO
15
-
16
13
  def initialize(collector: Commits::Collector.new, builder: Builders::Stream.new, **)
17
14
  @collector = collector
18
15
  @builder = builder
@@ -42,7 +39,7 @@ module Milestoner
42
39
 
43
40
  def create(version) = build(version).bind { |body| git.tag_create version, body }
44
41
 
45
- def build(version) = builder.call.fmap { |body| "Version #{version}\n\n#{body.reread}\n\n" }
42
+ def build(version) = builder.call.fmap { |body| "Version #{version}\n\n#{body}\n\n" }
46
43
  end
47
44
  end
48
45
  end
@@ -3,7 +3,7 @@
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 %>] <%= project_version %> (<%= tag.committed_date %>)
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 %>)
7
7
 
8
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 %>
9
9
 
@@ -9,7 +9,7 @@
9
9
 
10
10
  **<%= tag.total_commits %>. <%= tag.total_files %>. <%= tag.total_deletions %>. <%= tag.total_insertions %>.**
11
11
  <% else %>
12
- # [<%= project_label %>](<%= project_uri_home %>) <%= project_version %> (<%= tag.committed_date %>)
12
+ # [<%= project_label %>](<%= project_uri_home %>) <%= tag.version %> (<%= tag.committed_date %>)
13
13
  <%= 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 %>
14
14
 
15
15
  <% tag.commits.each do |commit| %><%= commit.render :commit %><% end %>
@@ -1,12 +1,13 @@
1
-
2
1
  <% if tag.empty? %>
3
2
  <%= project_label %> (<%= tag.committed_date %>)
4
3
 
5
4
  <%= tag.total_commits %>. <%= tag.total_files %>. <%= tag.total_deletions %>. <%= tag.total_insertions %>.
6
5
  <% else %>
7
- <%= project_label %> <%= project_version %> (<%= tag.committed_date %>)
6
+ <%= project_label %> <%= tag.version %> (<%= tag.committed_date %>)
8
7
 
8
+ <% if tag.version != project_version %>
9
9
  <%= tag.author.name %> | <%= tag.security %>
10
+ <% end %>
10
11
 
11
12
  <% tag.commits.each do |commit| %><%= commit.render :commit %><% end %>
12
13
 
data/milestoner.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "milestoner"
5
- spec.version = "18.0.0"
5
+ spec.version = "18.0.1"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/milestoner"
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: milestoner
3
3
  version: !ruby/object:Gem::Version
4
- version: 18.0.0
4
+ version: 18.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -35,7 +35,7 @@ cert_chain:
35
35
  3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
36
36
  gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
37
37
  -----END CERTIFICATE-----
38
- date: 2024-07-07 00:00:00.000000000 Z
38
+ date: 2024-07-08 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: asciidoctor
metadata.gz.sig CHANGED
Binary file