milestoner 10.0.2 → 11.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a578c120a88aac89a49c98fbfb50bb30b17e9303a1dab67f7e7d6029e56e2193
4
- data.tar.gz: 4925f570e411f4a432526abc66574170cf0934351c499acc94d9f5d6021e3768
3
+ metadata.gz: 5152a1a412828716c3e01a280e473011f66335cb0cb007d18603a7fe973fa298
4
+ data.tar.gz: 325015f1de0b136f8d817c3f24ec96f7b429b8c5bf1847551fdb5cc0cdde420d
5
5
  SHA512:
6
- metadata.gz: 351f67a208771f8f9c0b1de65bb89645b1b5d4642653e3a9f945ca12b7fc182cd00e8de6ab681f2b75ce5c5077466cc8ed14c01c23e1fd16ac7698f65c3495f3
7
- data.tar.gz: e339dc73f6b8b41525c348ec26b2a9b2d8909d7cacd6e22a41ca6c9770a12b8be9cb4437e9481718369d84202fc6b1625af29e8e14d8ab827323041f61a02db8
6
+ metadata.gz: dc1808ca74a11de0ed5e751faa47832e2c2cbebfcd544c99a045886b004f00bb29c9d80c078fe0b043a802f492e2afddbef289f5c028ac60072a940f14d3d978
7
+ data.tar.gz: 444fce8423e259ec58ea353464c204a2d94eb4d3de51f04d2ab3bb7cf71f358962ff670c979c2bef354848a6944f75d58e966262d17b304cf518001643b24cd3
@@ -1 +1,2 @@
1
- ���W ��0�����m�$�Wϋ"���! \X4s���(Q��ZMd1����`tm��Iā��J��$��ω���HB���);/��W�tc(C# ��:Ҳxr���j�!v�D>b�.�i��m^��H+(?t�\J�ef���Ia,�;�����?����Q%��M�y�������=�သB�
1
+ ���y�. �{yԒ�`/6�5���C�;�kX[���qX+�����@ȕ�W!�Q2B>e}L��F�J��"K�#S��Fc�:����Θ� aQ� EV� ��g%�Z-_��
2
+ A�z_M��0�rS�;$��\}Ⱥ,��ѻ�ћ��T�t��O��(��^�/)�xSz�G�j����wx$��l{Ɛ��D.*Piۦ�v�c4-���IQ���������4��iZ2 ��b>������e�U-�:��
data.tar.gz.sig CHANGED
Binary file
@@ -1,4 +1,4 @@
1
- # Apache License
1
+ = Apache License
2
2
 
3
3
  Version 2.0, January 2004
4
4
 
@@ -6,7 +6,7 @@ http://www.apache.org/licenses
6
6
 
7
7
  TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
8
 
9
- ## 1. Definitions
9
+ == 1. Definitions
10
10
 
11
11
  "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by
12
12
  Sections 1 through 9 of this document.
@@ -54,14 +54,14 @@ Contribution."
54
54
  "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a
55
55
  Contribution has been received by Licensor and subsequently incorporated within the Work.
56
56
 
57
- ## 2. Grant of Copyright License
57
+ == 2. Grant of Copyright License
58
58
 
59
59
  Subject to the terms and conditions of this License, each Contributor hereby grants to You a
60
60
  perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to
61
61
  reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and
62
62
  distribute the Work and such Derivative Works in Source or Object form.
63
63
 
64
- ## 3. Grant of Patent License
64
+ == 3. Grant of Patent License
65
65
 
66
66
  Subject to the terms and conditions of this License, each Contributor hereby grants to You a
67
67
  perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this
@@ -74,39 +74,38 @@ a Contribution incorporated within the Work constitutes direct or contributory p
74
74
  then any patent licenses granted to You under this License for that Work shall terminate as of the
75
75
  date such litigation is filed.
76
76
 
77
- ## 4. Redistribution
77
+ == 4. Redistribution
78
78
 
79
79
  You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with
80
80
  or without modifications, and in Source or Object form, provided that You meet the following
81
81
  conditions:
82
82
 
83
- 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
83
+ . You must give any other recipients of the Work or Derivative Works a copy of this License; and
84
84
 
85
- 2. You must cause any modified files to carry prominent notices stating that You changed the
86
- files; and
85
+ . You must cause any modified files to carry prominent notices stating that You changed the files;
86
+ and
87
87
 
88
- 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright,
89
- patent, trademark, and attribution notices from the Source form of the Work, excluding those
90
- notices that do not pertain to any part of the Derivative Works; and
88
+ . You must retain, in the Source form of any Derivative Works that You distribute, all copyright,
89
+ patent, trademark, and attribution notices from the Source form of the Work, excluding those
90
+ notices that do not pertain to any part of the Derivative Works; and
91
91
 
92
- 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative
93
- Works that You distribute must include a readable copy of the attribution notices contained
94
- within such NOTICE file, excluding those notices that do not pertain to any part of the
95
- Derivative Works, in at least one of the following places: within a NOTICE text file
96
- distributed as part of the Derivative Works; within the Source form or documentation, if
97
- provided along with the Derivative Works; or, within a display generated by the Derivative
98
- Works, if and wherever such third-party notices normally appear. The contents of the NOTICE
99
- file are for informational purposes only and do not modify the License. You may add Your own
100
- attribution notices within Derivative Works that You distribute, alongside or as an addendum to
101
- the NOTICE text from the Work, provided that such additional attribution notices cannot be
102
- construed as modifying the License.
92
+ . If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works
93
+ that You distribute must include a readable copy of the attribution notices contained within such
94
+ NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in
95
+ at least one of the following places: within a NOTICE text file distributed as part of the
96
+ Derivative Works; within the Source form or documentation, if provided along with the Derivative
97
+ Works; or, within a display generated by the Derivative Works, if and wherever such third-party
98
+ notices normally appear. The contents of the NOTICE file are for informational purposes only and
99
+ do not modify the License. You may add Your own attribution notices within Derivative Works that
100
+ You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such
101
+ additional attribution notices cannot be construed as modifying the License.
103
102
 
104
103
  You may add Your own copyright statement to Your modifications and may provide additional or
105
104
  different license terms and conditions for use, reproduction, or distribution of Your modifications,
106
105
  or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of
107
106
  the Work otherwise complies with the conditions stated in this License.
108
107
 
109
- ## 5. Submission of Contributions
108
+ == 5. Submission of Contributions
110
109
 
111
110
  Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the
112
111
  Work by You to the Licensor shall be under the terms and conditions of this License, without any
@@ -114,13 +113,13 @@ additional terms or conditions. Notwithstanding the above, nothing herein shall
114
113
  the terms of any separate license agreement you may have executed with Licensor regarding such
115
114
  Contributions.
116
115
 
117
- ## 6. Trademarks
116
+ == 6. Trademarks
118
117
 
119
118
  This License does not grant permission to use the trade names, trademarks, service marks, or product
120
119
  names of the Licensor, except as required for reasonable and customary use in describing the origin
121
120
  of the Work and reproducing the content of the NOTICE file.
122
121
 
123
- ## 7. Disclaimer of Warranty
122
+ == 7. Disclaimer of Warranty
124
123
 
125
124
  Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each
126
125
  Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -129,7 +128,7 @@ TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. Y
129
128
  responsible for determining the appropriateness of using or redistributing the Work and assume any
130
129
  risks associated with Your exercise of permissions under this License.
131
130
 
132
- ## 8. Limitation of Liability
131
+ == 8. Limitation of Liability
133
132
 
134
133
  In no event and under no legal theory, whether in tort (including negligence), contract, or
135
134
  otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or
@@ -139,7 +138,7 @@ License or out of the use or inability to use the Work (including but not limite
139
138
  loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial
140
139
  damages or losses), even if such Contributor has been advised of the possibility of such damages.
141
140
 
142
- ## 9. Accepting Warranty or Additional Liability
141
+ == 9. Accepting Warranty or Additional Liability
143
142
 
144
143
  While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee
145
144
  for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights
@@ -151,11 +150,11 @@ additional liability.
151
150
 
152
151
  END OF TERMS AND CONDITIONS
153
152
 
154
- Copyright 2015 [Alchemists](https://www.alchemists.io).
153
+ Copyright 2015 link:https://www.alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
155
154
 
156
155
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
157
- compliance with the License. You may obtain a [copy](http://www.apache.org/licenses/LICENSE-2.0) of
158
- the License.
156
+ compliance with the License. You may obtain a link:https://www.apache.org/licenses/LICENSE-2.0[copy]
157
+ of the License.
159
158
 
160
159
  Unless required by applicable law or agreed to in writing, software distributed under the License is
161
160
  distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
@@ -0,0 +1,225 @@
1
+ :toc: macro
2
+ :toclevels: 5
3
+ :figure-caption!:
4
+
5
+ = Milestoner
6
+
7
+ [link=http://badge.fury.io/rb/milestoner]
8
+ image::https://badge.fury.io/rb/milestoner.svg[Gem Version]
9
+ [link=https://www.alchemists.io/projects/code_quality]
10
+ image::https://img.shields.io/badge/code_style-alchemists-brightgreen.svg[Alchemists Style Guide]
11
+ [link=https://circleci.com/gh/bkuhlmann/milestoner]
12
+ image::https://circleci.com/gh/bkuhlmann/milestoner.svg?style=svg[Circle CI Status]
13
+
14
+ A command line interface for crafting Git repository milestones (also known as _tags_).
15
+
16
+ toc::[]
17
+
18
+ == Features
19
+
20
+ * Uses link:https://www.alchemists.io/projects/versionaire[Versionaire] for
21
+ link:https://semver.org[Semantic Versioning].
22
+ ** Format: `+<major>.<minor>.<patch>+`.
23
+ ** Example: `+0.1.0+`.
24
+ * Ensures Git commits since last tag (or initialization of repository) are included.
25
+ * Ensures Git commit messages are grouped by prefix, in order defined. For more details, see
26
+ link:https://www.alchemists.io/projects/git-cop/#_commit_subject_prefix[Git Cop Subject Prefix]
27
+ for details. Defaults (can be customized):
28
+ ** Fixed
29
+ ** Added
30
+ ** Updated
31
+ ** Removed
32
+ ** Refactored
33
+ * Ensures Git commit messages are alphabetically sorted.
34
+ * Ensures duplicate Git commit messages are removed (if any).
35
+ * Provides optional security for signing Git tags with https://www.gnupg.org[GnuPG] signing key.
36
+
37
+ == Screencasts
38
+
39
+ [link=https://www.alchemists.io/screencasts/milestoner]
40
+ image::https://www.alchemists.io/images/screencasts/milestoner/cover.svg[Screencast,600,240,role=focal_point]
41
+
42
+ == Requirements
43
+
44
+ . A UNIX-based system.
45
+ . https://www.ruby-lang.org[Ruby].
46
+ . https://www.gnupg.org[GnuPG].
47
+
48
+ == Setup
49
+
50
+ To install, run:
51
+
52
+ [source,bash]
53
+ ----
54
+ gem install milestoner
55
+ ----
56
+
57
+ == Usage
58
+
59
+ === Command Line Interface (CLI)
60
+
61
+ From the command line, type: `+milestoner help+`
62
+
63
+ ....
64
+ milestoner -C, [--commits] # Show commits for next milestone.
65
+ milestoner -P, [--publish=VERSION] # Tag and push milestone to remote repository.
66
+ milestoner -c, [--config] # Manage gem configuration.
67
+ milestoner -h, [--help=COMMAND] # Show this message or get help for a command.
68
+ milestoner -p, [--push=VERSION] # Push local tag to remote repository.
69
+ milestoner -t, [--tag=VERSION] # Tag local repository with new version.
70
+ milestoner -v, [--version] # Show gem version.
71
+ ....
72
+
73
+ For config options, type: `+milestoner help --config+`
74
+
75
+ ....
76
+ -e, [--edit], [--no-edit] # Edit gem configuration.
77
+ -i, [--info], [--no-info] # Print gem configuration info.
78
+ ....
79
+
80
+ For tag options, type: `+milestoner help --tag+`
81
+
82
+ ....
83
+ -s, [--sign], [--no-sign] # Sign tag with GPG key.
84
+ ....
85
+
86
+ For publish options, type: `+milestoner help --publish+`
87
+
88
+ ....
89
+ -s, [--sign], [--no-sign] # Sign tag with GPG key.
90
+ ....
91
+
92
+ When using Milestoner, the `+--publish+` command is intended to be the only command necessary for
93
+ publishing a new release as it handles all of the steps necessary for tagging and pushing a new
94
+ milestone. Should individual steps be needed, then the `+--tag+` and `+--push+` options are
95
+ available.
96
+
97
+ === Customization
98
+
99
+ This gem can be configured via a global configuration:
100
+
101
+ ....
102
+ ~/.config/milestoner/configuration.yml
103
+ ....
104
+
105
+ It can also be configured via https://www.alchemists.io/projects/xdg[XDG] environment variables.
106
+
107
+ The default configuration is as follows:
108
+
109
+ [source,yaml]
110
+ ----
111
+ :git_commit_prefixes:
112
+ - Fixed
113
+ - Added
114
+ - Updated
115
+ - Removed
116
+ - Refactored
117
+ :git_tag_sign: false
118
+ ----
119
+
120
+ Feel free to take this default configuration, modify, and save as your own custom
121
+ `+configuration.yml+`.
122
+
123
+ The `+configuration.yml+` file can be configured as follows:
124
+
125
+ * `+git_commit_prefixes+`: Should the default prefixes not be desired, you can define Git commit
126
+ prefixes that match your style. _NOTE: Prefix order is important with the first prefix defined
127
+ taking precedence over the second and so forth._ Special characters are allowed for prefixes but
128
+ should be enclosed in quotes. To disable prefix usage completely, use an empty array. Example:
129
+ `+:git_commit_prefixes: []+`.
130
+ * `+git_tag_sign+`: Defaults to `+false+` but can be enabled by setting to `+true+`. When enabled, a
131
+ Git tag will require GPG signing for enhanced security and include a signed signature as part of the
132
+ Git tag. This is useful for public milestones where the author of a milestone can be verified to
133
+ ensure milestone integrity/security.
134
+
135
+ == Security
136
+
137
+ To securely sign your Git tags, install and configure https://www.gnupg.org[GPG]:
138
+
139
+ [source,bash]
140
+ ----
141
+ brew install gpg
142
+ gpg --gen-key
143
+ ----
144
+
145
+ When creating your GPG key, choose these settings:
146
+
147
+ * Key kind: RSA and RSA (default)
148
+ * Key size: 4096
149
+ * Key validity: 0
150
+ * Real Name: `+<your name>+`
151
+ * Email: `+<your email>+`
152
+ * Passphrase: `+<your passphrase>+`
153
+
154
+ To obtain your key, run the following and take the part after the forward slash:
155
+
156
+ ....
157
+ gpg --list-keys | grep pub
158
+ ....
159
+
160
+ Add your key to your global Git configuration in the `+[user]+` section. Example:
161
+
162
+ ....
163
+ [user]
164
+ signingkey = <your GPG key>
165
+ ....
166
+
167
+ Now, when publishing a new milestone (i.e. `+milestoner --publish <version> --sign+`), signing of
168
+ your Git tag will happen automatically. You will be prompted for the GPG Passphrase each time but
169
+ that is to be expected.
170
+
171
+ == Development
172
+
173
+ To contribute, run:
174
+
175
+ [source,bash]
176
+ ----
177
+ git clone https://github.com/bkuhlmann/milestoner.git
178
+ cd milestoner
179
+ bin/setup
180
+ ----
181
+
182
+ You can also use the IRB console for direct access to all objects:
183
+
184
+ [source,bash]
185
+ ----
186
+ bin/console
187
+ ----
188
+
189
+ == Tests
190
+
191
+ To test, run:
192
+
193
+ [source,bash]
194
+ ----
195
+ bundle exec spec
196
+ ----
197
+
198
+ == Versioning
199
+
200
+ Read link:https://semver.org[Semantic Versioning] for details. Briefly, it means:
201
+
202
+ * Major (X.y.z) - Incremented for any backwards incompatible public API changes.
203
+ * Minor (x.Y.z) - Incremented for new, backwards compatible, public API enhancements/fixes.
204
+ * Patch (x.y.Z) - Incremented for small, backwards compatible, bug fixes.
205
+
206
+ == Code of Conduct
207
+
208
+ Please note that this project is released with a link:CODE_OF_CONDUCT.adoc[CODE OF CONDUCT]. By
209
+ participating in this project you agree to abide by its terms.
210
+
211
+ == Contributions
212
+
213
+ Read link:CONTRIBUTING.adoc[CONTRIBUTING] for details.
214
+
215
+ == License
216
+
217
+ Read link:LICENSE.adoc[LICENSE] for details.
218
+
219
+ == History
220
+
221
+ Read link:CHANGES.adoc[CHANGES] for details.
222
+
223
+ == Credits
224
+
225
+ Engineered by link:https://www.alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
@@ -5,5 +5,5 @@ require "milestoner"
5
5
  require "milestoner/cli"
6
6
  require "milestoner/identity"
7
7
 
8
- Process.setproctitle Milestoner::Identity.version_label
8
+ Process.setproctitle Milestoner::Identity::VERSION_LABEL
9
9
  Milestoner::CLI.start
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "git_plus"
3
4
  require "milestoner/identity"
4
5
  require "milestoner/errors/base"
5
6
  require "milestoner/errors/duplicate_tag"
6
7
  require "milestoner/errors/git"
7
- require "milestoner/git/config"
8
- require "milestoner/git/kit"
8
+ require "milestoner/commit"
9
9
  require "milestoner/tagger"
10
10
  require "milestoner/pusher"
11
11
  require "milestoner/publisher"
@@ -9,10 +9,10 @@ module Milestoner
9
9
  class CLI < Thor
10
10
  include Thor::Actions
11
11
 
12
- package_name Identity.version_label
12
+ package_name Identity::VERSION_LABEL
13
13
 
14
14
  def self.configuration
15
- Runcom::Config.new "#{Identity.name}/configuration.yml",
15
+ Runcom::Config.new "#{Identity::NAME}/configuration.yml",
16
16
  defaults: {
17
17
  git_commit_prefixes: %w[Fixed Added Updated Removed Refactored],
18
18
  git_tag_sign: false
@@ -46,7 +46,7 @@ module Milestoner
46
46
  default: false
47
47
  def tag version
48
48
  tagger.create version, sign: sign_tag?(options[:sign])
49
- say "Repository tagged: #{tagger.version}."
49
+ say "Repository tagged: #{version}."
50
50
  rescue StandardError => error
51
51
  say_status :error, error.message, :red
52
52
  end
@@ -69,7 +69,7 @@ module Milestoner
69
69
  default: false
70
70
  def publish version
71
71
  publisher.publish version, sign: sign_tag?(options[:sign])
72
- say_status :info, "Repository tagged and pushed: #{tagger.version}.", :green
72
+ say_status :info, "Repository tagged and pushed: #{version}.", :green
73
73
  say_status :info, "Milestone published!", :green
74
74
  rescue StandardError => error
75
75
  say_status :error, error.message, :red
@@ -100,7 +100,7 @@ module Milestoner
100
100
  desc "-v, [--version]", "Show gem version."
101
101
  map %w[-v --version] => :version
102
102
  def version
103
- say Identity.version_label
103
+ say Identity::VERSION_LABEL
104
104
  end
105
105
 
106
106
  desc "-h, [--help=COMMAND]", "Show this message or get help for a command."
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "forwardable"
4
+
5
+ module Milestoner
6
+ # Wraps the Git Kit Commit for presentation purposes.
7
+ class Commit
8
+ extend Forwardable
9
+
10
+ delegate [*GitPlus::Commit.members, :fixup?, :squash?] => :source
11
+
12
+ def initialize source
13
+ @source = source
14
+ end
15
+
16
+ def subject_author delimiter: " - "
17
+ "#{subject}#{delimiter}#{author_name}"
18
+ end
19
+
20
+ private
21
+
22
+ attr_reader :source
23
+ end
24
+ end