utils 0.71.0 → 0.72.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/bin/code_comment +23 -16
- data/lib/utils/version.rb +1 -1
- data/utils.gemspec +2 -2
- 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: '0669343d477b3b469c0856cf988d9526677ba181ef5d8786b7291fb8ec21da46'
|
4
|
+
data.tar.gz: cc6c96962eb22d3f6469aaa93bf092ebbddfc7ba7f30afb42e277b3c2cd142c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c88255d58409d2f1b6cd881d4d9164e6ab8ce7c3d6b6e52b8160e5d9cdfac5ba2a3a2a5f70ba1821c20a41b620e2249a4412bb36b3659b61ca0b407fc57ab8f
|
7
|
+
data.tar.gz: b805d2d08627a97127ff115e75a990384866c473695fc26178367e60b1f2b030947d5ae247f5fbcf809d4ccc2cc149b5339937fa534b33c48fabb42b55046d3d
|
data/bin/code_comment
CHANGED
@@ -176,23 +176,30 @@ base_url = ENV['OLLAMA_URL'] || 'http://%s' % ENV.fetch('OLLAMA_HOST'
|
|
176
176
|
model = ENV.fetch('OLLAMA_MODEL', 'llama3.1')
|
177
177
|
construct, construct_type = fetch_construct(filename_linenumber)
|
178
178
|
construct_indent = construct[/\A( *)/, 1].size
|
179
|
-
|
180
|
-
|
179
|
+
context_filename = ENV.fetch(
|
180
|
+
'CODE_COMMENT_CONTEXT_FILENAME', '.contexts/code_comment.rb'
|
181
|
+
)
|
182
|
+
|
183
|
+
default_context = ContextSpook.generate_context do
|
184
|
+
context do
|
185
|
+
file "README.md", tags: %w[ documentation ]
|
186
|
+
|
187
|
+
# Auto-discover files using globs
|
188
|
+
%w[ lib spec test ].each do |dir|
|
189
|
+
namespace dir do
|
190
|
+
Dir["#{dir}/**/*.rb"].each do |filename|
|
191
|
+
file filename, tags: %w[ ruby ]
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|
197
|
+
context = if File.exist?(context_filename)
|
198
|
+
STDERR.puts "Using context from #{context_filename.inspect}."
|
199
|
+
ContextSpook.generate_context(context_filename)
|
181
200
|
else
|
182
|
-
|
183
|
-
|
184
|
-
file "README.md", tags: %w[ documentation ]
|
185
|
-
|
186
|
-
# Auto-discover files using globs
|
187
|
-
%w[ lib spec test ].each do |dir|
|
188
|
-
namespace dir do
|
189
|
-
Dir["#{dir}/**/*.rb"].each do |filename|
|
190
|
-
file filename, tags: %w[ ruby ]
|
191
|
-
end
|
192
|
-
end
|
193
|
-
end
|
194
|
-
end
|
195
|
-
end
|
201
|
+
STDERR.puts "Using inline default context."
|
202
|
+
default_context
|
196
203
|
end.to_json
|
197
204
|
#call_sites = %x(cscope -L -3 "#{method_name}" $(find . -name '*.rb') | awk '{ print $1 ":" $3 }').lines.map(&:chomp).uniq
|
198
205
|
#methods = call_sites.map { fetch_method(_1) } * ?\n
|
data/lib/utils/version.rb
CHANGED
data/utils.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: utils 0.
|
2
|
+
# stub: utils 0.72.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.72.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]
|