comito 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 9940316c102cf40c790799cfdfdc1c45c7afd0784310e5d89a6308929f010460
4
+ data.tar.gz: 37b0cc80837e6881fd287ed3bbd81b6197391869f8e809c20f64b384f67b0004
5
+ SHA512:
6
+ metadata.gz: c3480fcbdd2bf8ba3d1ca9711dc5fe26fd303ca27665ffaebae266a06ed35887b0193a573420199d43d1030f6391e7944bb8a6cde249ff49db4db8275bcef48d
7
+ data.tar.gz: 3274e506ba6227799d787a2e406749490f976798f4dc6124b6c06de9013eab897467ca67c5adc77c0eda7e2c5e2fefd394bc95255d4726ca887baf4c4601883b
data/.DS_Store ADDED
Binary file
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2025-08-10
4
+
5
+ - Initial release
data/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in comito.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+ gem "rspec", "~> 3.0"
10
+
11
+ group :development, :test do
12
+ gem 'simplecov', require: false
13
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,44 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ comito (0.1.0)
5
+ cli-ui (~> 2.4)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ cli-ui (2.4.0)
11
+ diff-lcs (1.6.2)
12
+ docile (1.4.1)
13
+ rake (13.3.0)
14
+ rspec (3.13.1)
15
+ rspec-core (~> 3.13.0)
16
+ rspec-expectations (~> 3.13.0)
17
+ rspec-mocks (~> 3.13.0)
18
+ rspec-core (3.13.5)
19
+ rspec-support (~> 3.13.0)
20
+ rspec-expectations (3.13.5)
21
+ diff-lcs (>= 1.2.0, < 2.0)
22
+ rspec-support (~> 3.13.0)
23
+ rspec-mocks (3.13.5)
24
+ diff-lcs (>= 1.2.0, < 2.0)
25
+ rspec-support (~> 3.13.0)
26
+ rspec-support (3.13.4)
27
+ simplecov (0.22.0)
28
+ docile (~> 1.1)
29
+ simplecov-html (~> 0.11)
30
+ simplecov_json_formatter (~> 0.1)
31
+ simplecov-html (0.13.2)
32
+ simplecov_json_formatter (0.1.4)
33
+
34
+ PLATFORMS
35
+ x86_64-darwin-24
36
+
37
+ DEPENDENCIES
38
+ comito!
39
+ rake (~> 13.0)
40
+ rspec (~> 3.0)
41
+ simplecov
42
+
43
+ BUNDLED WITH
44
+ 2.4.10
data/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
data/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # Comito
2
+
3
+ Comito is a lightweight and intuitive Ruby CLI tool that provides an interactive interface for crafting commit messages following the **Conventional Commits** standard in Rails projects (and any Ruby-based project).
4
+
5
+ ## Features
6
+
7
+ - 🚀 Interactive step-by-step interface to choose commit type (`feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `test`, etc.).
8
+ - 🏷️ Optional **scope** support for more precise commit descriptions.
9
+ - 📝 Automatic commit message formatting according to the Conventional Commits standard.
10
+ - 🔧 Option to directly commit via Git after generating the message.
11
+ - 📦 Minimal dependencies — fully written in Ruby.
12
+ - 🎯 Perfect for Rails developers who want to standardize commit history.
13
+ - ⚙️ Easy integration with CI/CD pipelines and Git hooks.
14
+
15
+ ## Why Comito?
16
+
17
+ - ❌ No need for Node.js, Rust, or other external tools — 100% Ruby.
18
+ - 🖥️ Simple to use — run `comito` and follow the interactive generator.
19
+ - 🔄 Flexible and extensible — easily adapted to your team’s workflow.
20
+ - 📚 Keeps your commit history clean and consistent for better collaboration and release management.
21
+
22
+ ## Installation
23
+
24
+ ```bash
25
+ gem install comito
26
+ ```
27
+
28
+ Or add it to your project’s Gemfile:
29
+
30
+ ```bash
31
+ gem "comito"
32
+ ```
33
+
34
+ ## Usage
35
+
36
+ ```bash
37
+ comito
38
+ ```
39
+
40
+ You’ll be guided through a series of prompts to build your commit message, with the option to confirm and commit directly.
41
+
42
+ ## Usage
43
+
44
+ Apache-2.0
data/README_UA.md ADDED
@@ -0,0 +1,38 @@
1
+ # Comito
2
+
3
+ Comito — це легкий та зручний Ruby CLI-інструмент, який надає інтерактивний інтерфейс для формування коміт-повідомлень відповідно до Conventional Commits у Rails-проєктах (та будь-яких Ruby-проєктах).
4
+
5
+ ## Основні можливості
6
+
7
+ - 🚀 Інтуїтивний покроковий інтерфейс для вибору типу коміту (feat, fix, chore, docs, style, refactor, test тощо).
8
+ - 🏷️ Підтримка optional scope (області змін) для більш точного опису.
9
+ - 📝 Автоматичне форматування commit message згідно стандарту Conventional Commits.
10
+ - 🔧 Підтримка швидкого коміту через Git після формування повідомлення.
11
+ - 📦 Мінімальні залежності, повністю написаний на Ruby.
12
+ - 🎯 Ідеально підходить для Rails-розробників, які хочуть стандартизувати історію комітів.
13
+ - ⚙️ Легко інтегрується у CI/CD процеси та git хуки.
14
+
15
+ ## Чому варто обрати Comito?
16
+
17
+ - ❌ Без необхідності встановлювати додаткові Node.js або Rust інструменти.
18
+ - 🖥️ Простий у використанні — запуск однієї команди comito запускає інтерактивний генератор.
19
+ - 🔄 Легко налаштовується та розширюється під потреби команди.
20
+ - 📚 Допомагає підтримувати чисту, зрозумілу історію комітів для кращої співпраці і реліз-менеджменту.
21
+
22
+ ## Встановлення
23
+
24
+ ```bash
25
+ gem install comito
26
+ ```
27
+
28
+ ## Використання
29
+
30
+ ```bash
31
+ comito
32
+ ```
33
+
34
+ Після запуску ти отримаєш послідовність запитань для формування commit message, а потім можеш підтвердити і зробити коміт.
35
+
36
+ ## Usage
37
+
38
+ Apache-2.0
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
data/comito.gemspec ADDED
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/comito/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "comito"
7
+ spec.version = Comito::VERSION
8
+ spec.authors = ["Dmytro"]
9
+ spec.email = ["k-d-m@ukr.net"]
10
+
11
+ spec.summary = "Interactive CLI for generating Conventional Commits messages in Ruby projects."
12
+ spec.description = <<~DESC
13
+ Comito is a lightweight and easy-to-use Ruby CLI tool that provides an interactive interface for generating commit messages
14
+ following the Conventional Commits specification. It is designed primarily for Ruby and Rails developers who want to standardize
15
+ their commit history with minimal setup and dependencies. Comito guides users through selecting the commit type, optional scope,
16
+ and description, then formats the message correctly and optionally executes the git commit command. This helps teams maintain
17
+ a clean, consistent, and meaningful git history to improve collaboration, automate changelogs, and streamline release processes.
18
+ DESC
19
+ spec.homepage = "https://github.com/DmytroKondratiuk/comito"
20
+ spec.required_ruby_version = ">= 2.6.0"
21
+
22
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
23
+
24
+ spec.metadata["homepage_uri"] = spec.homepage
25
+ spec.metadata["source_code_uri"] = spec.homepage
26
+ spec.metadata["changelog_uri"] = "https://github.com/DmytroKondratiuk/comito/CHANGELOG.md"
27
+
28
+ # Specify which files should be added to the gem when it is released.
29
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
30
+ spec.files = Dir.chdir(__dir__) do
31
+ `git ls-files -z`.split("\x0").reject do |f|
32
+ (File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor])
33
+ end
34
+ end
35
+ spec.bindir = "exe"
36
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
37
+ spec.require_paths = ["lib"]
38
+
39
+ spec.license = "Apache-2.0"
40
+
41
+ # Uncomment to register a new dependency of your gem
42
+ # spec.add_dependency "example-gem", "~> 1.0"
43
+ spec.add_runtime_dependency "cli-ui", "~> 2.4"
44
+
45
+ # For more information and examples about making a new gem, check out our
46
+ # guide at: https://bundler.io/guides/creating_gem.html
47
+ end
data/exe/comito ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "comito"
4
+
5
+ Comito::DoCommit.run
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Comito
4
+ VERSION = "0.1.0"
5
+ end
data/lib/comito.rb ADDED
@@ -0,0 +1,115 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "comito/version"
4
+ require "cli/ui"
5
+
6
+ module Comito
7
+ class DoCommit
8
+ class Error < StandardError; end
9
+
10
+ GREEN = "\e[32m"
11
+ YELLOW = "\e[33m"
12
+ BLUE = "\e[34m"
13
+ RED = "\e[31m"
14
+ RESET = "\e[0m"
15
+
16
+ DEFAULT_MESSAGE_LENGTH = 72
17
+ CONFIRM_COMMIT_MESSAGE = true
18
+
19
+ DEFAULT_TYPES = {
20
+ "feat" => "A new feature",
21
+ "fix" => "A bug fix",
22
+ "chore" => "Build process changes",
23
+ "docs" => "Documentation only",
24
+ "style" => "Code style changes",
25
+ "refactor" => "Refactor code",
26
+ "test" => "Add or correct tests"
27
+ }.freeze
28
+
29
+ DEFAULT_SCOPES = {
30
+ "ruby" => "Ruby code",
31
+ "JS" => "JS code",
32
+ "db" => "Database migrations",
33
+ "api" => "API changes",
34
+ "jobs" => "Jobs changes",
35
+ "spec" => "Add or correct specs",
36
+ }.freeze
37
+
38
+ def self.load_config
39
+ config_path = File.join(Dir.pwd, "comito_config.yml")
40
+
41
+ if File.exist?(config_path)
42
+ config = YAML.load_file(config_path)
43
+
44
+ types = config["types"] || DEFAULT_TYPES
45
+ scopes = config["scopes"] || DEFAULT_SCOPES
46
+ msg_length =
47
+ config["message_length"] < DEFAULT_MESSAGE_LENGTH ? config["message_length"] : DEFAULT_MESSAGE_LENGTH
48
+ confirm_commit_message = config.fetch("confirm_commit_message", CONFIRM_COMMIT_MESSAGE)
49
+
50
+ [types, scopes, msg_length - 1, confirm_commit_message]
51
+ else
52
+ [DEFAULT_TYPES, DEFAULT_SCOPES, DEFAULT_MESSAGE_LENGTH, CONFIRM_COMMIT_MESSAGE]
53
+ end
54
+ end
55
+
56
+ def self.run
57
+ types, scopes, msg_length, confirn_commit_message = load_config
58
+
59
+ staged_files = `git diff --cached --name-only`.split("\n")
60
+
61
+ if staged_files.empty?
62
+ puts "#{RED}\nNo files staged for commit.\n#{RESET}"
63
+ return
64
+ end
65
+
66
+ CLI::UI::StdoutRouter.enable
67
+ type = nil
68
+
69
+ CLI::UI::Prompt.ask("#{YELLOW}Select commit type:#{RESET}") do |handler|
70
+ types.each do |type_key, type_desc|
71
+ handler.option("#{GREEN}#{type_key} — #{type_desc}#{RESET}") { type = type_key }
72
+ end
73
+ end
74
+
75
+ scope = nil
76
+
77
+ CLI::UI::Prompt.ask("#{YELLOW}Select scope:#{RESET}") do |handler|
78
+ scopes.each do |scope_key, scope_desc|
79
+ handler.option("#{GREEN}#{scope_key} — #{scope_desc}#{RESET}") { scope = scope_key }
80
+ end
81
+ end
82
+
83
+ print "#{YELLOW}Your commit message: #{RESET}"
84
+ message = gets.strip
85
+
86
+ commit_msg = "#{type}#{scope.to_s.empty? ? '' : "(#{scope})"}: #{message}"
87
+
88
+ if commit_msg.length > msg_length
89
+ puts "#{RED}\nError: Commit message exceeds #{msg_length} characters limit.\n#{RESET}"
90
+ puts "#{RED}\nYour full commit message: \n#{commit_msg}\n#{RESET}"
91
+ end
92
+
93
+ puts "#{YELLOW}\nFinal full commit message:#{RESET}"
94
+ puts "--------------------------------"
95
+ puts "\n#{BLUE}#{commit_msg[0..msg_length]}#{RESET}\n\n"
96
+ puts "--------------------------------"
97
+
98
+ confirm = true
99
+
100
+ if confirn_commit_message
101
+ CLI::UI::Prompt.ask("#{YELLOW}\nCommit with this message?#{RESET}") do |handler|
102
+ %w[yes no].each do |confirm_key, confirm_desc|
103
+ handler.option("#{GREEN}#{confirm_key}#{RESET}") { confirm = (confirm_key == 'yes') }
104
+ end
105
+ end
106
+ end
107
+
108
+ if confirm
109
+ system("git commit -m \"#{commit_msg}\"")
110
+ else
111
+ puts "#{RED}\nAborted.#{RESET}"
112
+ end
113
+ end
114
+ end
115
+ end
data/sig/comito.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module Comito
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,80 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: comito
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Dmytro
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2025-08-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: cli-ui
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.4'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.4'
27
+ description: |
28
+ Comito is a lightweight and easy-to-use Ruby CLI tool that provides an interactive interface for generating commit messages
29
+ following the Conventional Commits specification. It is designed primarily for Ruby and Rails developers who want to standardize
30
+ their commit history with minimal setup and dependencies. Comito guides users through selecting the commit type, optional scope,
31
+ and description, then formats the message correctly and optionally executes the git commit command. This helps teams maintain
32
+ a clean, consistent, and meaningful git history to improve collaboration, automate changelogs, and streamline release processes.
33
+ email:
34
+ - k-d-m@ukr.net
35
+ executables:
36
+ - comito
37
+ extensions: []
38
+ extra_rdoc_files: []
39
+ files:
40
+ - ".DS_Store"
41
+ - CHANGELOG.md
42
+ - Gemfile
43
+ - Gemfile.lock
44
+ - LICENSE
45
+ - README.md
46
+ - README_UA.md
47
+ - Rakefile
48
+ - comito.gemspec
49
+ - exe/comito
50
+ - lib/comito.rb
51
+ - lib/comito/version.rb
52
+ - sig/comito.rbs
53
+ homepage: https://github.com/DmytroKondratiuk/comito
54
+ licenses:
55
+ - Apache-2.0
56
+ metadata:
57
+ allowed_push_host: https://rubygems.org
58
+ homepage_uri: https://github.com/DmytroKondratiuk/comito
59
+ source_code_uri: https://github.com/DmytroKondratiuk/comito
60
+ changelog_uri: https://github.com/DmytroKondratiuk/comito/CHANGELOG.md
61
+ post_install_message:
62
+ rdoc_options: []
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: 2.6.0
70
+ required_rubygems_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ requirements: []
76
+ rubygems_version: 3.4.10
77
+ signing_key:
78
+ specification_version: 4
79
+ summary: Interactive CLI for generating Conventional Commits messages in Ruby projects.
80
+ test_files: []