systemd-journal 1.2.0 → 1.2.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/.travis.yml +2 -0
- data/LICENSE.txt +1 -1
- data/README.md +3 -2
- data/lib/systemd.rb +13 -0
- data/lib/systemd/id128.rb +3 -3
- data/lib/systemd/journal.rb +23 -2
- data/lib/systemd/journal/native.rb +13 -1
- data/lib/systemd/journal/navigable.rb +2 -2
- data/lib/systemd/journal/version.rb +1 -1
- data/lib/systemd/journal/writable.rb +5 -2
- data/lib/systemd/journal_entry.rb +34 -0
- data/spec/systemd/id128_spec.rb +45 -0
- data/spec/systemd/journal_entry_spec.rb +10 -1
- data/spec/systemd/journal_spec.rb +48 -0
- data/spec/systemd_spec.rb +18 -0
- data/systemd-journal.gemspec +14 -12
- metadata +20 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17f43d104aba0ce7b017388964e8dc82a8552ad2
|
4
|
+
data.tar.gz: 22fa6ea7f4c044f1d1e27e81b388dc390ee02066
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63fda69b863ca386c990331a565ff787b3b09ca3e14db6bfb3276bc0b291f726a2b0fb89d2d6431ea2147d86cbe548fd01f92cd91af255e5490cbcc30170969b
|
7
|
+
data.tar.gz: 3455916da4baede72a14514ee20702b4451b1391e746a5e0cbc7db087fefda64d8f29533e4b41585273a37e91f98a4e5638232afb1d97803876d36b6db3f69da
|
data/.travis.yml
CHANGED
@@ -21,3 +21,5 @@ before_script:
|
|
21
21
|
- cd /tmp/systemd/ && make && sudo make install
|
22
22
|
- echo "done building in $(pwd), switching back to $PREV_DIR, library path is $LD_LIBRARY_PATH"
|
23
23
|
- cd $PREV_DIR
|
24
|
+
- >
|
25
|
+
[ -f /etc/machine-id ] || cat /dev/urandom | tr -cd 'a-f0-9' | head -c 32 | awk '{ print $1 }' | sudo tee /etc/machine-id
|
data/LICENSE.txt
CHANGED
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
19
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
20
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
21
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ Ruby bindings for reading from the systemd journal.
|
|
9
9
|
|
10
10
|
Add this line to your application's Gemfile:
|
11
11
|
|
12
|
-
gem 'systemd-journal', '~> 1.
|
12
|
+
gem 'systemd-journal', '~> 1.2.0'
|
13
13
|
|
14
14
|
And then execute:
|
15
15
|
|
@@ -22,7 +22,8 @@ thing.
|
|
22
22
|
|
23
23
|
Obviously you will need to have
|
24
24
|
[systemd](http://www.freedesktop.org/wiki/Software/systemd/) installed on your
|
25
|
-
system
|
25
|
+
system (specifically libsystemd or the older libsystemd-journal) in order to
|
26
|
+
use the gem. Currently we support systemd 208 or higher.
|
26
27
|
|
27
28
|
## Usage
|
28
29
|
|
data/lib/systemd.rb
ADDED
data/lib/systemd/id128.rb
CHANGED
@@ -9,7 +9,7 @@ module Systemd
|
|
9
9
|
# from this machine.
|
10
10
|
# @example Filter journal to the current machine.
|
11
11
|
# j = Systemd::Journal.new
|
12
|
-
# j.
|
12
|
+
# j.filter(_machine_id: Systemd::Id128.machine_id)
|
13
13
|
# @return [String] 128-bit hex string representing the current machine.
|
14
14
|
def self.machine_id
|
15
15
|
@machine_id ||= read_id128(:sd_id128_get_machine)
|
@@ -20,7 +20,7 @@ module Systemd
|
|
20
20
|
# the current boot.
|
21
21
|
# @example Filter journal to the current boot.
|
22
22
|
# j = Systemd::Journal.new
|
23
|
-
# j.
|
23
|
+
# j.filter(_boot_id: Systemd::Id128.boot_id)
|
24
24
|
# @return [String] 128-bit hex string representing the current boot.
|
25
25
|
def self.boot_id
|
26
26
|
@boot_id ||= read_id128(:sd_id128_get_boot)
|
@@ -59,7 +59,7 @@ module Systemd
|
|
59
59
|
:qwords, [:uint64, 2]
|
60
60
|
|
61
61
|
def to_s
|
62
|
-
('%02x' * 16
|
62
|
+
format('%02x' * 16, *self[:bytes].to_a)
|
63
63
|
end
|
64
64
|
|
65
65
|
def self.from_s(str)
|
data/lib/systemd/journal.rb
CHANGED
@@ -9,8 +9,8 @@ require 'systemd/journal/waitable'
|
|
9
9
|
require 'systemd/journal_error'
|
10
10
|
require 'systemd/journal_entry'
|
11
11
|
require 'systemd/id128'
|
12
|
-
|
13
12
|
require 'systemd/ffi_size_t'
|
13
|
+
require 'systemd'
|
14
14
|
|
15
15
|
module Systemd
|
16
16
|
# Class to allow interacting with the systemd journal.
|
@@ -194,17 +194,38 @@ module Systemd
|
|
194
194
|
end
|
195
195
|
end
|
196
196
|
|
197
|
+
# @private
|
198
|
+
def inspect
|
199
|
+
format(
|
200
|
+
'#<%s:0x%016x target: "%s", flags: 0x%08x>',
|
201
|
+
self.class.name,
|
202
|
+
object_id,
|
203
|
+
@open_target,
|
204
|
+
@open_flags
|
205
|
+
)
|
206
|
+
end
|
207
|
+
|
197
208
|
private
|
198
209
|
|
199
210
|
def open_journal(ptr, opts, flags)
|
211
|
+
@open_flags = 0
|
212
|
+
|
200
213
|
case
|
201
214
|
when opts[:path]
|
215
|
+
@open_target = "path:#{opts[:path]}"
|
202
216
|
Native.sd_journal_open_directory(ptr, opts[:path], 0)
|
203
217
|
when opts[:files]
|
204
|
-
|
218
|
+
files = Array(opts[:files])
|
219
|
+
@open_target = "file#{files.one? ? '' : 's'}:#{files.join(',')}"
|
220
|
+
Native.sd_journal_open_files(ptr, array_to_ptrs(files), 0)
|
205
221
|
when opts[:container]
|
222
|
+
raise ArgumentError.new('This libsystemd-journal version does not support sd_journal_open_container') unless Native.open_container?
|
223
|
+
@open_flags = flags
|
224
|
+
@open_target = "container:#{opts[:container]}"
|
206
225
|
Native.sd_journal_open_container(ptr, opts[:container], flags)
|
207
226
|
else
|
227
|
+
@open_flags = flags
|
228
|
+
@open_target = 'journal:local'
|
208
229
|
Native.sd_journal_open(ptr, flags)
|
209
230
|
end
|
210
231
|
end
|
@@ -11,13 +11,25 @@ module Systemd
|
|
11
11
|
ffi_lib %w( libsystemd.so.0 libsystemd.so
|
12
12
|
libsystemd-journal.so.0 libsystemd-journal.so)
|
13
13
|
|
14
|
+
@@has_open_container = true
|
15
|
+
|
16
|
+
def self.open_container?
|
17
|
+
@@has_open_container
|
18
|
+
end
|
19
|
+
|
14
20
|
# setup/teardown
|
15
21
|
attach_function :sd_journal_open, [:pointer, :int], :int
|
16
22
|
attach_function :sd_journal_open_directory, [:pointer, :string, :int], :int
|
17
23
|
attach_function :sd_journal_close, [:pointer], :void
|
18
24
|
|
19
25
|
attach_function :sd_journal_open_files, [:pointer, :pointer, :int], :int
|
20
|
-
|
26
|
+
|
27
|
+
# not available in 208
|
28
|
+
begin
|
29
|
+
attach_function :sd_journal_open_container, [:pointer, :string, :int], :int
|
30
|
+
rescue FFI::NotFoundError
|
31
|
+
@@has_open_container = false
|
32
|
+
end
|
21
33
|
|
22
34
|
# navigation
|
23
35
|
attach_function :sd_journal_next, [:pointer], :int
|
@@ -29,9 +29,9 @@ module Systemd
|
|
29
29
|
# Move the read pointer by `offset` entries.
|
30
30
|
# @param [Integer] offset how many entries to move the read pointer by.
|
31
31
|
# If this value is positive, the read pointer moves forward. Otherwise,
|
32
|
-
# it moves backwards.
|
32
|
+
# it moves backwards. Defaults to moving forward one entry.
|
33
33
|
# @return [Integer] number of entries the read pointer actually moved.
|
34
|
-
def move(offset)
|
34
|
+
def move(offset = 1)
|
35
35
|
offset > 0 ? move_next_skip(offset) : move_previous_skip(-offset)
|
36
36
|
end
|
37
37
|
|
@@ -32,7 +32,6 @@ module Systemd
|
|
32
32
|
# methods in this module will be available as class methods on
|
33
33
|
# {Systemd::Journal}
|
34
34
|
module ClassMethods
|
35
|
-
|
36
35
|
# Creates a new IO stream which writes newline-seperated messages to
|
37
36
|
# the journal.
|
38
37
|
# @param identifier [String] this value will be passed as
|
@@ -44,7 +43,11 @@ module Systemd
|
|
44
43
|
# priority prefixes
|
45
44
|
# @return [IO]
|
46
45
|
def log_stream(identifier, priority, opts = {})
|
47
|
-
fd = Native.sd_journal_stream_fd(
|
46
|
+
fd = Native.sd_journal_stream_fd(
|
47
|
+
identifier,
|
48
|
+
priority,
|
49
|
+
!opts[:prefix].nil?
|
50
|
+
)
|
48
51
|
raise JournalError.new(fd) if fd < 0
|
49
52
|
|
50
53
|
IO.new(fd, File::WRONLY, encoding: Encoding::UTF_8)
|
@@ -11,18 +11,23 @@ module Systemd
|
|
11
11
|
# @param [Hash] entry a hash containing all the key-value pairs associated
|
12
12
|
# with a given journal entry.
|
13
13
|
def initialize(entry, context = {})
|
14
|
+
inspect = []
|
14
15
|
@entry = entry
|
15
16
|
@ctx = context
|
16
17
|
@fields = entry.map do |key, value|
|
17
18
|
name = key.downcase.to_sym
|
18
19
|
define_singleton_method(name) { value } unless respond_to?(name)
|
20
|
+
|
21
|
+
inspect.push("#{name}: '#{value}'")
|
19
22
|
name
|
20
23
|
end
|
24
|
+
@inspect = inspect.join(', ')
|
21
25
|
end
|
22
26
|
|
23
27
|
# Returns the wall-clock time that this entry was received by the journal.
|
24
28
|
# @return [Time]
|
25
29
|
def realtime_timestamp
|
30
|
+
return nil unless @ctx.key?(:realtime_ts)
|
26
31
|
@realtime_timestamp ||= Time.at(0, @ctx[:realtime_ts])
|
27
32
|
end
|
28
33
|
|
@@ -30,9 +35,11 @@ module Systemd
|
|
30
35
|
# by the journal. This should be associated with a boot_id.
|
31
36
|
# @return [Time]
|
32
37
|
def monotonic_timestamp
|
38
|
+
return nil unless @ctx.key?(:monotonic_ts)
|
33
39
|
@monotonic_timestamp ||= Time.at(0, @ctx[:monotonic_ts].first)
|
34
40
|
end
|
35
41
|
|
42
|
+
# @private
|
36
43
|
def method_missing(m, *args)
|
37
44
|
# not all journal entries will have all fields. don't raise an error
|
38
45
|
# unless the user passed arguments.
|
@@ -40,15 +47,27 @@ module Systemd
|
|
40
47
|
end
|
41
48
|
|
42
49
|
# Get the value of a given field in the entry, or nil if it doesn't exist
|
50
|
+
# @param [String] the field name for which to look up the value. Can be a
|
51
|
+
# symbol or string, case insensitive.
|
52
|
+
# @return [String] the value for the given field, or nil if not found.
|
43
53
|
def [](key)
|
44
54
|
@entry[key] || @entry[key.to_s.upcase]
|
45
55
|
end
|
46
56
|
|
57
|
+
# Yields each field name and value pair to the provided block.
|
58
|
+
# If no block is given, returns an enumerator.
|
59
|
+
# @return [Enumerator]
|
47
60
|
def each
|
48
61
|
return to_enum(:each) unless block_given?
|
49
62
|
@entry.each { |key, value| yield [key, value] }
|
50
63
|
end
|
51
64
|
|
65
|
+
# Returns the catalog message that this Journal Entry references, if any.
|
66
|
+
# @option opts [Boolean] :replace set to false to not replace placeholder
|
67
|
+
# strings in the catalog with the associated values in this Journal Entry.
|
68
|
+
# defaults to true.
|
69
|
+
# @return [String] the catalog provided message for this Journal Entry, or
|
70
|
+
# nil if non exists.
|
52
71
|
def catalog(opts = {})
|
53
72
|
return nil unless catalog?
|
54
73
|
|
@@ -60,12 +79,27 @@ module Systemd
|
|
60
79
|
opts[:replace] ? field_substitute(cat) : cat
|
61
80
|
end
|
62
81
|
|
82
|
+
# Returns true if this Journal Entry has an associated catalog message.
|
83
|
+
# @return [Boolean] whether or not this entry has an associated catalog
|
84
|
+
# message.
|
63
85
|
def catalog?
|
64
86
|
!self[:message_id].nil?
|
65
87
|
end
|
66
88
|
|
89
|
+
# Convert this Entry into a hash.
|
90
|
+
# @return [Hash] the hash representation of this journal entry.
|
91
|
+
def to_h
|
92
|
+
@entry.each_with_object({}) { |(k, v), h| h[k] = v.dup }
|
93
|
+
end
|
94
|
+
|
95
|
+
# @private
|
96
|
+
def inspect
|
97
|
+
format('#<%s:0x%016x %s>', self.class.name, object_id, @inspect)
|
98
|
+
end
|
99
|
+
|
67
100
|
private
|
68
101
|
|
102
|
+
# @private
|
69
103
|
def field_substitute(msg)
|
70
104
|
msg.gsub(/@[A-Z_0-9]+@/) { |field| self[field[1..-2]] || field }
|
71
105
|
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe Systemd::Id128 do
|
4
|
+
subject(:id128){ Systemd::Id128 }
|
5
|
+
|
6
|
+
describe 'machine_id' do
|
7
|
+
it 'should be a 128 bit hexadecimal string' do
|
8
|
+
expect(id128.machine_id).to match(/[0-9a-f]{16}/)
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'should match when called twice' do
|
12
|
+
m1 = id128.machine_id
|
13
|
+
m2 = id128.machine_id
|
14
|
+
expect(m1).to eq(m2)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
# travis-ci does not boot with systemd so these cases
|
19
|
+
# will raise exceptions.
|
20
|
+
context 'when booted under systemd' do
|
21
|
+
describe 'boot_id' do
|
22
|
+
it 'should be a 128 bit hexadecimal string' do
|
23
|
+
expect(id128.boot_id).to match(/[0-9a-f]{16}/)
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'should match when called twice' do
|
27
|
+
b1 = id128.boot_id
|
28
|
+
b2 = id128.boot_id
|
29
|
+
expect(b1).to eq(b2)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end unless ENV['TRAVIS']
|
33
|
+
|
34
|
+
describe 'random' do
|
35
|
+
it 'should be a 128 bit hexadecimal string' do
|
36
|
+
expect(id128.random).to match(/[0-9a-f]{16}/)
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'should return a different value when called again' do
|
40
|
+
r1 = id128.random
|
41
|
+
r2 = id128.random
|
42
|
+
expect(r1).to_not eq(r2)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -36,7 +36,16 @@ RSpec.describe Systemd::JournalEntry do
|
|
36
36
|
end
|
37
37
|
|
38
38
|
it 'yields each key/value in turn' do
|
39
|
-
|
39
|
+
items = entry.map { |k, v| [k, v] }
|
40
|
+
expect(items).to eq([['_PID', pid], ['MESSAGE', msg]])
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
describe 'to_h' do
|
45
|
+
it 'returns a deep copy of the entry' do
|
46
|
+
copy = subject.to_h
|
47
|
+
expect(copy).to eq(hash)
|
48
|
+
expect { copy['_PID'] << '3' }.to_not change { subject._pid }
|
40
49
|
end
|
41
50
|
end
|
42
51
|
|
@@ -16,6 +16,11 @@ RSpec.describe Systemd::Journal do
|
|
16
16
|
expect { j.new(container: '', files: []) }.to raise_error(ArgumentError)
|
17
17
|
expect { j.new(container: '', path: '/') }.to raise_error(ArgumentError)
|
18
18
|
end
|
19
|
+
|
20
|
+
it 'throws an ArgumentError when attempting to open a container without support' do
|
21
|
+
allow(Systemd::Journal::Native).to receive(:open_container?).and_return(false)
|
22
|
+
expect { j.new(container: 'test') }.to raise_error(ArgumentError)
|
23
|
+
end
|
19
24
|
end
|
20
25
|
|
21
26
|
describe 'query_unique' do
|
@@ -46,6 +51,8 @@ RSpec.describe Systemd::Journal do
|
|
46
51
|
it 'returns the disk usage of the example journal file' do
|
47
52
|
pending 'blocks? bytes?'
|
48
53
|
expect(j.disk_usage).to eq(4_005_888)
|
54
|
+
# force failure to make travis-ci happy
|
55
|
+
expect(true).to be false
|
49
56
|
end
|
50
57
|
end
|
51
58
|
|
@@ -326,4 +333,45 @@ RSpec.describe Systemd::Journal do
|
|
326
333
|
end
|
327
334
|
end
|
328
335
|
|
336
|
+
describe 'wait' do
|
337
|
+
it 'returns nil if nothing happens' do
|
338
|
+
expect(Systemd::Journal::Native)
|
339
|
+
.to receive(:sd_journal_wait)
|
340
|
+
.and_return(:nop)
|
341
|
+
|
342
|
+
expect(j.wait(1)).to be nil
|
343
|
+
end
|
344
|
+
|
345
|
+
it 'returns :append if new entries are found' do
|
346
|
+
expect(Systemd::Journal::Native)
|
347
|
+
.to receive(:sd_journal_wait)
|
348
|
+
.and_return(:append)
|
349
|
+
|
350
|
+
expect(j.wait(1)).to be :append
|
351
|
+
end
|
352
|
+
|
353
|
+
it 'raise a JournalError on error' do
|
354
|
+
expect(Systemd::Journal::Native)
|
355
|
+
.to receive(:sd_journal_wait)
|
356
|
+
.and_return(-1)
|
357
|
+
|
358
|
+
expect { j.wait(1) }.to raise_error(Systemd::JournalError)
|
359
|
+
end
|
360
|
+
|
361
|
+
it 'can use select' do
|
362
|
+
expect(Systemd::Journal::Native).to_not receive(:sd_journal_wait)
|
363
|
+
j.wait(1, select: true)
|
364
|
+
end
|
365
|
+
end
|
366
|
+
|
367
|
+
describe 'wait_select_reliable?' do
|
368
|
+
it 'should not throw an error' do
|
369
|
+
expect { j.wait_select_reliable? }.to_not raise_error
|
370
|
+
end
|
371
|
+
|
372
|
+
it 'should return a boolean' do
|
373
|
+
expect([true, false]).to include(j.wait_select_reliable?)
|
374
|
+
end
|
375
|
+
end
|
376
|
+
|
329
377
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe Systemd do
|
4
|
+
describe 'machine_id' do
|
5
|
+
it 'is an alias for Systemd::Id128.machine_id' do
|
6
|
+
expect(Systemd::Id128).to receive(:machine_id)
|
7
|
+
Systemd.machine_id
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
describe 'boot_id' do
|
12
|
+
it 'is an alias for Systemd::Id128.boot_id' do
|
13
|
+
expect(Systemd::Id128).to receive(:boot_id)
|
14
|
+
Systemd.boot_id
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
data/systemd-journal.gemspec
CHANGED
@@ -4,26 +4,28 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'systemd/journal/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |gem|
|
7
|
-
gem.name =
|
7
|
+
gem.name = 'systemd-journal'
|
8
8
|
gem.version = Systemd::Journal::VERSION
|
9
9
|
gem.license = 'MIT'
|
10
|
-
gem.authors = [
|
11
|
-
gem.email = [
|
10
|
+
gem.authors = ['John Ledbetter', 'Daniel Mack']
|
11
|
+
gem.email = ['john@throttle.io']
|
12
12
|
gem.description = %q{Provides the ability to navigate and read entries from the systemd journal in ruby, as well as write events to the journal.}
|
13
13
|
gem.summary = %q{Ruby bindings to libsystemd-journal}
|
14
|
-
gem.homepage =
|
14
|
+
gem.homepage = 'https://github.com/ledbettj/systemd-journal'
|
15
15
|
|
16
16
|
gem.files = `git ls-files`.split($/)
|
17
17
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
18
18
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
19
|
-
gem.require_paths = [
|
19
|
+
gem.require_paths = ['lib']
|
20
20
|
|
21
|
-
gem.
|
21
|
+
gem.required_ruby_version = '>= 1.9.3'
|
22
22
|
|
23
|
-
gem.
|
24
|
-
|
25
|
-
gem.add_development_dependency '
|
26
|
-
gem.add_development_dependency '
|
27
|
-
gem.add_development_dependency '
|
28
|
-
gem.add_development_dependency '
|
23
|
+
gem.add_runtime_dependency 'ffi', '~> 1.9.0'
|
24
|
+
|
25
|
+
gem.add_development_dependency 'rspec', '~> 3.1'
|
26
|
+
gem.add_development_dependency 'simplecov', '~> 0.9'
|
27
|
+
gem.add_development_dependency 'rubocop', '~> 0.26'
|
28
|
+
gem.add_development_dependency 'rake', '~> 10.3'
|
29
|
+
gem.add_development_dependency 'yard', '~> 0.8.7'
|
30
|
+
gem.add_development_dependency 'pry', '~> 0.10'
|
29
31
|
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.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Ledbetter
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-10-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi
|
@@ -31,84 +31,84 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 3.
|
34
|
+
version: '3.1'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 3.
|
41
|
+
version: '3.1'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: simplecov
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: 0.
|
48
|
+
version: '0.9'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.
|
55
|
+
version: '0.9'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: rubocop
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0.
|
62
|
+
version: '0.26'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.
|
69
|
+
version: '0.26'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: rake
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: 10.
|
76
|
+
version: '10.3'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: 10.
|
83
|
+
version: '10.3'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: yard
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: 0.8.7
|
90
|
+
version: 0.8.7
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: 0.8.7
|
97
|
+
version: 0.8.7
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: pry
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
102
|
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: 0.10
|
104
|
+
version: '0.10'
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
109
|
- - "~>"
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: 0.10
|
111
|
+
version: '0.10'
|
112
112
|
description: Provides the ability to navigate and read entries from the systemd journal
|
113
113
|
in ruby, as well as write events to the journal.
|
114
114
|
email:
|
@@ -127,6 +127,7 @@ files:
|
|
127
127
|
- examples/journal_directory.rb
|
128
128
|
- examples/ssh_watcher.rb
|
129
129
|
- lib/systemd-journal.rb
|
130
|
+
- lib/systemd.rb
|
130
131
|
- lib/systemd/ffi_size_t.rb
|
131
132
|
- lib/systemd/id128.rb
|
132
133
|
- lib/systemd/journal.rb
|
@@ -143,8 +144,10 @@ files:
|
|
143
144
|
- spec/fixtures/test.journal
|
144
145
|
- spec/fixtures/test.json
|
145
146
|
- spec/spec_helper.rb
|
147
|
+
- spec/systemd/id128_spec.rb
|
146
148
|
- spec/systemd/journal_entry_spec.rb
|
147
149
|
- spec/systemd/journal_spec.rb
|
150
|
+
- spec/systemd_spec.rb
|
148
151
|
- systemd-journal.gemspec
|
149
152
|
homepage: https://github.com/ledbettj/systemd-journal
|
150
153
|
licenses:
|
@@ -158,7 +161,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
158
161
|
requirements:
|
159
162
|
- - ">="
|
160
163
|
- !ruby/object:Gem::Version
|
161
|
-
version:
|
164
|
+
version: 1.9.3
|
162
165
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
163
166
|
requirements:
|
164
167
|
- - ">="
|
@@ -174,6 +177,8 @@ test_files:
|
|
174
177
|
- spec/fixtures/test.journal
|
175
178
|
- spec/fixtures/test.json
|
176
179
|
- spec/spec_helper.rb
|
180
|
+
- spec/systemd/id128_spec.rb
|
177
181
|
- spec/systemd/journal_entry_spec.rb
|
178
182
|
- spec/systemd/journal_spec.rb
|
183
|
+
- spec/systemd_spec.rb
|
179
184
|
has_rdoc:
|