milestoner 18.10.0 → 18.12.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/lib/milestoner/builders/feed.rb +0 -1
- data/lib/milestoner/builders/stream.rb +0 -4
- data/lib/milestoner/builders/web.rb +1 -0
- data/lib/milestoner/commits/categorizer.rb +1 -1
- data/lib/milestoner/commits/enricher.rb +3 -1
- 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 -0
- 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/time.rb +20 -0
- data/lib/milestoner/commits/tagger.rb +2 -2
- data/lib/milestoner/commits/versioner.rb +1 -1
- data/lib/milestoner/configuration/transformers/gems/description.rb +1 -1
- data/lib/milestoner/configuration/transformers/gems/label.rb +1 -1
- 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 -0
- data/lib/milestoner/models/commit.rb +7 -0
- data/lib/milestoner/templates/layouts/page.html.erb +2 -2
- data/lib/milestoner/views/parts/commit.rb +3 -3
- data/lib/milestoner/views/parts/tag.rb +15 -9
- data/lib/milestoner/views/scopes/tag_signature.rb +1 -1
- data/milestoner.gemspec +3 -2
- data.tar.gz.sig +0 -0
- metadata +19 -4
- 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: e9ed4141a024a3afb6dd224f6d8f6e52db2c189bfc7ff121d39d29bf0423abb9
|
4
|
+
data.tar.gz: 966e8a280416c847a955b4ed3f674c42ea1ccebe7b8a1c8e8a48012df5743c26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '04963da39631d44ed1617b4e341c846a270359002cd2ab1b4728e2fce374fc0f96ea335bba338d0f005a07cb07ad2f5fd69864a901652d8418d0ab42c78d990d'
|
7
|
+
data.tar.gz: 9c8a92faff3f870ccf7ba95bb2d5bf889273952465ed4ce6931c9386c578e50f042651bbc853acfc20d6fdc1dddf553e67ffa66d356eb0199434cd68d5a9c11a
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -1,15 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "refinements/pathname"
|
4
|
-
|
5
3
|
module Milestoner
|
6
4
|
module Builders
|
7
5
|
# Builds I/O stream output.
|
8
6
|
class Stream
|
9
7
|
include Milestoner::Import[:settings, :logger, :io]
|
10
8
|
|
11
|
-
using Refinements::Pathname
|
12
|
-
|
13
9
|
def initialize(tagger: Commits::Tagger.new, view: Views::Milestones::Show.new, **)
|
14
10
|
@tagger = tagger
|
15
11
|
@view = view
|
@@ -12,9 +12,9 @@ module Milestoner
|
|
12
12
|
using Refinements::Array
|
13
13
|
|
14
14
|
def initialize(collector: Collector.new, **)
|
15
|
-
@collector = collector
|
16
15
|
super(**)
|
17
16
|
|
17
|
+
@collector = collector
|
18
18
|
@labels = settings.commit_categories.pluck :label
|
19
19
|
@pattern = labels.empty? ? // : Regexp.union(labels)
|
20
20
|
end
|
@@ -12,21 +12,23 @@ module Milestoner
|
|
12
12
|
:author,
|
13
13
|
:body,
|
14
14
|
:collaborators,
|
15
|
+
:created_at,
|
15
16
|
:format,
|
16
17
|
:issue,
|
17
18
|
:milestone,
|
18
19
|
:notes,
|
19
20
|
:review,
|
20
21
|
:signers,
|
22
|
+
:updated_at,
|
21
23
|
:uri
|
22
24
|
]
|
23
25
|
|
24
26
|
include Dry::Monads[:result]
|
25
27
|
|
26
28
|
def initialize(categorizer: Commits::Categorizer.new, model: Models::Commit, **)
|
29
|
+
super(**)
|
27
30
|
@categorizer = categorizer
|
28
31
|
@model = model
|
29
|
-
super(**)
|
30
32
|
end
|
31
33
|
|
32
34
|
def call min: Collector::MIN, max: Collector::MAX
|
@@ -10,9 +10,9 @@ module Milestoner
|
|
10
10
|
include Milestoner::Import[:cache]
|
11
11
|
|
12
12
|
def initialize(key:, parser: Gitt::Parsers::Person.new, **)
|
13
|
+
super(**)
|
13
14
|
@key = key
|
14
15
|
@parser = parser
|
15
|
-
super(**)
|
16
16
|
end
|
17
17
|
|
18
18
|
def call(commit) = commit.find_trailers(key).bind { |trailers| users_for(trailers).compact }
|
@@ -12,12 +12,14 @@ module Milestoner
|
|
12
12
|
register(:author) { Author.new }
|
13
13
|
register(:body) { Body.new }
|
14
14
|
register(:collaborators) { Colleague.new key: "Co-authored-by" }
|
15
|
+
register(:created_at) { Time.new key: :authored_at }
|
15
16
|
register(:format) { Format.new }
|
16
17
|
register(:issue) { Issue.new }
|
17
18
|
register(:milestone) { Milestone.new }
|
18
19
|
register(:notes) { Note.new }
|
19
20
|
register(:review) { Review.new }
|
20
21
|
register(:signers) { Colleague.new key: "Signed-off-by" }
|
22
|
+
register(:updated_at) { Time.new key: :committed_at }
|
21
23
|
register(:uri) { URI.new }
|
22
24
|
end
|
23
25
|
end
|
@@ -8,9 +8,9 @@ module Milestoner
|
|
8
8
|
include Milestoner::Import[:settings]
|
9
9
|
|
10
10
|
def initialize(key: "Milestone", default: "unknown", **)
|
11
|
+
super(**)
|
11
12
|
@key = key
|
12
13
|
@default = default
|
13
|
-
super(**)
|
14
14
|
end
|
15
15
|
|
16
16
|
def call(commit) = commit.trailer_value_for(key).value_or(default)
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Milestoner
|
4
|
+
module Commits
|
5
|
+
module Enrichers
|
6
|
+
# Enriches raw time as a Time instance.
|
7
|
+
class Time
|
8
|
+
def initialize key:
|
9
|
+
@key = key
|
10
|
+
end
|
11
|
+
|
12
|
+
def call(commit) = ::Time.at commit.public_send(key).to_i
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
attr_reader :key
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -18,9 +18,9 @@ module Milestoner
|
|
18
18
|
using Refinements::Struct
|
19
19
|
|
20
20
|
def initialize(enricher: Commits::Enricher.new, model: Models::Tag, **)
|
21
|
+
super(**)
|
21
22
|
@enricher = enricher
|
22
23
|
@model = model
|
23
|
-
super(**)
|
24
24
|
end
|
25
25
|
|
26
26
|
def call
|
@@ -91,7 +91,7 @@ module Milestoner
|
|
91
91
|
author_enricher.call tag.with(author_name: tag.author_name || settings.project_author)
|
92
92
|
end
|
93
93
|
|
94
|
-
def committed_at(at) = at ? Time.at(at.to_i)
|
94
|
+
def committed_at(at) = at ? Time.at(at.to_i) : settings.loaded_at
|
95
95
|
end
|
96
96
|
end
|
97
97
|
end
|
@@ -16,9 +16,9 @@ module Milestoner
|
|
16
16
|
DEFAULTS = {trailer_key: "Milestone", fallback: Versionaire::Version.new}.freeze
|
17
17
|
|
18
18
|
def initialize(defaults: DEFAULTS, collector: Collector.new, **)
|
19
|
+
super(**)
|
19
20
|
@defaults = defaults
|
20
21
|
@collector = collector
|
21
|
-
super(**)
|
22
22
|
end
|
23
23
|
|
24
24
|
def call
|
data/lib/milestoner/container.rb
CHANGED
@@ -7,6 +7,7 @@ require "gitt"
|
|
7
7
|
require "lode"
|
8
8
|
require "runcom"
|
9
9
|
require "spek"
|
10
|
+
require "tone"
|
10
11
|
|
11
12
|
module Milestoner
|
12
13
|
# Provides a global gem container for injection into other objects.
|
@@ -68,6 +69,7 @@ module Milestoner
|
|
68
69
|
register(:spec_loader) { Spek::Loader.new }
|
69
70
|
register(:git) { Gitt::Repository.new }
|
70
71
|
register(:defaults_path) { Pathname(__dir__).join("configuration/defaults.yml") }
|
72
|
+
register(:color) { Tone.new }
|
71
73
|
register(:logger) { Cogger.new id: :milestoner }
|
72
74
|
register :io, STDOUT
|
73
75
|
end
|
@@ -6,9 +6,13 @@ module Milestoner
|
|
6
6
|
module Models
|
7
7
|
COMMIT_COMMON_ATTRIBUTES = %i[
|
8
8
|
authored_at
|
9
|
+
authored_relative_at
|
9
10
|
body
|
10
11
|
body_lines
|
12
|
+
committed_at
|
13
|
+
committed_relative_at
|
11
14
|
deletions
|
15
|
+
encoding
|
12
16
|
files_changed
|
13
17
|
fingerprint
|
14
18
|
fingerprint_key
|
@@ -22,11 +26,14 @@ module Milestoner
|
|
22
26
|
COMMIT_ENRICHED_ATTRIBUTES = %i[
|
23
27
|
author
|
24
28
|
collaborators
|
29
|
+
created_at
|
25
30
|
format
|
26
31
|
issue
|
27
32
|
milestone
|
33
|
+
position
|
28
34
|
review
|
29
35
|
signers
|
36
|
+
updated_at
|
30
37
|
uri
|
31
38
|
].freeze
|
32
39
|
|
@@ -32,8 +32,8 @@
|
|
32
32
|
type="text/css">
|
33
33
|
<% end %>
|
34
34
|
|
35
|
-
<script src="https://unpkg.com/alpinejs@3.14.
|
36
|
-
integrity="sha384-
|
35
|
+
<script src="https://unpkg.com/alpinejs@3.14.3"
|
36
|
+
integrity="sha384-iZD2X8o1Zdq0HR5H/7oa8W30WS4No+zWCKUPD7fHRay9I1Gf+C4F8sVmw7zec1wW"
|
37
37
|
crossorigin="anonymous"
|
38
38
|
defer>
|
39
39
|
</script>
|
@@ -20,7 +20,7 @@ module Milestoner
|
|
20
20
|
def initialize(**)
|
21
21
|
super
|
22
22
|
@prefixes = settings.commit_categories.pluck :label
|
23
|
-
@authored_at = Time.at
|
23
|
+
@authored_at = Time.at value.authored_at.to_i
|
24
24
|
end
|
25
25
|
|
26
26
|
def avatar_url user
|
@@ -89,13 +89,13 @@ module Milestoner
|
|
89
89
|
|
90
90
|
def at = authored_at.strftime "%Y-%m-%dT%H:%M:%S%z"
|
91
91
|
|
92
|
-
def datetime = authored_at.strftime "%Y-%m-%d (%A)
|
92
|
+
def datetime = authored_at.strftime "%Y-%m-%d (%A) %I:%M %p %Z"
|
93
93
|
|
94
94
|
def weekday = authored_at.strftime "%A"
|
95
95
|
|
96
96
|
def date = authored_at.strftime "%Y-%m-%d"
|
97
97
|
|
98
|
-
def time = authored_at.strftime "%
|
98
|
+
def time = authored_at.strftime "%I:%M %p"
|
99
99
|
|
100
100
|
def zone = authored_at.strftime "%Z"
|
101
101
|
|
@@ -22,7 +22,9 @@ module Milestoner
|
|
22
22
|
format settings.avatar_uri, id: user.external_id
|
23
23
|
end
|
24
24
|
|
25
|
-
def
|
25
|
+
def commit_count = value.commits.size
|
26
|
+
|
27
|
+
def committed_at fallback: Time.now
|
26
28
|
value.committed_at.then { |at| at ? Time.at(at) : fallback }
|
27
29
|
end
|
28
30
|
|
@@ -30,6 +32,8 @@ module Milestoner
|
|
30
32
|
|
31
33
|
def committed_datetime = committed_at.strftime "%Y-%m-%dT%H:%M:%S%z"
|
32
34
|
|
35
|
+
def deletion_count = value.commits.sum(&:deletions)
|
36
|
+
|
33
37
|
def empty? = value.commits.empty?
|
34
38
|
|
35
39
|
def profile_url user
|
@@ -39,23 +43,25 @@ module Milestoner
|
|
39
43
|
format settings.profile_uri, id: user.handle
|
40
44
|
end
|
41
45
|
|
46
|
+
def file_count = value.commits.sum(&:files_changed)
|
47
|
+
|
48
|
+
def insertion_count = value.commits.sum(&:insertions)
|
49
|
+
|
42
50
|
def security = value.signature ? "🔒 Tag (secure)" : "🔓 Tag (insecure)"
|
43
51
|
|
44
|
-
def total_commits
|
45
|
-
value.commits.size.then { |total| "#{total} commit".pluralize "s", total }
|
46
|
-
end
|
52
|
+
def total_commits = commit_count.then { |total| "#{total} commit".pluralize "s", total }
|
47
53
|
|
48
|
-
def total_files
|
49
|
-
value.commits.sum(&:files_changed).then { |total| "#{total} file".pluralize "s", total }
|
50
|
-
end
|
54
|
+
def total_files = file_count.then { |total| "#{total} file".pluralize "s", total }
|
51
55
|
|
52
56
|
def total_deletions
|
53
|
-
|
57
|
+
deletion_count.then { |total| "#{total} deletion".pluralize "s", total }
|
54
58
|
end
|
55
59
|
|
56
60
|
def total_insertions
|
57
|
-
|
61
|
+
insertion_count.then { |total| "#{total} insertion".pluralize "s", total }
|
58
62
|
end
|
63
|
+
|
64
|
+
def uri = format settings.project_uri_version, id: value.version
|
59
65
|
end
|
60
66
|
end
|
61
67
|
end
|
@@ -8,8 +8,8 @@ module Milestoner
|
|
8
8
|
# The tag signature specific behavior for partials.
|
9
9
|
class TagSignature < Hanami::View::Scope
|
10
10
|
def initialize(part: Parts::Tag.new(value: Models::Tag.new), **)
|
11
|
-
@part = part
|
12
11
|
super(**)
|
12
|
+
@part = part
|
13
13
|
end
|
14
14
|
|
15
15
|
def tag = locals.fetch :tag, part
|
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.12.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://alchemists.io/projects/milestoner"
|
@@ -41,8 +41,9 @@ Gem::Specification.new do |spec|
|
|
41
41
|
spec.add_dependency "rss", "~> 0.3"
|
42
42
|
spec.add_dependency "runcom", "~> 11.10"
|
43
43
|
spec.add_dependency "sanitize", "~> 6.1"
|
44
|
-
spec.add_dependency "sod", "~> 0.
|
44
|
+
spec.add_dependency "sod", "~> 0.20"
|
45
45
|
spec.add_dependency "spek", "~> 3.0"
|
46
|
+
spec.add_dependency "tone", "~> 1.0"
|
46
47
|
spec.add_dependency "versionaire", "~> 13.10"
|
47
48
|
spec.add_dependency "zeitwerk", "~> 2.7"
|
48
49
|
|
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.12.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-
|
38
|
+
date: 2024-12-15 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: asciidoctor
|
@@ -295,14 +295,14 @@ dependencies:
|
|
295
295
|
requirements:
|
296
296
|
- - "~>"
|
297
297
|
- !ruby/object:Gem::Version
|
298
|
-
version: '0.
|
298
|
+
version: '0.20'
|
299
299
|
type: :runtime
|
300
300
|
prerelease: false
|
301
301
|
version_requirements: !ruby/object:Gem::Requirement
|
302
302
|
requirements:
|
303
303
|
- - "~>"
|
304
304
|
- !ruby/object:Gem::Version
|
305
|
-
version: '0.
|
305
|
+
version: '0.20'
|
306
306
|
- !ruby/object:Gem::Dependency
|
307
307
|
name: spek
|
308
308
|
requirement: !ruby/object:Gem::Requirement
|
@@ -317,6 +317,20 @@ dependencies:
|
|
317
317
|
- - "~>"
|
318
318
|
- !ruby/object:Gem::Version
|
319
319
|
version: '3.0'
|
320
|
+
- !ruby/object:Gem::Dependency
|
321
|
+
name: tone
|
322
|
+
requirement: !ruby/object:Gem::Requirement
|
323
|
+
requirements:
|
324
|
+
- - "~>"
|
325
|
+
- !ruby/object:Gem::Version
|
326
|
+
version: '1.0'
|
327
|
+
type: :runtime
|
328
|
+
prerelease: false
|
329
|
+
version_requirements: !ruby/object:Gem::Requirement
|
330
|
+
requirements:
|
331
|
+
- - "~>"
|
332
|
+
- !ruby/object:Gem::Version
|
333
|
+
version: '1.0'
|
320
334
|
- !ruby/object:Gem::Dependency
|
321
335
|
name: versionaire
|
322
336
|
requirement: !ruby/object:Gem::Requirement
|
@@ -398,6 +412,7 @@ files:
|
|
398
412
|
- lib/milestoner/commits/enrichers/milestone.rb
|
399
413
|
- lib/milestoner/commits/enrichers/note.rb
|
400
414
|
- lib/milestoner/commits/enrichers/review.rb
|
415
|
+
- lib/milestoner/commits/enrichers/time.rb
|
401
416
|
- lib/milestoner/commits/enrichers/uri.rb
|
402
417
|
- lib/milestoner/commits/tagger.rb
|
403
418
|
- lib/milestoner/commits/versioner.rb
|
metadata.gz.sig
CHANGED
Binary file
|