ollama_chat 0.0.31 → 0.0.32
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/CHANGES.md +6 -0
- data/lib/ollama_chat/source_fetching.rb +8 -4
- data/lib/ollama_chat/version.rb +1 -1
- data/ollama_chat.gemspec +2 -2
- data/spec/ollama_chat/source_fetching_spec.rb +3 -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: cb31e7c6931a74314a918fa3f94838bccb89e2c7abd81c04632132998ed22f4b
|
4
|
+
data.tar.gz: e75bd24632b7c7ef65e1d316802db5a919a7c4e401941e1b080e15bfea208618
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c722b060b9e8c3e4e2de8cb3eca4656a75cc4eb063cc710350b27529d5b4449f58b75cf0f19cf6842019e0fe261ef0eda6af09e8ed8428458d01d2824315c3c
|
7
|
+
data.tar.gz: 28c6966b8e3d663935f8cc5ddfe572df73c3d8471bb51168734c98641099c983e59859b44f576d3e92b80ca2277633d9ce7d00ac37cd464c087cf77104942368
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changes
|
2
2
|
|
3
|
+
## 2025-09-15 v0.0.32
|
4
|
+
|
5
|
+
- Fixed file path parsing for escaped spaces and URI handling
|
6
|
+
- Updated regex pattern for relative paths to better handle `\ ` escaped spaces
|
7
|
+
- Added explicit unescaping of spaces in test case for `./spec/assets/file\ with\ spaces.html`
|
8
|
+
|
3
9
|
## 2025-09-15 v0.0.31
|
4
10
|
|
5
11
|
- Added new test asset file `"spec/assets/example with \".html"` as
|
@@ -71,16 +71,20 @@ module OllamaChat::SourceFetching
|
|
71
71
|
block.(tmp)
|
72
72
|
end
|
73
73
|
when %r{\Afile://([^\s#]+)}
|
74
|
-
filename =
|
74
|
+
filename = $1
|
75
|
+
filename = URI.decode_www_form_component(filename)
|
75
76
|
filename = File.expand_path(filename)
|
76
77
|
check_exist && !File.exist?(filename) and return
|
77
78
|
fetch_source_as_filename(filename, &block)
|
78
|
-
when %r{\A((?:\.\.|[~.]?)/(
|
79
|
-
filename =
|
79
|
+
when %r{\A((?:\.\.|[~.]?)/(?:\\ |\\|[^\\]+)*)}
|
80
|
+
filename = $1
|
81
|
+
filename = filename.gsub('\ ', ' ')
|
82
|
+
filename = File.expand_path(filename)
|
80
83
|
check_exist && !File.exist?(filename) and return
|
81
84
|
fetch_source_as_filename(filename, &block)
|
82
85
|
when %r{\A"((?:\.\.|[~.]?)/(?:\\"|\\|[^"\\]+)+)"}
|
83
|
-
filename = $1
|
86
|
+
filename = $1
|
87
|
+
filename = filename.gsub('\"', ?")
|
84
88
|
filename = File.expand_path(filename)
|
85
89
|
check_exist && !File.exist?(filename) and return
|
86
90
|
fetch_source_as_filename(filename, &block)
|
data/lib/ollama_chat/version.rb
CHANGED
data/ollama_chat.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: ollama_chat 0.0.
|
2
|
+
# stub: ollama_chat 0.0.32 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "ollama_chat".freeze
|
6
|
-
s.version = "0.0.
|
6
|
+
s.version = "0.0.32".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]
|
@@ -47,9 +47,10 @@ describe OllamaChat::SourceFetching do
|
|
47
47
|
end
|
48
48
|
|
49
49
|
it 'can handle files with \\ escaped spaces' do
|
50
|
-
source
|
50
|
+
source = './spec/assets/file\ with\ spaces.html'
|
51
|
+
unescaped = source.gsub('\ ', ' ')
|
51
52
|
expect(chat).to receive(:fetch_source_as_filename).
|
52
|
-
with(File.expand_path(
|
53
|
+
with(File.expand_path(unescaped))
|
53
54
|
chat.fetch_source(source)
|
54
55
|
end
|
55
56
|
|