async-matrix 1.2.1 → 2.0.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/Cargo.lock +990 -0
- data/Cargo.toml +7 -0
- data/README.md +8 -6
- data/lib/async/discord/api/path_tree.rb +2 -5
- data/lib/async/discord/api.rb +1 -6
- data/lib/async/discord/client.rb +1 -4
- data/lib/async/discord/error.rb +1 -5
- data/lib/async/discord/gateway.rb +1 -4
- data/lib/async/discord.rb +0 -1
- data/lib/async/matrix/api/chain.rb +1 -4
- data/lib/async/matrix/api/concat.rb +1 -5
- data/lib/async/matrix/api/path_tree.rb +1 -4
- data/lib/async/matrix/api.rb +1 -5
- data/lib/async/matrix/application_service/bot.rb +4 -7
- data/lib/async/matrix/application_service/config/vivify.rb +1 -5
- data/lib/async/matrix/application_service/config.rb +1 -4
- data/lib/async/matrix/application_service/dispatcher.rb +65 -9
- data/lib/async/matrix/application_service/error_response.rb +1 -5
- data/lib/async/matrix/application_service/event.rb +1 -5
- data/lib/async/matrix/application_service/server.rb +339 -211
- data/lib/async/matrix/application_service/transaction.rb +1 -5
- data/lib/async/matrix/application_service/transaction_handler.rb +185 -0
- data/lib/async/matrix/application_service/transaction_store.rb +1 -5
- data/lib/async/matrix/bridge/discord/db/connection.rb +1 -3
- data/lib/async/matrix/bridge/discord/db/file.rb +2 -4
- data/lib/async/matrix/bridge/discord/db/guild.rb +2 -4
- data/lib/async/matrix/bridge/discord/db/message.rb +2 -4
- data/lib/async/matrix/bridge/discord/db/portal.rb +2 -4
- data/lib/async/matrix/bridge/discord/db/puppet.rb +2 -4
- data/lib/async/matrix/bridge/discord/db/reaction.rb +2 -4
- data/lib/async/matrix/bridge/discord/db/schema.rb +18 -0
- data/lib/async/matrix/bridge/discord/db/user.rb +2 -4
- data/lib/async/matrix/bridge/discord/db.rb +14 -16
- data/lib/async/matrix/client.rb +1 -4
- data/lib/async/matrix/connection.rb +1 -4
- data/lib/async/matrix/double_puppet_client.rb +2 -4
- data/lib/async/matrix/e2ee.rb +11 -4
- data/lib/async/matrix/endpoint.rb +1 -4
- data/lib/async/matrix/error.rb +1 -4
- data/lib/async/matrix/media_client.rb +1 -4
- data/lib/async/matrix/notifier.rb +1 -4
- data/lib/async/matrix/schema/registry.rb +1 -2
- data/lib/async/matrix/schema/validation_error.rb +1 -2
- data/lib/async/matrix/schema.rb +1 -5
- data/lib/async/matrix/server.rb +1 -4
- data/lib/async/matrix/stream.rb +1 -4
- data/lib/async/matrix/version.rb +1 -1
- data/lib/async/matrix.rb +4 -1
- metadata +25 -7
|
@@ -234,7 +234,7 @@ module Async
|
|
|
234
234
|
end
|
|
235
235
|
end
|
|
236
236
|
|
|
237
|
-
|
|
237
|
+
__END__
|
|
238
238
|
describe "Async::Matrix::Schema::Registry" do
|
|
239
239
|
it "loads schemas from disk" do
|
|
240
240
|
Async::Matrix::Schema::Registry.instance.size.should.be > 0
|
|
@@ -352,4 +352,3 @@ test do
|
|
|
352
352
|
Async::Matrix::Schema::Registry.instance.validate(event).should == []
|
|
353
353
|
end
|
|
354
354
|
end
|
|
355
|
-
end
|
|
@@ -115,7 +115,7 @@ module Async
|
|
|
115
115
|
end
|
|
116
116
|
end
|
|
117
117
|
|
|
118
|
-
|
|
118
|
+
__END__
|
|
119
119
|
describe "Async::Matrix::Schema::ValidationError" do
|
|
120
120
|
def error_hash(overrides = {})
|
|
121
121
|
{
|
|
@@ -223,4 +223,3 @@ test do
|
|
|
223
223
|
err.errors.should.equal raw
|
|
224
224
|
end
|
|
225
225
|
end
|
|
226
|
-
end
|
data/lib/async/matrix/schema.rb
CHANGED
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
# Released under the Apache License, Version 2.0.
|
|
4
4
|
# Copyright, 2026, by General Intelligence Systems.
|
|
5
5
|
|
|
6
|
-
require "bundler/setup"
|
|
7
|
-
require "async/matrix"
|
|
8
|
-
|
|
9
6
|
module Async
|
|
10
7
|
module Matrix
|
|
11
8
|
# Schema-driven validation for Matrix events using the official matrix-org/matrix-spec
|
|
@@ -91,7 +88,7 @@ module Async
|
|
|
91
88
|
end
|
|
92
89
|
end
|
|
93
90
|
|
|
94
|
-
|
|
91
|
+
__END__
|
|
95
92
|
describe "Async::Matrix::Schema" do
|
|
96
93
|
it "looks up schemas by event type" do
|
|
97
94
|
schema = Async::Matrix::Schema["m.room.message"]
|
|
@@ -171,4 +168,3 @@ test do
|
|
|
171
168
|
event.schema.should.not.be.nil
|
|
172
169
|
end
|
|
173
170
|
end
|
|
174
|
-
end
|
data/lib/async/matrix/server.rb
CHANGED
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
# Released under the Apache License, Version 2.0.
|
|
4
4
|
# Copyright, 2026, by General Intelligence Systems.
|
|
5
5
|
|
|
6
|
-
require "bundler/setup"
|
|
7
6
|
require "async/http"
|
|
8
|
-
require "async/matrix"
|
|
9
7
|
|
|
10
8
|
module Async
|
|
11
9
|
module Matrix
|
|
@@ -14,8 +12,7 @@ module Async
|
|
|
14
12
|
end
|
|
15
13
|
end
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
__END__
|
|
18
16
|
it "inherits from Async::HTTP::Protocol::HTTP2::Server" do
|
|
19
17
|
Async::Matrix::Server.ancestors.should.include Async::HTTP::Protocol::HTTP2::Server
|
|
20
18
|
end
|
|
21
|
-
end
|
data/lib/async/matrix/stream.rb
CHANGED
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
# Released under the Apache License, Version 2.0.
|
|
4
4
|
# Copyright, 2026, by General Intelligence Systems.
|
|
5
5
|
|
|
6
|
-
require "bundler/setup"
|
|
7
6
|
require "async/http"
|
|
8
|
-
require "async/matrix"
|
|
9
7
|
|
|
10
8
|
module Async
|
|
11
9
|
module Matrix
|
|
@@ -14,8 +12,7 @@ module Async
|
|
|
14
12
|
end
|
|
15
13
|
end
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
__END__
|
|
18
16
|
it "inherits from Async::HTTP::Protocol::HTTP2::Stream" do
|
|
19
17
|
Async::Matrix::Stream.ancestors.should.include Async::HTTP::Protocol::HTTP2::Stream
|
|
20
18
|
end
|
|
21
|
-
end
|
data/lib/async/matrix/version.rb
CHANGED
data/lib/async/matrix.rb
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
|
|
6
6
|
require "bundler/setup"
|
|
7
7
|
require "async/http"
|
|
8
|
-
require "scampi"
|
|
9
8
|
|
|
10
9
|
module Async
|
|
11
10
|
module Matrix
|
|
@@ -14,6 +13,10 @@ end
|
|
|
14
13
|
|
|
15
14
|
Dir.glob("#{__dir__}/matrix/**/*.rb").sort.each do |path|
|
|
16
15
|
next if path.include?("/migrations/")
|
|
16
|
+
# The Discord bridge is opt-in — it pulls in Sequel and opens a placeholder
|
|
17
|
+
# database at load time. Require "async/matrix/bridge/discord/db" explicitly
|
|
18
|
+
# when you need it, so plain Matrix use stays free of that dependency.
|
|
19
|
+
next if path.include?("/bridge/")
|
|
17
20
|
require path
|
|
18
21
|
end
|
|
19
22
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: async-matrix
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nathan Kidd
|
|
@@ -52,33 +52,33 @@ dependencies:
|
|
|
52
52
|
- !ruby/object:Gem::Version
|
|
53
53
|
version: '0.30'
|
|
54
54
|
- !ruby/object:Gem::Dependency
|
|
55
|
-
name:
|
|
55
|
+
name: grape
|
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
|
57
57
|
requirements:
|
|
58
58
|
- - "~>"
|
|
59
59
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: '
|
|
60
|
+
version: '3.3'
|
|
61
61
|
type: :runtime
|
|
62
62
|
prerelease: false
|
|
63
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
64
64
|
requirements:
|
|
65
65
|
- - "~>"
|
|
66
66
|
- !ruby/object:Gem::Version
|
|
67
|
-
version: '
|
|
67
|
+
version: '3.3'
|
|
68
68
|
- !ruby/object:Gem::Dependency
|
|
69
|
-
name:
|
|
69
|
+
name: json_schemer
|
|
70
70
|
requirement: !ruby/object:Gem::Requirement
|
|
71
71
|
requirements:
|
|
72
72
|
- - "~>"
|
|
73
73
|
- !ruby/object:Gem::Version
|
|
74
|
-
version: 0
|
|
74
|
+
version: '2.0'
|
|
75
75
|
type: :runtime
|
|
76
76
|
prerelease: false
|
|
77
77
|
version_requirements: !ruby/object:Gem::Requirement
|
|
78
78
|
requirements:
|
|
79
79
|
- - "~>"
|
|
80
80
|
- !ruby/object:Gem::Version
|
|
81
|
-
version: 0
|
|
81
|
+
version: '2.0'
|
|
82
82
|
- !ruby/object:Gem::Dependency
|
|
83
83
|
name: sequel
|
|
84
84
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -121,6 +121,20 @@ dependencies:
|
|
|
121
121
|
- - "~>"
|
|
122
122
|
- !ruby/object:Gem::Version
|
|
123
123
|
version: '0.9'
|
|
124
|
+
- !ruby/object:Gem::Dependency
|
|
125
|
+
name: scampi
|
|
126
|
+
requirement: !ruby/object:Gem::Requirement
|
|
127
|
+
requirements:
|
|
128
|
+
- - "~>"
|
|
129
|
+
- !ruby/object:Gem::Version
|
|
130
|
+
version: '1.0'
|
|
131
|
+
type: :development
|
|
132
|
+
prerelease: false
|
|
133
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
134
|
+
requirements:
|
|
135
|
+
- - "~>"
|
|
136
|
+
- !ruby/object:Gem::Version
|
|
137
|
+
version: '1.0'
|
|
124
138
|
- !ruby/object:Gem::Dependency
|
|
125
139
|
name: falcon
|
|
126
140
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -186,6 +200,8 @@ extensions:
|
|
|
186
200
|
- ext/async_matrix_e2ee/extconf.rb
|
|
187
201
|
extra_rdoc_files: []
|
|
188
202
|
files:
|
|
203
|
+
- Cargo.lock
|
|
204
|
+
- Cargo.toml
|
|
189
205
|
- LICENSE
|
|
190
206
|
- README.md
|
|
191
207
|
- data/discord-api-spec/openapi.json
|
|
@@ -523,6 +539,7 @@ files:
|
|
|
523
539
|
- lib/async/matrix/application_service/event.rb
|
|
524
540
|
- lib/async/matrix/application_service/server.rb
|
|
525
541
|
- lib/async/matrix/application_service/transaction.rb
|
|
542
|
+
- lib/async/matrix/application_service/transaction_handler.rb
|
|
526
543
|
- lib/async/matrix/application_service/transaction_store.rb
|
|
527
544
|
- lib/async/matrix/bridge/discord/db.rb
|
|
528
545
|
- lib/async/matrix/bridge/discord/db/connection.rb
|
|
@@ -539,6 +556,7 @@ files:
|
|
|
539
556
|
- lib/async/matrix/bridge/discord/db/portal.rb
|
|
540
557
|
- lib/async/matrix/bridge/discord/db/puppet.rb
|
|
541
558
|
- lib/async/matrix/bridge/discord/db/reaction.rb
|
|
559
|
+
- lib/async/matrix/bridge/discord/db/schema.rb
|
|
542
560
|
- lib/async/matrix/bridge/discord/db/user.rb
|
|
543
561
|
- lib/async/matrix/client.rb
|
|
544
562
|
- lib/async/matrix/connection.rb
|