utils 0.49.1 → 0.51.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +12 -11
- data/bin/changes +30 -5
- data/bin/discover +4 -2
- data/lib/utils/version.rb +1 -1
- data/utils.gemspec +5 -4
- metadata +30 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e185acac664741314fb5a1f58266668dbb52aa2658d1ded38fd81c28de31871
|
4
|
+
data.tar.gz: 45275a54c3ae135e6414093aeb3b954b5bcc2eb5bfcfe34aecbb624a8d7c79a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f10fced5595d91ec7f9dd873cfb94634f13e1871c428a7ea8f25e63ea71e054946600aa042e1a2739e99a57bee6d2cae79b3cb4e9f2722aa788e0b7c6c695123
|
7
|
+
data.tar.gz: c5f1327f9b910cfe137835356c7e42736e88c01348861a3962e333519040b7783fd01672473ac697f4e43ea612fba539b6db85df501474f51999496056acae3a
|
data/Rakefile
CHANGED
@@ -19,17 +19,18 @@ GemHadar do
|
|
19
19
|
readme 'README.md'
|
20
20
|
licenses << 'GPL-2.0'
|
21
21
|
|
22
|
-
dependency
|
23
|
-
dependency
|
24
|
-
dependency
|
25
|
-
dependency
|
26
|
-
dependency
|
27
|
-
dependency
|
28
|
-
dependency
|
29
|
-
dependency
|
30
|
-
dependency
|
31
|
-
dependency
|
32
|
-
|
22
|
+
dependency 'drb'
|
23
|
+
dependency 'webrick'
|
24
|
+
dependency 'tins', '~> 1.14'
|
25
|
+
dependency 'term-ansicolor', '~> 1.3'
|
26
|
+
dependency 'pstree', '~> 0.3'
|
27
|
+
dependency 'infobar', '~> 0.8'
|
28
|
+
dependency 'mize', '~> 0.6'
|
29
|
+
dependency 'search_ui', '~> 0.0'
|
30
|
+
dependency 'all_images', '~> 0.5.0'
|
31
|
+
dependency 'ollama-ruby', '~> 0.3.0'
|
32
|
+
dependency 'simplecov'
|
33
|
+
dependency 'debug'
|
33
34
|
|
34
35
|
install_library do
|
35
36
|
libdir = CONFIG["sitelibdir"]
|
data/bin/changes
CHANGED
@@ -26,8 +26,12 @@ end
|
|
26
26
|
|
27
27
|
def compute_change(range_from, range_to)
|
28
28
|
range_from = range_from.to_s.sub(/\Av?/, ?v)
|
29
|
-
|
30
|
-
|
29
|
+
if range_to.to_s == 'HEAD'
|
30
|
+
range = "#{range_from}..HEAD"
|
31
|
+
else
|
32
|
+
range_to = range_to.to_s.sub(/\Av?/, ?v)
|
33
|
+
range = "#{range_from}..#{range_to}"
|
34
|
+
end
|
31
35
|
|
32
36
|
log=x("git log #{range}")
|
33
37
|
$?.success? or exit 1
|
@@ -52,10 +56,13 @@ def compute_change(range_from, range_to)
|
|
52
56
|
prompt = <<~EOT
|
53
57
|
- Summarize the changes in the following git log messages as bullet points.
|
54
58
|
- List significant changes as bullet points using markdown when applicable.
|
59
|
+
- Mark all names and values for variables, methods, functions, and
|
60
|
+
constants, you see in the messages as markdown `code`.
|
61
|
+
- Mark all version numbers you see in the messages as markdown **bold**.
|
55
62
|
- Don't refer to single commits by sha1 hash.
|
56
63
|
- Don't add information about changes you are not sure about.
|
57
64
|
- Don't output any additional chatty remarks, notes, introductions,
|
58
|
-
communications.
|
65
|
+
communications, etc.
|
59
66
|
|
60
67
|
#{log}
|
61
68
|
EOT
|
@@ -88,6 +95,24 @@ end
|
|
88
95
|
x("git fetch --tags")
|
89
96
|
|
90
97
|
case command = ARGV.shift
|
98
|
+
when 'pending'
|
99
|
+
last_version = x("git tag").lines.grep(/^v?\d+\.\d+\.\d+$/).map(&:chomp).map {
|
100
|
+
Tins::StringVersion::Version.new(_1.sub(/\Av/, ''))
|
101
|
+
}.max
|
102
|
+
if last_version
|
103
|
+
puts compute_change(last_version, :HEAD)
|
104
|
+
else
|
105
|
+
fail 'need at least one version tag to work'
|
106
|
+
end
|
107
|
+
when 'current'
|
108
|
+
version1, version2 = x("git tag").lines.grep(/^v?\d+\.\d+\.\d+$/).map(&:chomp).map {
|
109
|
+
Tins::StringVersion::Version.new(_1.sub(/\Av/, ''))
|
110
|
+
}.sort.last(2)
|
111
|
+
if version1 and version2
|
112
|
+
puts compute_change(version1, version2)
|
113
|
+
else
|
114
|
+
fail 'need at least two version tags to work'
|
115
|
+
end
|
91
116
|
when 'range'
|
92
117
|
range = ARGV.shift
|
93
118
|
if range =~ /\A(.+)\.\.(.+)\z/
|
@@ -98,7 +123,7 @@ when 'range'
|
|
98
123
|
end
|
99
124
|
when 'full', 'add'
|
100
125
|
ary = []
|
101
|
-
tags=x("git tag").lines.grep(/^v?\d+\.\d+\.\d+$/).map(&:chomp).map {
|
126
|
+
tags = x("git tag").lines.grep(/^v?\d+\.\d+\.\d+$/).map(&:chomp).map {
|
102
127
|
Tins::StringVersion::Version.new(_1.sub(/\Av/, ''))
|
103
128
|
}.sort
|
104
129
|
if command == 'full'
|
@@ -152,6 +177,6 @@ when 'full', 'add'
|
|
152
177
|
end
|
153
178
|
else
|
154
179
|
puts <<~end
|
155
|
-
Usage: #{File.basename($0)} help|range|full|add
|
180
|
+
Usage: #{File.basename($0)} help|range|full|add|pending
|
156
181
|
end
|
157
182
|
end
|
data/bin/discover
CHANGED
@@ -53,7 +53,7 @@ Version is #{File.basename($0)} #{Utils::VERSION}.
|
|
53
53
|
exit 1
|
54
54
|
end
|
55
55
|
|
56
|
-
args = go 'n:I:i:a:p:
|
56
|
+
args = go 'n:I:i:a:p:lcreEvdsDh', defaults: { ?a => '\\w' }
|
57
57
|
args[?h] and usage
|
58
58
|
|
59
59
|
Term::ANSIColor.coloring = (STDIN.tty? && ENV['TERM'] !~ /dumb/) && !args[?c]
|
@@ -61,7 +61,7 @@ STDOUT.sync = true
|
|
61
61
|
config = Utils::ConfigFile.new
|
62
62
|
config.configure_from_paths
|
63
63
|
args[?b] ||= config.discover.binary
|
64
|
-
args[?n] ||= config.discover.max_matches
|
64
|
+
args[?n] ||= args[?l] ? 1 << 60 : config.discover.max_matches
|
65
65
|
|
66
66
|
if args[?s]
|
67
67
|
pattern = ''
|
@@ -111,6 +111,8 @@ search = -> * {
|
|
111
111
|
}
|
112
112
|
|
113
113
|
case
|
114
|
+
when args[?l]
|
115
|
+
puts finder.().search_index.output
|
114
116
|
when args[?s]
|
115
117
|
search.()
|
116
118
|
when args[?E]
|
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.51.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.51.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-09-
|
11
|
+
s.date = "2024-09-22"
|
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-versions".freeze, "json_check".freeze, "long_lines".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]
|
@@ -23,7 +23,6 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.specification_version = 4
|
24
24
|
|
25
25
|
s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.17.1".freeze])
|
26
|
-
s.add_development_dependency(%q<debug>.freeze, [">= 0".freeze])
|
27
26
|
s.add_runtime_dependency(%q<drb>.freeze, [">= 0".freeze])
|
28
27
|
s.add_runtime_dependency(%q<webrick>.freeze, [">= 0".freeze])
|
29
28
|
s.add_runtime_dependency(%q<tins>.freeze, ["~> 1.14".freeze])
|
@@ -34,4 +33,6 @@ Gem::Specification.new do |s|
|
|
34
33
|
s.add_runtime_dependency(%q<search_ui>.freeze, ["~> 0.0".freeze])
|
35
34
|
s.add_runtime_dependency(%q<all_images>.freeze, ["~> 0.5.0".freeze])
|
36
35
|
s.add_runtime_dependency(%q<ollama-ruby>.freeze, ["~> 0.3.0".freeze])
|
36
|
+
s.add_runtime_dependency(%q<simplecov>.freeze, [">= 0".freeze])
|
37
|
+
s.add_runtime_dependency(%q<debug>.freeze, [">= 0".freeze])
|
37
38
|
end
|
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.51.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-09-
|
11
|
+
date: 2024-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_hadar
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.17.1
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: debug
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: drb
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -178,6 +164,34 @@ dependencies:
|
|
178
164
|
- - "~>"
|
179
165
|
- !ruby/object:Gem::Version
|
180
166
|
version: 0.3.0
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: simplecov
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :runtime
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: debug
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :runtime
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
181
195
|
description: This ruby gem provides some useful command line utilities
|
182
196
|
email: flori@ping.de
|
183
197
|
executables:
|