searxng 0.1.0 → 0.2.1
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 +4 -4
- data/CHANGELOG.md +36 -1
- data/README.md +84 -40
- data/bin/searxng +7 -4
- data/lib/searxng/client.rb +83 -9
- data/lib/searxng/errors.rb +64 -0
- data/lib/searxng/network_policy.rb +74 -0
- data/lib/searxng/server.rb +793 -2
- data/lib/searxng/version.rb +1 -1
- data/sig/searxng.rbs +11 -1
- metadata +18 -3
data/lib/searxng/version.rb
CHANGED
data/sig/searxng.rbs
CHANGED
|
@@ -12,6 +12,16 @@ module Searxng
|
|
|
12
12
|
attr_reader uri: String?
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
+
module ErrorMessages
|
|
16
|
+
def self.configuration_missing_url: () -> String
|
|
17
|
+
def self.configuration_invalid_url: (untyped url) -> String
|
|
18
|
+
def self.configuration_invalid_protocol: (untyped protocol) -> String
|
|
19
|
+
def self.configuration_auth_pair: () -> String
|
|
20
|
+
def self.no_results: (String query) -> String
|
|
21
|
+
def self.network_error: (Exception exception, ?uri: URI::Generic?, ?target: String) -> String
|
|
22
|
+
def self.api_error: (Integer status_code, String status_message) -> String
|
|
23
|
+
end
|
|
24
|
+
|
|
15
25
|
class Client
|
|
16
26
|
def initialize: (
|
|
17
27
|
?base_url: String?,
|
|
@@ -23,7 +33,7 @@ module Searxng
|
|
|
23
33
|
?ca_path: String?,
|
|
24
34
|
?verify_mode: Integer?,
|
|
25
35
|
?user_agent: String?,
|
|
26
|
-
?configure_http: (Net::HTTP, URI::Generic) -> void
|
|
36
|
+
?configure_http: ((Net::HTTP, URI::Generic) -> void)?
|
|
27
37
|
) -> void
|
|
28
38
|
def search: (
|
|
29
39
|
String query,
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: searxng
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrei Makarov
|
|
@@ -71,6 +71,20 @@ dependencies:
|
|
|
71
71
|
- - "~>"
|
|
72
72
|
- !ruby/object:Gem::Version
|
|
73
73
|
version: '3.13'
|
|
74
|
+
- !ruby/object:Gem::Dependency
|
|
75
|
+
name: polyrun
|
|
76
|
+
requirement: !ruby/object:Gem::Requirement
|
|
77
|
+
requirements:
|
|
78
|
+
- - ">="
|
|
79
|
+
- !ruby/object:Gem::Version
|
|
80
|
+
version: 2.2.0
|
|
81
|
+
type: :development
|
|
82
|
+
prerelease: false
|
|
83
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
84
|
+
requirements:
|
|
85
|
+
- - ">="
|
|
86
|
+
- !ruby/object:Gem::Version
|
|
87
|
+
version: 2.2.0
|
|
74
88
|
- !ruby/object:Gem::Dependency
|
|
75
89
|
name: webmock
|
|
76
90
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -297,6 +311,7 @@ files:
|
|
|
297
311
|
- lib/searxng.rb
|
|
298
312
|
- lib/searxng/client.rb
|
|
299
313
|
- lib/searxng/errors.rb
|
|
314
|
+
- lib/searxng/network_policy.rb
|
|
300
315
|
- lib/searxng/server.rb
|
|
301
316
|
- lib/searxng/version.rb
|
|
302
317
|
- sig/searxng.rbs
|
|
@@ -316,14 +331,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
316
331
|
requirements:
|
|
317
332
|
- - ">="
|
|
318
333
|
- !ruby/object:Gem::Version
|
|
319
|
-
version: '3.
|
|
334
|
+
version: '3.4'
|
|
320
335
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
321
336
|
requirements:
|
|
322
337
|
- - ">="
|
|
323
338
|
- !ruby/object:Gem::Version
|
|
324
339
|
version: '0'
|
|
325
340
|
requirements: []
|
|
326
|
-
rubygems_version: 4.0.
|
|
341
|
+
rubygems_version: 4.0.6
|
|
327
342
|
specification_version: 4
|
|
328
343
|
summary: SearXNG Ruby client and MCP server
|
|
329
344
|
test_files: []
|