utils 0.57.0 → 0.58.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/changes +2 -1
- data/bin/git-md +14 -2
- data/lib/utils/version.rb +1 -1
- data/utils.gemspec +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e6752e1ca730c5f10c631266c8bfff9f7a0e2b0992441352e0e46f345f0fda9
|
4
|
+
data.tar.gz: 8b0b060dc91580dbfd025ea00542b2f0534d564b4aee6af31371732c48cbc562
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de648eaf2513ec70e337dcf16d0b4d9050027237806397f37cca4b8c8d4966b4a0dd35375f56f9cdb70c74a6ae1a4b4b5005d973db003f30797c08ffe4d68127
|
7
|
+
data.tar.gz: 64d54caa0581972f9b85ba81299283dd0e7d3f02ca7333bea539867f8519f2921b04bd2e0099a5799e6fec91044fca542d0546ba3c5b07b6357048a680785513
|
data/bin/changes
CHANGED
@@ -80,7 +80,8 @@ def compute_change(range_from, range_to)
|
|
80
80
|
)
|
81
81
|
|
82
82
|
ollama = Client.new(base_url:, read_timeout: 120)
|
83
|
-
changes = ollama.generate(model:, system:, prompt:, options:, stream: false)
|
83
|
+
changes = ollama.generate(model:, system:, prompt:, options:, stream: false)
|
84
|
+
changes = changes.response.gsub(/\t/, ' ')
|
84
85
|
|
85
86
|
return <<~EOT
|
86
87
|
|
data/bin/git-md
CHANGED
@@ -3,9 +3,11 @@
|
|
3
3
|
require 'utils/markdown'
|
4
4
|
include Utils::Markdown
|
5
5
|
require 'utils/pager'
|
6
|
+
require 'term/ansicolor'
|
7
|
+
include Term::ANSIColor
|
6
8
|
require 'shellwords'
|
7
9
|
|
8
|
-
cmd = %{git log --color=always --pretty=format:"commit %C(auto)%
|
10
|
+
cmd = %{git log --color=always --pretty=format:"commit %H%C(auto)%d%nDate: %Cgreen%cD (%cr)%Creset%nAuthor: %Cblue%an <%ae>%Creset%n%nMARKUP%n%s%n%n%b%nMARKDOWN%n"}
|
9
11
|
|
10
12
|
core_pager = `git config get core.pager`.chomp.full?
|
11
13
|
git_pager = ENV['GIT_PAGER'].full?
|
@@ -15,6 +17,14 @@ if fallback_pager = `which less`.chomp.full? || `which more`.chomp.full?
|
|
15
17
|
end
|
16
18
|
my_pager = git_pager || core_pager || default_pager || fallback_pager
|
17
19
|
|
20
|
+
repo_url = case git_origin_url = `git remote get-url origin`.chomp
|
21
|
+
when %r(\Ahttps://)
|
22
|
+
u = git_origin_url.sub(%r(\.git\z), '')
|
23
|
+
u << '/commit/'
|
24
|
+
when %r(\Agit@github.com:([^.]+))
|
25
|
+
"https://github.com/#$1/commit/"
|
26
|
+
end
|
27
|
+
|
18
28
|
Utils::Pager.pager(command: my_pager) do |output|
|
19
29
|
IO.popen("#{cmd} #{Shellwords.join(ARGV)}") do |log|
|
20
30
|
until log.eof?
|
@@ -30,7 +40,9 @@ Utils::Pager.pager(command: my_pager) do |output|
|
|
30
40
|
if message
|
31
41
|
message << line
|
32
42
|
else
|
33
|
-
output.puts line
|
43
|
+
output.puts line.sub(/(?<=^commit )(\h{40})/) {
|
44
|
+
yellow { repo_url ? hyperlink(repo_url + $1) { $1 } : $1 }
|
45
|
+
}
|
34
46
|
end
|
35
47
|
end
|
36
48
|
end
|
data/lib/utils/version.rb
CHANGED
data/utils.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: utils 0.
|
2
|
+
# stub: utils 0.58.0 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "utils".freeze
|
6
|
-
s.version = "0.
|
6
|
+
s.version = "0.58.0".freeze
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib".freeze]
|
10
10
|
s.authors = ["Florian Frank".freeze]
|
11
|
-
s.date = "2024-10-
|
11
|
+
s.date = "2024-10-04"
|
12
12
|
s.description = "This ruby gem provides some useful command line utilities".freeze
|
13
13
|
s.email = "flori@ping.de".freeze
|
14
14
|
s.executables = ["ascii7".freeze, "blameline".freeze, "changes".freeze, "classify".freeze, "code_comment".freeze, "commit_message".freeze, "create_cstags".freeze, "create_tags".freeze, "discover".freeze, "edit".freeze, "edit_wait".freeze, "enum".freeze, "git-empty".freeze, "git-md".freeze, "git-versions".freeze, "json_check".freeze, "long_lines".freeze, "md".freeze, "myex".freeze, "number_files".freeze, "on_change".freeze, "path".freeze, "print_method".freeze, "probe".freeze, "rd2md".freeze, "search".freeze, "sedit".freeze, "serve".freeze, "ssh-tunnel".freeze, "strip_spaces".freeze, "sync_dir".freeze, "untest".freeze, "utils-utilsrc".freeze, "vcf2alias".freeze, "yaml_check".freeze]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.58.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Frank
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_hadar
|