ruby-dbus 0.18.0.beta1 → 0.18.0.beta4
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/NEWS.md +33 -0
- data/VERSION +1 -1
- data/doc/Reference.md +1 -1
- data/examples/service/complex-property.rb +21 -0
- data/lib/dbus/data.rb +744 -0
- data/lib/dbus/introspect.rb +1 -0
- data/lib/dbus/marshall.rb +172 -259
- data/lib/dbus/message.rb +4 -10
- data/lib/dbus/object.rb +11 -11
- data/lib/dbus/object_path.rb +2 -1
- data/lib/dbus/raw_message.rb +91 -0
- data/lib/dbus/type.rb +147 -70
- data/lib/dbus.rb +6 -0
- data/spec/data/marshall.yaml +1667 -0
- data/spec/data_spec.rb +353 -0
- data/spec/object_path_spec.rb +1 -0
- data/spec/packet_marshaller_spec.rb +41 -0
- data/spec/packet_unmarshaller_spec.rb +262 -0
- data/spec/property_spec.rb +80 -2
- data/spec/service_newapi.rb +19 -1
- data/spec/spec_helper.rb +14 -0
- data/spec/type_spec.rb +67 -6
- data/spec/zzz_quit_spec.rb +16 -0
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6e093b55c88614ceebd2cfd0c09a5bba3886b8c561b8e153c034d9249ae5a08
|
4
|
+
data.tar.gz: a2b2931d1b3b9ae560cc6204e297a7daceec2ec85a065a2782cbbeed34286f5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66e7ad826a0f1ef5bb1abba72a6f76f02fbd4c13c7e7f14caf3abd71946ba4e5a0b9cc16950d60a22eb2d994d73c78306d270296af90f2bf9aa2aaaf4f85dab3
|
7
|
+
data.tar.gz: 4641ca7b18414d7cf58d786ab05d3d3bc3a50d40311b1b5650b6f44a1bfcf0b1cca373eee4445b5cd6e0eb70a42407b244d93c09371d9ea985a66d6d4c79c0d7
|
data/NEWS.md
CHANGED
@@ -2,6 +2,39 @@
|
|
2
2
|
|
3
3
|
## Unreleased
|
4
4
|
|
5
|
+
## Ruby D-Bus 0.18.0.beta4 - 2022-04-21
|
6
|
+
|
7
|
+
Bug fixes:
|
8
|
+
* Service-side properties: Fix Properties.Get, Properties.GetAll for
|
9
|
+
properties that contain arrays, on other than outermost level ([#109][]).
|
10
|
+
* Sending variants: fixed make_variant to correctly guess the signature
|
11
|
+
for UInt64 and number-keyed hashes/dictionaries.
|
12
|
+
|
13
|
+
[#109]: https://github.com/mvidner/ruby-dbus/pull/109
|
14
|
+
|
15
|
+
## Ruby D-Bus 0.18.0.beta3 - 2022-04-10
|
16
|
+
|
17
|
+
Bug fixes:
|
18
|
+
* Service-side properties: Fix Properties.Get, Properties.GetAll for Array,
|
19
|
+
Dict, and Variant types ([#105][]).
|
20
|
+
|
21
|
+
[#105]: https://github.com/mvidner/ruby-dbus/pull/105
|
22
|
+
|
23
|
+
## Ruby D-Bus 0.18.0.beta2 - 2022-04-04
|
24
|
+
|
25
|
+
API:
|
26
|
+
* Renamed the DBus::Type::Type class to DBus::Type
|
27
|
+
(which was previously a module).
|
28
|
+
* Introduced DBus::Data classes, use them in Properties.Get,
|
29
|
+
Properties.GetAll to return correct types as declared (still [#97][]).
|
30
|
+
|
31
|
+
Bug fixes:
|
32
|
+
* Signature validation: Ensure DBus.type produces a valid Type
|
33
|
+
* Detect more malformed messages: non-NUL padding bytes, variants with
|
34
|
+
multiple or no value.
|
35
|
+
* Added thorough tests (`spec/data/marshall.yaml`) to detect nearly all
|
36
|
+
invalid data at unmarshalling time.
|
37
|
+
|
5
38
|
## Ruby D-Bus 0.18.0.beta1 - 2022-02-24
|
6
39
|
|
7
40
|
API:
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.18.0.
|
1
|
+
0.18.0.beta4
|
data/doc/Reference.md
CHANGED
@@ -171,7 +171,7 @@ by the D-Bus signature.
|
|
171
171
|
If the signature expects a Variant
|
172
172
|
(which is the case for all Properties!) then an explicit mechanism is needed.
|
173
173
|
|
174
|
-
1. A pair [{DBus::Type
|
174
|
+
1. A pair [{DBus::Type}, value] specifies to marshall *value* as
|
175
175
|
that specified type.
|
176
176
|
The pair can be produced by {DBus.variant}(signature, value) which
|
177
177
|
gives the same result as [{DBus.type}(signature), value].
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "dbus"
|
5
|
+
|
6
|
+
# Complex property
|
7
|
+
class Test < DBus::Object
|
8
|
+
dbus_interface "net.vidner.Scratch" do
|
9
|
+
dbus_attr_reader :progress, "(stttt)"
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(opath)
|
13
|
+
@progress = ["working", 1, 0, 100, 42].freeze
|
14
|
+
super(opath)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
bus = DBus::SessionBus.instance
|
19
|
+
svc = bus.request_service("net.vidner.Scratch")
|
20
|
+
svc.export(Test.new("/net/vidner/Scratch"))
|
21
|
+
DBus::Main.new.tap { |m| m << bus }.run
|