milestoner 18.3.0 → 18.4.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 +3 -1
- data/lib/milestoner/commits/enricher.rb +2 -2
- data/lib/milestoner/configuration/transformers/citations/description.rb +2 -4
- data/lib/milestoner/configuration/transformers/citations/label.rb +5 -4
- data/lib/milestoner/configuration/transformers/citations/uri.rb +1 -4
- data/lib/milestoner/configuration/transformers/gems/description.rb +2 -4
- data/lib/milestoner/configuration/transformers/gems/name.rb +2 -4
- data/lib/milestoner/configuration/transformers/project/author.rb +1 -4
- data/lib/milestoner/configuration/transformers/project/label.rb +1 -3
- data/lib/milestoner/container.rb +1 -2
- data/lib/milestoner/models/commit.rb +1 -0
- data/lib/milestoner/sanitizer.rb +31 -0
- data/lib/milestoner/templates/milestones/_commit.adoc.erb +48 -1
- data/lib/milestoner/templates/milestones/_commit.html.erb +5 -1
- data/lib/milestoner/templates/milestones/_commit.xml.erb +2 -6
- data/lib/milestoner/views/parts/commit.rb +2 -0
- data/milestoner.gemspec +3 -3
- data.tar.gz.sig +0 -0
- metadata +7 -6
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f42cba7a4f2b93a05d7fcf25fb973e2a241c8d1813a143baa779c2e1a310f1ed
|
4
|
+
data.tar.gz: 73635a67814d59b11bae524f45cb4878196aba7e302fa595ecedaaf89e350a6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9fcf5478cee6c0a63811cb133d27ae4bc292da15bacdbdb65f2edd29375057f87c23f15f4780ae68539439ed3c5c2011989477ea4c530b32effa5659f46735b1
|
7
|
+
data.tar.gz: a9e17509fa39de1247896518da061daa4586afbff8e905b5934728e5269e448ef973c1ffa1ac1136efd6d01a275912fe872c1fe84876c65c25dbaf7e32fed75a
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -52,7 +52,9 @@ The following are screenshots of using this gem to render release notes for the
|
|
52
52
|
|
53
53
|
=== ASCII Doc Format
|
54
54
|
|
55
|
-
image:https://alchemists.io/images/projects/milestoner/screenshots/build-ascii_doc.png[Release Notes,width=
|
55
|
+
image:https://alchemists.io/images/projects/milestoner/screenshots/build-ascii_doc-collapsed.png[Release Notes,width=1149,height=830,role=focal_point]
|
56
|
+
|
57
|
+
image:https://alchemists.io/images/projects/milestoner/screenshots/build-ascii_doc-expanded.png[Release Notes,width=1149,height=1054,role=focal_point]
|
56
58
|
|
57
59
|
* *Command*: `milestoner build --format ascii_doc`
|
58
60
|
* *Renderer*: {ascii_doc_link}
|
@@ -40,8 +40,8 @@ module Milestoner
|
|
40
40
|
attr_reader :categorizer, :model
|
41
41
|
|
42
42
|
def build_attributes commit
|
43
|
-
infused_keys.each.with_object({}) do |
|
44
|
-
attributes[
|
43
|
+
infused_keys.each.with_object({}) do |key, attributes|
|
44
|
+
attributes[key] = __send__(key).call commit
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
@@ -3,7 +3,6 @@
|
|
3
3
|
require "cff"
|
4
4
|
require "dry/monads"
|
5
5
|
require "pathname"
|
6
|
-
require "refinements/hash"
|
7
6
|
|
8
7
|
module Milestoner
|
9
8
|
module Configuration
|
@@ -13,8 +12,6 @@ module Milestoner
|
|
13
12
|
class Description
|
14
13
|
include Dry::Monads[:result]
|
15
14
|
|
16
|
-
using Refinements::Hash
|
17
|
-
|
18
15
|
def initialize key = :project_description,
|
19
16
|
path: Pathname.pwd.join("CITATION.cff"),
|
20
17
|
citation: CFF::File
|
@@ -25,7 +22,8 @@ module Milestoner
|
|
25
22
|
|
26
23
|
def call attributes
|
27
24
|
attributes.fetch key do
|
28
|
-
|
25
|
+
value = citation.open(path).abstract
|
26
|
+
attributes.merge! key => value unless value.empty?
|
29
27
|
end
|
30
28
|
|
31
29
|
Success attributes
|
@@ -3,7 +3,6 @@
|
|
3
3
|
require "cff"
|
4
4
|
require "dry/monads"
|
5
5
|
require "pathname"
|
6
|
-
require "refinements/hash"
|
7
6
|
|
8
7
|
module Milestoner
|
9
8
|
module Configuration
|
@@ -13,8 +12,6 @@ module Milestoner
|
|
13
12
|
class Label
|
14
13
|
include Dry::Monads[:result]
|
15
14
|
|
16
|
-
using Refinements::Hash
|
17
|
-
|
18
15
|
def initialize key = :project_label,
|
19
16
|
path: Pathname.pwd.join("CITATION.cff"),
|
20
17
|
citation: CFF::File
|
@@ -24,7 +21,11 @@ module Milestoner
|
|
24
21
|
end
|
25
22
|
|
26
23
|
def call attributes
|
27
|
-
attributes.fetch
|
24
|
+
attributes.fetch key do
|
25
|
+
value = citation.open(path).title
|
26
|
+
attributes.merge! key => value unless value.empty?
|
27
|
+
end
|
28
|
+
|
28
29
|
Success attributes
|
29
30
|
end
|
30
31
|
|
@@ -3,7 +3,6 @@
|
|
3
3
|
require "cff"
|
4
4
|
require "dry/monads"
|
5
5
|
require "pathname"
|
6
|
-
require "refinements/hash"
|
7
6
|
|
8
7
|
module Milestoner
|
9
8
|
module Configuration
|
@@ -13,8 +12,6 @@ module Milestoner
|
|
13
12
|
class URI
|
14
13
|
include Dry::Monads[:result]
|
15
14
|
|
16
|
-
using Refinements::Hash
|
17
|
-
|
18
15
|
def initialize key = :project_uri,
|
19
16
|
path: Pathname.pwd.join("CITATION.cff"),
|
20
17
|
citation: CFF::File
|
@@ -39,7 +36,7 @@ module Milestoner
|
|
39
36
|
def process attributes
|
40
37
|
attributes.fetch(key) { citation.open(path).url }
|
41
38
|
.then { |value| value.match?(/%<.+>s/) ? format(value, attributes) : value }
|
42
|
-
.then { |value| attributes.merge!
|
39
|
+
.then { |value| attributes.merge! key => value unless value.empty? }
|
43
40
|
end
|
44
41
|
end
|
45
42
|
end
|
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
require "dry/monads"
|
4
4
|
require "pathname"
|
5
|
-
require "refinements/hash"
|
6
5
|
|
7
6
|
module Milestoner
|
8
7
|
module Configuration
|
@@ -13,8 +12,6 @@ module Milestoner
|
|
13
12
|
include Import[:spec_loader]
|
14
13
|
include Dry::Monads[:result]
|
15
14
|
|
16
|
-
using Refinements::Hash
|
17
|
-
|
18
15
|
def initialize(key = :project_description, path: "#{Pathname.pwd.basename}.gemspec", **)
|
19
16
|
@key = key
|
20
17
|
@path = path
|
@@ -23,7 +20,8 @@ module Milestoner
|
|
23
20
|
|
24
21
|
def call attributes
|
25
22
|
attributes.fetch key do
|
26
|
-
|
23
|
+
value = spec_loader.call(path).summary
|
24
|
+
attributes.merge! key => value if value
|
27
25
|
end
|
28
26
|
|
29
27
|
Success attributes
|
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
require "dry/monads"
|
4
4
|
require "pathname"
|
5
|
-
require "refinements/hash"
|
6
5
|
|
7
6
|
module Milestoner
|
8
7
|
module Configuration
|
@@ -13,8 +12,6 @@ module Milestoner
|
|
13
12
|
include Import[:spec_loader]
|
14
13
|
include Dry::Monads[:result]
|
15
14
|
|
16
|
-
using Refinements::Hash
|
17
|
-
|
18
15
|
def initialize(key = :project_name, path: "#{Pathname.pwd.basename}.gemspec", **)
|
19
16
|
@key = key
|
20
17
|
@path = path
|
@@ -23,7 +20,8 @@ module Milestoner
|
|
23
20
|
|
24
21
|
def call attributes
|
25
22
|
attributes.fetch key do
|
26
|
-
|
23
|
+
value = spec_loader.call(path).name
|
24
|
+
attributes.merge! key => value if value
|
27
25
|
end
|
28
26
|
|
29
27
|
Success attributes
|
@@ -1,7 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "dry/monads"
|
4
|
-
require "refinements/hash"
|
5
4
|
|
6
5
|
module Milestoner
|
7
6
|
module Configuration
|
@@ -12,8 +11,6 @@ module Milestoner
|
|
12
11
|
include Import[:git]
|
13
12
|
include Dry::Monads[:result]
|
14
13
|
|
15
|
-
using Refinements::Hash
|
16
|
-
|
17
14
|
def initialize(key = :project_author, **)
|
18
15
|
@key = key
|
19
16
|
super(**)
|
@@ -21,7 +18,7 @@ module Milestoner
|
|
21
18
|
|
22
19
|
def call attributes
|
23
20
|
attributes.fetch key do
|
24
|
-
git.get("user.name", nil).bind { |value| attributes.merge!
|
21
|
+
git.get("user.name", nil).bind { |value| attributes.merge! key => value if value }
|
25
22
|
end
|
26
23
|
|
27
24
|
Success attributes
|
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
require "dry/monads"
|
4
4
|
require "pathname"
|
5
|
-
require "refinements/hash"
|
6
5
|
require "refinements/string"
|
7
6
|
|
8
7
|
module Milestoner
|
@@ -11,10 +10,9 @@ module Milestoner
|
|
11
10
|
# Conditionally updates label based on current directory.
|
12
11
|
module Project
|
13
12
|
using Refinements::String
|
14
|
-
using Refinements::Hash
|
15
13
|
|
16
14
|
Label = lambda do |attributes, key = :project_label, default: Pathname.pwd.basename.to_s|
|
17
|
-
attributes.fetch(key) { attributes.merge!
|
15
|
+
attributes.fetch(key) { attributes.merge! key => default.titleize }
|
18
16
|
Dry::Monads::Success attributes
|
19
17
|
end
|
20
18
|
end
|
data/lib/milestoner/container.rb
CHANGED
@@ -6,7 +6,6 @@ require "etcher"
|
|
6
6
|
require "gitt"
|
7
7
|
require "lode"
|
8
8
|
require "runcom"
|
9
|
-
require "sanitize"
|
10
9
|
require "spek"
|
11
10
|
|
12
11
|
module Milestoner
|
@@ -65,7 +64,7 @@ module Milestoner
|
|
65
64
|
|
66
65
|
register(:settings) { Etcher.call(self[:registry]).dup }
|
67
66
|
register(:specification) { self[:spec_loader].call "#{__dir__}/../../milestoner.gemspec" }
|
68
|
-
register
|
67
|
+
register(:sanitizer) { Sanitizer.new }
|
69
68
|
register(:spec_loader) { Spek::Loader.new }
|
70
69
|
register(:git) { Gitt::Repository.new }
|
71
70
|
register(:defaults_path) { Pathname(__dir__).join("configuration/defaults.yml") }
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "refinements/array"
|
4
|
+
require "sanitize"
|
5
|
+
|
6
|
+
module Milestoner
|
7
|
+
# A custom HTML sanitizer.
|
8
|
+
class Sanitizer
|
9
|
+
using Refinements::Array
|
10
|
+
|
11
|
+
def initialize defaults: Sanitize::Config::BASIC, client: Sanitize
|
12
|
+
@defaults = defaults
|
13
|
+
@client = client
|
14
|
+
end
|
15
|
+
|
16
|
+
def call(content) = client.fragment content, configuration
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
attr_reader :defaults, :client
|
21
|
+
|
22
|
+
def configuration
|
23
|
+
client::Config.merge defaults,
|
24
|
+
elements: defaults[:elements].including("img", "video"),
|
25
|
+
attributes: defaults[:attributes].merge(
|
26
|
+
"img" => %w[alt class height id loading src width],
|
27
|
+
"video" => %w[class controls height id poster src width]
|
28
|
+
)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -1 +1,48 @@
|
|
1
|
-
|
1
|
+
.<%= commit.emoji %> <%= commit.subject %> - <%= render :profile, name: commit.author.name, url: commit.profile_url(commit.author) %>
|
2
|
+
[%collapsible]
|
3
|
+
====
|
4
|
+
*Message*
|
5
|
+
|
6
|
+
<% if commit.body_lines && commit.body_lines.any? %>
|
7
|
+
<%= commit.body_lines.join "\n" %>
|
8
|
+
<% else %>
|
9
|
+
None.
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<% unless commit.notes.empty? %>
|
13
|
+
*Notes*
|
14
|
+
|
15
|
+
_Notes are detected but can't be rendered at the moment. Support will be added in the next Milestoner version._
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
*Author*
|
19
|
+
|
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) %>
|
21
|
+
|
22
|
+
<% if commit.collaborators.any? %>
|
23
|
+
*Collaborators*
|
24
|
+
|
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 %>
|
29
|
+
|
30
|
+
<% if commit.signers.any? %>
|
31
|
+
*Signers*
|
32
|
+
|
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 %>
|
37
|
+
|
38
|
+
*Details*
|
39
|
+
|
40
|
+
* Milestone: <%= commit.tag.capitalize %>
|
41
|
+
* Signature: <%= commit.signature %>
|
42
|
+
* Files: link:<%= commit.uri %>[<%= commit.files_changed %>]
|
43
|
+
* Lines: <%= commit.total_deletions %>/<%= commit.total_insertions %>
|
44
|
+
* Issue: link:<%= commit.issue.uri %>[<%= commit.issue.id %>]
|
45
|
+
* Review: link:<%= commit.review.uri %>[<%= commit.review.id %>]
|
46
|
+
|
47
|
+
_<%= commit.datetime %>_
|
48
|
+
====
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<h4>Message</h4>
|
8
8
|
|
9
9
|
<% if commit.body.empty? %>
|
10
|
-
<p>
|
10
|
+
<p>None.</p>
|
11
11
|
<% else %>
|
12
12
|
<%= commit.safe_body %>
|
13
13
|
<% end %>
|
@@ -72,11 +72,7 @@
|
|
72
72
|
|
73
73
|
<p>
|
74
74
|
<em style="display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1rem;">
|
75
|
-
|
76
|
-
<time datetime="<%= commit.at %>">(<%= commit.weekday %>)</time>
|
77
|
-
at
|
78
|
-
<time datetime="<%= commit.at %>"><%= commit.time %></time>
|
79
|
-
<time datetime="<%= commit.at %>"><%= commit.zone %></time>
|
75
|
+
<%= commit.datetime %>
|
80
76
|
</em>
|
81
77
|
</p>
|
82
78
|
|
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.
|
5
|
+
spec.version = "18.4.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://alchemists.io/projects/milestoner"
|
@@ -31,10 +31,10 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_dependency "dry-monads", "~> 1.6"
|
32
32
|
spec.add_dependency "dry-schema", "~> 1.13"
|
33
33
|
spec.add_dependency "etcher", "~> 2.1"
|
34
|
-
spec.add_dependency "gitt", "~> 3.
|
34
|
+
spec.add_dependency "gitt", "~> 3.9"
|
35
35
|
spec.add_dependency "hanami-view", "~> 2.1"
|
36
36
|
spec.add_dependency "infusible", "~> 3.8"
|
37
|
-
spec.add_dependency "lode", "~> 1.
|
37
|
+
spec.add_dependency "lode", "~> 1.8"
|
38
38
|
spec.add_dependency "redcarpet", "~> 3.6"
|
39
39
|
spec.add_dependency "refinements", "~> 12.8"
|
40
40
|
spec.add_dependency "rss", "~> 0.3"
|
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.
|
4
|
+
version: 18.4.0
|
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-09-
|
38
|
+
date: 2024-09-07 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: asciidoctor
|
@@ -155,14 +155,14 @@ dependencies:
|
|
155
155
|
requirements:
|
156
156
|
- - "~>"
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
version: '3.
|
158
|
+
version: '3.9'
|
159
159
|
type: :runtime
|
160
160
|
prerelease: false
|
161
161
|
version_requirements: !ruby/object:Gem::Requirement
|
162
162
|
requirements:
|
163
163
|
- - "~>"
|
164
164
|
- !ruby/object:Gem::Version
|
165
|
-
version: '3.
|
165
|
+
version: '3.9'
|
166
166
|
- !ruby/object:Gem::Dependency
|
167
167
|
name: hanami-view
|
168
168
|
requirement: !ruby/object:Gem::Requirement
|
@@ -197,14 +197,14 @@ dependencies:
|
|
197
197
|
requirements:
|
198
198
|
- - "~>"
|
199
199
|
- !ruby/object:Gem::Version
|
200
|
-
version: '1.
|
200
|
+
version: '1.8'
|
201
201
|
type: :runtime
|
202
202
|
prerelease: false
|
203
203
|
version_requirements: !ruby/object:Gem::Requirement
|
204
204
|
requirements:
|
205
205
|
- - "~>"
|
206
206
|
- !ruby/object:Gem::Version
|
207
|
-
version: '1.
|
207
|
+
version: '1.8'
|
208
208
|
- !ruby/object:Gem::Dependency
|
209
209
|
name: redcarpet
|
210
210
|
requirement: !ruby/object:Gem::Requirement
|
@@ -415,6 +415,7 @@ files:
|
|
415
415
|
- lib/milestoner/renderers/asciidoc.rb
|
416
416
|
- lib/milestoner/renderers/markdown.rb
|
417
417
|
- lib/milestoner/renderers/universal.rb
|
418
|
+
- lib/milestoner/sanitizer.rb
|
418
419
|
- lib/milestoner/syndication/builder.rb
|
419
420
|
- lib/milestoner/syndication/refine.rb
|
420
421
|
- lib/milestoner/syndication/shared.rb
|
metadata.gz.sig
CHANGED
Binary file
|