systemd-journal 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f3143bd56943aac2825763f571d4be96938850d
4
- data.tar.gz: da9dfeb9e238db9d1a3f2133a067d1f3e3027497
3
+ metadata.gz: 2a059156599a0d4007da349975fbeabc806617b7
4
+ data.tar.gz: 04e3a33cd7dd024fab848183ad3f36e3c3a3ecba
5
5
  SHA512:
6
- metadata.gz: b2728e14303118f0f34a1c25aa5f973f8dd22089d4798f36e29e9036bbfbf0052f1196e14a14915469361519a8751224a3f73c8ece7b7e20ee513663a1a83ed9
7
- data.tar.gz: f2700281ac8a85099630790dda239d8cae0419fd5193ca9b28679ec8249a77e1e4547a21cfd0c0db44961b4f4ebb6a5b9b0e65398f2c7ee1de7debeb09e486ea
6
+ metadata.gz: 07b7b3dadcc849ef85dec175bec3734353ffb839e0a0ce287b0bb8954e307972684584815129017e92012f027a04518a6e839237edf52c95c9a16f4763cdbf85
7
+ data.tar.gz: b05f3ba3b46d561c0596b498616fab5a9fb57cbeb0462a85c8fbf613e09060caf98dd7ba9224242845ad354cd9897aa135dcd8af9500f3af2a7f2cf8d3fcb909
data/Gemfile CHANGED
@@ -3,7 +3,3 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in systemd-journal.gemspec
4
4
  gemspec
5
5
 
6
- gem 'pry'
7
- gem 'rake'
8
- gem 'yard'
9
- gem 'rubocop'
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
- Rubocop::RakeTask.new(:rubocop) do |task|
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
- opts = ['--color']
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
- unless $NO_FFI_SPEC
47
- require 'ffi'
48
- extend FFI::Library
49
- ffi_lib %w{ libsystemd.so.0 libsystemd.so
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
- attach_function :sd_id128_get_machine, [:pointer], :int
53
- attach_function :sd_id128_get_boot, [:pointer], :int
54
- attach_function :sd_id128_randomize, [:pointer], :int
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
@@ -68,7 +68,7 @@ module Systemd
68
68
  # misc
69
69
  attach_function :sd_journal_get_usage, [:pointer, :pointer], :int
70
70
  end
71
- end unless $NO_FFI_SPEC
71
+ end
72
72
 
73
73
  # @private
74
74
  module LibC
@@ -103,7 +103,7 @@ module Systemd
103
103
  raise ArgumentError.new("Unknown seek type: #{where.class}")
104
104
  end
105
105
 
106
- raise JournalErrornew(rc) if rc < 0
106
+ raise JournalError.new(rc) if rc < 0
107
107
 
108
108
  true
109
109
  end
@@ -1,6 +1,6 @@
1
1
  module Systemd
2
2
  class Journal
3
3
  # The version of the systemd-journal gem.
4
- VERSION = '1.1.2'
4
+ VERSION = '1.1.3'
5
5
  end
6
6
  end
@@ -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