milestoner 7.0.1 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +1 -1
- data/README.md +10 -19
- data/lib/milestoner/cli.rb +6 -7
- data/lib/milestoner/identity.rb +1 -1
- data/lib/milestoner/pusher.rb +2 -2
- data/lib/milestoner/tagger.rb +8 -22
- metadata +31 -43
- 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: 59a431e1c54ac84d240f85e5b40b940c3fda7bc66f6544c276b5af966bada7be
|
4
|
+
data.tar.gz: 61b99b288ccf9bc733274610567fa4486d9f3b1b6dba3b38ba37870506f133d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa9cf9668c0a97fbcdcfc0bd860fcc0f5ab112b3d6a1c26ca211cf0ab65f6d8d177b7d4cc4770bd3ac51da7140ce26dcfc5fb29f5c4bba8e442f0dc9eb7d038c
|
7
|
+
data.tar.gz: a7addb3626f0a0b1f451411c4f33c2b2e5893a59b4ef529aae2751bb1ff878f5a50ec483a3f775c85cd702d29a73c8139db18c144a0f27a59099809558bfd13a
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
M���+��9�0��R��Or����-OkɎ0u;��tw��ω�(�/��r;��'��yA�����"ۭ���gج��ӊK"���KWw�(�a|�G�[��OQ.�3,��ǫy\��j�-�6���L�"�j�H��푃E㹔�(L%|�U6l�8�eF�#t��gŲ2\"eYy`î� �%�#H'_d%Ә�0k�湘xB��Vk�ӻ$1LU���g���0J��gz��䓚wac
|
data/README.md
CHANGED
@@ -3,9 +3,7 @@
|
|
3
3
|
[](http://badge.fury.io/rb/milestoner)
|
4
4
|
[](https://codeclimate.com/github/bkuhlmann/milestoner/maintainability)
|
5
5
|
[](https://codeclimate.com/github/bkuhlmann/milestoner/test_coverage)
|
6
|
-
[](https://gemnasium.com/bkuhlmann/milestoner)
|
7
6
|
[](https://circleci.com/gh/bkuhlmann/milestoner)
|
8
|
-
[](https://www.patreon.com/bkuhlmann)
|
9
7
|
|
10
8
|
A command line interface for releasing Git repository milestones.
|
11
9
|
|
@@ -35,27 +33,25 @@ A command line interface for releasing Git repository milestones.
|
|
35
33
|
|
36
34
|
- Uses [Versionaire](https://github.com/bkuhlmann/versionaire) for
|
37
35
|
[Semantic Versioning](http://semver.org).
|
38
|
-
- Format:
|
39
|
-
- Example: `
|
40
|
-
- Ensures Git commits since last tag (or initialization of repository) are included
|
41
|
-
|
42
|
-
- Ensures Git commit messages are grouped by prefix, in order defined, for each Git tag message.
|
43
|
-
Defaults (can be customized):
|
36
|
+
- Format: `<major>.<minor>.<maintenance>`.
|
37
|
+
- Example: `0.1.0`.
|
38
|
+
- Ensures Git commits since last tag (or initialization of repository) are included.
|
39
|
+
- Ensures Git commit messages are grouped by prefix, in order defined. Defaults (can be customized):
|
44
40
|
- Fixed
|
45
41
|
- Added
|
46
42
|
- Updated
|
47
43
|
- Removed
|
48
44
|
- Refactored
|
49
|
-
- Ensures Git commit merge messages are excluded
|
50
|
-
- Ensures Git commit messages are alphabetically sorted
|
51
|
-
- Ensures duplicate Git commit messages are removed (if any)
|
45
|
+
- Ensures Git commit merge messages are excluded.
|
46
|
+
- Ensures Git commit messages are alphabetically sorted.
|
47
|
+
- Ensures duplicate Git commit messages are removed (if any).
|
52
48
|
- Ensures Git commit messages are sanitized by removing extra spaces and `[ci skip]` text within
|
53
49
|
each Git tag message.
|
54
50
|
- Provides optional security for signing Git tags with [GnuPG](https://www.gnupg.org) signing key.
|
55
51
|
|
56
52
|
## Screencasts
|
57
53
|
|
58
|
-
[](https://asciinema.org/a/155986)
|
59
55
|
|
60
56
|
## Requirements
|
61
57
|
|
@@ -79,7 +75,7 @@ From the command line, type: `milestoner help`
|
|
79
75
|
milestoner -P, [--publish=VERSION] # Tag and push milestone to remote repository.
|
80
76
|
milestoner -c, [--config] # Manage gem configuration.
|
81
77
|
milestoner -h, [--help=COMMAND] # Show this message or get help for a command.
|
82
|
-
milestoner -p, [--push]
|
78
|
+
milestoner -p, [--push=VERSION] # Push local tag to remote repository.
|
83
79
|
milestoner -t, [--tag=VERSION] # Tag local repository with new version.
|
84
80
|
milestoner -v, [--version] # Show gem version.
|
85
81
|
|
@@ -111,7 +107,6 @@ as provided by the [Runcom](https://github.com/bkuhlmann/runcom) gem.
|
|
111
107
|
|
112
108
|
The default configuration is as follows:
|
113
109
|
|
114
|
-
:version: "0.1.0"
|
115
110
|
:git_commit_prefixes:
|
116
111
|
- Fixed
|
117
112
|
- Added
|
@@ -125,10 +120,6 @@ Feel free to take this default configuration, modify, and save as your own custo
|
|
125
120
|
|
126
121
|
The `configuration.yml` file can be configured as follows:
|
127
122
|
|
128
|
-
- `version`: Useful if desired to have the current version checked into source code per project. The
|
129
|
-
version, if set, will be used to tag the repository. If the version is a duplicate, an error will
|
130
|
-
be thrown. When supplying a version, it *must* be semantic: `<major>.<minor>.<maintenance>`.
|
131
|
-
Example: `0.1.0`.
|
132
123
|
- `git_commit_prefixes`: Should the default prefixes not be desired, you can define Git commit
|
133
124
|
prefixes that match your style. *NOTE: Prefix order is important with the first prefix defined
|
134
125
|
taking precedence over the second and so forth.* Special characters are allowed for prefixes but
|
@@ -193,7 +184,7 @@ Read [CONTRIBUTING](CONTRIBUTING.md) for details.
|
|
193
184
|
|
194
185
|
## License
|
195
186
|
|
196
|
-
Copyright
|
187
|
+
Copyright 2015 [Alchemists](https://www.alchemists.io).
|
197
188
|
Read [LICENSE](LICENSE.md) for details.
|
198
189
|
|
199
190
|
## History
|
data/lib/milestoner/cli.rb
CHANGED
@@ -13,7 +13,6 @@ module Milestoner
|
|
13
13
|
|
14
14
|
def self.configuration
|
15
15
|
Runcom::Configuration.new project_name: Identity.name, defaults: {
|
16
|
-
version: "0.1.0",
|
17
16
|
git_commit_prefixes: %w[Fixed Added Updated Removed Refactored],
|
18
17
|
git_tag_sign: false
|
19
18
|
}
|
@@ -44,16 +43,16 @@ module Milestoner
|
|
44
43
|
desc: "Sign tag with GPG key.",
|
45
44
|
type: :boolean,
|
46
45
|
default: false
|
47
|
-
def tag version
|
46
|
+
def tag version
|
48
47
|
tagger.create version, sign: sign_tag?(options[:sign])
|
49
|
-
say "Repository tagged: #{tagger.
|
48
|
+
say "Repository tagged: #{tagger.version}."
|
50
49
|
rescue StandardError => exception
|
51
50
|
say_status :error, exception.message, :red
|
52
51
|
end
|
53
52
|
|
54
|
-
desc "-p, [--push]", "Push local tag to remote repository."
|
53
|
+
desc "-p, [--push=VERSION]", "Push local tag to remote repository."
|
55
54
|
map %w[-p --push] => :push
|
56
|
-
def push version
|
55
|
+
def push version
|
57
56
|
pusher.push version
|
58
57
|
say_status :info, "Tags pushed to remote repository.", :green
|
59
58
|
rescue StandardError => exception
|
@@ -67,9 +66,9 @@ module Milestoner
|
|
67
66
|
desc: "Sign tag with GPG key.",
|
68
67
|
type: :boolean,
|
69
68
|
default: false
|
70
|
-
def publish version
|
69
|
+
def publish version
|
71
70
|
publisher.publish version, sign: sign_tag?(options[:sign])
|
72
|
-
say_status :info, "Repository tagged and pushed: #{tagger.
|
71
|
+
say_status :info, "Repository tagged and pushed: #{tagger.version}.", :green
|
73
72
|
say_status :info, "Milestone published!", :green
|
74
73
|
rescue StandardError => exception
|
75
74
|
say_status :error, exception.message, :red
|
data/lib/milestoner/identity.rb
CHANGED
data/lib/milestoner/pusher.rb
CHANGED
@@ -11,7 +11,7 @@ module Milestoner
|
|
11
11
|
version = Versionaire::Version version
|
12
12
|
|
13
13
|
fail(Errors::Git, "Remote repository not configured.") unless git.remote?
|
14
|
-
fail(Errors::Git, "Remote tag exists: #{version
|
14
|
+
fail(Errors::Git, "Remote tag exists: #{version}.") if tag_exists?(version)
|
15
15
|
return if git.push_tags.empty?
|
16
16
|
fail(Errors::Git, "Tags could not be pushed to remote repository.")
|
17
17
|
end
|
@@ -21,7 +21,7 @@ module Milestoner
|
|
21
21
|
attr_reader :git, :version
|
22
22
|
|
23
23
|
def tag_exists? version
|
24
|
-
git.tag_remote? version
|
24
|
+
git.tag_remote? version
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
data/lib/milestoner/tagger.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "forwardable"
|
4
3
|
require "open3"
|
5
4
|
require "thor"
|
6
5
|
require "versionaire"
|
@@ -9,13 +8,10 @@ require "tempfile"
|
|
9
8
|
module Milestoner
|
10
9
|
# Handles the tagging of a project repository.
|
11
10
|
# :reek:TooManyMethods
|
11
|
+
# :reek:InstanceVariableAssumption
|
12
12
|
class Tagger
|
13
|
-
extend Forwardable
|
14
|
-
|
15
13
|
attr_reader :version, :commit_prefixes
|
16
14
|
|
17
|
-
def_delegator :version, :label, :version_label
|
18
|
-
|
19
15
|
def initialize commit_prefixes: [], git: Git::Kit.new
|
20
16
|
@commit_prefixes = commit_prefixes
|
21
17
|
@git = git
|
@@ -30,7 +26,7 @@ module Milestoner
|
|
30
26
|
def commits
|
31
27
|
groups = build_commit_prefix_groups
|
32
28
|
group_by_commit_prefix groups
|
33
|
-
|
29
|
+
groups.each_value(&:sort!)
|
34
30
|
groups.values.flatten.uniq
|
35
31
|
end
|
36
32
|
|
@@ -72,40 +68,30 @@ module Milestoner
|
|
72
68
|
groups.merge! "Other" => []
|
73
69
|
end
|
74
70
|
|
75
|
-
# :reek:UtilityFunction
|
76
|
-
def sanitize_commit commit
|
77
|
-
commit.gsub(/\[ci\sskip\]/, "").squeeze(" ").strip
|
78
|
-
end
|
79
|
-
|
80
71
|
def group_by_commit_prefix groups = {}
|
81
72
|
raw_commits.each do |commit|
|
82
73
|
prefix = commit[commit_prefix_regex]
|
83
74
|
key = groups.key?(prefix) ? prefix : "Other"
|
84
|
-
groups[key] <<
|
75
|
+
groups[key] << commit.gsub(/\[ci\sskip\]/, "").squeeze(" ").strip
|
85
76
|
end
|
86
77
|
end
|
87
78
|
|
88
|
-
# :reek:UtilityFunction
|
89
|
-
def sort_by_commit_prefix groups = {}
|
90
|
-
groups.each_value(&:sort!)
|
91
|
-
end
|
92
|
-
|
93
79
|
def git_message
|
94
|
-
%(Version #{version}.\n\n#{commit_list.join "\n"}\n\n)
|
80
|
+
%(Version #{@version}.\n\n#{commit_list.join "\n"}\n\n)
|
95
81
|
end
|
96
82
|
|
97
83
|
# :reek:BooleanParameter
|
98
84
|
# :reek:ControlParameter
|
99
85
|
def git_options message_file, sign: false
|
100
|
-
options = %(--sign --annotate "#{
|
86
|
+
options = %(--sign --annotate "#{@version}" ) +
|
101
87
|
%(--cleanup verbatim --file "#{message_file.path}")
|
102
88
|
return options.gsub("--sign ", "") unless sign
|
103
89
|
options
|
104
90
|
end
|
105
91
|
|
106
92
|
def existing_tag?
|
107
|
-
return false unless git.tag_local?(
|
108
|
-
shell.say_status :warn, "Local tag exists: #{
|
93
|
+
return false unless git.tag_local?(@version)
|
94
|
+
shell.say_status :warn, "Local tag exists: #{@version}. Skipped.", :yellow
|
109
95
|
true
|
110
96
|
end
|
111
97
|
|
@@ -115,7 +101,7 @@ module Milestoner
|
|
115
101
|
message_file = Tempfile.new Identity.name
|
116
102
|
File.open(message_file, "w") { |file| file.write git_message }
|
117
103
|
status = system "git tag #{git_options message_file, sign: sign}"
|
118
|
-
fail(Errors::Git, "Unable to create tag: #{
|
104
|
+
fail(Errors::Git, "Unable to create tag: #{@version}.") unless status
|
119
105
|
ensure
|
120
106
|
message_file.close
|
121
107
|
message_file.unlink
|
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: 8.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -10,27 +10,26 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
GyTL6s+8CnN9sL2Spfh/YdRn/29r4g2qi6FomQ==
|
13
|
+
MIIDQDCCAiigAwIBAgIBATANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpicm9v
|
14
|
+
a2UvREM9YWxjaGVtaXN0cy9EQz1pbzAeFw0xODAyMTQxNTA4NDVaFw0xOTAyMTQx
|
15
|
+
NTA4NDVaMCUxIzAhBgNVBAMMGmJyb29rZS9EQz1hbGNoZW1pc3RzL0RDPWlvMIIB
|
16
|
+
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6l1qpXTiomH1RfMRloyw7MiE
|
17
|
+
xyVx/x8Yc3EupdH7uhNaTXQGyORN6aOY//1QXXMHIZ9tW74nZLhesWMSUMYy0XhB
|
18
|
+
brs+KkurHnc9FnEJAbG7ebGvl/ncqZt72nQvaxpDxvuCBHgJAz+8i5wl6FhLw+oT
|
19
|
+
9z0A8KcGhz67SdcoQiD7qiCjL/2NTeWHOzkpPrdGlt088+VerEEGf5I13QCvaftP
|
20
|
+
D5vkU0YlAm1r98BymuJlcQ1qdkVEI1d48ph4kcS0S0nv1RiuyVb6TCAR3Nu3VaVq
|
21
|
+
3fPzZKJLZBx67UvXdbdicWPiUR75elI4PXpLIic3xytaF52ZJYyKZCNZJhNwfQID
|
22
|
+
AQABo3sweTAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU0nzow9vc
|
23
|
+
2CdikiiE3fJhP/gY4ggwHwYDVR0RBBgwFoEUYnJvb2tlQGFsY2hlbWlzdHMuaW8w
|
24
|
+
HwYDVR0SBBgwFoEUYnJvb2tlQGFsY2hlbWlzdHMuaW8wDQYJKoZIhvcNAQELBQAD
|
25
|
+
ggEBAImQPNpkb90nkDUCJ4ivQNKK1LCebOjqZnOWGC4HxndvBQBqj78MTZifoODl
|
26
|
+
uPBY4fSnnpVGph+Y1OTWw/xhk3HE2AH0GDGC9xbM75qrg3/+a4D81pM94B6zuBdA
|
27
|
+
7hxUy4kByawrii833IidV0zkI4lCombTNicc8JWXXSlL2G/sWPLndNvn5rzoyyRT
|
28
|
+
pPOLYGdB4hqUam3hBgLOsYIOVp+yXMvj0gvk/Djq8IR2P1RS4NZU7HHD485xkBfL
|
29
|
+
4Zrsxi713z6sndd9JBAm4G7mJiV93MsuCM5N4ZDY7XaxIhvctNSNhX/Yn8LLdtGI
|
30
|
+
b4jw5t40FKyNUvLPPXYAvQALBtk=
|
32
31
|
-----END CERTIFICATE-----
|
33
|
-
date: 2018-
|
32
|
+
date: 2018-03-25 00:00:00.000000000 Z
|
34
33
|
dependencies:
|
35
34
|
- !ruby/object:Gem::Dependency
|
36
35
|
name: runcom
|
@@ -66,14 +65,14 @@ dependencies:
|
|
66
65
|
requirements:
|
67
66
|
- - "~>"
|
68
67
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
68
|
+
version: '5.1'
|
70
69
|
type: :runtime
|
71
70
|
prerelease: false
|
72
71
|
version_requirements: !ruby/object:Gem::Requirement
|
73
72
|
requirements:
|
74
73
|
- - "~>"
|
75
74
|
- !ruby/object:Gem::Version
|
76
|
-
version: '
|
75
|
+
version: '5.1'
|
77
76
|
- !ruby/object:Gem::Dependency
|
78
77
|
name: awesome_print
|
79
78
|
requirement: !ruby/object:Gem::Requirement
|
@@ -144,20 +143,6 @@ dependencies:
|
|
144
143
|
- - "~>"
|
145
144
|
- !ruby/object:Gem::Version
|
146
145
|
version: '1.0'
|
147
|
-
- !ruby/object:Gem::Dependency
|
148
|
-
name: gemsmith
|
149
|
-
requirement: !ruby/object:Gem::Requirement
|
150
|
-
requirements:
|
151
|
-
- - "~>"
|
152
|
-
- !ruby/object:Gem::Version
|
153
|
-
version: '11.0'
|
154
|
-
type: :development
|
155
|
-
prerelease: false
|
156
|
-
version_requirements: !ruby/object:Gem::Requirement
|
157
|
-
requirements:
|
158
|
-
- - "~>"
|
159
|
-
- !ruby/object:Gem::Version
|
160
|
-
version: '11.0'
|
161
146
|
- !ruby/object:Gem::Dependency
|
162
147
|
name: git-cop
|
163
148
|
requirement: !ruby/object:Gem::Requirement
|
@@ -248,14 +233,14 @@ dependencies:
|
|
248
233
|
requirements:
|
249
234
|
- - "~>"
|
250
235
|
- !ruby/object:Gem::Version
|
251
|
-
version: '4.
|
236
|
+
version: '4.8'
|
252
237
|
type: :development
|
253
238
|
prerelease: false
|
254
239
|
version_requirements: !ruby/object:Gem::Requirement
|
255
240
|
requirements:
|
256
241
|
- - "~>"
|
257
242
|
- !ruby/object:Gem::Version
|
258
|
-
version: '4.
|
243
|
+
version: '4.8'
|
259
244
|
- !ruby/object:Gem::Dependency
|
260
245
|
name: rspec
|
261
246
|
requirement: !ruby/object:Gem::Requirement
|
@@ -276,14 +261,14 @@ dependencies:
|
|
276
261
|
requirements:
|
277
262
|
- - "~>"
|
278
263
|
- !ruby/object:Gem::Version
|
279
|
-
version: '0.
|
264
|
+
version: '0.54'
|
280
265
|
type: :development
|
281
266
|
prerelease: false
|
282
267
|
version_requirements: !ruby/object:Gem::Requirement
|
283
268
|
requirements:
|
284
269
|
- - "~>"
|
285
270
|
- !ruby/object:Gem::Version
|
286
|
-
version: '0.
|
271
|
+
version: '0.54'
|
287
272
|
- !ruby/object:Gem::Dependency
|
288
273
|
name: wirb
|
289
274
|
requirement: !ruby/object:Gem::Requirement
|
@@ -325,7 +310,10 @@ files:
|
|
325
310
|
homepage: https://github.com/bkuhlmann/milestoner
|
326
311
|
licenses:
|
327
312
|
- Apache-2.0
|
328
|
-
metadata:
|
313
|
+
metadata:
|
314
|
+
source_code_uri: https://github.com/bkuhlmann/milestoner
|
315
|
+
changelog_uri: https://github.com/bkuhlmann/milestoner/blob/master/CHANGES.md
|
316
|
+
bug_tracker_uri: https://github.com/bkuhlmann/milestoner/issues
|
329
317
|
post_install_message:
|
330
318
|
rdoc_options: []
|
331
319
|
require_paths:
|
@@ -342,7 +330,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
342
330
|
version: '0'
|
343
331
|
requirements: []
|
344
332
|
rubyforge_project:
|
345
|
-
rubygems_version: 2.7.
|
333
|
+
rubygems_version: 2.7.6
|
346
334
|
signing_key:
|
347
335
|
specification_version: 4
|
348
336
|
summary: A command line interface for releasing Git repository milestones.
|
metadata.gz.sig
CHANGED
Binary file
|