dorian-commit 1.2.2 → 2.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/commit +12 -10
  3. metadata +4 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd3989d815dc30d7c8be317196b03f406f33a4c59871f7e830ceb8f26e43fe22
4
- data.tar.gz: d344c2580d0f5ffe574d8244ae7dce288600d70b8c7c7cd71e778de59fb72c83
3
+ metadata.gz: b23f0737c2fedcbb330ef279891da6224367fe6f22f10595692042547367fb10
4
+ data.tar.gz: c37e23104b3762dd09a153ac72409aead2e9f8e4ba7477c99e787c6f00795cee
5
5
  SHA512:
6
- metadata.gz: 8a22e382afce1734e7a95d9980a683b9ee5eac08973e86c457dd208617a0eb5ead77f97b83ee1e1eb326026f0c17e16ca62f0d05e6818b084727e3bb67ee168e
7
- data.tar.gz: 545a400c21fdd34afbf5f5d181aa22e3af7ba9d8bc4486600a921f2f3fb35fb6a2248ab492239a2dbf0da6ad9e7aa585d7c6e58ba46b58896c32bf20ffb2f70f
6
+ metadata.gz: 7b55ef04517c46e0e25d4c2533edc8b162090f29649ead918b6828173d1f199f9f1f645c10acbb6baaa0f956ad57d50774630d8fd8d66f620d0a720742ae5f99
7
+ data.tar.gz: 3183907c6a5040330e01ba77db74cab23491c91b7c0fec2188ebaa94060f42e6dfd57365acd690855c4808fdf0b6d623ba060753680ff405fa011dc86fceb820
data/bin/commit CHANGED
@@ -10,15 +10,6 @@ require "uri"
10
10
 
11
11
  TOKEN_FILE = File.join(Dir.home, ".commit")
12
12
 
13
- if File.exist?(TOKEN_FILE)
14
- TOKEN = File.read(TOKEN_FILE).strip
15
- else
16
- print "token: "
17
- TOKEN = gets.strip
18
- File.write(TOKEN_FILE, TOKEN)
19
- puts "token written to #{TOKEN_FILE}"
20
- end
21
-
22
13
  PROMPT_1 = "simple, clear, short, lowercase commit message"
23
14
  PROMPT_2 = "for the following diff:"
24
15
  PROMPT_3 = "for the following git status:"
@@ -45,6 +36,17 @@ if parsed.options.version
45
36
  abort File.read(File.expand_path("../VERSION", __dir__))
46
37
  end
47
38
 
39
+ token =
40
+ if File.exist?(TOKEN_FILE)
41
+ File.read(TOKEN_FILE).strip
42
+ else
43
+ print "token: "
44
+ token = gets.strip
45
+ File.write(TOKEN_FILE, token)
46
+ puts "token written to #{TOKEN_FILE}"
47
+ token
48
+ end
49
+
48
50
  content_2 = `git diff --staged`
49
51
  content_3 = `git status`
50
52
  content_4 = parsed.arguments.join(" ")
@@ -89,7 +91,7 @@ request =
89
91
  uri.path,
90
92
  {
91
93
  "Content-Type" => "application/json",
92
- "Authorization" => "Bearer #{TOKEN}"
94
+ "Authorization" => "Bearer #{token}"
93
95
  }
94
96
  )
95
97
 
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dorian-commit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dorian Marié
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-09-05 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: dorian-arguments
@@ -65,7 +64,6 @@ licenses:
65
64
  - MIT
66
65
  metadata:
67
66
  rubygems_mfa_required: 'true'
68
- post_install_message:
69
67
  rdoc_options: []
70
68
  require_paths:
71
69
  - lib
@@ -73,15 +71,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
73
71
  requirements:
74
72
  - - ">="
75
73
  - !ruby/object:Gem::Version
76
- version: 3.3.0
74
+ version: '4.0'
77
75
  required_rubygems_version: !ruby/object:Gem::Requirement
78
76
  requirements:
79
77
  - - ">="
80
78
  - !ruby/object:Gem::Version
81
79
  version: '0'
82
80
  requirements: []
83
- rubygems_version: 3.5.16
84
- signing_key:
81
+ rubygems_version: 4.0.15
85
82
  specification_version: 4
86
83
  summary: commit with ai
87
84
  test_files: []