jeeves-git-commit 2.4.2 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/jeeves/version.rb +1 -1
- data/lib/jeeves.rb +16 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61da8e275a8df7260004e3b246fb4f4d33f23cc59412fe112a674929c10a4411
|
4
|
+
data.tar.gz: 22c702ed46e03b77068693e3d0418aca2361736e54b1571e8a44ecb1d6371149
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e160482997643783ec6ecf7402f4d005ece27b989b09ca1674cf9c45af111cb997a2b47dea42da736158d6ef048c5ed194924dfc2f981d26ec26710ff8711030
|
7
|
+
data.tar.gz: '079e247723887f5677eafbe455d87a600362fcefe69adc9f40410b77b8b7b411bc11815b3439429ee837978d70e207a8ed12e04b230a7b9d74771820ab6adf69'
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
<img src="assets/jeeves.png" alt="Jeeves Logo" width="200">
|
5
5
|
</p>
|
6
6
|
|
7
|
-
Jeeves is a command-line tool that creates AI-powered Git commit messages that
|
7
|
+
Jeeves is a command-line tool that creates AI-powered Git commit messages that savagely roasts you and your code.
|
8
8
|
|
9
9
|
## Features
|
10
10
|
|
data/lib/jeeves/version.rb
CHANGED
data/lib/jeeves.rb
CHANGED
@@ -13,7 +13,8 @@ module Jeeves
|
|
13
13
|
def initialize
|
14
14
|
@options = {
|
15
15
|
all: false,
|
16
|
-
push: false
|
16
|
+
push: false,
|
17
|
+
dry_run: false
|
17
18
|
}
|
18
19
|
setup_config_dir
|
19
20
|
end
|
@@ -33,6 +34,10 @@ module Jeeves
|
|
33
34
|
@options[:push] = true
|
34
35
|
end
|
35
36
|
|
37
|
+
opts.on('-d', '--dry-run', 'Generate commit message without committing') do
|
38
|
+
@options[:dry_run] = true
|
39
|
+
end
|
40
|
+
|
36
41
|
opts.on('-h', '--help', 'Show this help message') do
|
37
42
|
puts opts
|
38
43
|
exit
|
@@ -58,6 +63,16 @@ module Jeeves
|
|
58
63
|
# Get AI-generated commit message
|
59
64
|
commit_message = generate_commit_message(diff)
|
60
65
|
|
66
|
+
# If dry-run mode, just output the message and exit
|
67
|
+
if @options[:dry_run]
|
68
|
+
puts "\nDry-run mode: Commit message would be:"
|
69
|
+
puts "============================================"
|
70
|
+
puts commit_message
|
71
|
+
puts "============================================"
|
72
|
+
puts "No commit was created (dry-run mode)"
|
73
|
+
return
|
74
|
+
end
|
75
|
+
|
61
76
|
# Write commit message to temp file for git to use
|
62
77
|
temp_file = File.join(Dir.tmpdir, 'jeeves_commit_message')
|
63
78
|
File.write(temp_file, commit_message)
|