ollama-ruby 1.23.1 → 1.23.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f197227ddcc162704a67a9cc17c97fd2b79d5771a96f3ebf20b11439c2a74c76
4
- data.tar.gz: 0d7ce28a20d917d972091270e09a1000436788a5ad65ce9c9992c9e5e8539d52
3
+ metadata.gz: 163b2e37bf96ec7e20b8b9b30361a542ce0b2bfad43d7b9b357c613420c36e30
4
+ data.tar.gz: f1cd822c2a27b48306f27da6e6353c34f3b53189166324664bfa57074d62ae81
5
5
  SHA512:
6
- metadata.gz: 44315e4d097b7866b0fbbed812d950c8e40b0ede380223561716d0a9f223fd74407afa803f2df5ad43f64cf3f620a8adabb0e4ba506518601036e78a0f1c194b
7
- data.tar.gz: b35bd622e71e8d6f79909c46c09a71792d8dac7cc37286de7b39049422f9e9fbca835d3f8e654926afc7ff84df628129a67bf63492953c49b55b735907a58915
6
+ metadata.gz: '048e08544b9121414edcd3f3032de8fa92a8cefa38748a013eee245eca72c6ccd4099352bf230195ce15ff6471fd5fb92a20e0104642bd336f506605bd190266'
7
+ data.tar.gz: ee05641dee1d22758614a4c76c9ae92ab0930ee8cdff0a31f76dba594b40e5c84b42af7939fee381e4847a8432d0e7c55c80df75cfd23c39907d10e41dfa5384
data/CHANGES.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-08-12 v1.23.2
4
+
5
+ - Optimized terminal rendering in `bin/ollama_ps` polling loop by replacing
6
+ `clear_screen` with `move_home` and `erase_in_display(nil)` to prevent tmux
7
+ flicker.
8
+ - Applied the same terminal clearing fix to streaming mode in
9
+ `lib/ollama/handlers/markdown.rb`.
10
+ - Updated `gem_hadar` development dependency to **>= 2.18.0**.
11
+
3
12
  ## 2026-07-23 v1.23.1
4
13
 
5
14
  - Update `tins` gem dependency to **~> 1.55** in `Rakefile` and
data/bin/ollama_ps CHANGED
@@ -190,6 +190,8 @@ def ps_table(models)
190
190
  puts table
191
191
  end
192
192
 
193
+ c = Term::ANSIColor
194
+
193
195
  opts = go 'f:i:h'
194
196
 
195
197
  opts[?h] and usage
@@ -204,7 +206,7 @@ when 'yaml'
204
206
  else
205
207
  duration = opts[?i].to_i.clamp(0..)
206
208
  begin
207
- print Term::ANSIColor.clear_screen, Term::ANSIColor.move_home if duration > 0
209
+ print c.move_home, c.erase_in_display(nil) if duration > 0
208
210
  if models = fetch_ps_models.full?
209
211
  ps_table(interpret_models(models))
210
212
  end
@@ -45,7 +45,7 @@ class Ollama::Handlers::Markdown
45
45
  if @stream
46
46
  @content << content
47
47
  markdown_content = Kramdown::ANSI.parse(@content)
48
- @output.print clear_screen, move_home, markdown_content
48
+ @output.print move_home, erase_in_display(nil), markdown_content
49
49
  else
50
50
  markdown_content = Kramdown::ANSI.parse(content)
51
51
  @output.print markdown_content
@@ -1,6 +1,6 @@
1
1
  module Ollama
2
2
  # Ollama version
3
- VERSION = '1.23.1'
3
+ VERSION = '1.23.2'
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/ollama-ruby.gemspec CHANGED
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: ollama-ruby 1.23.1 ruby lib
2
+ # stub: ollama-ruby 1.23.2 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "ollama-ruby".freeze
6
- s.version = "1.23.1".freeze
6
+ s.version = "1.23.2".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]
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24
24
 
25
25
  s.specification_version = 4
26
26
 
27
- s.add_development_dependency(%q<gem_hadar>.freeze, [">= 2.17.1".freeze])
27
+ s.add_development_dependency(%q<gem_hadar>.freeze, [">= 2.18.0".freeze])
28
28
  s.add_development_dependency(%q<all_images>.freeze, ["~> 0.12".freeze])
29
29
  s.add_development_dependency(%q<rspec>.freeze, ["~> 3.2".freeze])
30
30
  s.add_development_dependency(%q<kramdown>.freeze, ["~> 2.0".freeze])
@@ -22,7 +22,7 @@ describe Ollama::Handlers::Markdown do
22
22
 
23
23
  it 'can markdown response as markdown' do
24
24
  output = double('output', :sync= => true)
25
- expect(output).to receive(:print).with("\e[2J", "\e[1;1H", ansi)
25
+ expect(output).to receive(:print).with("\e[1;1H", "\e[J", ansi)
26
26
  markdown = described_class.new(output:)
27
27
  response = double('response', response: md, done: false)
28
28
  markdown.call(response)
@@ -32,7 +32,7 @@ describe Ollama::Handlers::Markdown do
32
32
 
33
33
  it 'can markdown message content as markdown' do
34
34
  output = double('output', :sync= => true)
35
- expect(output).to receive(:print).with("\e[2J", "\e[1;1H", ansi)
35
+ expect(output).to receive(:print).with("\e[1;1H", "\e[J", ansi)
36
36
  markdown = described_class.new(output:)
37
37
  response = double('response', response: nil, message: double(content: md), done: false)
38
38
  markdown.call(response)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ollama-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.23.1
4
+ version: 1.23.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: 2.17.1
18
+ version: 2.18.0
19
19
  type: :development
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
- version: 2.17.1
25
+ version: 2.18.0
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: all_images
28
28
  requirement: !ruby/object:Gem::Requirement