systemd-journal 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/systemd/journal/version.rb +1 -1
- data/lib/systemd/journal/writable.rb +2 -1
- data/spec/systemd/journal_spec.rb +10 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f31e11d5777f97a69cae351bd6f65c90fdd2cd6
|
4
|
+
data.tar.gz: 14cccb03b8856fea50433a58648267947113797d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c51128c4f6c947e6c0d84142ea73af1013bb66211b6ef0dbc3ab4b7c211897fc504afef3b8021f2294d85c5d75f2c539253e8f8cecc5e389bae19a18bfa7daf
|
7
|
+
data.tar.gz: 6fa32204f49f3e4df4c82ae06a1ee5a20afda7744f087ee289c48ae92b8dfd72989dbc25db870734715ba1889feaef3b2bcb29fe453a96834890b5444097aad2
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
@@ -74,7 +74,8 @@ module Systemd
|
|
74
74
|
# @param [Hash] contents the set of key-value pairs defining the event.
|
75
75
|
def message(contents)
|
76
76
|
items = contents.flat_map do |k, v|
|
77
|
-
|
77
|
+
value = v.to_s.gsub('%', '%%')
|
78
|
+
[:string, "#{k.to_s.upcase}=#{value}"]
|
78
79
|
end
|
79
80
|
# add a null pointer to terminate the varargs
|
80
81
|
items += [:string, nil]
|
@@ -410,4 +410,14 @@ RSpec.describe Systemd::Journal do
|
|
410
410
|
expect([true, false]).to include(j.wait_select_reliable?)
|
411
411
|
end
|
412
412
|
end
|
413
|
+
|
414
|
+
describe 'message' do
|
415
|
+
it 'escapes percent signs in messages' do
|
416
|
+
expect(Systemd::Journal::Native).to receive(:sd_journal_send)
|
417
|
+
.with(:string, 'MESSAGE=hello %% world %%', :string, nil)
|
418
|
+
.and_return(0)
|
419
|
+
|
420
|
+
Systemd::Journal.message(message: 'hello % world %')
|
421
|
+
end
|
422
|
+
end
|
413
423
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: systemd-journal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Ledbetter
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
LnHNrDPklxqI1pnkXyKU9OrcCVuFnKY6te48kWZ8ZN/WhegL1fbNtLuvgoS2WuUJ
|
32
32
|
5MDu0m5ogQUz8Ijw
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2017-
|
34
|
+
date: 2017-10-06 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: ffi
|
metadata.gz.sig
CHANGED
Binary file
|