···11+## [0.0.2] - 2025-12-23
22+33+- added `#operation` method (aliased as `#op`) to `Operation`
44+- added `#resolve_did` for calling the `/resolve/:did` API endpoint
55+- workaround for `isActive` field sent as `is_active` in identity events
66+17## [0.0.1] - 2025-12-22
2839- first working version, with streaming from Tap, support for ack and admin password options, and calling two HTTP endpoints
+7-2
README.md
···33333434## Installation
35353636-Add this to your `Gemfile`:
3636+Tapfall should run on any somewhat recent version of Ruby (3.x/4.x), although it's recommended to use one that's still getting maintenance updates, ideally the latest one. In production, it's also recommended to install it with [YJIT support](https://shopify.engineering/ruby-yjit-is-production-ready) and with [jemalloc](https://scalingo.com/blog/improve-ruby-application-memory-jemalloc). A compatible version should be available on most Linux systems, otherwise you can install one using tools such as [RVM](https://rvm.io), [asdf](https://asdf-vm.com), [ruby-install](https://github.com/postmodern/ruby-install) or [ruby-build](https://github.com/rbenv/ruby-build), or `rpm` or `apt-get` on Linux (see more installation options on [ruby-lang.org](https://www.ruby-lang.org/en/downloads/)).
3737+3838+To use it in your app, add this to your `Gemfile`:
37393840 gem 'tapfall'
3941···116118- `type` (symbol) – the message type identifier, e.g. `:record`
117119- `id` (integer), aliased as `seq` – a sequential index of the message
118120119119-The `:record` messages have an `operations` method, which includes an array of add/remove/edit `Operation`s done on some records. Currently Tap event format only includes one single record operation in each event, but it's returned as an array here for symmetry with the `Skyfall::Firehose` stream version.
121121+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.)
120122121123An `Operation` has such fields (also matching the API of `Skyfall::Firehose::Operation` and `Skyfall::Jetstream::Operation`):
122124···147149 end
148150end
149151```
152152+153153+> [!NOTE]
154154+> If you're doing a full network backfill of some app.bsky.* lexicons, that's going to be a *lot* of events that Tap will be sending to you, on localhost (so not limited by network bandwidth), likely in large bursts. In that case it's [recommended](https://bsky.app/profile/did:plc:ragtjsm2j2vknwkz3zp4oxrd/post/3mawmnwukws2w) to try to do as little processing as possible in the event handling loop, and especially avoid any sync network requests there. If you're working with a limited number of repos and/or with non-Bluesky lexicons only, this is probably much less of an issue.
150155151156152157### Note on custom lexicons
+24
lib/tapfall/api.rb
···2525 post_request('/repos/remove', { dids: dids })
2626 end
27272828+ def resolve_did(did)
2929+ get_request("/resolve/#{did}")
3030+ end
3131+2832 private
29333034 def build_root_url(server)
···4953 end
5054 end
51555656+ def get_request(path)
5757+ uri = URI(@root_url + path)
5858+5959+ request = Net::HTTP::Get.new(uri)
6060+6161+ if @options[:admin_password]
6262+ request.basic_auth('admin', @options[:admin_password])
6363+ end
6464+6565+ response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => (uri.scheme == 'https')) do |http|
6666+ http.request(request)
6767+ end
6868+6969+ handle_response(response)
7070+ end
7171+5272 def post_request(path, json_data)
5373 uri = URI(@root_url + path)
5474···6484 http.request(request)
6585 end
66868787+ handle_response(response)
8888+ end
8989+9090+ def handle_response(response)
6791 status = response.code.to_i
6892 message = response.message
6993 response_body = (response.content_type == 'application/json') ? JSON.parse(response.body) : response.body
+1-1
lib/tapfall/messages/identity_message.rb
···2020 end
21212222 def active?
2323- @identity['isActive']
2323+ @identity['isActive'] || @identity['is_active']
2424 end
25252626 def status
+7-1
lib/tapfall/messages/record_message.rb
···88 super
99 end
10101111+ def operation
1212+ @operation ||= Operation.new(json['record'])
1313+ end
1414+1115 def operations
1212- @operations ||= [Operation.new(json['record'])]
1616+ [operation]
1317 end
1818+1919+ alias op operation
1420 end
1521end