syslog 0.1.0 → 0.1.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/.git-blame-ignore-revs +7 -0
- data/.github/dependabot.yml +6 -0
- data/.github/workflows/test.yml +2 -4
- data/ext/syslog/syslog.c +11 -11
- data/syslog.gemspec +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d612e3dcc5ded7a09900b9c414f8300c36b416eee15db2e8b3f8d0c768ece92d
|
4
|
+
data.tar.gz: dd94d87e07ad867e68a8e0f90c20dc2844bba256618d825409b17c81f91b89e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdf1d2f0ebe14aee8d3b222fe519e48d2d35b5e9b9ede1159f080fa30df3eb24078c5611a2c5bc9deddce67dae470d6dd1774d68dcfd37c289dca8889e1d60b2
|
7
|
+
data.tar.gz: 4e914f4c4500ca1e65f4e8d47b65fe7818382c18c585c1b5104f7b826ed7e84262c99771c23d359238a64aec406f9e74ef8124e7c8bbb96e2cd698b3d783ef0d
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# This is a file used by GitHub to ignore the following commits on `git blame`.
|
2
|
+
#
|
3
|
+
# You can also do the same thing in your local repository with:
|
4
|
+
# $ git config --local blame.ignoreRevsFile .git-blame-ignore-revs
|
5
|
+
|
6
|
+
# Expand tabs
|
7
|
+
4ba27cb6380daf5103fc9920ce61e7c5fcfcc713
|
data/.github/workflows/test.yml
CHANGED
@@ -11,14 +11,12 @@ jobs:
|
|
11
11
|
os: [ ubuntu-latest, macos-latest ]
|
12
12
|
runs-on: ${{ matrix.os }}
|
13
13
|
steps:
|
14
|
-
- uses: actions/checkout@
|
14
|
+
- uses: actions/checkout@v3
|
15
15
|
- name: Set up Ruby
|
16
16
|
uses: ruby/setup-ruby@v1
|
17
17
|
with:
|
18
18
|
ruby-version: ${{ matrix.ruby }}
|
19
19
|
- name: Install dependencies
|
20
|
-
run:
|
21
|
-
gem install bundler --no-document
|
22
|
-
bundle install
|
20
|
+
run: bundle install
|
23
21
|
- name: Run test
|
24
22
|
run: rake compile test
|
data/ext/syslog/syslog.c
CHANGED
@@ -165,15 +165,15 @@ static VALUE mSyslog_open(int argc, VALUE *argv, VALUE self)
|
|
165
165
|
syslog_ident = strdup(ident_ptr);
|
166
166
|
|
167
167
|
if (NIL_P(opt)) {
|
168
|
-
|
168
|
+
syslog_options = LOG_PID | LOG_CONS;
|
169
169
|
} else {
|
170
|
-
|
170
|
+
syslog_options = NUM2INT(opt);
|
171
171
|
}
|
172
172
|
|
173
173
|
if (NIL_P(fac)) {
|
174
|
-
|
174
|
+
syslog_facility = LOG_USER;
|
175
175
|
} else {
|
176
|
-
|
176
|
+
syslog_facility = NUM2INT(fac);
|
177
177
|
}
|
178
178
|
|
179
179
|
openlog(syslog_ident, syslog_options, syslog_facility);
|
@@ -307,7 +307,7 @@ static VALUE mSyslog_log(int argc, VALUE *argv, VALUE self)
|
|
307
307
|
pri = *argv++;
|
308
308
|
|
309
309
|
if (!FIXNUM_P(pri)) {
|
310
|
-
|
310
|
+
rb_raise(rb_eTypeError, "type mismatch: %"PRIsVALUE" given", rb_obj_class(pri));
|
311
311
|
}
|
312
312
|
|
313
313
|
syslog_write(FIX2INT(pri), argc, argv);
|
@@ -322,14 +322,14 @@ static VALUE mSyslog_inspect(VALUE self)
|
|
322
322
|
Check_Type(self, T_MODULE);
|
323
323
|
|
324
324
|
if (!syslog_opened)
|
325
|
-
|
325
|
+
return rb_sprintf("<#%"PRIsVALUE": opened=false>", self);
|
326
326
|
|
327
327
|
return rb_sprintf("<#%"PRIsVALUE": opened=true, ident=\"%s\", options=%d, facility=%d, mask=%d>",
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
328
|
+
self,
|
329
|
+
syslog_ident,
|
330
|
+
syslog_options,
|
331
|
+
syslog_facility,
|
332
|
+
syslog_mask);
|
333
333
|
}
|
334
334
|
|
335
335
|
/* Returns self, for backward compatibility.
|
data/syslog.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: syslog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Akinori MUSHA
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Ruby interface for the POSIX system logging facility.
|
14
14
|
email:
|
@@ -18,6 +18,8 @@ extensions:
|
|
18
18
|
- ext/syslog/extconf.rb
|
19
19
|
extra_rdoc_files: []
|
20
20
|
files:
|
21
|
+
- ".git-blame-ignore-revs"
|
22
|
+
- ".github/dependabot.yml"
|
21
23
|
- ".github/workflows/test.yml"
|
22
24
|
- ".gitignore"
|
23
25
|
- Gemfile
|
@@ -53,7 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
55
|
- !ruby/object:Gem::Version
|
54
56
|
version: '0'
|
55
57
|
requirements: []
|
56
|
-
rubygems_version: 3.
|
58
|
+
rubygems_version: 3.4.0.dev
|
57
59
|
signing_key:
|
58
60
|
specification_version: 4
|
59
61
|
summary: Ruby interface for the POSIX system logging facility.
|