milestoner 13.3.1 → 14.0.2

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: 20ee3f48df68aee0ae1a12474c2f61e59aa6d6ecb574575ef70af34b0e87321f
4
- data.tar.gz: 9e22ab67fbbe038a0b0ad9c8bb6977ebada13870eb10112cfc5e9e9b88a951e7
3
+ metadata.gz: 9ff032df25b194ae4bb751f34252020988d76b4332442d99611097577f4edbba
4
+ data.tar.gz: f590f4b8f2232301587b21fc92d5ceac33804f79c974311b4356403f4cef7cc8
5
5
  SHA512:
6
- metadata.gz: f2f3548fbc6e988e583342c3d2508b4b1ff562a60e4d5f45e675701bb5d89b295917208ee048016cb7d3eccde84cfdbf34c924f1471b1d43b78392e17130514c
7
- data.tar.gz: bf2cbd679ddddfcbc8fbaac6acbb2634c4d132ff0872f52eb1710ac15aa83fa56b92f386b7f0b48a93c8cc39b5fa8515016da9ba3c9edbe36eecf5d332c4b590
6
+ metadata.gz: 26b82725d628e0dd6c386b3da97709943f2d0b4cb24f4ea8af16ae905820cc37205e94a5dffa8847c791ebdd6ca953095a9f00e606903aa7ace94021ff5367c0
7
+ data.tar.gz: 4cbd00749c15e72880935fe5b7ef4d597cc1560fe6389bff8e1d498f840db0dfdfdee0c9974e10624f64277cc98029a1b4894b5938e0f983d3058fa9c61852c2
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -4,13 +4,18 @@
4
4
 
5
5
  = Milestoner
6
6
 
7
- Milestoner is a command line interface for crafting Git repository tags (milestones) using semantic
8
- versions. Each milestone is a summary of all commits made since the last milestone. You can use
9
- Milestoner to inspect what is currently unreleased or create a new release via a single command. By
10
- having a tool, like Milestoner, you can quickly manage/automate releases in a consistent and
11
- reliable fashion. Milestoner also pairs well with
12
- link:https://www.alchemists.io/projects/git-lint[Git Lint] for further ensuring you have commit
13
- messages of high quality for your release notes.
7
+ Milestoner is a command line interface for crafting Git repository tags (milestones) using
8
+ link:https://semver.org[semantic versions]. Each milestone is a summary of all commits made since
9
+ the last milestone. You can use Milestoner to inspect what is currently pending or create a new
10
+ release via a single command. By having a tool, like Milestoner, you can automate releases in a
11
+ consistent and reliable fashion. Milestoner pairs well with the following gems:
12
+
13
+ - link:https://www.alchemists.io/projects/git-lint[Git Lint] - Ensures your commit messages are of
14
+ high quality which feed into the release notes built by Milestoner.
15
+ - link:https://www.alchemists.io/projects/rubysmith[Rubysmith] - Use Milestoner to automate the
16
+ publishing of new or existing Ruby project versions.
17
+ - link:https://www.alchemists.io/projects/gemsmith[Gemsmith] - Is built on top of Milestoner and is
18
+ used to publish new Ruby gem versions.
14
19
 
15
20
  toc::[]
16
21
 
@@ -31,13 +36,12 @@ toc::[]
31
36
  ** Refactored
32
37
  * Ensures Git commit messages are alphabetically sorted.
33
38
  * Ensures duplicate Git commit messages are removed (if any).
34
- * Provides optional security for signing Git tags with https://www.gnupg.org[GnuPG] signing key.
35
39
 
36
40
  == Requirements
37
41
 
38
42
  . A UNIX-based system.
39
43
  . https://www.ruby-lang.org[Ruby].
40
- . https://www.gnupg.org[GnuPG].
44
+ . https://www.gnupg.org[GnuPG] (optional).
41
45
 
42
46
  == Setup
43
47
 
@@ -61,9 +65,6 @@ USAGE:
61
65
  -P, --publish VERSION Tag and push milestone to remote repository.
62
66
  -s, --status Show project status.
63
67
  -v, --version Show gem version.
64
-
65
- SECURITY OPTIONS:
66
- --[no-]sign Sign with GPG key. Default: false.
67
68
  ....
68
69
 
69
70
  Examples:
@@ -72,13 +73,8 @@ Examples:
72
73
  ----
73
74
  milestoner --config edit
74
75
  milestoner --config view
75
-
76
76
  milestoner --help
77
-
78
77
  milestoner --publish 0.1.0
79
- milestoner --publish 0.1.0 --sign
80
- milestoner --publish 0.1.0 --no-sign
81
-
82
78
  milestoner --status
83
79
  milestoner --version
84
80
  ----
@@ -98,14 +94,13 @@ The default configuration is as follows:
98
94
  [source,yaml]
99
95
  ----
100
96
  :documentation:
101
- :format: "md"
97
+ :format: "adoc"
102
98
  :prefixes:
103
99
  - Fixed
104
100
  - Added
105
101
  - Updated
106
102
  - Removed
107
103
  - Refactored
108
- :sign: false
109
104
  ----
110
105
 
111
106
  Feel free to take this default configuration, modify, and save as your own custom
@@ -113,18 +108,16 @@ Feel free to take this default configuration, modify, and save as your own custo
113
108
 
114
109
  The `+configuration.yml+` file can be configured as follows:
115
110
 
116
- * *Documenation Format*: Determines what format the status information should be rendered. Defaults
117
- to link:https://daringfireball.net/projects/markdown[Markdown] (i.e. `md`) but
118
- link:https://asciidoctor.org/docs/what-is-asciidoc[ASCII Doc] (i.e. `adoc`) is supported too.
119
- * *Git Commit Prefixes*: Should the default prefixes not be desired, you can define Git commit
120
- prefixes that match your style. _NOTE: Prefix order is important with the first prefix defined
121
- taking precedence over the second and so forth._ Special characters are allowed for prefixes but
122
- should be enclosed in quotes. To disable prefix usage completely, use an empty array. Example:
123
- `:prefixes: []`.
124
- * *Git Tag Sign*: Defaults to `false` but can be enabled by setting to `true`. When enabled, a
125
- Git tag will require GPG signing for enhanced security and include a signed signature as part of
126
- the Git tag. This is useful for public milestones where the author of a milestone can be verified
127
- to ensure milestone integrity/security.
111
+ * *Documentation Format* (i.e. `documentation`): Determines what format the release notes should be
112
+ rendered as. This effects both status information from the command line and the release notes
113
+ embedded within the body of a Git tag. Defaults to
114
+ link:https://asciidoctor.org/docs/what-is-asciidoc[ASCII Doc] (i.e. `adoc`) but
115
+ link:https://daringfireball.net/projects/markdown[Markdown] (i.e. `md`) is supported too.
116
+ * *Git Commit Prefixes* (i.e. `prefixes`): Should the default prefixes not be desired, you can
117
+ define Git commit prefixes that match your style. _NOTE: Prefix order is important with the first
118
+ prefix defined taking precedence over the second and so forth._ Special characters are allowed for
119
+ prefixes but should be enclosed in quotes. To disable prefix usage completely, use an empty array.
120
+ Example: `:prefixes: []`.
128
121
 
129
122
  == Security
130
123
 
@@ -151,16 +144,21 @@ To obtain your key, run the following and take the part after the forward slash:
151
144
  gpg --list-keys | grep pub
152
145
  ....
153
146
 
154
- Add your key to your global Git configuration in the `+[user]+` section. Example:
147
+ Add your key to your global (or local) Git configuration and ensure GPG signing for your tag is
148
+ enabled. Example:
155
149
 
156
150
  ....
151
+ [tag]
152
+ gpgSign = true
157
153
  [user]
158
154
  signingkey = <your GPG key>
159
155
  ....
160
156
 
161
- Now, when publishing a new milestone (i.e. `+milestoner --publish <version> --sign+`), signing of
162
- your Git tag will happen automatically. You will be prompted for the GPG Passphrase each time but
163
- that is to be expected.
157
+ Now, when publishing a new milestone (i.e. `milestoner --publish <version>`), the signing of your
158
+ Git tag will happen automatically. You will be prompted for the GPG Passphrase each time unless you
159
+ are running the
160
+ link:https://gnupg.org/documentation/manuals/gnupg/Invoking-GPG_002dAGENT.html#Invoking-GPG_002dAGENT[GPG
161
+ Agent] in the background (highly recommend).
164
162
 
165
163
  == Development
166
164
 
@@ -5,9 +5,11 @@ module Milestoner
5
5
  module Actions
6
6
  # Handles the gem configuration action.
7
7
  class Config
8
- def initialize configuration: Configuration::Loader::CLIENT, container: Container
8
+ include Milestoner::Import[:kernel, :logger]
9
+
10
+ def initialize configuration: Configuration::Loader::CLIENT, **dependencies
11
+ super(**dependencies)
9
12
  @configuration = configuration
10
- @container = container
11
13
  end
12
14
 
13
15
  def call action
@@ -20,15 +22,11 @@ module Milestoner
20
22
 
21
23
  private
22
24
 
23
- attr_reader :configuration, :container
25
+ attr_reader :configuration
24
26
 
25
27
  def edit = kernel.system("$EDITOR #{configuration.current}")
26
28
 
27
29
  def view = kernel.system("cat #{configuration.current}")
28
-
29
- def kernel = container[__method__]
30
-
31
- def logger = container[__method__]
32
30
  end
33
31
  end
34
32
  end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "dry/container"
4
+
5
+ module Milestoner
6
+ module CLI
7
+ module Actions
8
+ # Provides a single container with application and action specific dependencies.
9
+ module Container
10
+ extend Dry::Container::Mixin
11
+
12
+ config.registry = ->(container, key, value, _options) { container[key.to_s] = value }
13
+
14
+ merge Milestoner::Container
15
+
16
+ register(:config) { Config.new }
17
+ register(:publish) { Publish.new }
18
+ register(:status) { Status.new }
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "auto_injector"
4
+
5
+ module Milestoner
6
+ module CLI
7
+ module Actions
8
+ Import = AutoInjector[Container]
9
+ end
10
+ end
11
+ end
@@ -5,12 +5,14 @@ module Milestoner
5
5
  module Actions
6
6
  # Handles listing project status of untagged commit history.
7
7
  class Status
8
+ include Milestoner::Import[:logger]
9
+
8
10
  def initialize presenter: Presenters::Commit,
9
11
  categorizer: Commits::Categorizer.new,
10
- container: Container
12
+ **dependencies
13
+ super(**dependencies)
11
14
  @presenter = presenter
12
15
  @categorizer = categorizer
13
- @container = container
14
16
  end
15
17
 
16
18
  def call
@@ -22,11 +24,9 @@ module Milestoner
22
24
 
23
25
  private
24
26
 
25
- attr_reader :presenter, :categorizer, :container
27
+ attr_reader :presenter, :categorizer
26
28
 
27
29
  def info(message) = logger.info { message }
28
-
29
- def logger = container[__method__]
30
30
  end
31
31
  end
32
32
  end
@@ -6,26 +6,30 @@ module Milestoner
6
6
  module CLI
7
7
  # Assembles and parses all Command Line Interface (CLI) options.
8
8
  class Parser
9
+ include Import[:configuration]
10
+
9
11
  CLIENT = OptionParser.new nil, 40, " "
10
- SECTIONS = [Parsers::Core, Parsers::Security].freeze # Order is important.
12
+ SECTIONS = [Parsers::Core].freeze
13
+
14
+ def initialize sections: SECTIONS, client: CLIENT, **dependencies
15
+ super(**dependencies)
11
16
 
12
- def initialize sections: SECTIONS, client: CLIENT, container: Container
13
17
  @sections = sections
14
18
  @client = client
15
- @configuration = container[:configuration].dup
19
+ @configuration_duplicate = configuration.dup
16
20
  end
17
21
 
18
22
  def call arguments = []
19
- sections.each { |section| section.call configuration, client: }
23
+ sections.each { |section| section.call configuration_duplicate, client: }
20
24
  client.parse arguments
21
- configuration.freeze
25
+ configuration_duplicate.freeze
22
26
  end
23
27
 
24
28
  def to_s = client.to_s
25
29
 
26
30
  private
27
31
 
28
- attr_reader :sections, :client, :configuration
32
+ attr_reader :sections, :client, :configuration_duplicate
29
33
  end
30
34
  end
31
35
  end
@@ -11,14 +11,16 @@ module Milestoner
11
11
 
12
12
  # Handles parsing of Command Line Interface (CLI) core options.
13
13
  class Core
14
+ include Import[:specification]
15
+
14
16
  def self.call(...) = new(...).call
15
17
 
16
- def initialize configuration = Configuration::Loader.call,
18
+ def initialize configuration = Container[:configuration],
17
19
  client: Parser::CLIENT,
18
- container: Container
20
+ **dependencies
21
+ super(**dependencies)
19
22
  @configuration = configuration
20
23
  @client = client
21
- @container = container
22
24
  end
23
25
 
24
26
  def call arguments = []
@@ -31,7 +33,7 @@ module Milestoner
31
33
 
32
34
  private
33
35
 
34
- attr_reader :configuration, :client, :container
36
+ attr_reader :configuration, :client
35
37
 
36
38
  def collate = private_methods.sort.grep(/add_/).each { |method| __send__ method }
37
39
 
@@ -74,8 +76,6 @@ module Milestoner
74
76
  configuration.merge! action_help: true
75
77
  end
76
78
  end
77
-
78
- def specification = container[__method__]
79
79
  end
80
80
  end
81
81
  end
@@ -4,16 +4,11 @@ module Milestoner
4
4
  module CLI
5
5
  # The main Command Line Interface (CLI) object.
6
6
  class Shell
7
- ACTIONS = {
8
- config: Actions::Config.new,
9
- publish: Actions::Publish.new,
10
- status: Actions::Status.new
11
- }.freeze
7
+ include Actions::Import[:config, :publish, :status, :specification, :logger]
12
8
 
13
- def initialize parser: Parser.new, actions: ACTIONS, container: Container
9
+ def initialize parser: Parser.new, **dependencies
10
+ super(**dependencies)
14
11
  @parser = parser
15
- @actions = actions
16
- @container = container
17
12
  end
18
13
 
19
14
  def call arguments = []
@@ -24,29 +19,17 @@ module Milestoner
24
19
 
25
20
  private
26
21
 
27
- attr_reader :parser, :actions, :container
22
+ attr_reader :parser
28
23
 
29
24
  def perform configuration
30
25
  case configuration
31
- in action_config: Symbol => action then config action
32
- in action_publish: true then publish configuration
33
- in action_status: true then status
26
+ in action_config: Symbol => action then config.call action
27
+ in action_publish: true then publish.call configuration
28
+ in action_status: true then status.call
34
29
  in action_version: true then logger.info { specification.labeled_version }
35
- else usage
30
+ else logger.any { parser.to_s }
36
31
  end
37
32
  end
38
-
39
- def config(action) = actions.fetch(__method__).call(action)
40
-
41
- def publish(configuration) = actions.fetch(__method__).call(configuration)
42
-
43
- def status = actions.fetch(__method__).call
44
-
45
- def usage = logger.unknown { parser.to_s }
46
-
47
- def specification = container[__method__]
48
-
49
- def logger = container[__method__]
50
33
  end
51
34
  end
52
35
  end
@@ -6,12 +6,14 @@ module Milestoner
6
6
  module Commits
7
7
  # Retrieves and categorizes Git repository commit tagged or untagged history.
8
8
  class Categorizer
9
- def initialize expression: Regexp, container: Container
9
+ include Import[:repository]
10
+
11
+ def initialize expression: Regexp, **dependencies
12
+ super(**dependencies)
10
13
  @expression = expression
11
- @container = container
12
14
  end
13
15
 
14
- def call configuration = Configuration::Loader.call
16
+ def call configuration = Container[:configuration]
15
17
  prefixes = configuration.prefixes
16
18
 
17
19
  prefixes.reduce({}) { |group, prefix| group.merge prefix => [] }
@@ -25,7 +27,7 @@ module Milestoner
25
27
 
26
28
  private
27
29
 
28
- attr_reader :expression, :container
30
+ attr_reader :expression
29
31
 
30
32
  def group_by_prefix prefixes, groups
31
33
  computed_commits.each.with_object groups do |commit, collection|
@@ -44,8 +46,6 @@ module Milestoner
44
46
  def tagged_commits = repository.commits("#{repository.tag_last}..HEAD")
45
47
 
46
48
  def saved_commits = repository.commits
47
-
48
- def repository = container[__method__]
49
49
  end
50
50
  end
51
51
  end
@@ -13,7 +13,6 @@ module Milestoner
13
13
  :action_help,
14
14
  :documentation_format,
15
15
  :prefixes,
16
- :sign,
17
16
  :version,
18
17
  keyword_init: true
19
18
  ) do
@@ -1,9 +1,8 @@
1
1
  :documentation:
2
- :format: "md"
2
+ :format: "adoc"
3
3
  :prefixes:
4
4
  - Fixed
5
5
  - Added
6
6
  - Updated
7
7
  - Removed
8
8
  - Refactored
9
- :sign: false
@@ -1,9 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "cogger"
3
4
  require "dry-container"
4
5
  require "git_plus"
5
- require "logger"
6
- require "pastel"
7
6
  require "spek"
8
7
 
9
8
  module Milestoner
@@ -13,30 +12,8 @@ module Milestoner
13
12
 
14
13
  register(:configuration) { Configuration::Loader.call }
15
14
  register(:specification) { Spek::Loader.call "#{__dir__}/../../milestoner.gemspec" }
16
- register(:colorizer) { Pastel.new enabled: $stdout.tty? }
17
- register(:kernel) { Kernel }
18
-
19
- register :log_colors do
20
- {
21
- "DEBUG" => self[:colorizer].white.detach,
22
- "INFO" => self[:colorizer].green.detach,
23
- "WARN" => self[:colorizer].yellow.detach,
24
- "ERROR" => self[:colorizer].red.detach,
25
- "FATAL" => self[:colorizer].white.bold.on_red.detach,
26
- "ANY" => self[:colorizer].white.bold.detach
27
- }
28
- end
29
-
30
- register :logger do
31
- Logger.new $stdout,
32
- level: Logger.const_get(ENV.fetch("LOG_LEVEL", "INFO")),
33
- formatter: (
34
- lambda do |severity, _at, _name, message|
35
- self[:log_colors][severity].call "#{message}\n"
36
- end
37
- )
38
- end
39
-
40
15
  register(:repository) { GitPlus::Repository.new }
16
+ register(:kernel) { Kernel }
17
+ register(:logger) { Cogger::Client.new }
41
18
  end
42
19
  end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "auto_injector"
4
+
5
+ module Milestoner
6
+ Import = AutoInjector[Container]
7
+ end
@@ -7,23 +7,25 @@ module Milestoner
7
7
  module Presenters
8
8
  # Wraps the Git Kit Commit for presentation purposes.
9
9
  class Commit
10
+ include Import[:configuration]
11
+
10
12
  extend Forwardable
11
13
 
12
14
  delegate [*GitPlus::Commit.members, :fixup?, :squash?] => :record
13
15
 
14
- def initialize record, container: Container
16
+ def initialize record, **dependencies
17
+ super(**dependencies)
15
18
  @record = record
16
- @container = container
17
19
  end
18
20
 
19
21
  def line_item(delimiter: " - ") = "#{bullet}#{subject}#{delimiter}#{author_name}"
20
22
 
21
23
  private
22
24
 
23
- attr_reader :record, :container
25
+ attr_reader :record
24
26
 
25
27
  def bullet
26
- case container[:configuration].documentation_format
28
+ case configuration.documentation_format
27
29
  when "md" then "- "
28
30
  when "adoc" then "* "
29
31
  else ""
@@ -7,52 +7,46 @@ module Milestoner
7
7
  module Tags
8
8
  # Handles the creation of project repository tags.
9
9
  class Creator
10
+ include Import[:repository, :logger]
11
+
10
12
  using Versionaire::Cast
11
13
 
12
14
  def initialize categorizer: Commits::Categorizer.new,
13
15
  presenter: Presenters::Commit,
14
- container: Container
15
-
16
+ **dependencies
17
+ super(**dependencies)
16
18
  @categorizer = categorizer
17
19
  @presenter = presenter
18
- @container = container
19
20
  end
20
21
 
21
- def call configuration = CLI::Configuration::Loader.call
22
+ def call configuration = Container[:configuration]
22
23
  return false if local? configuration
23
24
  fail Error, "Unable to tag without commits." if categorizer.call.empty?
24
25
 
25
- sign configuration
26
+ create configuration
26
27
  rescue Versionaire::Error, GitPlus::Error => error
27
28
  raise Error, error.message
28
29
  end
29
30
 
30
31
  private
31
32
 
32
- attr_reader :categorizer, :presenter, :container
33
+ attr_reader :categorizer, :presenter
33
34
 
34
35
  def local? configuration
35
36
  version = Version configuration.version
36
37
 
37
38
  if repository.tag_local? version
38
- logger.warn "Local tag exists: #{version}. Skipped."
39
+ logger.warn { "Local tag exists: #{version}. Skipped." }
39
40
  true
40
41
  else
41
42
  false
42
43
  end
43
44
  end
44
45
 
45
- def sign configuration
46
- version = configuration.version
47
- content = message configuration
48
-
49
- if configuration.sign
50
- repository.tag_sign version, content
51
- else
52
- repository.tag_unsign version, content
53
- end
54
-
55
- logger.debug "Local tag created: #{version}."
46
+ def create configuration
47
+ label = configuration.version
48
+ repository.tag_version label, message(configuration)
49
+ logger.debug { "Local tag created: #{label}." }
56
50
  end
57
51
 
58
52
  def message configuration
@@ -62,10 +56,6 @@ module Milestoner
62
56
  %(Version #{configuration.version}\n\n#{line_items.join "\n"}\n\n)
63
57
  end
64
58
  end
65
-
66
- def repository = container[__method__]
67
-
68
- def logger = container[__method__]
69
59
  end
70
60
  end
71
61
  end
@@ -4,13 +4,15 @@ module Milestoner
4
4
  module Tags
5
5
  # Handles the tagging and pushing of a tag to a remote repository.
6
6
  class Publisher
7
- def initialize tagger: Tags::Creator.new, pusher: Tags::Pusher.new, container: Container
7
+ include Import[:logger]
8
+
9
+ def initialize tagger: Tags::Creator.new, pusher: Tags::Pusher.new, **dependencies
10
+ super(**dependencies)
8
11
  @tagger = tagger
9
12
  @pusher = pusher
10
- @container = container
11
13
  end
12
14
 
13
- def call configuration = CLI::Configuration::Loader.call
15
+ def call configuration = Container[:configuration]
14
16
  tagger.call configuration
15
17
  pusher.call configuration
16
18
  logger.info { "Published: #{configuration.version}!" }
@@ -18,9 +20,7 @@ module Milestoner
18
20
 
19
21
  private
20
22
 
21
- attr_reader :tagger, :pusher, :container
22
-
23
- def logger = container[__method__]
23
+ attr_reader :tagger, :pusher
24
24
  end
25
25
  end
26
26
  end
@@ -6,13 +6,11 @@ module Milestoner
6
6
  module Tags
7
7
  # Handles publishing of tags to a remote repository.
8
8
  class Pusher
9
- using Versionaire::Cast
9
+ include Import[:repository, :logger]
10
10
 
11
- def initialize container: Container
12
- @container = container
13
- end
11
+ using Versionaire::Cast
14
12
 
15
- def call configuration = CLI::Configuration::Loader.call
13
+ def call configuration = Container[:configuration]
16
14
  version = Version configuration.version
17
15
 
18
16
  fail Error, "Remote repository not configured." unless repository.config_origin?
@@ -24,17 +22,11 @@ module Milestoner
24
22
 
25
23
  private
26
24
 
27
- attr_reader :container
28
-
29
25
  def push
30
26
  repository.tag_push.then do |_stdout, stderr, status|
31
27
  status.success? && stderr.match?(/[new tag]/)
32
28
  end
33
29
  end
34
-
35
- def repository = container[__method__]
36
-
37
- def logger = container[__method__]
38
30
  end
39
31
  end
40
32
  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 = "13.3.1"
5
+ spec.version = "14.0.2"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://www.alchemists.io/projects/milestoner"
@@ -22,9 +22,10 @@ Gem::Specification.new do |spec|
22
22
  spec.cert_chain = [Gem.default_cert_path]
23
23
 
24
24
  spec.required_ruby_version = "~> 3.1"
25
- spec.add_dependency "dry-container", "~> 0.8"
26
- spec.add_dependency "git_plus", "~> 1.1"
27
- spec.add_dependency "pastel", "~> 0.8"
25
+ spec.add_dependency "auto_injector", "~> 0.4"
26
+ spec.add_dependency "cogger", "~> 0.0"
27
+ spec.add_dependency "dry-container", "~> 0.9"
28
+ spec.add_dependency "git_plus", "~> 1.3"
28
29
  spec.add_dependency "refinements", "~> 9.2"
29
30
  spec.add_dependency "runcom", "~> 8.2"
30
31
  spec.add_dependency "spek", "~> 0.2"
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: 13.3.1
4
+ version: 14.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -10,9 +10,9 @@ bindir: exe
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIC/jCCAeagAwIBAgIBBDANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpicm9v
14
- a2UvREM9YWxjaGVtaXN0cy9EQz1pbzAeFw0yMTAzMTkxMjQ4MDZaFw0yMjAzMTkx
15
- MjQ4MDZaMCUxIzAhBgNVBAMMGmJyb29rZS9EQz1hbGNoZW1pc3RzL0RDPWlvMIIB
13
+ MIIC/jCCAeagAwIBAgIBBTANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpicm9v
14
+ a2UvREM9YWxjaGVtaXN0cy9EQz1pbzAeFw0yMjAzMTkxNzI0MzJaFw0yMzAzMTkx
15
+ NzI0MzJaMCUxIzAhBgNVBAMMGmJyb29rZS9EQz1hbGNoZW1pc3RzL0RDPWlvMIIB
16
16
  IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6l1qpXTiomH1RfMRloyw7MiE
17
17
  xyVx/x8Yc3EupdH7uhNaTXQGyORN6aOY//1QXXMHIZ9tW74nZLhesWMSUMYy0XhB
18
18
  brs+KkurHnc9FnEJAbG7ebGvl/ncqZt72nQvaxpDxvuCBHgJAz+8i5wl6FhLw+oT
@@ -20,58 +20,72 @@ cert_chain:
20
20
  D5vkU0YlAm1r98BymuJlcQ1qdkVEI1d48ph4kcS0S0nv1RiuyVb6TCAR3Nu3VaVq
21
21
  3fPzZKJLZBx67UvXdbdicWPiUR75elI4PXpLIic3xytaF52ZJYyKZCNZJhNwfQID
22
22
  AQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU0nzow9vc
23
- 2CdikiiE3fJhP/gY4ggwDQYJKoZIhvcNAQELBQADggEBAEjpaOXHHp8s/7GL2qCb
24
- YAs7urOLv9VHSPfQWAwaTMVnSsIf3Sw4xzISOP/mmfEPBPXtz61K5esrE/uTFtgb
25
- FyjxQk2H0sEWgrRXGGNHBWQRhhEs7LP/TByoC15A0br++xLxRz4r7HBLGAWQQDpg
26
- 66BJ2TBVjxS6K64tKbq7+ACyrOZGgTfNHACh4M076y0x0oRf/rwBrU39/KRfuhbb
27
- cm+nNCEtO35gTmZ2bVDHLGvWazi3gJt6+huQjfXTCUUG2YYBxwhu+GPdAGQPxpf9
28
- lkHilIrX69jq8wMPpBhlaw2mRmeSL50Wv5u6xVBvOHhXFSP1crXM95vfLhLyRYod
29
- W2A=
23
+ 2CdikiiE3fJhP/gY4ggwDQYJKoZIhvcNAQELBQADggEBAJbbNyWzFjqUNVPPCUCo
24
+ IMrhDa9xf1xkORXNYYbmXgoxRy/KyNbUr+jgEEoWJAm9GXlcqxxWAUI6pK/i4/Qi
25
+ X6rPFEFmeObDOHNvuqy8Hd6AYsu+kP94U/KJhe9wnWGMmGoNKJNU3EkW3jM/osSl
26
+ +JRxiH5t4WtnDiVyoYl5nYC02rYdjJkG6VMxDymXTqn7u6HhYgZkGujq1UPar8x2
27
+ hNIWJblDKKSu7hA2d6+kUthuYo13o1sg1Da/AEDg0hoZSUvhqDEF5Hy232qb3pDt
28
+ CxDe2+VuChj4I1nvIHdu+E6XoEVlanUPKmSg6nddhkKn2gC45Kyzh6FZqnzH/CRp
29
+ RFE=
30
30
  -----END CERTIFICATE-----
31
- date: 2022-03-04 00:00:00.000000000 Z
31
+ date: 2022-04-23 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
- name: dry-container
34
+ name: auto_injector
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0.8'
39
+ version: '0.4'
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.8'
46
+ version: '0.4'
47
47
  - !ruby/object:Gem::Dependency
48
- name: git_plus
48
+ name: cogger
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '1.1'
53
+ version: '0.0'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '1.1'
60
+ version: '0.0'
61
61
  - !ruby/object:Gem::Dependency
62
- name: pastel
62
+ name: dry-container
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '0.9'
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '0.9'
75
+ - !ruby/object:Gem::Dependency
76
+ name: git_plus
63
77
  requirement: !ruby/object:Gem::Requirement
64
78
  requirements:
65
79
  - - "~>"
66
80
  - !ruby/object:Gem::Version
67
- version: '0.8'
81
+ version: '1.3'
68
82
  type: :runtime
69
83
  prerelease: false
70
84
  version_requirements: !ruby/object:Gem::Requirement
71
85
  requirements:
72
86
  - - "~>"
73
87
  - !ruby/object:Gem::Version
74
- version: '0.8'
88
+ version: '1.3'
75
89
  - !ruby/object:Gem::Dependency
76
90
  name: refinements
77
91
  requirement: !ruby/object:Gem::Requirement
@@ -157,11 +171,12 @@ files:
157
171
  - exe/milestoner
158
172
  - lib/milestoner.rb
159
173
  - lib/milestoner/cli/actions/config.rb
174
+ - lib/milestoner/cli/actions/container.rb
175
+ - lib/milestoner/cli/actions/import.rb
160
176
  - lib/milestoner/cli/actions/publish.rb
161
177
  - lib/milestoner/cli/actions/status.rb
162
178
  - lib/milestoner/cli/parser.rb
163
179
  - lib/milestoner/cli/parsers/core.rb
164
- - lib/milestoner/cli/parsers/security.rb
165
180
  - lib/milestoner/cli/shell.rb
166
181
  - lib/milestoner/commits/categorizer.rb
167
182
  - lib/milestoner/configuration/content.rb
@@ -169,6 +184,7 @@ files:
169
184
  - lib/milestoner/configuration/loader.rb
170
185
  - lib/milestoner/container.rb
171
186
  - lib/milestoner/error.rb
187
+ - lib/milestoner/import.rb
172
188
  - lib/milestoner/presenters/commit.rb
173
189
  - lib/milestoner/tags/creator.rb
174
190
  - lib/milestoner/tags/publisher.rb
@@ -199,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
215
  - !ruby/object:Gem::Version
200
216
  version: '0'
201
217
  requirements: []
202
- rubygems_version: 3.3.8
218
+ rubygems_version: 3.3.12
203
219
  signing_key:
204
220
  specification_version: 4
205
221
  summary: A command line interface for crafting Git semantically versioned repository
metadata.gz.sig CHANGED
Binary file
@@ -1,56 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "refinements/structs"
4
-
5
- module Milestoner
6
- module CLI
7
- module Parsers
8
- # Handles parsing of Command Line Interface (CLI) security options.
9
- class Security
10
- using Refinements::Structs
11
-
12
- def self.call(...) = new(...).call
13
-
14
- def initialize configuration = Container[:configuration],
15
- client: Parser::CLIENT,
16
- container: Container
17
- @configuration = configuration
18
- @client = client
19
- @container = container
20
- end
21
-
22
- def call arguments = []
23
- client.separator "\nSECURITY OPTIONS:\n"
24
- add_sign
25
- client.parse arguments
26
- configuration
27
- end
28
-
29
- private
30
-
31
- attr_reader :configuration, :client, :container
32
-
33
- def add_sign
34
- client.on(
35
- "--[no-]sign",
36
- %(Sign with GPG key. Default: #{configuration.sign}.)
37
- ) do |value|
38
- compute_sign value
39
- end
40
- end
41
-
42
- def compute_sign value
43
- truth_table = [true, false].repeated_permutation(2).to_a
44
-
45
- case truth_table.index [value, configuration.sign]
46
- when 0..1 then configuration.merge! sign: true
47
- when 2..3 then configuration.merge! sign: false
48
- else logger.error { "--sign must be a boolean. Check gem configuration." }
49
- end
50
- end
51
-
52
- def logger = container[__method__]
53
- end
54
- end
55
- end
56
- end