ruby-dbus 0.23.1 → 0.24.0
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 +8 -0
- data/VERSION +1 -1
- data/lib/dbus/proxy_object.rb +10 -5
- data/ruby-dbus.gemspec +2 -0
- data/spec/signal_spec.rb +2 -1
- metadata +17 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46409560afa18cf728a8fdc0d5a488e69f04d3bf3c14cece10f8c14af8bc8a41
|
4
|
+
data.tar.gz: f0432d7e9716f8e87ce5daaf7dc581b0cf5b89c66f5e5cc3da50bb38cae85fa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e98790e7cf81e2cb7bcaf3e2e39e530b99788483fd9fb583f209ce3f2a120ef381b59d3f0683c9affcef7d1475bf52f9d91e0f66004c1e78cb4fd363639698bf
|
7
|
+
data.tar.gz: 2660d2bf3b6a511898c13048a5548c31d04674e6ad62e13aca567b1379fed0ce48b063435c5c74a680fba649427cc3a7c802c0883a6ff433a20040129604e07c
|
data/NEWS.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
## Unreleased
|
4
4
|
|
5
|
+
## Ruby D-Bus 0.24.0 - 2025-01-02
|
6
|
+
|
7
|
+
Bug fixes:
|
8
|
+
* Adapted for Ruby 3.4, which uses a single quote instead of a backtick
|
9
|
+
in exceptions ([#145][], by Mamoru TASAKA).
|
10
|
+
|
11
|
+
[#145]: https://github.com/mvidner/ruby-dbus/pull/145
|
12
|
+
|
5
13
|
## Ruby D-Bus 0.23.1 - 2023-10-03
|
6
14
|
|
7
15
|
API:
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.24.0
|
data/lib/dbus/proxy_object.rb
CHANGED
@@ -33,6 +33,8 @@ module DBus
|
|
33
33
|
# @return [ApiOptions]
|
34
34
|
attr_reader :api
|
35
35
|
|
36
|
+
OPEN_QUOTE = RUBY_VERSION >= "3.4" ? "'" : "`"
|
37
|
+
|
36
38
|
# Creates a new proxy object living on the given _bus_ at destination _dest_
|
37
39
|
# on the given _path_.
|
38
40
|
def initialize(bus, dest, path, api: ApiOptions::CURRENT)
|
@@ -58,7 +60,7 @@ module DBus
|
|
58
60
|
def [](intfname)
|
59
61
|
introspect unless introspected
|
60
62
|
ifc = @interfaces[intfname]
|
61
|
-
raise DBus::Error, "no such interface
|
63
|
+
raise DBus::Error, "no such interface #{OPEN_QUOTE}#{intfname}' on object #{OPEN_QUOTE}#{@path}'" unless ifc
|
62
64
|
|
63
65
|
ifc
|
64
66
|
end
|
@@ -127,7 +129,8 @@ module DBus
|
|
127
129
|
# @return [void]
|
128
130
|
def on_signal(name, &block)
|
129
131
|
unless @default_iface && has_iface?(@default_iface)
|
130
|
-
raise NoMethodError, "undefined signal
|
132
|
+
raise NoMethodError, "undefined signal #{OPEN_QUOTE}#{name}' for DBus interface "\
|
133
|
+
"#{OPEN_QUOTE}#{@default_iface}' on object #{OPEN_QUOTE}#{@path}'"
|
131
134
|
end
|
132
135
|
|
133
136
|
@interfaces[@default_iface].on_signal(name, &block)
|
@@ -151,7 +154,8 @@ module DBus
|
|
151
154
|
# - di not specified
|
152
155
|
# TODO
|
153
156
|
# - di is specified but not found in introspection data
|
154
|
-
raise NoMethodError, "undefined method
|
157
|
+
raise NoMethodError, "undefined method #{OPEN_QUOTE}#{name}' for DBus interface "\
|
158
|
+
"#{OPEN_QUOTE}#{@default_iface}' on object #{OPEN_QUOTE}#{@path}'"
|
155
159
|
end
|
156
160
|
|
157
161
|
begin
|
@@ -159,10 +163,11 @@ module DBus
|
|
159
163
|
rescue NameError => e
|
160
164
|
# interesting, foo.method("unknown")
|
161
165
|
# raises NameError, not NoMethodError
|
162
|
-
raise unless e.to_s =~ /undefined method
|
166
|
+
raise unless e.to_s =~ /undefined method #{OPEN_QUOTE}#{name}'/
|
163
167
|
|
164
168
|
# BTW e.exception("...") would preserve the class.
|
165
|
-
raise NoMethodError, "undefined method
|
169
|
+
raise NoMethodError, "undefined method #{OPEN_QUOTE}#{name}' for DBus interface "\
|
170
|
+
"#{OPEN_QUOTE}#{@default_iface}' on object #{OPEN_QUOTE}#{@path}'"
|
166
171
|
end
|
167
172
|
end
|
168
173
|
# rubocop:enable Lint/MissingSuper
|
data/ruby-dbus.gemspec
CHANGED
@@ -28,6 +28,8 @@ GEMSPEC = Gem::Specification.new do |s|
|
|
28
28
|
s.add_runtime_dependency "rexml"
|
29
29
|
# s.add_runtime_dependency "nokogiri"
|
30
30
|
|
31
|
+
# workaround: rubocop-1.0 needs base64 which is no longer in stdlib in newer rubies
|
32
|
+
s.add_development_dependency "base64"
|
31
33
|
s.add_development_dependency "packaging_rake_tasks"
|
32
34
|
s.add_development_dependency "rake"
|
33
35
|
s.add_development_dependency "rspec", "~> 3"
|
data/spec/signal_spec.rb
CHANGED
@@ -107,9 +107,10 @@ describe "SignalHandlerTest" do
|
|
107
107
|
describe DBus::ProxyObject do
|
108
108
|
describe "#on_signal" do
|
109
109
|
it "raises a descriptive error when the default_iface is wrong" do
|
110
|
+
open_quote = RUBY_VERSION >= "3.4" ? "'" : "`"
|
110
111
|
@obj.default_iface = "org.ruby.NoSuchInterface"
|
111
112
|
expect { @obj.on_signal("Foo") {} }
|
112
|
-
.to raise_error(NoMethodError, /undefined signal.*interface
|
113
|
+
.to raise_error(NoMethodError, /undefined signal.*interface #{open_quote}org.ruby.NoSuchInterface'/)
|
113
114
|
end
|
114
115
|
end
|
115
116
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-dbus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.24.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ruby DBus Team
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: rexml
|
@@ -24,6 +23,20 @@ dependencies:
|
|
24
23
|
- - ">="
|
25
24
|
- !ruby/object:Gem::Version
|
26
25
|
version: '0'
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: base64
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
27
40
|
- !ruby/object:Gem::Dependency
|
28
41
|
name: packaging_rake_tasks
|
29
42
|
requirement: !ruby/object:Gem::Requirement
|
@@ -224,7 +237,6 @@ homepage: https://github.com/mvidner/ruby-dbus
|
|
224
237
|
licenses:
|
225
238
|
- LGPL-2.1-or-later
|
226
239
|
metadata: {}
|
227
|
-
post_install_message:
|
228
240
|
rdoc_options: []
|
229
241
|
require_paths:
|
230
242
|
- lib
|
@@ -239,8 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
239
251
|
- !ruby/object:Gem::Version
|
240
252
|
version: '0'
|
241
253
|
requirements: []
|
242
|
-
rubygems_version: 3.
|
243
|
-
signing_key:
|
254
|
+
rubygems_version: 3.6.2
|
244
255
|
specification_version: 4
|
245
256
|
summary: Ruby module for interaction with D-Bus
|
246
257
|
test_files: []
|