typesense 2.0.0 → 2.1.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/typesense/alias.rb +1 -1
- data/lib/typesense/aliases.rb +1 -1
- data/lib/typesense/analytics_rule.rb +1 -1
- data/lib/typesense/analytics_rules.rb +1 -1
- data/lib/typesense/client.rb +2 -1
- data/lib/typesense/collection.rb +1 -1
- data/lib/typesense/document.rb +1 -1
- data/lib/typesense/documents.rb +1 -1
- data/lib/typesense/key.rb +1 -1
- data/lib/typesense/override.rb +1 -1
- data/lib/typesense/overrides.rb +1 -1
- data/lib/typesense/preset.rb +1 -1
- data/lib/typesense/presets.rb +1 -1
- data/lib/typesense/stats.rb +15 -0
- data/lib/typesense/synonym.rb +1 -1
- data/lib/typesense/synonyms.rb +1 -1
- data/lib/typesense/version.rb +1 -1
- data/lib/typesense.rb +2 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4277bf2d4714157959fe31dd42be2ae28af0285eda20e644aeea48b18370dbb5
|
4
|
+
data.tar.gz: 5b9985aab6c88db0d7853e507676812078d87263b48e330c30cf14ea32e988d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8843954b06affd11ad33b66929df395011eef4e8336037683b5fbbf72adcaa2ce00605ceb1d7f5f5f3ee777b5ab3846d907c797f81ae1130c735664afc8fb64
|
7
|
+
data.tar.gz: 52b57e91831bdb6d4599fa1d5a17d9073ec4ff2730054b66d1a8fb17211e416d5b74c0fd429550112a196789b5dd648be56afb8e368fbe1d3c761a17f414a257
|
data/lib/typesense/alias.rb
CHANGED
data/lib/typesense/aliases.rb
CHANGED
@@ -24,7 +24,7 @@ module Typesense
|
|
24
24
|
private
|
25
25
|
|
26
26
|
def endpoint_path(operation = nil)
|
27
|
-
"#{AnalyticsRules::RESOURCE_PATH}#{operation.nil? ? '' : "/#{
|
27
|
+
"#{AnalyticsRules::RESOURCE_PATH}#{operation.nil? ? '' : "/#{URI.encode_www_form_component(operation)}"}"
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
data/lib/typesense/client.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module Typesense
|
4
4
|
class Client
|
5
|
-
attr_reader :configuration, :collections, :aliases, :keys, :debug, :health, :metrics, :operations,
|
5
|
+
attr_reader :configuration, :collections, :aliases, :keys, :debug, :health, :metrics, :stats, :operations,
|
6
6
|
:multi_search, :analytics, :presets
|
7
7
|
|
8
8
|
def initialize(options = {})
|
@@ -15,6 +15,7 @@ module Typesense
|
|
15
15
|
@debug = Debug.new(@api_call)
|
16
16
|
@health = Health.new(@api_call)
|
17
17
|
@metrics = Metrics.new(@api_call)
|
18
|
+
@stats = Stats.new(@api_call)
|
18
19
|
@operations = Operations.new(@api_call)
|
19
20
|
@analytics = Analytics.new(@api_call)
|
20
21
|
@presets = Presets.new(@api_call)
|
data/lib/typesense/collection.rb
CHANGED
data/lib/typesense/document.rb
CHANGED
@@ -23,7 +23,7 @@ module Typesense
|
|
23
23
|
private
|
24
24
|
|
25
25
|
def endpoint_path
|
26
|
-
"#{Collections::RESOURCE_PATH}/#{
|
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
|
data/lib/typesense/documents.rb
CHANGED
@@ -75,7 +75,7 @@ module Typesense
|
|
75
75
|
private
|
76
76
|
|
77
77
|
def endpoint_path(operation = nil)
|
78
|
-
"#{Collections::RESOURCE_PATH}/#{
|
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
data/lib/typesense/override.rb
CHANGED
@@ -19,7 +19,7 @@ module Typesense
|
|
19
19
|
private
|
20
20
|
|
21
21
|
def endpoint_path
|
22
|
-
"#{Collections::RESOURCE_PATH}/#{
|
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
|
data/lib/typesense/overrides.rb
CHANGED
@@ -25,7 +25,7 @@ module Typesense
|
|
25
25
|
private
|
26
26
|
|
27
27
|
def endpoint_path(operation = nil)
|
28
|
-
"#{Collections::RESOURCE_PATH}/#{
|
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
|
data/lib/typesense/preset.rb
CHANGED
data/lib/typesense/presets.rb
CHANGED
@@ -24,7 +24,7 @@ module Typesense
|
|
24
24
|
private
|
25
25
|
|
26
26
|
def endpoint_path(operation = nil)
|
27
|
-
"#{Presets::RESOURCE_PATH}#{operation.nil? ? '' : "/#{
|
27
|
+
"#{Presets::RESOURCE_PATH}#{operation.nil? ? '' : "/#{URI.encode_www_form_component(operation)}"}"
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
data/lib/typesense/synonym.rb
CHANGED
@@ -19,7 +19,7 @@ module Typesense
|
|
19
19
|
private
|
20
20
|
|
21
21
|
def endpoint_path
|
22
|
-
"#{Collections::RESOURCE_PATH}/#{
|
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
|
data/lib/typesense/synonyms.rb
CHANGED
@@ -25,7 +25,7 @@ module Typesense
|
|
25
25
|
private
|
26
26
|
|
27
27
|
def endpoint_path(operation = nil)
|
28
|
-
"#{Collections::RESOURCE_PATH}/#{
|
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
|
data/lib/typesense/version.rb
CHANGED
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'
|
@@ -28,5 +29,6 @@ require_relative 'typesense/preset'
|
|
28
29
|
require_relative 'typesense/debug'
|
29
30
|
require_relative 'typesense/health'
|
30
31
|
require_relative 'typesense/metrics'
|
32
|
+
require_relative 'typesense/stats'
|
31
33
|
require_relative 'typesense/operations'
|
32
34
|
require_relative 'typesense/error'
|
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: 2.0.
|
4
|
+
version: 2.1.0.rc2
|
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-
|
11
|
+
date: 2024-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- lib/typesense/overrides.rb
|
91
91
|
- lib/typesense/preset.rb
|
92
92
|
- lib/typesense/presets.rb
|
93
|
+
- lib/typesense/stats.rb
|
93
94
|
- lib/typesense/synonym.rb
|
94
95
|
- lib/typesense/synonyms.rb
|
95
96
|
- lib/typesense/version.rb
|
@@ -110,9 +111,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
110
111
|
version: '2.7'
|
111
112
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
113
|
requirements:
|
113
|
-
- - "
|
114
|
+
- - ">"
|
114
115
|
- !ruby/object:Gem::Version
|
115
|
-
version:
|
116
|
+
version: 1.3.1
|
116
117
|
requirements: []
|
117
118
|
rubygems_version: 3.4.10
|
118
119
|
signing_key:
|