milestoner 14.5.0 → 15.0.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 +1 -3
- data/lib/milestoner/cli/parsers/core.rb +1 -1
- data/lib/milestoner/commits/categorizer.rb +9 -4
- data/lib/milestoner/container.rb +2 -2
- data/lib/milestoner/presenters/commit.rb +2 -2
- data/lib/milestoner/tags/creator.rb +7 -7
- data/lib/milestoner/tags/publisher.rb +4 -4
- data/lib/milestoner/tags/pusher.rb +4 -8
- data/milestoner.gemspec +10 -9
- data.tar.gz.sig +3 -4
- metadata +33 -19
- 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: c9ca88372fa71fdb6411fc91bcb3c814315d826dde761dfe427bf0f1a9aedcab
|
4
|
+
data.tar.gz: 9ef3339ce71daa2a2851de839d570db7cd8516eeae1c3eb8070776b4c6f34596
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b121d138642abb985749366af423396c5312974ecfe1805b6ecb3eff5e88c5296d9c0ec35286bad6f474bda4c53331471bae32550114f29558aeee7e8b860e5
|
7
|
+
data.tar.gz: 5290798104cd4ca854825a10f032615f3e905d5f40b3d9a631897f170ecf5cdbf06923fa492b21f35a3b06b837b8f242c03329a254a4d48a3c5fa8f807ab6d4b
|
checksums.yaml.gz.sig
CHANGED
@@ -1,3 +1 @@
|
|
1
|
-
�8�
|
2
|
-
e��`f�!�� ���w�8_��S��{u�D"�idFZ�|��
|
3
|
-
�\�-���\�E�S���k���m�
|
1
|
+
.���/���6>�ېPֲjbc!�^���CQN�ig��q�M���5��������60���zi1#�Q�`��/�8��Q�T{��?j7�]-Ԯș���9�bE��~L*��1�����y�����TP$Db%��Oq챘�a��q�Ϊ �HEtБ�V̂4������ϼ;�._L<8FvI���ô��~�NT&m�_��>��)�.��d$�����?8�n)bgW;�!���TϢG�H��%dl�����
|
@@ -6,7 +6,7 @@ module Milestoner
|
|
6
6
|
module Commits
|
7
7
|
# Retrieves and categorizes Git repository commit tagged or untagged history.
|
8
8
|
class Categorizer
|
9
|
-
include Import[:
|
9
|
+
include Import[:git]
|
10
10
|
|
11
11
|
def initialize expression: Regexp, **dependencies
|
12
12
|
super(**dependencies)
|
@@ -41,11 +41,16 @@ module Milestoner
|
|
41
41
|
prefixes.empty? ? expression.new(//) : expression.union(prefixes)
|
42
42
|
end
|
43
43
|
|
44
|
-
def computed_commits =
|
44
|
+
def computed_commits = git.tagged? ? tagged_commits : saved_commits
|
45
45
|
|
46
|
-
def tagged_commits
|
46
|
+
def tagged_commits
|
47
|
+
git.tag_last
|
48
|
+
.value_or(nil)
|
49
|
+
.then { |tag| git.commits("#{tag}..HEAD") }
|
50
|
+
.value_or([])
|
51
|
+
end
|
47
52
|
|
48
|
-
def saved_commits =
|
53
|
+
def saved_commits = git.commits.value_or([])
|
49
54
|
end
|
50
55
|
end
|
51
56
|
end
|
data/lib/milestoner/container.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require "cogger"
|
4
4
|
require "dry-container"
|
5
|
-
require "
|
5
|
+
require "gitt"
|
6
6
|
require "spek"
|
7
7
|
|
8
8
|
module Milestoner
|
@@ -12,7 +12,7 @@ module Milestoner
|
|
12
12
|
|
13
13
|
register(:configuration) { Configuration::Loader.call }
|
14
14
|
register(:specification) { Spek::Loader.call "#{__dir__}/../../milestoner.gemspec" }
|
15
|
-
register(:
|
15
|
+
register(:git) { Gitt::Repository.new }
|
16
16
|
register(:kernel) { Kernel }
|
17
17
|
register(:logger) { Cogger::Client.new }
|
18
18
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "forwardable"
|
4
|
-
require "
|
4
|
+
require "gitt"
|
5
5
|
|
6
6
|
module Milestoner
|
7
7
|
module Presenters
|
@@ -11,7 +11,7 @@ module Milestoner
|
|
11
11
|
|
12
12
|
extend Forwardable
|
13
13
|
|
14
|
-
delegate [*
|
14
|
+
delegate [*Gitt::Models::Commit.members, :amend?, :fixup?, :squash?, :prefix?] => :record
|
15
15
|
|
16
16
|
def initialize record, **dependencies
|
17
17
|
super(**dependencies)
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "
|
3
|
+
require "gitt"
|
4
4
|
require "versionaire"
|
5
5
|
|
6
6
|
module Milestoner
|
7
7
|
module Tags
|
8
8
|
# Handles the creation of project repository tags.
|
9
9
|
class Creator
|
10
|
-
include Import[:
|
10
|
+
include Import[:git, :logger]
|
11
11
|
|
12
12
|
using Versionaire::Cast
|
13
13
|
|
@@ -24,7 +24,7 @@ module Milestoner
|
|
24
24
|
fail Error, "Unable to tag without commits." if categorizer.call.empty?
|
25
25
|
|
26
26
|
create configuration
|
27
|
-
rescue Versionaire::Error
|
27
|
+
rescue Versionaire::Error => error
|
28
28
|
raise Error, error.message
|
29
29
|
end
|
30
30
|
|
@@ -35,7 +35,7 @@ module Milestoner
|
|
35
35
|
def local? configuration
|
36
36
|
version = Version configuration.version
|
37
37
|
|
38
|
-
if
|
38
|
+
if git.tag_local? version
|
39
39
|
logger.warn { "Local tag exists: #{version}. Skipped." }
|
40
40
|
true
|
41
41
|
else
|
@@ -44,9 +44,9 @@ module Milestoner
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def create configuration
|
47
|
-
|
48
|
-
|
49
|
-
|
47
|
+
git.tag_create(configuration.version, message(configuration))
|
48
|
+
.or { |error| fail Error, error }
|
49
|
+
.bind { true }
|
50
50
|
end
|
51
51
|
|
52
52
|
def message configuration
|
@@ -6,21 +6,21 @@ module Milestoner
|
|
6
6
|
class Publisher
|
7
7
|
include Import[:logger]
|
8
8
|
|
9
|
-
def initialize
|
9
|
+
def initialize creator: Tags::Creator.new, pusher: Tags::Pusher.new, **dependencies
|
10
10
|
super(**dependencies)
|
11
|
-
@
|
11
|
+
@creator = creator
|
12
12
|
@pusher = pusher
|
13
13
|
end
|
14
14
|
|
15
15
|
def call configuration = Container[:configuration]
|
16
|
-
|
16
|
+
creator.call configuration
|
17
17
|
pusher.call configuration
|
18
18
|
logger.info { "Published: #{configuration.version}!" }
|
19
19
|
end
|
20
20
|
|
21
21
|
private
|
22
22
|
|
23
|
-
attr_reader :
|
23
|
+
attr_reader :creator, :pusher
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -6,15 +6,15 @@ module Milestoner
|
|
6
6
|
module Tags
|
7
7
|
# Handles publishing of tags to a remote repository.
|
8
8
|
class Pusher
|
9
|
-
include Import[:
|
9
|
+
include Import[:git, :logger]
|
10
10
|
|
11
11
|
using Versionaire::Cast
|
12
12
|
|
13
13
|
def call configuration = Container[:configuration]
|
14
14
|
version = Version configuration.version
|
15
15
|
|
16
|
-
fail Error, "Remote repository not configured." unless
|
17
|
-
fail Error, "Remote tag exists: #{version}." if
|
16
|
+
fail Error, "Remote repository not configured." unless git.origin?
|
17
|
+
fail Error, "Remote tag exists: #{version}." if git.tag_remote? version
|
18
18
|
fail Error, "Tags could not be pushed to remote repository." unless push
|
19
19
|
|
20
20
|
logger.debug "Local tag pushed: #{version}."
|
@@ -22,11 +22,7 @@ module Milestoner
|
|
22
22
|
|
23
23
|
private
|
24
24
|
|
25
|
-
def push
|
26
|
-
repository.tag_push.then do |_stdout, stderr, status|
|
27
|
-
status.success? && stderr.match?(/[new tag]/)
|
28
|
-
end
|
29
|
-
end
|
25
|
+
def push = git.tags_push.value_or("").match?(/[new tag]/)
|
30
26
|
end
|
31
27
|
end
|
32
28
|
end
|
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 = "
|
5
|
+
spec.version = "15.0.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://www.alchemists.io/projects/milestoner"
|
@@ -22,15 +22,16 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.signing_key = Gem.default_key_path
|
23
23
|
spec.cert_chain = [Gem.default_cert_path]
|
24
24
|
|
25
|
-
spec.required_ruby_version = "~> 3.
|
26
|
-
spec.add_dependency "cogger", "~> 0.
|
25
|
+
spec.required_ruby_version = "~> 3.2"
|
26
|
+
spec.add_dependency "cogger", "~> 0.5"
|
27
27
|
spec.add_dependency "dry-container", "~> 0.11"
|
28
|
-
spec.add_dependency "
|
29
|
-
spec.add_dependency "
|
30
|
-
spec.add_dependency "
|
31
|
-
spec.add_dependency "
|
32
|
-
spec.add_dependency "
|
33
|
-
spec.add_dependency "
|
28
|
+
spec.add_dependency "dry-monads", "~> 1.6"
|
29
|
+
spec.add_dependency "gitt", "~> 1.0"
|
30
|
+
spec.add_dependency "infusible", "~> 1.0"
|
31
|
+
spec.add_dependency "refinements", "~> 10.0"
|
32
|
+
spec.add_dependency "runcom", "~> 9.0"
|
33
|
+
spec.add_dependency "spek", "~> 1.0"
|
34
|
+
spec.add_dependency "versionaire", "~> 11.0"
|
34
35
|
spec.add_dependency "zeitwerk", "~> 2.6"
|
35
36
|
|
36
37
|
spec.bindir = "exe"
|
data.tar.gz.sig
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
�
|
4
|
-
7�m`9(���p������+�a��;�� �W*6���|�b%���O}VH\#~���y��f�:`�p�+צj��2�1��`MX�n1G
|
1
|
+
���
|
2
|
+
���?��M��/��i�4�r��F�Edؚm�7���_�n!j��[(�=Y��Z�Q2�0��P�湹�tw��'���u&��j�]�4�P^6��պ�����T=���άT���N?mB�
|
3
|
+
��5�=�����Mh���!;�}����NB@�R�Ua�[/�7��X�"�p
|
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:
|
4
|
+
version: 15.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -28,7 +28,7 @@ cert_chain:
|
|
28
28
|
CxDe2+VuChj4I1nvIHdu+E6XoEVlanUPKmSg6nddhkKn2gC45Kyzh6FZqnzH/CRp
|
29
29
|
RFE=
|
30
30
|
-----END CERTIFICATE-----
|
31
|
-
date: 2022-
|
31
|
+
date: 2022-12-25 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: cogger
|
@@ -36,14 +36,14 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '0.
|
39
|
+
version: '0.5'
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '0.
|
46
|
+
version: '0.5'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: dry-container
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,89 +59,103 @@ dependencies:
|
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0.11'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
|
-
name:
|
62
|
+
name: dry-monads
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '1.
|
67
|
+
version: '1.6'
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '1.
|
74
|
+
version: '1.6'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: gitt
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '1.0'
|
82
|
+
type: :runtime
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '1.0'
|
75
89
|
- !ruby/object:Gem::Dependency
|
76
90
|
name: infusible
|
77
91
|
requirement: !ruby/object:Gem::Requirement
|
78
92
|
requirements:
|
79
93
|
- - "~>"
|
80
94
|
- !ruby/object:Gem::Version
|
81
|
-
version: '0
|
95
|
+
version: '1.0'
|
82
96
|
type: :runtime
|
83
97
|
prerelease: false
|
84
98
|
version_requirements: !ruby/object:Gem::Requirement
|
85
99
|
requirements:
|
86
100
|
- - "~>"
|
87
101
|
- !ruby/object:Gem::Version
|
88
|
-
version: '0
|
102
|
+
version: '1.0'
|
89
103
|
- !ruby/object:Gem::Dependency
|
90
104
|
name: refinements
|
91
105
|
requirement: !ruby/object:Gem::Requirement
|
92
106
|
requirements:
|
93
107
|
- - "~>"
|
94
108
|
- !ruby/object:Gem::Version
|
95
|
-
version: '
|
109
|
+
version: '10.0'
|
96
110
|
type: :runtime
|
97
111
|
prerelease: false
|
98
112
|
version_requirements: !ruby/object:Gem::Requirement
|
99
113
|
requirements:
|
100
114
|
- - "~>"
|
101
115
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
116
|
+
version: '10.0'
|
103
117
|
- !ruby/object:Gem::Dependency
|
104
118
|
name: runcom
|
105
119
|
requirement: !ruby/object:Gem::Requirement
|
106
120
|
requirements:
|
107
121
|
- - "~>"
|
108
122
|
- !ruby/object:Gem::Version
|
109
|
-
version: '
|
123
|
+
version: '9.0'
|
110
124
|
type: :runtime
|
111
125
|
prerelease: false
|
112
126
|
version_requirements: !ruby/object:Gem::Requirement
|
113
127
|
requirements:
|
114
128
|
- - "~>"
|
115
129
|
- !ruby/object:Gem::Version
|
116
|
-
version: '
|
130
|
+
version: '9.0'
|
117
131
|
- !ruby/object:Gem::Dependency
|
118
132
|
name: spek
|
119
133
|
requirement: !ruby/object:Gem::Requirement
|
120
134
|
requirements:
|
121
135
|
- - "~>"
|
122
136
|
- !ruby/object:Gem::Version
|
123
|
-
version: '0
|
137
|
+
version: '1.0'
|
124
138
|
type: :runtime
|
125
139
|
prerelease: false
|
126
140
|
version_requirements: !ruby/object:Gem::Requirement
|
127
141
|
requirements:
|
128
142
|
- - "~>"
|
129
143
|
- !ruby/object:Gem::Version
|
130
|
-
version: '0
|
144
|
+
version: '1.0'
|
131
145
|
- !ruby/object:Gem::Dependency
|
132
146
|
name: versionaire
|
133
147
|
requirement: !ruby/object:Gem::Requirement
|
134
148
|
requirements:
|
135
149
|
- - "~>"
|
136
150
|
- !ruby/object:Gem::Version
|
137
|
-
version: '
|
151
|
+
version: '11.0'
|
138
152
|
type: :runtime
|
139
153
|
prerelease: false
|
140
154
|
version_requirements: !ruby/object:Gem::Requirement
|
141
155
|
requirements:
|
142
156
|
- - "~>"
|
143
157
|
- !ruby/object:Gem::Version
|
144
|
-
version: '
|
158
|
+
version: '11.0'
|
145
159
|
- !ruby/object:Gem::Dependency
|
146
160
|
name: zeitwerk
|
147
161
|
requirement: !ruby/object:Gem::Requirement
|
@@ -209,14 +223,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
209
223
|
requirements:
|
210
224
|
- - "~>"
|
211
225
|
- !ruby/object:Gem::Version
|
212
|
-
version: '3.
|
226
|
+
version: '3.2'
|
213
227
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
214
228
|
requirements:
|
215
229
|
- - ">="
|
216
230
|
- !ruby/object:Gem::Version
|
217
231
|
version: '0'
|
218
232
|
requirements: []
|
219
|
-
rubygems_version: 3.
|
233
|
+
rubygems_version: 3.4.1
|
220
234
|
signing_key:
|
221
235
|
specification_version: 4
|
222
236
|
summary: A command line interface for crafting Git semantically versioned repository
|
metadata.gz.sig
CHANGED
Binary file
|