utils 0.91.1 → 0.92.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/lib/utils/irb/shell.rb +3 -3
- data/lib/utils/line_formatter.rb +17 -4
- 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: e463ff924e67f19010624b289785351548ff5a2936b2313364746db6cda78ab1
|
|
4
|
+
data.tar.gz: 108ecbd19c3181d3ec171c9b299c0c6cbdecce2ca7dc74c6e79b628fd0817d99
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e15ee8452f37913150ec92fef8b34713eacf1fd711f05b103a53d5f95b703dcc66ab6e0e33d0d2adaef2025f9dd9addade2d56b4e146e25190d3f0704f130f5f
|
|
7
|
+
data.tar.gz: b190a70da86e9fa3f79f6d46a6fbe846f06151d201108519712da7f910081d188a3cdb5aa759176e7a70fbcce305bf61e5452693eff31c73abe334c459753b14
|
data/lib/utils/irb/shell.rb
CHANGED
|
@@ -67,8 +67,8 @@ module Utils::IRB::Shell
|
|
|
67
67
|
ri(*patterns, doc: 'yri')
|
|
68
68
|
end
|
|
69
69
|
|
|
70
|
-
# The
|
|
71
|
-
#
|
|
70
|
+
# The ocs method interacts with an Ollama chat service to process queries and
|
|
71
|
+
# optionally return responses.
|
|
72
72
|
#
|
|
73
73
|
# This method constructs command-line arguments for the ollama_chat_send
|
|
74
74
|
# utility based on the provided options, executes the command with the
|
|
@@ -85,7 +85,7 @@ module Utils::IRB::Shell
|
|
|
85
85
|
#
|
|
86
86
|
# @return [ String, nil ] the response from the Ollama chat service if
|
|
87
87
|
# respond is true, otherwise nil
|
|
88
|
-
def
|
|
88
|
+
def ocs(query, command: false, respond: false, parse: false, dir: ?.)
|
|
89
89
|
dir = File.expand_path(dir)
|
|
90
90
|
args = {
|
|
91
91
|
?r => respond,
|
data/lib/utils/line_formatter.rb
CHANGED
|
@@ -258,7 +258,7 @@ else
|
|
|
258
258
|
# full description or abbreviated version
|
|
259
259
|
#
|
|
260
260
|
# @return [ String ] the appropriate description based on the full parameter value
|
|
261
|
-
def description(example, full:
|
|
261
|
+
def description(example, full: true)
|
|
262
262
|
if full
|
|
263
263
|
example.example.full_description
|
|
264
264
|
else
|
|
@@ -296,9 +296,22 @@ else
|
|
|
296
296
|
failed: ?❌,
|
|
297
297
|
pending: ?⏩
|
|
298
298
|
)
|
|
299
|
-
|
|
300
|
-
uncolored
|
|
301
|
-
|
|
299
|
+
description = self.description(example)
|
|
300
|
+
uncolored = nil
|
|
301
|
+
cols = Tins::Terminal.columns - 1
|
|
302
|
+
redone = false
|
|
303
|
+
1.times do
|
|
304
|
+
args = [ status_emoji[status], location(example), run_time(example), description ]
|
|
305
|
+
uncolored = "%s %s # %3.3fs %s" % args
|
|
306
|
+
if !redone && uncolored.size > cols
|
|
307
|
+
description = self.description(example, full: false)
|
|
308
|
+
redone = true
|
|
309
|
+
redo
|
|
310
|
+
else
|
|
311
|
+
break
|
|
312
|
+
end
|
|
313
|
+
end
|
|
314
|
+
uncolored = uncolored[0, cols]
|
|
302
315
|
case status
|
|
303
316
|
when :passed
|
|
304
317
|
success_color(uncolored)
|
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.92.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.92.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]
|