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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3cf7c663913f623a4eafc4d65dd23d48b0d4a9b44342b689304b7382fb28b7d0
4
- data.tar.gz: 579405aee2c734e74834398d899928517a9067317b8cb482364e25b218a1e0d0
3
+ metadata.gz: 59a431e1c54ac84d240f85e5b40b940c3fda7bc66f6544c276b5af966bada7be
4
+ data.tar.gz: 61b99b288ccf9bc733274610567fa4486d9f3b1b6dba3b38ba37870506f133d8
5
5
  SHA512:
6
- metadata.gz: 5623468e7ae71af2ef8af88c282c2f91d029ebe17ccf2a9002891a75b1da5921c288c0d45f29d5578f5eef8103ad422759d90d3194e55a434db913e981e7ef70
7
- data.tar.gz: 30e367f6f7c594134cea6c5fc7ed1f1a14a6892f40084bb718d3415bddf134e11cc40758f20847ec7785d0a6b8901cd3e49a57c6c20d7eb4e7e91930a9b206de
6
+ metadata.gz: aa9cf9668c0a97fbcdcfc0bd860fcc0f5ab112b3d6a1c26ca211cf0ab65f6d8d177b7d4cc4770bd3ac51da7140ce26dcfc5fb29f5c4bba8e442f0dc9eb7d038c
7
+ data.tar.gz: a7addb3626f0a0b1f451411c4f33c2b2e5893a59b4ef529aae2751bb1ff878f5a50ec483a3f775c85cd702d29a73c8139db18c144a0f27a59099809558bfd13a
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
@@ -1 +1 @@
1
- b���om5��������S6x�=h)��Eb���[
1
+ M���+��90��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
  [![Gem Version](https://badge.fury.io/rb/milestoner.svg)](http://badge.fury.io/rb/milestoner)
4
4
  [![Code Climate Maintainability](https://api.codeclimate.com/v1/badges/4cf2547433410a9c7150/maintainability)](https://codeclimate.com/github/bkuhlmann/milestoner/maintainability)
5
5
  [![Code Climate Test Coverage](https://api.codeclimate.com/v1/badges/4cf2547433410a9c7150/test_coverage)](https://codeclimate.com/github/bkuhlmann/milestoner/test_coverage)
6
- [![Gemnasium Status](https://gemnasium.com/bkuhlmann/milestoner.svg)](https://gemnasium.com/bkuhlmann/milestoner)
7
6
  [![Circle CI Status](https://circleci.com/gh/bkuhlmann/milestoner.svg?style=svg)](https://circleci.com/gh/bkuhlmann/milestoner)
8
- [![Patreon](https://img.shields.io/badge/patreon-donate-brightgreen.svg)](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: `v<major>.<minor>.<maintenance>`.
39
- - Example: `v0.1.0`.
40
- - Ensures Git commits since last tag (or initialization of repository) are included within each Git
41
- tag message.
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 within each Git tag message.
50
- - Ensures Git commit messages are alphabetically sorted within each Git tag message.
51
- - Ensures duplicate Git commit messages are removed (if any) within each Git tag message.
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
- [![asciicast](https://asciinema.org/a/91752.png)](https://asciinema.org/a/91752)
54
+ [![asciicast](https://asciinema.org/a/155986.png)](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] # Push local tag to remote repository.
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 (c) 2015 [Alchemists](https://www.alchemists.io).
187
+ Copyright 2015 [Alchemists](https://www.alchemists.io).
197
188
  Read [LICENSE](LICENSE.md) for details.
198
189
 
199
190
  ## History
@@ -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 = configuration.to_h[:version]
46
+ def tag version
48
47
  tagger.create version, sign: sign_tag?(options[:sign])
49
- say "Repository tagged: #{tagger.version_label}."
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 = configuration.to_h[: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 = configuration.to_h[:version]
69
+ def publish version
71
70
  publisher.publish version, sign: sign_tag?(options[:sign])
72
- say_status :info, "Repository tagged and pushed: #{tagger.version_label}.", :green
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
@@ -12,7 +12,7 @@ module Milestoner
12
12
  end
13
13
 
14
14
  def self.version
15
- "7.0.1"
15
+ "8.0.0"
16
16
  end
17
17
 
18
18
  def self.version_label
@@ -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.label}.") if 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.label
24
+ git.tag_remote? version
25
25
  end
26
26
  end
27
27
  end
@@ -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
- sort_by_commit_prefix groups
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] << sanitize_commit(commit)
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 "#{version_label}" ) +
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?(version_label)
108
- shell.say_status :warn, "Local tag exists: #{version_label}. Skipped.", :yellow
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: #{version_label}.") unless status
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: 7.0.1
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
- MIIDeDCCAmCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBBMQ8wDQYDVQQDDAZicm9v
14
- a2UxGjAYBgoJkiaJk/IsZAEZFgphbGNoZW1pc3RzMRIwEAY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4kByawrii833IidV0zkI4lCombTNicc8JWXXSlL2G/sWPLndNvn5rzoyyRT
28
+ pPOLYGdB4hqUam3hBgLOsYIOVp+yXMvj0gvk/Djq8IR2P1RS4NZU7HHD485xkBfL
29
+ 4Zrsxi713z6sndd9JBAm4G7mJiV93MsuCM5N4ZDY7XaxIhvctNSNhX/Yn8LLdtGI
30
+ b4jw5t40FKyNUvLPPXYAvQALBtk=
32
31
  -----END CERTIFICATE-----
33
- date: 2018-01-01 00:00:00.000000000 Z
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: '4.0'
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: '4.0'
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.7'
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.7'
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.52'
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.52'
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.4
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