Improve DBUS_SESSION_BUS_ADDRESS extraction #62
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi :-D
I've got following error after update of dbus (system dbus, not ruby-dbus)
The cause of this error was
DBUS_SESSION_BUS_ADDRESS
value surrounded by single quotation from generated file in~/.dbus/session-bus/#{MACHINE_ID}-#{ENV["DISPLAY"]}
If I remove this single quotations from this file, then error has gone.
But I think that It would might be better to support it in ruby-dbus.
Then I've just created this pull request ;)
How dou you think about this?
I tested this change in ruby
{2.3.1|1.9.3-p551|2.0.0-p648}
in local.If I need some thing change about code or style, please tell me.
especially, I used some
mocks
at rspec instead of real file for testing orTempfile
.Improvement
DBUS_SESSION_BUS_ADDRESS
value surrounded by quotation marks ('
and"
)Environment
The OS on my latop is Gentoo Linux.
% uname -a Linux HOSTNAME 4.5.2-gentoo #18 SMP Sun Aug 7 14:23:24 CEST 2016 x86_64 Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz GenuineIntel GNU/Linux
The dbus version is
1.10.10
I'm using dbus without user session support.
And it is compiled for 32 bit and 64 bit both.
I'm using ruby-dbus
0.11.1
on ruby{2.3.1|1.9.3-p551|2.0.0-p648}
:)thanks