skyfall 0.3.0 → 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/CHANGELOG.md +12 -0
- data/README.md +4 -1
- data/lib/skyfall/collection.rb +15 -12
- data/lib/skyfall/messages/account_message.rb +11 -0
- data/lib/skyfall/messages/handle_message.rb +5 -0
- data/lib/skyfall/messages/identity_message.rb +3 -0
- data/lib/skyfall/messages/tombstone_message.rb +5 -0
- data/lib/skyfall/messages/websocket_message.rb +2 -0
- data/lib/skyfall/operation.rb +14 -12
- data/lib/skyfall/version.rb +1 -1
- metadata +17 -58
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1002b9dbaf48b9158f4b37d314e7f72d0990bf8290a5ad5d172af5aec9c48e38
|
4
|
+
data.tar.gz: 2a7cf444f30a13135e0848cbf0ad6c1900d9210e0799117e0612d5c52a93b2a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 600eaf8dd34c393b592a6490848d9e981c9ff0fa17fab629d2d640162eecda1248a49944e49d4bb679f732551e75ac209fd09bac85b7a087f81e8b13153c3446
|
7
|
+
data.tar.gz: e8d2c63b039aa7918337b67b77e8d0b511aba81b98d21862cf75a8561d42e72e71214fe16b11f884082fdd8b646e917b840b0369911d07afb32aedc42badc38a
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
## [Unreleased]
|
2
|
+
|
3
|
+
- added heartbeat timer
|
4
|
+
|
5
|
+
## [0.3.1] - 2024-06-28
|
6
|
+
|
7
|
+
- added `app.bsky.graph.starterpack` and `chat.bsky.actor.declaration` record types
|
8
|
+
- added `#account` event type (`AccountMessage`)
|
9
|
+
- added `handle` field to `IdentityMessage`
|
10
|
+
- fixed param validation on `Stream` initialization
|
11
|
+
- reverted the change that added Ruby stdlib dependencies explicitly to the gemspec, since this causes more problems than it's worth - only `base64` is left there, since it's the one now required to be listed
|
12
|
+
|
1
13
|
## [0.3.0] - 2024-03-21
|
2
14
|
|
3
15
|
- added support for labeller firehose, served by labeller services at the `com.atproto.label.subscribeLabels` endpoint (aliased as `:subscribe_labels`)
|
data/README.md
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
# Skyfall
|
2
2
|
|
3
|
-
|
3
|
+
A Ruby gem for streaming data from the Bluesky/AtProto firehose 🦋
|
4
|
+
|
5
|
+
> [!NOTE]
|
6
|
+
> ATProto Ruby gems collection: [skyfall](https://github.com/mackuba/skyfall) | [blue_factory](https://github.com/mackuba/blue_factory) | [minisky](https://github.com/mackuba/minisky) | [didkit](https://github.com/mackuba/didkit)
|
4
7
|
|
5
8
|
|
6
9
|
## What does it do
|
data/lib/skyfall/collection.rb
CHANGED
@@ -1,16 +1,19 @@
|
|
1
1
|
module Skyfall
|
2
2
|
module Collection
|
3
|
-
BSKY_PROFILE
|
4
|
-
BSKY_FEED
|
5
|
-
BSKY_LIKE
|
6
|
-
BSKY_POST
|
7
|
-
BSKY_REPOST
|
8
|
-
BSKY_THREADGATE
|
9
|
-
BSKY_BLOCK
|
10
|
-
BSKY_FOLLOW
|
11
|
-
BSKY_LIST
|
12
|
-
BSKY_LISTBLOCK
|
13
|
-
BSKY_LISTITEM
|
14
|
-
|
3
|
+
BSKY_PROFILE = "app.bsky.actor.profile"
|
4
|
+
BSKY_FEED = "app.bsky.feed.generator"
|
5
|
+
BSKY_LIKE = "app.bsky.feed.like"
|
6
|
+
BSKY_POST = "app.bsky.feed.post"
|
7
|
+
BSKY_REPOST = "app.bsky.feed.repost"
|
8
|
+
BSKY_THREADGATE = "app.bsky.feed.threadgate"
|
9
|
+
BSKY_BLOCK = "app.bsky.graph.block"
|
10
|
+
BSKY_FOLLOW = "app.bsky.graph.follow"
|
11
|
+
BSKY_LIST = "app.bsky.graph.list"
|
12
|
+
BSKY_LISTBLOCK = "app.bsky.graph.listblock"
|
13
|
+
BSKY_LISTITEM = "app.bsky.graph.listitem"
|
14
|
+
BSKY_STARTERPACK = "app.bsky.graph.starterpack"
|
15
|
+
BSKY_LABELER = "app.bsky.labeler.service"
|
16
|
+
|
17
|
+
BSKY_CHAT_DECLARATION = "chat.bsky.actor.declaration"
|
15
18
|
end
|
16
19
|
end
|
@@ -1,4 +1,9 @@
|
|
1
1
|
module Skyfall
|
2
|
+
|
3
|
+
#
|
4
|
+
# Note: this event type is deprecated and will stop being emitted at some point.
|
5
|
+
# You should instead listen for 'identity' events (Skyfall::IdentityMessage).
|
6
|
+
#
|
2
7
|
class HandleMessage < WebsocketMessage
|
3
8
|
def handle
|
4
9
|
@data_object['handle']
|
@@ -8,6 +8,7 @@ module Skyfall
|
|
8
8
|
class WebsocketMessage
|
9
9
|
using Skyfall::Extensions
|
10
10
|
|
11
|
+
require_relative 'account_message'
|
11
12
|
require_relative 'commit_message'
|
12
13
|
require_relative 'handle_message'
|
13
14
|
require_relative 'identity_message'
|
@@ -25,6 +26,7 @@ module Skyfall
|
|
25
26
|
type_object, data_object = decode_cbor_objects(data)
|
26
27
|
|
27
28
|
message_class = case type_object['t']
|
29
|
+
when '#account' then AccountMessage
|
28
30
|
when '#commit' then CommitMessage
|
29
31
|
when '#handle' then HandleMessage
|
30
32
|
when '#identity' then IdentityMessage
|
data/lib/skyfall/operation.rb
CHANGED
@@ -43,18 +43,20 @@ module Skyfall
|
|
43
43
|
|
44
44
|
def type
|
45
45
|
case collection
|
46
|
-
when Collection::BSKY_BLOCK
|
47
|
-
when Collection::BSKY_FEED
|
48
|
-
when Collection::BSKY_FOLLOW
|
49
|
-
when Collection::BSKY_LABELER
|
50
|
-
when Collection::BSKY_LIKE
|
51
|
-
when Collection::BSKY_LIST
|
52
|
-
when Collection::BSKY_LISTBLOCK
|
53
|
-
when Collection::BSKY_LISTITEM
|
54
|
-
when Collection::BSKY_POST
|
55
|
-
when Collection::BSKY_PROFILE
|
56
|
-
when Collection::BSKY_REPOST
|
57
|
-
when Collection::
|
46
|
+
when Collection::BSKY_BLOCK then :bsky_block
|
47
|
+
when Collection::BSKY_FEED then :bsky_feed
|
48
|
+
when Collection::BSKY_FOLLOW then :bsky_follow
|
49
|
+
when Collection::BSKY_LABELER then :bsky_labeler
|
50
|
+
when Collection::BSKY_LIKE then :bsky_like
|
51
|
+
when Collection::BSKY_LIST then :bsky_list
|
52
|
+
when Collection::BSKY_LISTBLOCK then :bsky_listblock
|
53
|
+
when Collection::BSKY_LISTITEM then :bsky_listitem
|
54
|
+
when Collection::BSKY_POST then :bsky_post
|
55
|
+
when Collection::BSKY_PROFILE then :bsky_profile
|
56
|
+
when Collection::BSKY_REPOST then :bsky_repost
|
57
|
+
when Collection::BSKY_STARTERPACK then :bsky_starterpack
|
58
|
+
when Collection::BSKY_THREADGATE then :bsky_threadgate
|
59
|
+
when Collection::BSKY_CHAT_DECLARATION then :bsky_chat_declaration
|
58
60
|
else :unknown
|
59
61
|
end
|
60
62
|
end
|
data/lib/skyfall/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skyfall
|
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
|
- Kuba Suder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: base32
|
@@ -30,6 +30,20 @@ dependencies:
|
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 0.3.4
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: base64
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0.1'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0.1'
|
33
47
|
- !ruby/object:Gem::Dependency
|
34
48
|
name: cbor
|
35
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,62 +98,6 @@ dependencies:
|
|
84
98
|
- - "~>"
|
85
99
|
- !ruby/object:Gem::Version
|
86
100
|
version: '0.11'
|
87
|
-
- !ruby/object:Gem::Dependency
|
88
|
-
name: base64
|
89
|
-
requirement: !ruby/object:Gem::Requirement
|
90
|
-
requirements:
|
91
|
-
- - "~>"
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: '0.1'
|
94
|
-
type: :runtime
|
95
|
-
prerelease: false
|
96
|
-
version_requirements: !ruby/object:Gem::Requirement
|
97
|
-
requirements:
|
98
|
-
- - "~>"
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
version: '0.1'
|
101
|
-
- !ruby/object:Gem::Dependency
|
102
|
-
name: stringio
|
103
|
-
requirement: !ruby/object:Gem::Requirement
|
104
|
-
requirements:
|
105
|
-
- - "~>"
|
106
|
-
- !ruby/object:Gem::Version
|
107
|
-
version: '3.0'
|
108
|
-
type: :runtime
|
109
|
-
prerelease: false
|
110
|
-
version_requirements: !ruby/object:Gem::Requirement
|
111
|
-
requirements:
|
112
|
-
- - "~>"
|
113
|
-
- !ruby/object:Gem::Version
|
114
|
-
version: '3.0'
|
115
|
-
- !ruby/object:Gem::Dependency
|
116
|
-
name: time
|
117
|
-
requirement: !ruby/object:Gem::Requirement
|
118
|
-
requirements:
|
119
|
-
- - "~>"
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
version: '0.3'
|
122
|
-
type: :runtime
|
123
|
-
prerelease: false
|
124
|
-
version_requirements: !ruby/object:Gem::Requirement
|
125
|
-
requirements:
|
126
|
-
- - "~>"
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
version: '0.3'
|
129
|
-
- !ruby/object:Gem::Dependency
|
130
|
-
name: uri
|
131
|
-
requirement: !ruby/object:Gem::Requirement
|
132
|
-
requirements:
|
133
|
-
- - "~>"
|
134
|
-
- !ruby/object:Gem::Version
|
135
|
-
version: '0.13'
|
136
|
-
type: :runtime
|
137
|
-
prerelease: false
|
138
|
-
version_requirements: !ruby/object:Gem::Requirement
|
139
|
-
requirements:
|
140
|
-
- - "~>"
|
141
|
-
- !ruby/object:Gem::Version
|
142
|
-
version: '0.13'
|
143
101
|
description: "\n Skyfall is a Ruby library for connecting to the \"firehose\" of
|
144
102
|
the Bluesky social network, i.e. a websocket which\n streams all new posts and
|
145
103
|
everything else happening on the Bluesky network in real time. The code connects
|
@@ -166,6 +124,7 @@ files:
|
|
166
124
|
- lib/skyfall/errors.rb
|
167
125
|
- lib/skyfall/extensions.rb
|
168
126
|
- lib/skyfall/label.rb
|
127
|
+
- lib/skyfall/messages/account_message.rb
|
169
128
|
- lib/skyfall/messages/commit_message.rb
|
170
129
|
- lib/skyfall/messages/handle_message.rb
|
171
130
|
- lib/skyfall/messages/identity_message.rb
|