distributed-press-api-client 0.3.0rc4 → 0.3.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/lib/distributed_press/v1/schemas/bittorrent_protocol.rb +23 -0
- data/lib/distributed_press/v1/schemas/new_site.rb +1 -0
- data/lib/distributed_press/v1/schemas/site.rb +4 -1
- data/lib/distributed_press/v1/schemas/update_site.rb +1 -1
- data/lib/distributed_press/v1/schemas.rb +1 -0
- data/lib/distributed_press/version.rb +1 -1
- 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: 1f9ade4eb6d66abaf9b33a5781a0a3ec1ced7849c59d2c5e23b871b59cd206f2
|
4
|
+
data.tar.gz: 57c7f2e5e72e49fa7418e850800a4ad420b29e6be1d62cf4bfb25272234c3424
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e6d5be220822e44d1397aa1bf034be6141892a847b99cb1dedb8830d56d0064e955f15b95aba51c1f4aba460d0c04195c1d8b45a651f2c328de5571a75f6215
|
7
|
+
data.tar.gz: b16c1082df61f87468e54ddf0cfd6336f995b45b7c05f6b30e94cff127daa4ea904fbf6188c519efc98c8116a90e9bef424d2985f5641989f2f42ee8b342e387
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'dry-schema'
|
4
|
+
|
5
|
+
class DistributedPress
|
6
|
+
module V1
|
7
|
+
module Schemas
|
8
|
+
# Bittorrent protocol
|
9
|
+
class BittorrentProtocol < Dry::Schema::JSON
|
10
|
+
define do
|
11
|
+
required(:enabled).value(:bool)
|
12
|
+
# TODO: Validate URL
|
13
|
+
required(:link).filled(:string)
|
14
|
+
required(:gateway).filled(:string)
|
15
|
+
required(:dnslink).filled(:string)
|
16
|
+
required(:infoHash).filled(:string)
|
17
|
+
required(:pubKey).filled(:string)
|
18
|
+
required(:magnet).filled(:string)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -4,6 +4,7 @@ require 'dry-schema'
|
|
4
4
|
require_relative 'http_protocol'
|
5
5
|
require_relative 'hyper_protocol'
|
6
6
|
require_relative 'ipfs_protocol'
|
7
|
+
require_relative 'bittorrent_protocol'
|
7
8
|
|
8
9
|
class DistributedPress
|
9
10
|
module V1
|
@@ -15,18 +16,20 @@ class DistributedPress
|
|
15
16
|
|
16
17
|
# TODO: Validate domain name
|
17
18
|
required(:domain).filled(:string)
|
18
|
-
|
19
|
+
optional(:public).filled(:bool)
|
19
20
|
|
20
21
|
required(:protocols).hash do
|
21
22
|
required(:http).filled(:bool)
|
22
23
|
required(:ipfs).filled(:bool)
|
23
24
|
required(:hyper).filled(:bool)
|
25
|
+
optional(:bittorrent).filled(:bool)
|
24
26
|
end
|
25
27
|
|
26
28
|
required(:links).hash do
|
27
29
|
optional(:http).hash(HttpProtocol.new)
|
28
30
|
optional(:hyper).hash(HyperProtocol.new)
|
29
31
|
optional(:ipfs).hash(IpfsProtocol.new)
|
32
|
+
optional(:bittorrent).hash(BittorrentProtocol.new)
|
30
33
|
end
|
31
34
|
end
|
32
35
|
end
|
@@ -4,6 +4,7 @@ require_relative 'schemas/admin'
|
|
4
4
|
require_relative 'schemas/http_protocol'
|
5
5
|
require_relative 'schemas/hyper_protocol'
|
6
6
|
require_relative 'schemas/ipfs_protocol'
|
7
|
+
require_relative 'schemas/bittorrent_protocol'
|
7
8
|
require_relative 'schemas/new_admin'
|
8
9
|
require_relative 'schemas/new_publisher'
|
9
10
|
require_relative 'schemas/new_site'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: distributed-press-api-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- f
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -264,6 +264,7 @@ files:
|
|
264
264
|
- lib/distributed_press/v1/errors.rb
|
265
265
|
- lib/distributed_press/v1/schemas.rb
|
266
266
|
- lib/distributed_press/v1/schemas/admin.rb
|
267
|
+
- lib/distributed_press/v1/schemas/bittorrent_protocol.rb
|
267
268
|
- lib/distributed_press/v1/schemas/http_protocol.rb
|
268
269
|
- lib/distributed_press/v1/schemas/hyper_protocol.rb
|
269
270
|
- lib/distributed_press/v1/schemas/ipfs_protocol.rb
|
@@ -309,9 +310,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
309
310
|
version: '2.7'
|
310
311
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
311
312
|
requirements:
|
312
|
-
- - "
|
313
|
+
- - ">="
|
313
314
|
- !ruby/object:Gem::Version
|
314
|
-
version:
|
315
|
+
version: '0'
|
315
316
|
requirements: []
|
316
317
|
rubygems_version: 3.3.26
|
317
318
|
signing_key:
|