systemd-journal 1.1.2 → 1.1.3
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/Gemfile +0 -4
- data/Rakefile +2 -4
- data/lib/systemd/id128.rb +7 -9
- data/lib/systemd/journal/native.rb +1 -1
- data/lib/systemd/journal/navigable.rb +1 -1
- data/lib/systemd/journal/version.rb +1 -1
- data/lib/systemd/journal.rb +0 -5
- data/spec/fixtures/test.journal +0 -0
- data/spec/fixtures/test.json +463 -0
- data/spec/spec_helper.rb +21 -32
- data/spec/systemd/journal_spec.rb +73 -489
- data/systemd-journal.gemspec +6 -2
- metadata +70 -17
- data/.travis.yml +0 -5
- data/spec/no_ffi.rb +0 -4
- data/spec/systemd/id128_spec.rb +0 -39
- data/spec/systemd/journal_entry_spec.rb +0 -97
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a059156599a0d4007da349975fbeabc806617b7
|
4
|
+
data.tar.gz: 04e3a33cd7dd024fab848183ad3f36e3c3a3ecba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07b7b3dadcc849ef85dec175bec3734353ffb839e0a0ce287b0bb8954e307972684584815129017e92012f027a04518a6e839237edf52c95c9a16f4763cdbf85
|
7
|
+
data.tar.gz: b05f3ba3b46d561c0596b498616fab5a9fb57cbeb0462a85c8fbf613e09060caf98dd7ba9224242845ad354cd9897aa135dcd8af9500f3af2a7f2cf8d3fcb909
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -8,7 +8,7 @@ task :console do
|
|
8
8
|
exec 'pry -I./lib -r systemd/journal'
|
9
9
|
end
|
10
10
|
|
11
|
-
|
11
|
+
RuboCop::RakeTask.new(:rubocop) do |task|
|
12
12
|
task.patterns = ['lib/**/*.rb', 'spec/**/*.rb']
|
13
13
|
task.fail_on_error = false
|
14
14
|
end
|
@@ -19,9 +19,7 @@ YARD::Rake::YardocTask.new do |t|
|
|
19
19
|
end
|
20
20
|
|
21
21
|
RSpec::Core::RakeTask.new(:spec) do |t|
|
22
|
-
|
23
|
-
opts << '--require ./spec/no_ffi.rb' if ENV['TRAVIS']
|
24
|
-
t.rspec_opts = opts.join(' ')
|
22
|
+
t.rspec_opts = %w(--color)
|
25
23
|
end
|
26
24
|
|
27
25
|
task default: :spec
|
data/lib/systemd/id128.rb
CHANGED
@@ -43,16 +43,14 @@ module Systemd
|
|
43
43
|
|
44
44
|
# providing bindings to the systemd-id128 library.
|
45
45
|
module Native
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
libsystemd-id128.so.0 libsystemd-id128.so }
|
46
|
+
require 'ffi'
|
47
|
+
extend FFI::Library
|
48
|
+
ffi_lib %w{ libsystemd.so.0 libsystemd.so
|
49
|
+
libsystemd-id128.so.0 libsystemd-id128.so }
|
51
50
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
end
|
51
|
+
attach_function :sd_id128_get_machine, [:pointer], :int
|
52
|
+
attach_function :sd_id128_get_boot, [:pointer], :int
|
53
|
+
attach_function :sd_id128_randomize, [:pointer], :int
|
56
54
|
|
57
55
|
# @private
|
58
56
|
class Id128 < FFI::Union
|
data/lib/systemd/journal.rb
CHANGED
@@ -151,11 +151,6 @@ module Systemd
|
|
151
151
|
# @example Fetch all possible boot ids from the journal
|
152
152
|
# j = Systemd::Journal.new
|
153
153
|
# j.query_unique('_BOOT_ID')
|
154
|
-
# @example Enumerate machine IDs with a block
|
155
|
-
# j = Systemd::Journal.new
|
156
|
-
# j.query_unique('_MACHINE_ID') do |machine_id|
|
157
|
-
# puts "found machine id #{machine_id}"
|
158
|
-
# end
|
159
154
|
def query_unique(field)
|
160
155
|
results = []
|
161
156
|
|
Binary file
|