typesense 1.1.0 → 2.1.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 173e451d6ea840eb9dd625340b7f0350ae3e7343dacfff09584b3749116e7090
4
- data.tar.gz: c0fbeb2881f825e49ec507cea288482ed52d398d8bf81bbc45da699f1a5305cf
3
+ metadata.gz: bd723b92e74fe4f30b8a61293b754c955e440aaa0d7da3c3428e77cccaf73d1a
4
+ data.tar.gz: 0ddf97cb4b0d821d8eef4763f42013a30e6b5a2c3f47503f5839e85e02a27040
5
5
  SHA512:
6
- metadata.gz: 56d66cb6510b179d25e33ea7534bd4a75f299d9dd5e51392654d9e88d62850004b1a2c099e73aa8261deddb01f2a8cc8e77f9775fea532fce0acd922bd98716e
7
- data.tar.gz: b6f6ea0103b926619e56e5f9a4d44d06ee33fde3822c2c6e20029a2506d2d699d5f8c2c53ea0c620389f20f2dff6a27429aa003d1cd55d62b096a99e9ee1f965
6
+ metadata.gz: 38443f587962d107f66df1b485265225b6af14a07d9cc997881ff9d8edaee1c9dd1dd1f20b35147c86fc3355b73bbe16d12bff34223bde20a36d0f5e50c4c98d
7
+ data.tar.gz: 6e58d68cd9d9c36a5c2291308ff0ae62bff8bb44150f26aecab366a19e000468f2e476ad2889ddd4fcaa3750edf088fd219a23673a1957daadebcc1c2e2b2ff0
@@ -18,7 +18,7 @@ module Typesense
18
18
  private
19
19
 
20
20
  def endpoint_path
21
- "#{Aliases::RESOURCE_PATH}/#{@name}"
21
+ "#{Aliases::RESOURCE_PATH}/#{URI.encode_www_form_component(@name)}"
22
22
  end
23
23
  end
24
24
  end
@@ -24,7 +24,7 @@ module Typesense
24
24
  private
25
25
 
26
26
  def endpoint_path(alias_name)
27
- "#{Aliases::RESOURCE_PATH}/#{alias_name}"
27
+ "#{Aliases::RESOURCE_PATH}/#{URI.encode_www_form_component(alias_name)}"
28
28
  end
29
29
  end
30
30
  end
@@ -18,7 +18,7 @@ module Typesense
18
18
  private
19
19
 
20
20
  def endpoint_path
21
- "#{AnalyticsRules::RESOURCE_PATH}/#{@rule_name}"
21
+ "#{AnalyticsRules::RESOURCE_PATH}/#{URI.encode_www_form_component(@rule_name)}"
22
22
  end
23
23
  end
24
24
  end
@@ -24,7 +24,7 @@ module Typesense
24
24
  private
25
25
 
26
26
  def endpoint_path(operation = nil)
27
- "#{AnalyticsRules::RESOURCE_PATH}#{operation.nil? ? '' : "/#{operation}"}"
27
+ "#{AnalyticsRules::RESOURCE_PATH}#{operation.nil? ? '' : "/#{URI.encode_www_form_component(operation)}"}"
28
28
  end
29
29
  end
30
30
  end
@@ -27,7 +27,7 @@ module Typesense
27
27
  private
28
28
 
29
29
  def endpoint_path
30
- "#{Collections::RESOURCE_PATH}/#{@name}"
30
+ "#{Collections::RESOURCE_PATH}/#{URI.encode_www_form_component(@name)}"
31
31
  end
32
32
  end
33
33
  end
@@ -23,7 +23,7 @@ module Typesense
23
23
  private
24
24
 
25
25
  def endpoint_path
26
- "#{Collections::RESOURCE_PATH}/#{@collection_name}#{Documents::RESOURCE_PATH}/#{@document_id}"
26
+ "#{Collections::RESOURCE_PATH}/#{URI.encode_www_form_component(@collection_name)}#{Documents::RESOURCE_PATH}/#{URI.encode_www_form_component(@document_id)}"
27
27
  end
28
28
  end
29
29
  end
@@ -75,7 +75,7 @@ module Typesense
75
75
  private
76
76
 
77
77
  def endpoint_path(operation = nil)
78
- "#{Collections::RESOURCE_PATH}/#{@collection_name}#{Documents::RESOURCE_PATH}#{operation.nil? ? '' : "/#{operation}"}"
78
+ "#{Collections::RESOURCE_PATH}/#{URI.encode_www_form_component(@collection_name)}#{Documents::RESOURCE_PATH}#{operation.nil? ? '' : "/#{operation}"}"
79
79
  end
80
80
  end
81
81
  end
data/lib/typesense/key.rb CHANGED
@@ -18,7 +18,7 @@ module Typesense
18
18
  private
19
19
 
20
20
  def endpoint_path
21
- "#{Keys::RESOURCE_PATH}/#{@id}"
21
+ "#{Keys::RESOURCE_PATH}/#{URI.encode_www_form_component(@id)}"
22
22
  end
23
23
  end
24
24
  end
@@ -19,7 +19,7 @@ module Typesense
19
19
  private
20
20
 
21
21
  def endpoint_path
22
- "#{Collections::RESOURCE_PATH}/#{@collection_name}#{Overrides::RESOURCE_PATH}/#{@override_id}"
22
+ "#{Collections::RESOURCE_PATH}/#{URI.encode_www_form_component(@collection_name)}#{Overrides::RESOURCE_PATH}/#{URI.encode_www_form_component(@override_id)}"
23
23
  end
24
24
  end
25
25
  end
@@ -25,7 +25,7 @@ module Typesense
25
25
  private
26
26
 
27
27
  def endpoint_path(operation = nil)
28
- "#{Collections::RESOURCE_PATH}/#{@collection_name}#{Overrides::RESOURCE_PATH}#{operation.nil? ? '' : "/#{operation}"}"
28
+ "#{Collections::RESOURCE_PATH}/#{URI.encode_www_form_component(@collection_name)}#{Overrides::RESOURCE_PATH}#{operation.nil? ? '' : "/#{URI.encode_www_form_component(operation)}"}"
29
29
  end
30
30
  end
31
31
  end
@@ -18,7 +18,7 @@ module Typesense
18
18
  private
19
19
 
20
20
  def endpoint_path
21
- "#{Presets::RESOURCE_PATH}/#{@preset_name}"
21
+ "#{Presets::RESOURCE_PATH}/#{URI.encode_www_form_component(@preset_name)}"
22
22
  end
23
23
  end
24
24
  end
@@ -24,7 +24,7 @@ module Typesense
24
24
  private
25
25
 
26
26
  def endpoint_path(operation = nil)
27
- "#{Presets::RESOURCE_PATH}#{operation.nil? ? '' : "/#{operation}"}"
27
+ "#{Presets::RESOURCE_PATH}#{operation.nil? ? '' : "/#{URI.encode_www_form_component(operation)}"}"
28
28
  end
29
29
  end
30
30
  end
@@ -19,7 +19,7 @@ module Typesense
19
19
  private
20
20
 
21
21
  def endpoint_path
22
- "#{Collections::RESOURCE_PATH}/#{@collection_name}#{Synonyms::RESOURCE_PATH}/#{@synonym_id}"
22
+ "#{Collections::RESOURCE_PATH}/#{URI.encode_www_form_component(@collection_name)}#{Synonyms::RESOURCE_PATH}/#{URI.encode_www_form_component(@synonym_id)}"
23
23
  end
24
24
  end
25
25
  end
@@ -25,7 +25,7 @@ module Typesense
25
25
  private
26
26
 
27
27
  def endpoint_path(operation = nil)
28
- "#{Collections::RESOURCE_PATH}/#{@collection_name}#{Synonyms::RESOURCE_PATH}#{operation.nil? ? '' : "/#{operation}"}"
28
+ "#{Collections::RESOURCE_PATH}/#{URI.encode_www_form_component(@collection_name)}#{Synonyms::RESOURCE_PATH}#{operation.nil? ? '' : "/#{URI.encode_www_form_component(operation)}"}"
29
29
  end
30
30
  end
31
31
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Typesense
4
- VERSION = '1.1.0'
4
+ VERSION = '2.1.0.rc1'
5
5
  end
data/lib/typesense.rb CHANGED
@@ -3,6 +3,7 @@
3
3
  module Typesense
4
4
  end
5
5
 
6
+ require 'uri'
6
7
  require_relative 'typesense/version'
7
8
  require_relative 'typesense/configuration'
8
9
  require_relative 'typesense/client'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typesense
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 2.1.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Typesense, Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-05 00:00:00.000000000 Z
11
+ date: 2024-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj
@@ -110,9 +110,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
110
  version: '2.7'
111
111
  required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  requirements:
113
- - - ">="
113
+ - - ">"
114
114
  - !ruby/object:Gem::Version
115
- version: '0'
115
+ version: 1.3.1
116
116
  requirements: []
117
117
  rubygems_version: 3.4.10
118
118
  signing_key: