milestoner 17.5.0 → 17.7.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 +2 -0
- data/lib/milestoner/builders/ascii_doc.rb +5 -5
- data/lib/milestoner/builders/markdown.rb +5 -5
- data/lib/milestoner/builders/stream.rb +2 -0
- data/lib/milestoner/builders/web.rb +2 -0
- data/lib/milestoner/cli/actions/build/label.rb +0 -2
- data/lib/milestoner/cli/actions/build/root.rb +0 -1
- data/lib/milestoner/cli/actions/build/version.rb +0 -2
- data/lib/milestoner/cli/actions/cache/create.rb +1 -1
- data/lib/milestoner/cli/actions/cache/delete.rb +1 -1
- data/lib/milestoner/cli/actions/cache/find.rb +1 -1
- data/lib/milestoner/cli/actions/cache/list.rb +1 -1
- data/lib/milestoner/cli/actions/publish.rb +0 -2
- data/lib/milestoner/cli/commands/build.rb +0 -3
- data/lib/milestoner/cli/commands/cache.rb +0 -3
- data/lib/milestoner/commits/categorizer.rb +2 -2
- data/lib/milestoner/commits/enrichers/author.rb +1 -1
- data/lib/milestoner/commits/enrichers/colleague.rb +1 -1
- data/lib/milestoner/commits/versioner.rb +2 -1
- data/lib/milestoner/configuration/contract.rb +1 -0
- data/lib/milestoner/configuration/model.rb +1 -0
- data/lib/milestoner/configuration/transformers/build/root.rb +3 -3
- data/lib/milestoner/configuration/transformers/build/template_paths.rb +1 -1
- data/lib/milestoner/configuration/transformers/citations/description.rb +4 -4
- data/lib/milestoner/configuration/transformers/citations/label.rb +4 -4
- data/lib/milestoner/configuration/transformers/gems/description.rb +3 -4
- data/lib/milestoner/configuration/transformers/gems/label.rb +4 -5
- data/lib/milestoner/configuration/transformers/gems/name.rb +3 -4
- data/lib/milestoner/configuration/transformers/gems/uri.rb +4 -5
- data/lib/milestoner/configuration/transformers/generator/label.rb +3 -3
- data/lib/milestoner/configuration/transformers/generator/uri.rb +3 -3
- data/lib/milestoner/configuration/transformers/generator/version.rb +31 -0
- data/lib/milestoner/configuration/transformers/project/author.rb +3 -3
- data/lib/milestoner/configuration/transformers/project/generator.rb +2 -2
- data/lib/milestoner/configuration/transformers/project/label.rb +3 -3
- data/lib/milestoner/configuration/transformers/project/name.rb +3 -3
- data/lib/milestoner/configuration/transformers/project/version.rb +3 -3
- data/lib/milestoner/configuration/transformers/uri/avatar.rb +5 -6
- data/lib/milestoner/configuration/transformers/uri/commit.rb +8 -9
- data/lib/milestoner/configuration/transformers/uri/profile.rb +5 -6
- data/lib/milestoner/configuration/transformers/uri/review.rb +8 -9
- data/lib/milestoner/configuration/transformers/uri/tracker.rb +8 -9
- data/lib/milestoner/container.rb +1 -0
- data/lib/milestoner/tags/creator.rb +5 -2
- data/lib/milestoner/templates/layouts/page.adoc.erb +1 -1
- data/lib/milestoner/templates/layouts/page.html.erb +2 -2
- data/lib/milestoner/templates/layouts/page.md.erb +1 -1
- data/lib/milestoner/templates/layouts/page.stream.erb +1 -1
- data/lib/milestoner/templates/milestones/show.adoc.erb +4 -2
- data/lib/milestoner/templates/milestones/show.html.erb +6 -6
- data/lib/milestoner/templates/milestones/show.md.erb +4 -2
- data/lib/milestoner/templates/milestones/show.stream.erb +4 -2
- data/lib/milestoner/templates/public/page.css.erb +8 -2
- data/lib/milestoner/views/context.rb +8 -0
- data/lib/milestoner/views/milestones/show.rb +0 -1
- data/lib/milestoner/views/parts/commit.rb +0 -1
- data/milestoner.gemspec +5 -4
- data.tar.gz.sig +0 -0
- metadata +23 -8
- 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: e1ba81535b2b7f13eee65139650927c6b6fd89d1f4ce7a91bd8bd8b5f193b938
|
4
|
+
data.tar.gz: bf82ebc6322e1509786691305dd7426716db0aa1edb118f244379ed147de9419
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da5ab0c1fb070b621f23d3cd2109fbc88197bc7ef605245fb92d8fd598a352d8f35ebdc7774b5649a0c9e305a08bfb625c0bf32a4d606a6f7ed25b9c666a4691
|
7
|
+
data.tar.gz: 93aa467526e6ac43d881834499220c0f0a73d1a0a463b85abc6ad2ff2e63aa5210f5bfa06916f7cfbded178af3383fc45f0d65e5438bfc5729f86ef267db6bd9
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -146,6 +146,7 @@ commit:
|
|
146
146
|
generator:
|
147
147
|
label:
|
148
148
|
uri:
|
149
|
+
version:
|
149
150
|
profile:
|
150
151
|
domain: https://github.com
|
151
152
|
uri: "%<domain>s/%<id>s"
|
@@ -185,6 +186,7 @@ The above can be customized as follows:
|
|
185
186
|
* `generator`: Manages generator information.
|
186
187
|
** `label`: Required. The label of the generator used for all software milestones. Default: Milestoner.
|
187
188
|
** `uri`: Required. The URI of the generator used for all software milestones. Defaults to Milestoner's homepage URL as provided by the {gem_specification_link} of this project.
|
189
|
+
** `version`: Required. The version of the generator used for all software milestones. Defaults to Milestoner's current version as provided by the {gem_specification_link} of this project.
|
188
190
|
* `profile`: Manages team member profile information.
|
189
191
|
** `domain`: Required. The domain of your {git_link} repository. Default: GitHub.
|
190
192
|
** `uri`: Required. The URI format for linking to profiles as formatted using {string_formats_link}. The `id` is dynamically calculated via the `handle` of the user stored in the {lode_link} cache. Default: GitHub.
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "refinements/pathname"
|
4
|
+
|
3
5
|
module Milestoner
|
4
6
|
module Builders
|
5
7
|
# Builds Markdown page output.
|
@@ -14,17 +16,15 @@ module Milestoner
|
|
14
16
|
super(**)
|
15
17
|
end
|
16
18
|
|
17
|
-
def call
|
18
|
-
input.build_root.join("index.adoc").make_ancestors.tap { |path| write path, at }
|
19
|
-
end
|
19
|
+
def call = input.build_root.join("index.adoc").make_ancestors.tap { |path| write path }
|
20
20
|
|
21
21
|
private
|
22
22
|
|
23
23
|
attr_reader :view, :enricher
|
24
24
|
|
25
|
-
def write path
|
25
|
+
def write path
|
26
26
|
enricher.call.fmap do |commits|
|
27
|
-
path.write view.call commits:,
|
27
|
+
path.write view.call commits:, layout: input.build_layout, format: :adoc
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "refinements/pathname"
|
4
|
+
|
3
5
|
module Milestoner
|
4
6
|
module Builders
|
5
7
|
# Builds Markdown page output.
|
@@ -14,17 +16,15 @@ module Milestoner
|
|
14
16
|
super(**)
|
15
17
|
end
|
16
18
|
|
17
|
-
def call
|
18
|
-
input.build_root.join("index.md").make_ancestors.tap { |path| write path, at }
|
19
|
-
end
|
19
|
+
def call = input.build_root.join("index.md").make_ancestors.tap { |path| write path }
|
20
20
|
|
21
21
|
private
|
22
22
|
|
23
23
|
attr_reader :view, :enricher
|
24
24
|
|
25
|
-
def write path
|
25
|
+
def write path
|
26
26
|
enricher.call.fmap do |commits|
|
27
|
-
path.write view.call commits:,
|
27
|
+
path.write view.call commits:, layout: input.build_layout, format: :md
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
@@ -24,7 +24,7 @@ module Milestoner
|
|
24
24
|
|
25
25
|
def process values
|
26
26
|
external_id, handle, name = values.split ","
|
27
|
-
client.
|
27
|
+
client.write(:users) { upsert({external_id:, handle:, name:}) }
|
28
28
|
end
|
29
29
|
|
30
30
|
def log_info(message) = logger.info { message }
|
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "refinements/struct"
|
4
3
|
require "sod"
|
5
4
|
require "versionaire"
|
6
5
|
|
@@ -11,7 +10,6 @@ module Milestoner
|
|
11
10
|
class Publish < Sod::Action
|
12
11
|
include Import[:configuration]
|
13
12
|
|
14
|
-
using Refinements::Struct
|
15
13
|
using Versionaire::Cast
|
16
14
|
|
17
15
|
description "Publish milestone."
|
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "refinements/pathname"
|
4
3
|
require "sod"
|
5
4
|
|
6
5
|
module Milestoner
|
@@ -11,8 +10,6 @@ module Milestoner
|
|
11
10
|
include Import[:input, :logger, :kernel]
|
12
11
|
include Builders::Import[:ascii_doc, :markdown, :stream, :web]
|
13
12
|
|
14
|
-
using Refinements::Pathname
|
15
|
-
|
16
13
|
handle "build"
|
17
14
|
|
18
15
|
description "Build milestone."
|
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "refinements/pathname"
|
4
3
|
require "sod"
|
5
4
|
|
6
5
|
module Milestoner
|
@@ -10,8 +9,6 @@ module Milestoner
|
|
10
9
|
class Cache < Sod::Command
|
11
10
|
include Import[:input, :logger]
|
12
11
|
|
13
|
-
using Refinements::Pathname
|
14
|
-
|
15
12
|
handle "cache"
|
16
13
|
|
17
14
|
description "Manage cache."
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "core"
|
3
4
|
require "refinements/array"
|
4
|
-
require "versionaire"
|
5
5
|
|
6
6
|
module Milestoner
|
7
7
|
module Commits
|
@@ -33,7 +33,7 @@ module Milestoner
|
|
33
33
|
attr_reader :collector, :expression
|
34
34
|
|
35
35
|
def group_by_category categories, groups
|
36
|
-
collector.call.value_or(
|
36
|
+
collector.call.value_or(Core::EMPTY_ARRAY).each.with_object groups do |commit, collection|
|
37
37
|
category = commit.subject[subject_pattern(categories)]
|
38
38
|
key = collection.key?(category) ? category : "Unknown"
|
39
39
|
collection[key] << commit
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "core"
|
3
4
|
require "dry/monads"
|
4
5
|
require "versionaire"
|
5
6
|
|
@@ -30,7 +31,7 @@ module Milestoner
|
|
30
31
|
attr_reader :defaults, :collector
|
31
32
|
|
32
33
|
def trailer_milestones
|
33
|
-
collector.call.value_or(
|
34
|
+
collector.call.value_or(Core::EMPTY_ARRAY).each.with_object [] do |commit, values|
|
34
35
|
commit.trailer_value_for(trailer_key).bind { |milestone| values.append milestone.to_sym }
|
35
36
|
end
|
36
37
|
end
|
@@ -25,6 +25,7 @@ module Milestoner
|
|
25
25
|
required(:commit_uri).filled :string
|
26
26
|
required(:generator_label).filled :string
|
27
27
|
required(:generator_uri).filled :string
|
28
|
+
required(:generator_version).filled Etcher::Types::Version
|
28
29
|
required(:profile_domain).filled :string
|
29
30
|
required(:profile_uri).filled :string
|
30
31
|
required(:project_author).filled :string
|
@@ -11,9 +11,9 @@ module Milestoner
|
|
11
11
|
module Build
|
12
12
|
using Refinements::Hash
|
13
13
|
|
14
|
-
Root = lambda do |
|
15
|
-
|
16
|
-
Dry::Monads::Success
|
14
|
+
Root = lambda do |attributes, key = :build_root|
|
15
|
+
attributes.transform_with! key => -> value { Pathname(value).expand_path }
|
16
|
+
Dry::Monads::Success attributes
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -23,10 +23,10 @@ module Milestoner
|
|
23
23
|
@citation = citation
|
24
24
|
end
|
25
25
|
|
26
|
-
def call
|
27
|
-
|
28
|
-
|
29
|
-
|
26
|
+
def call attributes
|
27
|
+
attributes.fetch_value(key) { citation.open(path).abstract }
|
28
|
+
.then { |value| value unless String(value).empty? }
|
29
|
+
.then { |value| Success attributes.merge!(key => value) }
|
30
30
|
end
|
31
31
|
|
32
32
|
private
|
@@ -23,10 +23,10 @@ module Milestoner
|
|
23
23
|
@citation = citation
|
24
24
|
end
|
25
25
|
|
26
|
-
def call
|
27
|
-
|
28
|
-
|
29
|
-
|
26
|
+
def call attributes
|
27
|
+
attributes.fetch_value(key) { citation.open(path).title }
|
28
|
+
.then { |value| value unless String(value).empty? }
|
29
|
+
.then { |value| Success attributes.merge!(key => value) }
|
30
30
|
end
|
31
31
|
|
32
32
|
private
|
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
require "dry/monads"
|
4
4
|
require "pathname"
|
5
|
-
require "spek"
|
6
5
|
|
7
6
|
module Milestoner
|
8
7
|
module Configuration
|
@@ -19,9 +18,9 @@ module Milestoner
|
|
19
18
|
super(**)
|
20
19
|
end
|
21
20
|
|
22
|
-
def call
|
23
|
-
|
24
|
-
|
21
|
+
def call attributes
|
22
|
+
attributes.fetch(key) { spec_loader.call(path).summary }
|
23
|
+
.then { |value| Success attributes.merge!(key => value) }
|
25
24
|
end
|
26
25
|
|
27
26
|
private
|
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
require "dry/monads"
|
4
4
|
require "pathname"
|
5
|
-
require "spek"
|
6
5
|
|
7
6
|
module Milestoner
|
8
7
|
module Configuration
|
@@ -19,10 +18,10 @@ module Milestoner
|
|
19
18
|
super(**)
|
20
19
|
end
|
21
20
|
|
22
|
-
def call
|
23
|
-
|
24
|
-
|
25
|
-
|
21
|
+
def call attributes
|
22
|
+
attributes.fetch(key) { spec_loader.call(path).label }
|
23
|
+
.then { |value| value unless value == "Undefined" }
|
24
|
+
.then { |value| Success attributes.merge!(key => value) }
|
26
25
|
end
|
27
26
|
|
28
27
|
private
|
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
require "dry/monads"
|
4
4
|
require "pathname"
|
5
|
-
require "spek"
|
6
5
|
|
7
6
|
module Milestoner
|
8
7
|
module Configuration
|
@@ -19,9 +18,9 @@ module Milestoner
|
|
19
18
|
super(**)
|
20
19
|
end
|
21
20
|
|
22
|
-
def call
|
23
|
-
|
24
|
-
|
21
|
+
def call attributes
|
22
|
+
attributes.fetch(key) { spec_loader.call(path).name }
|
23
|
+
.then { |value| Success attributes.merge!(key => value) }
|
25
24
|
end
|
26
25
|
|
27
26
|
private
|
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
require "dry/monads"
|
4
4
|
require "pathname"
|
5
|
-
require "spek"
|
6
5
|
|
7
6
|
module Milestoner
|
8
7
|
module Configuration
|
@@ -19,10 +18,10 @@ module Milestoner
|
|
19
18
|
super(**)
|
20
19
|
end
|
21
20
|
|
22
|
-
def call
|
23
|
-
|
24
|
-
|
25
|
-
|
21
|
+
def call attributes
|
22
|
+
attributes.fetch(key) { spec_loader.call(path).homepage_url }
|
23
|
+
.then { |value| value unless String(value).empty? }
|
24
|
+
.then { |value| Success attributes.merge!(key => value) }
|
26
25
|
end
|
27
26
|
|
28
27
|
private
|
@@ -16,9 +16,9 @@ module Milestoner
|
|
16
16
|
super(**)
|
17
17
|
end
|
18
18
|
|
19
|
-
def call
|
20
|
-
|
21
|
-
|
19
|
+
def call attributes
|
20
|
+
attributes.fetch(key) { specification.label }
|
21
|
+
.then { |value| Success attributes.merge!(key => value) }
|
22
22
|
end
|
23
23
|
|
24
24
|
private
|
@@ -16,9 +16,9 @@ module Milestoner
|
|
16
16
|
super(**)
|
17
17
|
end
|
18
18
|
|
19
|
-
def call
|
20
|
-
|
21
|
-
|
19
|
+
def call attributes
|
20
|
+
attributes.fetch(key) { specification.homepage_url }
|
21
|
+
.then { |value| Success attributes.merge!(key => value) }
|
22
22
|
end
|
23
23
|
|
24
24
|
private
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "dry/monads"
|
4
|
+
|
5
|
+
module Milestoner
|
6
|
+
module Configuration
|
7
|
+
module Transformers
|
8
|
+
module Generator
|
9
|
+
# Conditionally updates generator version based on gem specification.
|
10
|
+
class Version
|
11
|
+
include Import[:specification]
|
12
|
+
include Dry::Monads[:result]
|
13
|
+
|
14
|
+
def initialize(key = :generator_version, **)
|
15
|
+
@key = key
|
16
|
+
super(**)
|
17
|
+
end
|
18
|
+
|
19
|
+
def call attributes
|
20
|
+
attributes.fetch(key) { specification.version }
|
21
|
+
.then { |value| Success attributes.merge!(key => value) }
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
attr_reader :key
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -19,9 +19,9 @@ module Milestoner
|
|
19
19
|
super(**)
|
20
20
|
end
|
21
21
|
|
22
|
-
def call
|
23
|
-
|
24
|
-
|
22
|
+
def call attributes
|
23
|
+
attributes.fetch_value(key) { git.get("user.name", nil).value_or(nil) }
|
24
|
+
.then { |value| Success attributes.merge!(key => value) }
|
25
25
|
end
|
26
26
|
|
27
27
|
private
|
@@ -16,13 +16,13 @@ module Milestoner
|
|
16
16
|
super(**)
|
17
17
|
end
|
18
18
|
|
19
|
-
def call
|
19
|
+
def call attributes
|
20
20
|
warn "`#{self.class}##{__method__}` is deprecated, use " \
|
21
21
|
"`Milestoner::Configuration::Transformers::Generator::Label` or " \
|
22
22
|
"`Milestoner::Configuration::Transformers::Generator::URI` instead.",
|
23
23
|
category: :deprecated
|
24
24
|
|
25
|
-
Success({key => specification.labeled_version}.merge!(
|
25
|
+
Success({key => specification.labeled_version}.merge!(attributes))
|
26
26
|
end
|
27
27
|
|
28
28
|
private
|
@@ -13,9 +13,9 @@ module Milestoner
|
|
13
13
|
using Refinements::String
|
14
14
|
using Refinements::Hash
|
15
15
|
|
16
|
-
Label = lambda do |
|
17
|
-
|
18
|
-
|
16
|
+
Label = lambda do |attributes, key = :project_label, default: Pathname.pwd.basename.to_s|
|
17
|
+
attributes.fetch_value(key) { default.titleize }
|
18
|
+
.then { |value| Dry::Monads::Success attributes.merge!(key => value) }
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
@@ -11,9 +11,9 @@ module Milestoner
|
|
11
11
|
module Project
|
12
12
|
using Refinements::Hash
|
13
13
|
|
14
|
-
Name = lambda do |
|
15
|
-
|
16
|
-
|
14
|
+
Name = lambda do |attributes, key = :project_name, default: Pathname.pwd.basename.to_s|
|
15
|
+
attributes.fetch_value(key) { default }
|
16
|
+
.then { |value| Dry::Monads::Success attributes.merge!(key => value) }
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -18,9 +18,9 @@ module Milestoner
|
|
18
18
|
@versioner = versioner
|
19
19
|
end
|
20
20
|
|
21
|
-
def call
|
22
|
-
|
23
|
-
|
21
|
+
def call attributes
|
22
|
+
attributes.fetch_value(key) { versioner.call }
|
23
|
+
.then { |value| Success attributes.merge!(key => value) }
|
24
24
|
end
|
25
25
|
|
26
26
|
private
|
@@ -1,19 +1,18 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "dry/monads"
|
4
|
-
require "pathname"
|
5
4
|
|
6
5
|
module Milestoner
|
7
6
|
module Configuration
|
8
7
|
module Transformers
|
9
8
|
module URI
|
10
|
-
Avatar = lambda do |
|
11
|
-
|
9
|
+
Avatar = lambda do |attributes, key = :avatar_uri|
|
10
|
+
uri, domain = attributes.values_at key, :avatar_domain
|
12
11
|
|
13
|
-
return Dry::Monads::Success
|
12
|
+
return Dry::Monads::Success attributes unless uri
|
14
13
|
|
15
|
-
|
16
|
-
Dry::Monads::Success
|
14
|
+
attributes[key] = format uri, domain:, id: "%<id>s"
|
15
|
+
Dry::Monads::Success attributes
|
17
16
|
end
|
18
17
|
end
|
19
18
|
end
|
@@ -1,22 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "dry/monads"
|
4
|
-
require "pathname"
|
5
4
|
|
6
5
|
module Milestoner
|
7
6
|
module Configuration
|
8
7
|
module Transformers
|
9
8
|
module URI
|
10
|
-
Commit = lambda do |
|
11
|
-
owner, name, domain
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
Commit = lambda do |attributes, key = :commit_uri|
|
10
|
+
uri, owner, name, domain = attributes.values_at key,
|
11
|
+
:project_owner,
|
12
|
+
:project_name,
|
13
|
+
:commit_domain
|
15
14
|
|
16
|
-
return Dry::Monads::Success
|
15
|
+
return Dry::Monads::Success attributes unless uri
|
17
16
|
|
18
|
-
|
19
|
-
Dry::Monads::Success
|
17
|
+
attributes[key] = format uri, domain:, owner:, name:, id: "%<id>s"
|
18
|
+
Dry::Monads::Success attributes
|
20
19
|
end
|
21
20
|
end
|
22
21
|
end
|
@@ -1,19 +1,18 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "dry/monads"
|
4
|
-
require "pathname"
|
5
4
|
|
6
5
|
module Milestoner
|
7
6
|
module Configuration
|
8
7
|
module Transformers
|
9
8
|
module URI
|
10
|
-
Profile = lambda do |
|
11
|
-
|
9
|
+
Profile = lambda do |attributes, key = :profile_uri|
|
10
|
+
uri, domain = attributes.values_at key, :profile_domain
|
12
11
|
|
13
|
-
return Dry::Monads::Success
|
12
|
+
return Dry::Monads::Success attributes unless uri
|
14
13
|
|
15
|
-
|
16
|
-
Dry::Monads::Success
|
14
|
+
attributes[key] = format uri, domain:, id: "%<id>s"
|
15
|
+
Dry::Monads::Success attributes
|
17
16
|
end
|
18
17
|
end
|
19
18
|
end
|
@@ -1,22 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "dry/monads"
|
4
|
-
require "pathname"
|
5
4
|
|
6
5
|
module Milestoner
|
7
6
|
module Configuration
|
8
7
|
module Transformers
|
9
8
|
module URI
|
10
|
-
Review = lambda do |
|
11
|
-
owner, name, domain
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
Review = lambda do |attributes, key = :review_uri|
|
10
|
+
uri, owner, name, domain = attributes.values_at key,
|
11
|
+
:project_owner,
|
12
|
+
:project_name,
|
13
|
+
:review_domain
|
15
14
|
|
16
|
-
return Dry::Monads::Success
|
15
|
+
return Dry::Monads::Success attributes unless uri
|
17
16
|
|
18
|
-
|
19
|
-
Dry::Monads::Success
|
17
|
+
attributes[key] = format uri, domain:, owner:, name:, id: "%<id>s"
|
18
|
+
Dry::Monads::Success attributes
|
20
19
|
end
|
21
20
|
end
|
22
21
|
end
|
@@ -1,22 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "dry/monads"
|
4
|
-
require "pathname"
|
5
4
|
|
6
5
|
module Milestoner
|
7
6
|
module Configuration
|
8
7
|
module Transformers
|
9
8
|
module URI
|
10
|
-
Tracker = lambda do |
|
11
|
-
owner, name, domain
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
Tracker = lambda do |attributes, key = :tracker_uri|
|
10
|
+
uri, owner, name, domain = attributes.values_at key,
|
11
|
+
:project_owner,
|
12
|
+
:project_name,
|
13
|
+
:tracker_domain
|
15
14
|
|
16
|
-
return Dry::Monads::Success
|
15
|
+
return Dry::Monads::Success attributes unless uri
|
17
16
|
|
18
|
-
|
19
|
-
Dry::Monads::Success
|
17
|
+
attributes[key] = format uri, domain:, owner:, name:, id: "%<id>s"
|
18
|
+
Dry::Monads::Success attributes
|
20
19
|
end
|
21
20
|
end
|
22
21
|
end
|
data/lib/milestoner/container.rb
CHANGED
@@ -50,6 +50,7 @@ module Milestoner
|
|
50
50
|
.add_transformer(Configuration::Transformers::Project::Version.new)
|
51
51
|
.add_transformer(Configuration::Transformers::Generator::Label.new)
|
52
52
|
.add_transformer(Configuration::Transformers::Generator::URI.new)
|
53
|
+
.add_transformer(Configuration::Transformers::Generator::Version.new)
|
53
54
|
.add_transformer(Configuration::Transformers::URI::Avatar)
|
54
55
|
.add_transformer(Configuration::Transformers::URI::Commit)
|
55
56
|
.add_transformer(Configuration::Transformers::URI::Profile)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "
|
3
|
+
require "core"
|
4
4
|
require "refinements/string_io"
|
5
5
|
require "versionaire"
|
6
6
|
|
@@ -27,7 +27,10 @@ module Milestoner
|
|
27
27
|
version = compute_version override
|
28
28
|
|
29
29
|
return false if local? version
|
30
|
-
|
30
|
+
|
31
|
+
collection = collector.call.value_or Core::EMPTY_ARRAY
|
32
|
+
|
33
|
+
fail Error, "Unable to tag without commits." if collection.empty?
|
31
34
|
|
32
35
|
create version
|
33
36
|
end
|
@@ -1,2 +1,2 @@
|
|
1
1
|
<%= yield %>
|
2
|
-
_Generated by link:<%= generator_uri %>[<%= generator_label %>]._
|
2
|
+
_Generated by link:<%= generator_uri %>[<%= generator_label %> <%= generator_version %>]._
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
9
9
|
<meta name="description" content="<%= project_description %>">
|
10
10
|
<meta name="author" content="<%= project_author %>">
|
11
|
-
<meta name="generator" content="<%= generator_label %>">
|
11
|
+
<meta name="generator" content="<%= generator_label %> <%= generator_version %>">
|
12
12
|
|
13
13
|
<link title="<%= project_label %>: Favorite Icon"
|
14
14
|
rel="icon"
|
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
<footer class="footer">
|
32
32
|
<p class="generator">
|
33
|
-
Generated by <a href="<%= generator_uri %>" class="link"><%= generator_label %></a>.
|
33
|
+
Generated by <a href="<%= generator_uri %>" class="link"><%= generator_label %> <%= generator_version %></a>.
|
34
34
|
</p>
|
35
35
|
</footer>
|
36
36
|
</body>
|
@@ -1,2 +1,2 @@
|
|
1
1
|
<%= yield %>
|
2
|
-
*Generated by [<%= generator_label %>](<%= generator_uri %>).*
|
2
|
+
*Generated by [<%= generator_label %> <%= generator_version %>](<%= generator_uri %>).*
|
@@ -1,2 +1,2 @@
|
|
1
1
|
<%= yield %>
|
2
|
-
Generated by <%= generator_label %>.
|
2
|
+
Generated by <%= generator_label %> <%= generator_version %>.
|
@@ -1,8 +1,10 @@
|
|
1
|
-
= <%= project_label %> <%= project_version %> (<%= date %>)
|
2
|
-
|
3
1
|
<% if commits.empty? %>
|
2
|
+
= <%= project_label %> (<%= date %>)
|
3
|
+
|
4
4
|
*<%= total_commits %>. <%= total_files %>. <%= total_deletions %>. <%= total_insertions %>.*
|
5
5
|
<% else %>
|
6
|
+
= <%= project_label %> <%= project_version %> (<%= date %>)
|
7
|
+
|
6
8
|
<% commits.each do |commit| %><%= commit.render :commit %><% end %>
|
7
9
|
|
8
10
|
*<%= total_commits %>. <%= total_files %>. <%= total_deletions %>. <%= total_insertions %>.*
|
@@ -2,7 +2,10 @@
|
|
2
2
|
<header class="header">
|
3
3
|
<h1 class="title">
|
4
4
|
<a href="<%= uri %>" class="label"><%= project_label %></a>
|
5
|
-
|
5
|
+
|
6
|
+
<% if commits.any? %>
|
7
|
+
<span class="version"><%= project_version %></span>
|
8
|
+
<% end %>
|
6
9
|
</h1>
|
7
10
|
|
8
11
|
<time datetime="<%= datetime %>" class="date"><%= date %></time>
|
@@ -13,11 +16,8 @@
|
|
13
16
|
<% else %>
|
14
17
|
<section class="body" x-data="{open: false}">
|
15
18
|
<div class="actions">
|
16
|
-
<button class="toggle"
|
17
|
-
|
18
|
-
x-text="open ? 'Collapse' : 'Expand'">
|
19
|
-
Expand
|
20
|
-
</button>
|
19
|
+
<button class="toggle" x-on:click="open = true">Expand</button>
|
20
|
+
<button class="toggle" x-on:click="open = false">Collapse</button>
|
21
21
|
</div>
|
22
22
|
|
23
23
|
<div class="columns">
|
@@ -1,8 +1,10 @@
|
|
1
|
-
# <%= project_label %> <%= project_version %> (<%= date %>)
|
2
|
-
|
3
1
|
<% if commits.empty? %>
|
2
|
+
# <%= project_label %> (<%= date %>)
|
3
|
+
|
4
4
|
**<%= total_commits %>. <%= total_files %>. <%= total_deletions %>. <%= total_insertions %>.**
|
5
5
|
<% else %>
|
6
|
+
# <%= project_label %> <%= project_version %> (<%= date %>)
|
7
|
+
|
6
8
|
<% commits.each do |commit| %><%= commit.render :commit %><% end %>
|
7
9
|
|
8
10
|
**<%= total_commits %>. <%= total_files %>. <%= total_deletions %>. <%= total_insertions %>.**
|
@@ -1,8 +1,10 @@
|
|
1
|
-
<%= project_label %> <%= project_version %> (<%= date %>)
|
2
|
-
|
3
1
|
<% if commits.empty? %>
|
2
|
+
<%= project_label %> (<%= date %>)
|
3
|
+
|
4
4
|
<%= total_commits %>. <%= total_files %>. <%= total_deletions %>. <%= total_insertions %>.
|
5
5
|
<% else %>
|
6
|
+
<%= project_label %> <%= project_version %> (<%= date %>)
|
7
|
+
|
6
8
|
<% commits.each do |commit| %><%= commit.render :commit %><% end %>
|
7
9
|
|
8
10
|
<%= total_commits %>. <%= total_files %>. <%= total_deletions %>. <%= total_insertions %>.
|
@@ -48,18 +48,24 @@
|
|
48
48
|
.actions {
|
49
49
|
display: flex;
|
50
50
|
justify-content: flex-end;
|
51
|
+
gap: 0.5rem;
|
51
52
|
margin-bottom: 0.5rem;
|
52
53
|
}
|
53
54
|
|
54
55
|
.toggle {
|
55
56
|
background-color: var(--color-white);
|
56
|
-
border: 0.
|
57
|
+
border: 0.13rem solid var(--color-carbon);
|
57
58
|
border-radius: 0.5rem;
|
58
|
-
color: var(--color-
|
59
|
+
color: var(--color-black);
|
59
60
|
cursor: pointer;
|
60
61
|
padding: 0.2rem;
|
61
62
|
font-size: 0.9rem;
|
62
63
|
width: 5rem;
|
64
|
+
transition: border-color .2s ease-in;
|
65
|
+
|
66
|
+
&:hover {
|
67
|
+
border-color: var(--color-black);
|
68
|
+
}
|
63
69
|
}
|
64
70
|
|
65
71
|
.normal {
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "core"
|
3
4
|
require "forwardable"
|
4
5
|
require "hanami/view"
|
5
6
|
|
@@ -14,13 +15,20 @@ module Milestoner
|
|
14
15
|
delegate %i[
|
15
16
|
generator_label
|
16
17
|
generator_uri
|
18
|
+
generator_version
|
17
19
|
project_author
|
18
20
|
project_description
|
19
21
|
project_generator
|
20
22
|
project_label
|
23
|
+
project_name
|
24
|
+
project_uri
|
21
25
|
project_version
|
22
26
|
] => :input
|
23
27
|
|
28
|
+
def project_slug
|
29
|
+
[project_name, project_version].compact.join("_").tr ".", Core::EMPTY_STRING
|
30
|
+
end
|
31
|
+
|
24
32
|
def project_title = [project_label, project_version].compact.join " "
|
25
33
|
end
|
26
34
|
end
|
data/milestoner.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "milestoner"
|
5
|
-
spec.version = "17.
|
5
|
+
spec.version = "17.7.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://alchemists.io/projects/milestoner"
|
9
|
-
spec.summary = "A command line interface for
|
9
|
+
spec.summary = "A command line interface for automated Git repository milestones."
|
10
10
|
spec.license = "Hippocratic-2.1"
|
11
11
|
|
12
12
|
spec.metadata = {
|
@@ -27,13 +27,14 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.add_dependency "cff", "~> 1.1"
|
28
28
|
spec.add_dependency "cogger", "~> 0.16"
|
29
29
|
spec.add_dependency "containable", "~> 0.0"
|
30
|
+
spec.add_dependency "core", "~> 1.3"
|
30
31
|
spec.add_dependency "dry-monads", "~> 1.6"
|
31
32
|
spec.add_dependency "dry-schema", "~> 1.13"
|
32
33
|
spec.add_dependency "etcher", "~> 1.3"
|
33
34
|
spec.add_dependency "gitt", "~> 3.2"
|
34
|
-
spec.add_dependency "hanami-view", "~> 2.1
|
35
|
+
spec.add_dependency "hanami-view", "~> 2.1"
|
35
36
|
spec.add_dependency "infusible", "~> 3.5"
|
36
|
-
spec.add_dependency "lode", "~> 1.
|
37
|
+
spec.add_dependency "lode", "~> 1.4"
|
37
38
|
spec.add_dependency "redcarpet", "~> 3.6"
|
38
39
|
spec.add_dependency "refinements", "~> 12.1"
|
39
40
|
spec.add_dependency "runcom", "~> 11.0"
|
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: 17.
|
4
|
+
version: 17.7.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-05-16 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: asciidoctor
|
@@ -93,6 +93,20 @@ dependencies:
|
|
93
93
|
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '0.0'
|
96
|
+
- !ruby/object:Gem::Dependency
|
97
|
+
name: core
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '1.3'
|
103
|
+
type: :runtime
|
104
|
+
prerelease: false
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '1.3'
|
96
110
|
- !ruby/object:Gem::Dependency
|
97
111
|
name: dry-monads
|
98
112
|
requirement: !ruby/object:Gem::Requirement
|
@@ -155,14 +169,14 @@ dependencies:
|
|
155
169
|
requirements:
|
156
170
|
- - "~>"
|
157
171
|
- !ruby/object:Gem::Version
|
158
|
-
version: 2.1
|
172
|
+
version: '2.1'
|
159
173
|
type: :runtime
|
160
174
|
prerelease: false
|
161
175
|
version_requirements: !ruby/object:Gem::Requirement
|
162
176
|
requirements:
|
163
177
|
- - "~>"
|
164
178
|
- !ruby/object:Gem::Version
|
165
|
-
version: 2.1
|
179
|
+
version: '2.1'
|
166
180
|
- !ruby/object:Gem::Dependency
|
167
181
|
name: infusible
|
168
182
|
requirement: !ruby/object:Gem::Requirement
|
@@ -183,14 +197,14 @@ dependencies:
|
|
183
197
|
requirements:
|
184
198
|
- - "~>"
|
185
199
|
- !ruby/object:Gem::Version
|
186
|
-
version: '1.
|
200
|
+
version: '1.4'
|
187
201
|
type: :runtime
|
188
202
|
prerelease: false
|
189
203
|
version_requirements: !ruby/object:Gem::Requirement
|
190
204
|
requirements:
|
191
205
|
- - "~>"
|
192
206
|
- !ruby/object:Gem::Version
|
193
|
-
version: '1.
|
207
|
+
version: '1.4'
|
194
208
|
- !ruby/object:Gem::Dependency
|
195
209
|
name: redcarpet
|
196
210
|
requirement: !ruby/object:Gem::Requirement
|
@@ -365,6 +379,7 @@ files:
|
|
365
379
|
- lib/milestoner/configuration/transformers/gems/uri.rb
|
366
380
|
- lib/milestoner/configuration/transformers/generator/label.rb
|
367
381
|
- lib/milestoner/configuration/transformers/generator/uri.rb
|
382
|
+
- lib/milestoner/configuration/transformers/generator/version.rb
|
368
383
|
- lib/milestoner/configuration/transformers/project/author.rb
|
369
384
|
- lib/milestoner/configuration/transformers/project/generator.rb
|
370
385
|
- lib/milestoner/configuration/transformers/project/label.rb
|
@@ -433,8 +448,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
433
448
|
- !ruby/object:Gem::Version
|
434
449
|
version: '0'
|
435
450
|
requirements: []
|
436
|
-
rubygems_version: 3.5.
|
451
|
+
rubygems_version: 3.5.10
|
437
452
|
signing_key:
|
438
453
|
specification_version: 4
|
439
|
-
summary: A command line interface for
|
454
|
+
summary: A command line interface for automated Git repository milestones.
|
440
455
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|