tapfall 0.0.1 → 0.0.2
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 +6 -0
- data/README.md +1 -1
- data/lib/tapfall/api.rb +24 -0
- data/lib/tapfall/messages/identity_message.rb +1 -1
- data/lib/tapfall/messages/record_message.rb +7 -1
- data/lib/tapfall/stream.rb +1 -1
- data/lib/tapfall/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 66d3598fd16d3ed0289b2007c59996a93bdda3c65c48adb49196dec33961308f
|
|
4
|
+
data.tar.gz: 87929c9107cb655f57e3d00ae08030b0d753ea3daae72bfc0fc337a6943e0ebb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6b811a74573589f3e3650c88df74ed3ea9e4a1109e3a074e32b4e5d8c8158f4239afd2f76f215d4a089ddba03e937082c727fb915d1b621f0bf96de763e97471
|
|
7
|
+
data.tar.gz: 569b52443ee8ebf798524619634aca85b5bb50e56869ea35e700a0e754bc29716227ccf498dbbbeaa2145a8e3d4e5a8b0e6c2fdf93ac17bf7165ac9cfa7853a1
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [0.0.2] - 2025-12-23
|
|
2
|
+
|
|
3
|
+
- added `#operation` method (aliased as `#op`) to `Operation`
|
|
4
|
+
- added `#resolve_did` for calling the `/resolve/:did` API endpoint
|
|
5
|
+
- workaround for `isActive` field sent as `is_active` in identity events
|
|
6
|
+
|
|
1
7
|
## [0.0.1] - 2025-12-22
|
|
2
8
|
|
|
3
9
|
- first working version, with streaming from Tap, support for ack and admin password options, and calling two HTTP endpoints
|
data/README.md
CHANGED
|
@@ -116,7 +116,7 @@ All message types share these properties:
|
|
|
116
116
|
- `type` (symbol) – the message type identifier, e.g. `:record`
|
|
117
117
|
- `id` (integer), aliased as `seq` – a sequential index of the message
|
|
118
118
|
|
|
119
|
-
The `:record` messages have an `
|
|
119
|
+
The `:record` messages have an `operation` method (aliased as `op`), which returns an `Operation` object with details of an create/update/delete operation done a record. (For symmetry with the `Skyfall::Firehose` stream version, there's also an `operations` method which returns an array.)
|
|
120
120
|
|
|
121
121
|
An `Operation` has such fields (also matching the API of `Skyfall::Firehose::Operation` and `Skyfall::Jetstream::Operation`):
|
|
122
122
|
|
data/lib/tapfall/api.rb
CHANGED
|
@@ -25,6 +25,10 @@ module Tapfall
|
|
|
25
25
|
post_request('/repos/remove', { dids: dids })
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
+
def resolve_did(did)
|
|
29
|
+
get_request("/resolve/#{did}")
|
|
30
|
+
end
|
|
31
|
+
|
|
28
32
|
private
|
|
29
33
|
|
|
30
34
|
def build_root_url(server)
|
|
@@ -49,6 +53,22 @@ module Tapfall
|
|
|
49
53
|
end
|
|
50
54
|
end
|
|
51
55
|
|
|
56
|
+
def get_request(path)
|
|
57
|
+
uri = URI(@root_url + path)
|
|
58
|
+
|
|
59
|
+
request = Net::HTTP::Get.new(uri)
|
|
60
|
+
|
|
61
|
+
if @options[:admin_password]
|
|
62
|
+
request.basic_auth('admin', @options[:admin_password])
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => (uri.scheme == 'https')) do |http|
|
|
66
|
+
http.request(request)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
handle_response(response)
|
|
70
|
+
end
|
|
71
|
+
|
|
52
72
|
def post_request(path, json_data)
|
|
53
73
|
uri = URI(@root_url + path)
|
|
54
74
|
|
|
@@ -64,6 +84,10 @@ module Tapfall
|
|
|
64
84
|
http.request(request)
|
|
65
85
|
end
|
|
66
86
|
|
|
87
|
+
handle_response(response)
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def handle_response(response)
|
|
67
91
|
status = response.code.to_i
|
|
68
92
|
message = response.message
|
|
69
93
|
response_body = (response.content_type == 'application/json') ? JSON.parse(response.body) : response.body
|
data/lib/tapfall/stream.rb
CHANGED
|
@@ -10,7 +10,7 @@ module Tapfall
|
|
|
10
10
|
class Tapfall::Stream < Skyfall::Stream
|
|
11
11
|
extend Forwardable
|
|
12
12
|
|
|
13
|
-
def_delegators :@api, :add_repo, :add_repos, :remove_repo, :remove_repos
|
|
13
|
+
def_delegators :@api, :add_repo, :add_repos, :remove_repo, :remove_repos, :resolve_did
|
|
14
14
|
|
|
15
15
|
def initialize(server, options = {})
|
|
16
16
|
super(server)
|
data/lib/tapfall/version.rb
CHANGED