Skip to content

Commit 828d3d6

Browse files
chore: bump version to v0.6.1 [ci skip]
- Updated version to 0.6.1 - Updated Gemfile.lock - Updated CHANGELOG.md with release notes - Fixed enrichment CLI integration test for pretty format - Improved test cleanup to cancel searches before webset deletion - Deleted outdated VCR cassette
1 parent 863f619 commit 828d3d6

6 files changed

Lines changed: 51 additions & 92 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.6.1] - 2025-12-07
11+
12+
### Changed
13+
- **Enhanced pretty format output** - Replaced JSON.pretty_generate with human-readable text format across all CLI formatters for better readability
14+
15+
### Fixed
16+
- **CLI enrichment flags** - Removed unused enrichment flags that were causing confusion
17+
- **Webset import/search scope validation** - Added proper validation to prevent conflicts between import and search scope parameters
18+
- **CLI formatter test** - Fixed enrichment CLI integration test to properly handle pretty format output (text instead of JSON)
19+
- **Test cleanup** - Improved webset cleanup in tests to cancel all searches before deletion, preventing concurrent request limit issues
20+
1021
## [0.6.0] - 2025-11-28
1122

1223
### Added

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
exa-ai (0.6.0)
4+
exa-ai (0.6.1)
55
faraday (~> 2.0)
66
ld-eventsource (~> 2.0)
77
toon-ruby (~> 0.1)

lib/exa/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Exa
4-
VERSION = "0.6.0"
4+
VERSION = "0.6.1"
55
end

test/integration/enrichments_cli_integration_test.rb

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -350,12 +350,16 @@ def test_enrichment_create_pretty_format
350350
stdout, _stderr, status = run_command(command)
351351

352352
assert status.success?, "enrichment-create with pretty format should succeed"
353-
# Pretty format is still JSON, just nicely formatted
354-
result = parse_json_output(stdout)
355-
track_enrichment(webset_id, result["id"])
356-
assert result["id"].start_with?("wenrich_") || result["id"].start_with?("enrich_")
357-
# Verify it has indentation (pretty-printed)
358-
assert_includes stdout, " "
353+
# Pretty format outputs human-readable text, not JSON
354+
assert_includes stdout, "Enrichment ID:"
355+
assert_includes stdout, "Webset ID:"
356+
assert_includes stdout, "Status:"
357+
assert_includes stdout, "Description:"
358+
assert_includes stdout, "Format:"
359+
360+
# Extract and track the enrichment ID from the pretty output
361+
enrichment_id = stdout.match(/Enrichment ID: (wenrich_\w+|enrich_\w+)/)[1]
362+
track_enrichment(webset_id, enrichment_id)
359363
end
360364

361365

test/test_helper.rb

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,42 @@ def delete_search(webset_id, search_id)
221221
end
222222

223223
# Delete a webset - supports both client and CLI approaches
224+
# First cancels all searches to avoid hitting concurrent request limits
224225
def delete_webset(webset_id)
226+
# Cancel all searches in the webset first
227+
cancel_all_webset_searches(webset_id)
228+
225229
if use_cli_cleanup?
226230
run_cli_command("bundle exec exe/exa-ai webset-delete #{webset_id} --force")
227231
else
228232
get_client.delete_webset(webset_id)
229233
end
230234
end
231235

236+
# Cancel all searches in a webset to avoid concurrent request limits
237+
def cancel_all_webset_searches(webset_id)
238+
if use_cli_cleanup?
239+
# Use CLI to get webset details and cancel searches
240+
stdout, _stderr, status = run_command("bundle exec exe/exa-ai webset-get #{webset_id} --output-format json")
241+
return unless status.success?
242+
243+
webset = JSON.parse(stdout)
244+
searches = webset["searches"] || []
245+
searches.each do |search|
246+
run_cli_command("bundle exec exe/exa-ai search-cancel #{webset_id} #{search['id']} --force") rescue nil
247+
end
248+
else
249+
# Use client to get webset and cancel searches
250+
webset = get_client.get_webset(webset_id)
251+
searches = webset.searches || []
252+
searches.each do |search|
253+
get_client.cancel_webset_search(webset_id: webset_id, id: search["id"]) rescue nil
254+
end
255+
end
256+
rescue => e
257+
# Ignore errors - webset might not exist or searches might already be cancelled
258+
end
259+
232260
# Delete an import - supports both client and CLI approaches
233261
def delete_import(import_id)
234262
if use_cli_cleanup?

test/vcr_cassettes/search_with_context.yml

Lines changed: 0 additions & 84 deletions
This file was deleted.

0 commit comments

Comments
 (0)