From 02340354d14eaaa5a482771bdc0e8e0045004d35 Mon Sep 17 00:00:00 2001 From: Erim Icel Date: Mon, 27 Apr 2026 17:17:40 +0100 Subject: [PATCH] fix(test): align local Typesense image with v30+ supported range The integration spec at `spec/typesense/collections_spec.rb:156` expects each field in the create-collection response to include `truncate_len`, which was added to Typesense's field schema response in v30.x. The local `docker-compose.yml` was still pinned to `typesense/typesense:29.0`, so the spec failed locally with the field missing from the actual response: Failure/Error: expect(result['fields']).to eq(expected_fields) Diff: - "truncate_len" => 100, The README compatibility table already states typesense-ruby v5.0.0 supports Typesense >= v30.0, so this just realigns local development with the gem's stated server compatibility. Bumping to the latest stable patch (30.2) also surfaced two new fields on curation rule responses (`stem`, `synonyms`); the curation set test fixtures are updated to mirror them. After the change: - `bundle exec rspec` reports 151 examples, 0 failures, 16 pending (down from 27 pending: 11 specs that were skipped against Typesense 29 are now exercised against 30.2). Co-Authored-By: Claude Opus 4.7 (1M context) --- docker-compose.yml | 2 +- spec/typesense/curation_set_spec.rb | 4 +++- spec/typesense/curation_sets_spec.rb | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7f1b7f3..e75ebe4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: typesense: - image: typesense/typesense:29.0 + image: typesense/typesense:30.2 ports: - "127.0.0.1:8108:8108" volumes: diff --git a/spec/typesense/curation_set_spec.rb b/spec/typesense/curation_set_spec.rb index 826e1e8..d2bc51f 100644 --- a/spec/typesense/curation_set_spec.rb +++ b/spec/typesense/curation_set_spec.rb @@ -27,7 +27,9 @@ 'id' => 'rule-1', 'rule' => { 'query' => 'test', - 'match' => 'exact' + 'match' => 'exact', + 'stem' => false, + 'synonyms' => false }, 'includes' => [{ 'id' => '123', 'position' => 1 }], 'excludes' => [], diff --git a/spec/typesense/curation_sets_spec.rb b/spec/typesense/curation_sets_spec.rb index 5abe28c..84da9f8 100644 --- a/spec/typesense/curation_sets_spec.rb +++ b/spec/typesense/curation_sets_spec.rb @@ -27,7 +27,9 @@ 'id' => 'rule-1', 'rule' => { 'query' => 'test', - 'match' => 'exact' + 'match' => 'exact', + 'stem' => false, + 'synonyms' => false }, 'includes' => [{ 'id' => '123', 'position' => 1 }], 'excludes' => [],