utils 0.46.0 → 0.47.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c70230878e670eb2201ade57a3d70154ae068aa3b5aefa3719369666bc94bffd
4
- data.tar.gz: c318827db3a29b112459662eb776ba0fc623ec6e35025fdc8206ac74f4dcc9c8
3
+ metadata.gz: d0124d1fabcb7124f92daf86d2f5eadf0b4b7028ac3bf13c6c866856324c5f33
4
+ data.tar.gz: 30e3b9b5d50d23fc37bf824d3dcd011bdd9e5bbd263436f16cca18aced0fb271
5
5
  SHA512:
6
- metadata.gz: b50150d35c6c70132a78c390fbd6fc4433bd060dd5b249907481d977ccd7a4a8d379896beef8892e0b663bb467ee7354e923b2e63641bdc57c7544a651654d6e
7
- data.tar.gz: 3f4fd29351c28b694b07331f586d23ad0bee687ef0759454880e00e59a059bf2b230fea7986a8df08f36fe223b342d087df30c36ef6e2a82c5062aa2b0d00233
6
+ metadata.gz: 8c7e64ba2acc8e6d609d5f0ca5d3f7293baaa577aea9303493064662b1b376b34c6880fe57ea24d083c5ca96adfce031ef25f70ad941828c37c6886bc6e1a91a
7
+ data.tar.gz: a109c008631bcd14976ff48aa2a5b4fb0553d00abca7a875aeafd21f737e08d3498408043a732f8d0771e54a1e20af9029d1e9f2049c385e6a6a331800dcdcf2
data/Rakefile CHANGED
@@ -10,7 +10,8 @@ GemHadar do
10
10
  summary 'Some useful command line utilities'
11
11
  description 'This ruby gem provides some useful command line utilities'
12
12
  bindir 'bin'
13
- executables Dir['bin/*'].map(&File.method(:basename))
13
+ executables Dir['bin/*'].select { |e| File.new(e).readline =~ /ruby/ }.
14
+ map(&File.method(:basename))
14
15
  test_dir 'tests'
15
16
  ignore '.*.sw[pon]', 'pkg', 'Gemfile.lock', '.rvmrc', '.AppleDouble',
16
17
  'tags', '.bundle', '.DS_Store', '.byebug_history'
@@ -18,14 +19,15 @@ GemHadar do
18
19
  readme 'README.md'
19
20
  licenses << 'GPL-2.0'
20
21
 
21
- dependency 'tins', '~>1.14'
22
- dependency 'term-ansicolor', '~>1.3'
23
- dependency 'pstree', '~>0.3'
24
- dependency 'infobar'
25
- dependency 'mize'
26
- dependency 'search_ui'
27
22
  dependency 'drb'
28
- dependency 'all_images', '>=0.0.2'
23
+ dependency 'tins', '~> 1.14'
24
+ dependency 'term-ansicolor', '~> 1.3'
25
+ dependency 'pstree', '~> 0.3'
26
+ dependency 'infobar', '~> 0.8'
27
+ dependency 'mize', '~> 0.6'
28
+ dependency 'search_ui', '~> 0.0'
29
+ dependency 'all_images', '~> 0.5.0'
30
+ dependency 'ollama-ruby', '~> 0.3.0'
29
31
  development_dependency 'debug'
30
32
 
31
33
  install_library do
data/bin/changes ADDED
@@ -0,0 +1,157 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'ollama'
4
+ include Ollama
5
+ require 'tins'
6
+
7
+ def x(cmd)
8
+ output=`#{cmd}`
9
+ $?.success? or fail "failed to execute #{cmd.inspect}"
10
+ output
11
+ end
12
+
13
+ def find_highest_version_tag(filename)
14
+ File.open(filename, ?r) do |input|
15
+ tags = []
16
+ input.each do |line|
17
+ line.scan(/^## \d{4}-\d{2}-\d{2} v(\d+\.\d+\.\d+)$/) do
18
+ tags << $1
19
+ end
20
+ end
21
+ tags.map {
22
+ Tins::StringVersion::Version.new(_1)
23
+ }.max
24
+ end
25
+ end
26
+
27
+ def compute_change(range_from, range_to)
28
+ range_from = range_from.to_s.sub(/\Av?/, ?v)
29
+ range_to = range_to.to_s.sub(/\Av?/, ?v)
30
+ range = "#{range_from}..#{range_to}"
31
+
32
+ log=x("git log #{range}")
33
+ $?.success? or exit 1
34
+
35
+ date=x("git log -n1 --pretty='format:%cd' --date=short #{range_to}")
36
+
37
+ if log.strip.empty?
38
+ return <<~EOT
39
+
40
+ ## #{date} #{range_to}
41
+ EOT
42
+ end
43
+
44
+ base_url = ENV['OLLAMA_URL'] || 'http://%s' % ENV.fetch('OLLAMA_HOST')
45
+ model = ENV.fetch('OLLAMA_MODEL', 'llama3.1')
46
+
47
+ system = <<~EOT
48
+ You are a Ruby programmer generating a change log entry in markdown syntax,
49
+ summarizing the code changes for a new version in a professional way.
50
+ EOT
51
+
52
+ prompt = <<~EOT
53
+ - Summarize the changes in the following git log messages as bullet points.
54
+ - List significant changes as bullet points using markdown when applicable.
55
+ - Don't refer to single commits by sha1 hash.
56
+ - Don't add information about changes you are not sure about.
57
+ - Don't output any additional chatty remarks, notes, introductions,
58
+ communications.
59
+
60
+ #{log}
61
+ EOT
62
+
63
+ if ENV['DEBUG'].to_i == 1
64
+ STDERR.puts "system:\n#{system}"
65
+ STDERR.puts "prompt:\n#{prompt}"
66
+ end
67
+
68
+ options = Ollama::Options.new(
69
+ num_ctx: 8192,
70
+ num_predict: 1024,
71
+ temperature: 0,
72
+ #seed: 1337,
73
+ top_p: 1,
74
+ min_p: 0.1,
75
+ )
76
+
77
+ ollama = Client.new(base_url:, read_timeout: 120)
78
+ changes = ollama.generate(model:, system:, prompt:, options:, stream: false).response
79
+
80
+ return <<~EOT
81
+
82
+ ## #{date} #{range_to}
83
+
84
+ #{changes}
85
+ EOT
86
+ end
87
+
88
+ x("git fetch --tags")
89
+
90
+ case command = ARGV.shift
91
+ when 'range'
92
+ range = ARGV.shift
93
+ if range =~ /\A(.+)\.\.(.+)\z/
94
+ range_from, range_to = $1, $2
95
+ puts compute_change(range_from, range_to)
96
+ else
97
+ fail "need range of the form v1.2.3..v1.2.4"
98
+ end
99
+ when 'full', 'add'
100
+ ary = []
101
+ tags=x("git tag").lines.grep(/^v?\d+\.\d+\.\d+$/).map(&:chomp).map {
102
+ Tins::StringVersion::Version.new(_1.sub(/\Av/, ''))
103
+ }.sort
104
+ if command == 'full'
105
+ date=x("git log -n1 --pretty='format:%cd' --date=short v#{tags.first}").chomp
106
+ ary << <<~EOT
107
+
108
+ ## #{date} v#{tags.first}
109
+
110
+ * Start
111
+ EOT
112
+ tags.each_cons(2) do |range_from, range_to|
113
+ ary << compute_change(range_from, range_to)
114
+ end
115
+ ary.reverse!
116
+ ary.unshift <<~EOT
117
+ # Changes
118
+ EOT
119
+ puts ary
120
+ else
121
+ filename = ARGV.shift or fail 'need file to add to'
122
+ start_tag = find_highest_version_tag(filename)
123
+ tags = tags.drop_while { |t| t < start_tag }
124
+ ary = []
125
+ tags.each_cons(2) do |range_from, range_to|
126
+ ary << compute_change(range_from, range_to)
127
+ end
128
+ ary.empty? and exit
129
+ ary.reverse!
130
+ File.open(filename) do |input|
131
+ File.secure_write(filename) do |output|
132
+ start_add = nil
133
+ input.each do |line|
134
+ if start_add.nil? && line =~ /^# Changes$/
135
+ start_add = true
136
+ output.puts line
137
+ next
138
+ end
139
+ if start_add && line =~ /^$/
140
+ ary.each do |change|
141
+ STDERR.puts change
142
+ output.puts change
143
+ end
144
+ output.puts line
145
+ start_add = false
146
+ next
147
+ end
148
+ output.puts line
149
+ end
150
+ end
151
+ end
152
+ end
153
+ else
154
+ puts <<~end
155
+ Usage: #{File.basename($0)} help|range|full|add
156
+ end
157
+ end
data/bin/code_comment ADDED
@@ -0,0 +1,178 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'utils'
4
+ require 'ollama'
5
+ include Ollama
6
+
7
+ def fetch_method(filename_linenumber)
8
+ result = ''
9
+ source_location = filename_linenumber.source_location
10
+ lf = Tins::LinesFile.for_filename(source_location.filename, source_location.linenumber)
11
+ if spaces = lf.match_backward(/^(\s*)def\s+(?:\S+?)(?:\(|\s*$)/)&.first
12
+ line_number_begin = lf.line_number
13
+ lf.match_forward(/^#{spaces}end/)
14
+ line_number_end = lf.line_number
15
+ line_number_begin.upto(line_number_end) do |line_number|
16
+ lf.line_number = line_number
17
+ result << lf.line
18
+ end
19
+ end
20
+ result
21
+ end
22
+
23
+ def fetch_file(filename_linenumber)
24
+ source_location = filename_linenumber.source_location
25
+ File.read(source_location.filename)
26
+ end
27
+
28
+ filename_linenumber = ARGV.shift or fail "require file_name as second argument"
29
+ method = fetch_method(filename_linenumber)
30
+ #file = fetch_file(filename_linenumber)
31
+ files = Dir['{lib,spec,test}/**/*.rb']
32
+ base_url = ENV['OLLAMA_URL'] || 'http://%s' % ENV.fetch('OLLAMA_HOST')
33
+ model = ENV.fetch('OLLAMA_MODEL', 'llama3.1')
34
+ #file = File.read(file_name)
35
+ #call_sites = %x(cscope -L -3 "#{method_name}" $(find . -name '*.rb') | awk '{ print $1 ":" $3 }').lines.map(&:chomp).uniq
36
+ #methods = call_sites.map { fetch_method(_1) } * ?\n
37
+
38
+ cheatsheet = <<EOT
39
+ # YARD CHEATSHEET http://yardoc.org
40
+
41
+ ## May 2020 - updated fork: https://gist.github.com/phansch/db18a595d2f5f1ef16646af72fe1fb0e
42
+
43
+ cribbed from http://pastebin.com/xgzeAmBn
44
+
45
+ Templates to remind you of the options and formatting for the different types of objects you might
46
+ want to document using YARD.
47
+
48
+ ## Modules
49
+
50
+ # Namespace for classes and modules that handle serving documentation over HTTP
51
+
52
+ ## Classes
53
+
54
+ # Abstract base class for CLI utilities. Provides some helper methods for
55
+ # the option parser
56
+ #
57
+ # @author Full Name
58
+ # @abstract
59
+ # @attr [Types] attribute_name a full description of the attribute
60
+ # @attr_reader [Types] name description of a readonly attribute
61
+ # @attr_writer [Types] name description of writeonly attribute
62
+ # @deprecated Describe the reason or provide alt. references here
63
+
64
+ ## Methods
65
+
66
+ # An alias to {Parser::SourceParser}'s parsing method
67
+ #
68
+ # @author Donovan Bray
69
+ #
70
+ # @see http://example.com Description of URL
71
+ # @see SomeOtherClass#method
72
+ #
73
+ # @deprecated Use {#my_new_method} instead of this method because
74
+ # it uses a library that is no longer supported in Ruby 1.9.
75
+ # The new method accepts the same parameters.
76
+ #
77
+ # @abstract
78
+ # @private
79
+ #
80
+ # @param subject [String] The subject
81
+ # @param from [String] ('nobody') From address
82
+ # @param to [String] Recipient email
83
+ # @param body [String] ('') The email's body
84
+ #
85
+ # @param (see User#initialize)
86
+ # @param [OptionParser] opts the option parser object
87
+ # @param [Array<String>] args the arguments passed from input. This
88
+ # array will be modified.
89
+ # @param [Array<String, Symbol>] list the list of strings and symbols.
90
+ #
91
+ # The options parsed out of the commandline.
92
+ # Default options are:
93
+ # :format => :dot
94
+ #
95
+ # @example Reverse a string
96
+ # "mystring.reverse" #=> "gnirtsym"
97
+ #
98
+ # @example Parse a glob of files
99
+ # YARD.parse('lib/**/*.rb')
100
+ #
101
+ # @raise [ExceptionClass] description
102
+ #
103
+ # @return [optional, types, ...] description
104
+ # @return [true] always returns true
105
+ # @return [void]
106
+ # @return [String, nil] the contents of our object or nil
107
+ # if the object has not been filled with data.
108
+ #
109
+ # We don't care about the "type" here:
110
+ # @return the object
111
+ #
112
+ # @return [String, #read] a string or object that responds to #read
113
+ # @return description here with no types
114
+
115
+ ## Anywhere
116
+
117
+ # @todo Add support for Jabberwocky service
118
+ # There is an open source Jabberwocky library available
119
+ # at http://somesite.com that can be integrated easily
120
+ # into the project.
121
+
122
+ ## Blocks
123
+
124
+ # for block {|a, b, c| ... }
125
+ # @yield [a, b, c] Description of block
126
+ #
127
+ # @yieldparam [optional, types, ...] argname description
128
+ # @yieldreturn [optional, types, ...] description
129
+ EOT
130
+
131
+ system = <<EOT
132
+ You are a Ruby code commenter that writes succinct, simple ruby YARD comments.
133
+ EOT
134
+ system = nil
135
+
136
+ prompt = <<EOT
137
+ Analyze this code:
138
+
139
+ #{files.map { File.read(_1) } * ?\n}
140
+
141
+ Then output a succinct YARD comment for the method below.
142
+
143
+ Follow the following guidelines:
144
+ - Do not repeat the ruby method code.
145
+ - Do not use `, `ruby, ```, ```ruby in your response.
146
+ - Start each line of your comment with a single # character.
147
+
148
+ Here's a cheatsheet for YARD you can peek into:
149
+
150
+ #{cheatsheet}
151
+
152
+ And this is the method you should document:
153
+
154
+ #{method}
155
+ EOT
156
+
157
+ options = Ollama::Options.new(
158
+ #repeat_penalty: 1.8,
159
+ num_ctx: 8192,
160
+ num_predict: 512,
161
+ temperature: 0,
162
+ #repeat_last_n: -1,
163
+ ##seed: 1337,
164
+ top_p: 1,
165
+ min_p: 0.1,
166
+ )
167
+
168
+ if ENV['DEBUG'].to_i == 1
169
+ File.open('debug.log', ?w) do |log|
170
+ log.puts "system:\n#{system}"
171
+ log.puts "prompt:\n#{prompt}"
172
+ log.puts "filename_linenumber: #{filename_linenumber}"
173
+ log.puts JSON.pretty_generate(options)
174
+ end
175
+ end
176
+
177
+ ollama = Client.new(base_url:, read_timeout: 120)
178
+ ollama.generate(model:, system:, prompt:, options:, stream: false, &Print)
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ config =
4
+ if (xdg = ENV['XDG_CONFIG_HOME'].to_s.strip).size == 0
5
+ File.join(ENV.fetch('HOME'), '.config', 'commit_message')
6
+ else
7
+ File.join(xdg, 'commit_message')
8
+ end
9
+
10
+ exec 'ollama_cli', '-M', "#{config}/options.json",
11
+ '-s', "#{config}/system.txt", '-p', "#{config}/prompt.txt"
data/bin/sync_dir CHANGED
@@ -81,7 +81,7 @@ diff_dir.each_line do |line|
81
81
  system "vimdiff #{s.inspect} #{d.inspect}"
82
82
  when /\Aq/i
83
83
  exit
84
- else
84
+ else
85
85
  next
86
86
  end
87
87
  redo
data/lib/utils/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Utils
2
2
  # Utils version
3
- VERSION = '0.46.0'
3
+ VERSION = '0.47.0'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
data/utils.gemspec CHANGED
@@ -1,35 +1,36 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: utils 0.46.0 ruby lib
2
+ # stub: utils 0.47.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "utils".freeze
6
- s.version = "0.46.0".freeze
6
+ s.version = "0.47.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-08-20"
11
+ s.date = "2024-09-06"
12
12
  s.description = "This ruby gem provides some useful command line utilities".freeze
13
13
  s.email = "flori@ping.de".freeze
14
- s.executables = ["ascii7".freeze, "blameline".freeze, "check-yaml".freeze, "classify".freeze, "create_cstags".freeze, "create_tags".freeze, "discover".freeze, "edit".freeze, "edit_wait".freeze, "enum".freeze, "fix-brew".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]
14
+ s.executables = ["ascii7".freeze, "blameline".freeze, "changes".freeze, "check-yaml".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]
15
15
  s.extra_rdoc_files = ["README.md".freeze, "lib/utils.rb".freeze, "lib/utils/config_file.rb".freeze, "lib/utils/editor.rb".freeze, "lib/utils/file_xt.rb".freeze, "lib/utils/finder.rb".freeze, "lib/utils/grepper.rb".freeze, "lib/utils/irb.rb".freeze, "lib/utils/line_blamer.rb".freeze, "lib/utils/line_formatter.rb".freeze, "lib/utils/md5.rb".freeze, "lib/utils/patterns.rb".freeze, "lib/utils/probe_server.rb".freeze, "lib/utils/ssh_tunnel_specification.rb".freeze, "lib/utils/version.rb".freeze, "lib/utils/xt/source_location_extension.rb".freeze]
16
- s.files = [".github/dependabot.yml".freeze, ".github/workflows/codeql-analysis.yml".freeze, "COPYING".freeze, "Gemfile".freeze, "README.md".freeze, "Rakefile".freeze, "bin/ascii7".freeze, "bin/blameline".freeze, "bin/check-yaml".freeze, "bin/classify".freeze, "bin/create_cstags".freeze, "bin/create_tags".freeze, "bin/discover".freeze, "bin/edit".freeze, "bin/edit_wait".freeze, "bin/enum".freeze, "bin/fix-brew".freeze, "bin/git-empty".freeze, "bin/git-versions".freeze, "bin/json_check".freeze, "bin/long_lines".freeze, "bin/myex".freeze, "bin/number_files".freeze, "bin/on_change".freeze, "bin/path".freeze, "bin/print_method".freeze, "bin/probe".freeze, "bin/rd2md".freeze, "bin/search".freeze, "bin/sedit".freeze, "bin/serve".freeze, "bin/ssh-tunnel".freeze, "bin/strip_spaces".freeze, "bin/sync_dir".freeze, "bin/untest".freeze, "bin/utils-utilsrc".freeze, "bin/vcf2alias".freeze, "lib/utils.rb".freeze, "lib/utils/config_file.rb".freeze, "lib/utils/editor.rb".freeze, "lib/utils/file_xt.rb".freeze, "lib/utils/finder.rb".freeze, "lib/utils/grepper.rb".freeze, "lib/utils/irb.rb".freeze, "lib/utils/line_blamer.rb".freeze, "lib/utils/line_formatter.rb".freeze, "lib/utils/md5.rb".freeze, "lib/utils/patterns.rb".freeze, "lib/utils/probe_server.rb".freeze, "lib/utils/ssh_tunnel_specification.rb".freeze, "lib/utils/version.rb".freeze, "lib/utils/xt/source_location_extension.rb".freeze, "utils.gemspec".freeze]
16
+ s.files = [".github/dependabot.yml".freeze, ".github/workflows/codeql-analysis.yml".freeze, "COPYING".freeze, "Gemfile".freeze, "README.md".freeze, "Rakefile".freeze, "bin/ascii7".freeze, "bin/blameline".freeze, "bin/changes".freeze, "bin/check-yaml".freeze, "bin/classify".freeze, "bin/code_comment".freeze, "bin/commit_message".freeze, "bin/create_cstags".freeze, "bin/create_tags".freeze, "bin/discover".freeze, "bin/edit".freeze, "bin/edit_wait".freeze, "bin/enum".freeze, "bin/git-empty".freeze, "bin/git-versions".freeze, "bin/json_check".freeze, "bin/long_lines".freeze, "bin/myex".freeze, "bin/number_files".freeze, "bin/on_change".freeze, "bin/path".freeze, "bin/print_method".freeze, "bin/probe".freeze, "bin/rd2md".freeze, "bin/search".freeze, "bin/sedit".freeze, "bin/serve".freeze, "bin/ssh-tunnel".freeze, "bin/strip_spaces".freeze, "bin/sync_dir".freeze, "bin/untest".freeze, "bin/utils-utilsrc".freeze, "bin/vcf2alias".freeze, "lib/utils.rb".freeze, "lib/utils/config_file.rb".freeze, "lib/utils/editor.rb".freeze, "lib/utils/file_xt.rb".freeze, "lib/utils/finder.rb".freeze, "lib/utils/grepper.rb".freeze, "lib/utils/irb.rb".freeze, "lib/utils/line_blamer.rb".freeze, "lib/utils/line_formatter.rb".freeze, "lib/utils/md5.rb".freeze, "lib/utils/patterns.rb".freeze, "lib/utils/probe_server.rb".freeze, "lib/utils/ssh_tunnel_specification.rb".freeze, "lib/utils/version.rb".freeze, "lib/utils/xt/source_location_extension.rb".freeze, "utils.gemspec".freeze]
17
17
  s.homepage = "http://github.com/flori/utils".freeze
18
18
  s.licenses = ["GPL-2.0".freeze]
19
19
  s.rdoc_options = ["--title".freeze, "Utils - Some useful command line utilities".freeze, "--main".freeze, "README.md".freeze]
20
- s.rubygems_version = "3.5.16".freeze
20
+ s.rubygems_version = "3.5.18".freeze
21
21
  s.summary = "Some useful command line utilities".freeze
22
22
 
23
23
  s.specification_version = 4
24
24
 
25
- s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.16.1".freeze])
25
+ s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.17.0".freeze])
26
26
  s.add_development_dependency(%q<debug>.freeze, [">= 0".freeze])
27
+ s.add_runtime_dependency(%q<drb>.freeze, [">= 0".freeze])
27
28
  s.add_runtime_dependency(%q<tins>.freeze, ["~> 1.14".freeze])
28
29
  s.add_runtime_dependency(%q<term-ansicolor>.freeze, ["~> 1.3".freeze])
29
30
  s.add_runtime_dependency(%q<pstree>.freeze, ["~> 0.3".freeze])
30
- s.add_runtime_dependency(%q<infobar>.freeze, [">= 0".freeze])
31
- s.add_runtime_dependency(%q<mize>.freeze, [">= 0".freeze])
32
- s.add_runtime_dependency(%q<search_ui>.freeze, [">= 0".freeze])
33
- s.add_runtime_dependency(%q<drb>.freeze, [">= 0".freeze])
34
- s.add_runtime_dependency(%q<all_images>.freeze, [">= 0.0.2".freeze])
31
+ s.add_runtime_dependency(%q<infobar>.freeze, ["~> 0.8".freeze])
32
+ s.add_runtime_dependency(%q<mize>.freeze, ["~> 0.6".freeze])
33
+ s.add_runtime_dependency(%q<search_ui>.freeze, ["~> 0.0".freeze])
34
+ s.add_runtime_dependency(%q<all_images>.freeze, ["~> 0.5.0".freeze])
35
+ s.add_runtime_dependency(%q<ollama-ruby>.freeze, ["~> 0.3.0".freeze])
35
36
  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.46.0
4
+ version: 0.47.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-08-20 00:00:00.000000000 Z
11
+ date: 2024-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.16.1
19
+ version: 1.17.0
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.16.1
26
+ version: 1.17.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: drb
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: tins
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -84,86 +98,88 @@ dependencies:
84
98
  name: infobar
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
- - - ">="
101
+ - - "~>"
88
102
  - !ruby/object:Gem::Version
89
- version: '0'
103
+ version: '0.8'
90
104
  type: :runtime
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
- - - ">="
108
+ - - "~>"
95
109
  - !ruby/object:Gem::Version
96
- version: '0'
110
+ version: '0.8'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: mize
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
- - - ">="
115
+ - - "~>"
102
116
  - !ruby/object:Gem::Version
103
- version: '0'
117
+ version: '0.6'
104
118
  type: :runtime
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
- - - ">="
122
+ - - "~>"
109
123
  - !ruby/object:Gem::Version
110
- version: '0'
124
+ version: '0.6'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: search_ui
113
127
  requirement: !ruby/object:Gem::Requirement
114
128
  requirements:
115
- - - ">="
129
+ - - "~>"
116
130
  - !ruby/object:Gem::Version
117
- version: '0'
131
+ version: '0.0'
118
132
  type: :runtime
119
133
  prerelease: false
120
134
  version_requirements: !ruby/object:Gem::Requirement
121
135
  requirements:
122
- - - ">="
136
+ - - "~>"
123
137
  - !ruby/object:Gem::Version
124
- version: '0'
138
+ version: '0.0'
125
139
  - !ruby/object:Gem::Dependency
126
- name: drb
140
+ name: all_images
127
141
  requirement: !ruby/object:Gem::Requirement
128
142
  requirements:
129
- - - ">="
143
+ - - "~>"
130
144
  - !ruby/object:Gem::Version
131
- version: '0'
145
+ version: 0.5.0
132
146
  type: :runtime
133
147
  prerelease: false
134
148
  version_requirements: !ruby/object:Gem::Requirement
135
149
  requirements:
136
- - - ">="
150
+ - - "~>"
137
151
  - !ruby/object:Gem::Version
138
- version: '0'
152
+ version: 0.5.0
139
153
  - !ruby/object:Gem::Dependency
140
- name: all_images
154
+ name: ollama-ruby
141
155
  requirement: !ruby/object:Gem::Requirement
142
156
  requirements:
143
- - - ">="
157
+ - - "~>"
144
158
  - !ruby/object:Gem::Version
145
- version: 0.0.2
159
+ version: 0.3.0
146
160
  type: :runtime
147
161
  prerelease: false
148
162
  version_requirements: !ruby/object:Gem::Requirement
149
163
  requirements:
150
- - - ">="
164
+ - - "~>"
151
165
  - !ruby/object:Gem::Version
152
- version: 0.0.2
166
+ version: 0.3.0
153
167
  description: This ruby gem provides some useful command line utilities
154
168
  email: flori@ping.de
155
169
  executables:
156
170
  - ascii7
157
171
  - blameline
172
+ - changes
158
173
  - check-yaml
159
174
  - classify
175
+ - code_comment
176
+ - commit_message
160
177
  - create_cstags
161
178
  - create_tags
162
179
  - discover
163
180
  - edit
164
181
  - edit_wait
165
182
  - enum
166
- - fix-brew
167
183
  - git-empty
168
184
  - git-versions
169
185
  - json_check
@@ -211,15 +227,17 @@ files:
211
227
  - Rakefile
212
228
  - bin/ascii7
213
229
  - bin/blameline
230
+ - bin/changes
214
231
  - bin/check-yaml
215
232
  - bin/classify
233
+ - bin/code_comment
234
+ - bin/commit_message
216
235
  - bin/create_cstags
217
236
  - bin/create_tags
218
237
  - bin/discover
219
238
  - bin/edit
220
239
  - bin/edit_wait
221
240
  - bin/enum
222
- - bin/fix-brew
223
241
  - bin/git-empty
224
242
  - bin/git-versions
225
243
  - bin/json_check
@@ -279,7 +297,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
279
297
  - !ruby/object:Gem::Version
280
298
  version: '0'
281
299
  requirements: []
282
- rubygems_version: 3.5.16
300
+ rubygems_version: 3.5.18
283
301
  signing_key:
284
302
  specification_version: 4
285
303
  summary: Some useful command line utilities
data/bin/fix-brew DELETED
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- PREFIX=$(brew --prefix)
4
- sudo chgrp -R brew $PREFIX
5
- sudo chmod -R g+w $PREFIX