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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38b096c332f629aa84304173aadd7683573c1d7f2d6fecbb35aa7c75e42185bd
4
- data.tar.gz: f8248f49a1453ed82a1384e9847fe66cb5cf33c265f21f780c192d3b1527ec2b
3
+ metadata.gz: 1f9ade4eb6d66abaf9b33a5781a0a3ec1ced7849c59d2c5e23b871b59cd206f2
4
+ data.tar.gz: 57c7f2e5e72e49fa7418e850800a4ad420b29e6be1d62cf4bfb25272234c3424
5
5
  SHA512:
6
- metadata.gz: 5d5e98110c0e40c433e2a76690eda3e910116f7e9fdd51234038d93dd3e72abd56048b958c17552af3cbb9b14c077f079aca0549096eaf7e74bd360c4323e5fb
7
- data.tar.gz: 0017a9f71b6bb9914e0d677ea0fa0ecc87f4253441e2826595e29dae0e6b5530cc7badd1cd64513f25873236f9c720fbabd3f82741057c79bb701da99d35811c
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
@@ -11,6 +11,7 @@ class DistributedPress
11
11
  define do
12
12
  # TODO: Validate domain name
13
13
  required(:domain).filled(:string)
14
+ optional(:public).filled(:bool)
14
15
 
15
16
  optional(:protocols).hash do
16
17
  optional(:http).filled(:bool)
@@ -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
- required(:public).filled(:bool)
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
@@ -10,7 +10,7 @@ class DistributedPress
10
10
  class UpdateSite < Dry::Schema::JSON
11
11
  define do
12
12
  required(:id).filled(:string)
13
- required(:public).filled(:bool)
13
+ optional(:public).filled(:bool)
14
14
 
15
15
  required(:protocols).hash do
16
16
  optional(:http).filled(:bool)
@@ -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'
@@ -3,5 +3,5 @@
3
3
  # API client
4
4
  class DistributedPress
5
5
  # Version
6
- VERSION = '0.3.0rc4'
6
+ VERSION = '0.3.1'
7
7
  end
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.0rc4
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-07 00:00:00.000000000 Z
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: 1.3.1
315
+ version: '0'
315
316
  requirements: []
316
317
  rubygems_version: 3.3.26
317
318
  signing_key: