foobara-ollama-api 1.0.2 → 1.0.3

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: 0ec52676f41eda20a6206276c24264772dc9c67fd5603269d63caa3c2d662a81
4
- data.tar.gz: 9b9e9d6038bc81893ac94f99f7bb2672bb2a87dfa5297245c55369dbea59b96a
3
+ metadata.gz: a91664d0f4090dfb6de94d3416e7f56c422350b3ec1a351baecdfaba4400ca75
4
+ data.tar.gz: 49fb43a66cbd91d79cc7dbb6701cb18920b07804d6a49c4083e0a81642278ee3
5
5
  SHA512:
6
- metadata.gz: 246faad9ee5c9b7f7e9557eb9dbde7e702c8142196bf9b02720d595c0a30b7eb75a9c038f5f765ba7982f9f2c8f0a0872cf37c97810307cd4ae8b9b23924ab21
7
- data.tar.gz: e231e6ff254193667aa1c64c8588b44f45243ec696959aea9d737ee6a1240d80195057bea1d8ab17b549fcf8c44c8caf7a02a081fea25d3a5f30f591650bdcd1
6
+ metadata.gz: bf06b097e97ca526fe87f0609dec49d29adea17c4b9d44a8b9aef8312125b84073a117567e23328852dbdbbe0eec8b0da58af9ebbc6984867a1934769cb956b4
7
+ data.tar.gz: 46f556ec20cb44370a4c9408a8f80fcdbb6955d6df6901ade141fb1660a4d589fae8f7c3d6f777f784e9380b6f4afcde22bd3e4bbab04095d24e3ec3fdd9d138
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [1.0.3] - 2025-11-23
2
+
3
+ - Add support for an API key
4
+
1
5
  ## [1.0.2] - 2025-08-01
2
6
 
3
7
  - Fix incorrect ruby version dependency preventing bundle updates
@@ -5,6 +5,22 @@ module Foobara
5
5
  include HttpApiCommand
6
6
 
7
7
  base_url { "#{ENV["OLLAMA_API_URL"] || "http://localhost:11434"}/api" }
8
+
9
+ def build_request_headers
10
+ self.request_headers = if api_token
11
+ super.merge("x-api-Key" => api_token)
12
+ else
13
+ super
14
+ end
15
+ end
16
+
17
+ def api_token
18
+ key = ENV["OLLAMA_API_KEY"]
19
+
20
+ if key
21
+ key.empty? ? nil : key
22
+ end
23
+ end
8
24
  end
9
25
  end
10
26
  end
metadata CHANGED
@@ -1,14 +1,34 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara-ollama-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-08-01 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: foobara
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: 0.1.1
19
+ - - "<"
20
+ - !ruby/object:Gem::Version
21
+ version: 2.0.0
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ version: 0.1.1
29
+ - - "<"
30
+ - !ruby/object:Gem::Version
31
+ version: 2.0.0
12
32
  - !ruby/object:Gem::Dependency
13
33
  name: foobara-cached-command
14
34
  requirement: !ruby/object:Gem::Requirement
@@ -88,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
108
  - !ruby/object:Gem::Version
89
109
  version: '0'
90
110
  requirements: []
91
- rubygems_version: 3.6.2
111
+ rubygems_version: 3.6.9
92
112
  specification_version: 4
93
113
  summary: Ruby Ollama API client using foobara commands
94
114
  test_files: []