abrt 0.4.0 → 0.5.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e28662ce14404d6c25ab366533c9fb61c304c7ec08d1a5b66daa6c8bc2cad2d
4
- data.tar.gz: 633c0790c3b560d3b895f529a8f3a2ea4626282d35f397c2431dcaa54e510d3c
3
+ metadata.gz: d0b6e26b81e5052b5cf17c7fdea271e206d27612f56a9bd98fec04e4f9a89cf1
4
+ data.tar.gz: 0e526cc80dc7f85b739af4f7cf8dc4a12ff1dd7de7a7e8167bbd1ce03e073ad1
5
5
  SHA512:
6
- metadata.gz: b016f9f38adf537b4c00ff3971ff7a1874e354b8b89a17cbb6f7240aa1dd4760c0d80f2e47ce9d4d991c48e101ae9bce09107b0f83fb64e1183ca8a69fea9119
7
- data.tar.gz: ce58173fe5230c3ffeccb5dee1a79197620b0c65a538825cfe2b2e9ce55512b1dce43879ef7a0570c3a734aea5548dfc9f509aef8878492c14f8d25bfe3df782
6
+ metadata.gz: 82a335ae9c7556506936c2fc1bb0cdf0d87e33010b97564905968b6b9d982e3bc853d952ff80cfa95dfad8803ece4c7fd1bbed2e2e9c76280b65288ca461b6de
7
+ data.tar.gz: adc538512fd0733b8b1ab1faac791dcfc2fa38469d747f0a3b3f7872dc4ef11b196f699a7bc15614e22bb11ea182b25c2c9cfc575d76b1a137e14765335369b9
data/README.md CHANGED
@@ -1,5 +1,3 @@
1
- [![Build Status](https://travis-ci.org/voxik/abrt-ruby.svg?branch=master)](https://travis-ci.org/voxik/abrt-ruby)
2
-
3
1
  # abrt
4
2
 
5
3
  Provides ABRT reporting support for libraries/applications written using Ruby.
@@ -20,6 +18,11 @@ gem "abrt", :require => false
20
18
 
21
19
  line into your *Gemfile*.
22
20
 
21
+ ### Dependencies
22
+
23
+ This library is using `logger` command from util-linux for logging purposes.
24
+ Please make sure it is available on your system for proper functionality.
25
+
23
26
  ## Usage
24
27
 
25
28
  There are several ways how to run any application with ABRT handler enabled.
data/lib/abrt/handler.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require 'socket'
2
- require 'syslog'
2
+ require_relative 'util_linux_logger'
3
3
  require_relative 'exception'
4
4
 
5
5
  module ABRT
@@ -16,7 +16,7 @@ module ABRT
16
16
  private
17
17
 
18
18
  def self.syslog
19
- @syslog ||= Syslog.open 'abrt'
19
+ @syslog ||= UtilLinuxLogger.open 'abrt'
20
20
  end
21
21
 
22
22
  def self.report(exception, io = nil)
@@ -0,0 +1,34 @@
1
+ # UtilLinuxLogger is small utility class intended to be drop in replacement for
2
+ # Syslog. It uses `logger` command from util-linux project to provide system
3
+ # logging facilities.
4
+ #
5
+ # It implements just minimal interface required by ABRT project.
6
+ class UtilLinuxLogger
7
+ # :yields: syslog
8
+ #
9
+ # Open the UtilLinuxLoggersyslog facility.
10
+ #
11
+ # `ident` is a String which identifies the calling program.
12
+ def self.open(ident)
13
+ self.new(ident)
14
+ end
15
+
16
+ def initialize(ident)
17
+ @ident = ident
18
+ end
19
+
20
+ def notice(format_string, *arguments)
21
+ log 'user.notice', format_string, *arguments
22
+ end
23
+
24
+ def err(format_string, *arguments)
25
+ log 'user.err', format_string, *arguments
26
+ end
27
+
28
+ private
29
+ def log(priority, format_string, *arguments)
30
+ IO.popen "logger -p #{priority} -t #{@ident} --socket-errors=off", 'w' do |io|
31
+ io.write sprintf(format_string, *arguments)
32
+ end
33
+ end
34
+ end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abrt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vít Ondruch
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2020-06-22 00:00:00.000000000 Z
10
+ date: 2025-08-01 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rspec
@@ -40,11 +39,11 @@ files:
40
39
  - lib/abrt.rb
41
40
  - lib/abrt/exception.rb
42
41
  - lib/abrt/handler.rb
42
+ - lib/abrt/util_linux_logger.rb
43
43
  homepage: http://github.com/voxik/abrt-ruby
44
44
  licenses:
45
45
  - MIT
46
46
  metadata: {}
47
- post_install_message:
48
47
  rdoc_options: []
49
48
  require_paths:
50
49
  - lib
@@ -59,8 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
59
58
  - !ruby/object:Gem::Version
60
59
  version: '0'
61
60
  requirements: []
62
- rubygems_version: 3.1.2
63
- signing_key:
61
+ rubygems_version: 3.6.2
64
62
  specification_version: 4
65
63
  summary: ABRT support for Ruby.
66
64
  test_files: []