syslog 0.1.2 → 0.2.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 +4 -4
- data/.github/workflows/push_gem.yml +46 -0
- data/.github/workflows/test.yml +5 -1
- data/README.md +1 -0
- data/Rakefile +9 -1
- data/ext/syslog/extconf.rb +18 -5
- data/ext/syslog/syslog.c +2 -2
- data/lib/syslog.rb +10 -0
- data/syslog.gemspec +0 -2
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4380feb49c69d3151f1180c3bb4709e81b002dbb5ed92f509a1496e2df2b8b82
|
4
|
+
data.tar.gz: b5d3d89e6b8554aaa2bc0355f675473304eb6687e8bfd34d0912d9b1429eb2ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6bc1cb6b33cabcbb9962e10e49053ab4939582bc59129cc291f304a781487da807fea267de2cc05b2cbf61f4ec31e0d45dbeba3f5c721a184744f6b7c31f705
|
7
|
+
data.tar.gz: eea9e7881550f036387d03fd73b3e5497d550f41ded31da7d7925c522a515ef76cd6aa0a14c920eb709d8a126442d5b741a92353ae5b2a619c5e8b624b133fba
|
@@ -0,0 +1,46 @@
|
|
1
|
+
name: Publish gem to rubygems.org
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- 'v*'
|
7
|
+
|
8
|
+
permissions:
|
9
|
+
contents: read
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
push:
|
13
|
+
if: github.repository == 'ruby/syslog'
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
|
16
|
+
environment:
|
17
|
+
name: rubygems.org
|
18
|
+
url: https://rubygems.org/gems/syslog
|
19
|
+
|
20
|
+
permissions:
|
21
|
+
contents: write
|
22
|
+
id-token: write
|
23
|
+
|
24
|
+
steps:
|
25
|
+
- name: Harden Runner
|
26
|
+
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
|
27
|
+
with:
|
28
|
+
egress-policy: audit
|
29
|
+
|
30
|
+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
31
|
+
|
32
|
+
- name: Set up Ruby
|
33
|
+
uses: ruby/setup-ruby@a6e6f86333f0a2523ece813039b8b4be04560854 # v1.190.0
|
34
|
+
with:
|
35
|
+
bundler-cache: true
|
36
|
+
ruby-version: ruby
|
37
|
+
|
38
|
+
- name: Publish to RubyGems
|
39
|
+
uses: rubygems/release-gem@9e85cb11501bebc2ae661c1500176316d3987059 # v1.1.0
|
40
|
+
|
41
|
+
- name: Create GitHub release
|
42
|
+
run: |
|
43
|
+
tag_name="$(git describe --tags --abbrev=0)"
|
44
|
+
gh release create "${tag_name}" --verify-tag --generate-notes
|
45
|
+
env:
|
46
|
+
GITHUB_TOKEN: ${{ secrets.MATZBOT_GITHUB_WORKFLOW_TOKEN }}
|
data/.github/workflows/test.yml
CHANGED
@@ -8,7 +8,11 @@ jobs:
|
|
8
8
|
strategy:
|
9
9
|
matrix:
|
10
10
|
ruby: [ 2.7, 2.6, 2.5, head ]
|
11
|
-
os: [ ubuntu-latest, macos-latest ]
|
11
|
+
os: [ ubuntu-latest, macos-latest, windows-latest ]
|
12
|
+
exclude:
|
13
|
+
- { os: macos-latest, ruby: '2.5' }
|
14
|
+
include:
|
15
|
+
- { os: macos-13, ruby: '2.5' }
|
12
16
|
runs-on: ${{ matrix.os }}
|
13
17
|
steps:
|
14
18
|
- uses: actions/checkout@v4
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -8,5 +8,13 @@ Rake::TestTask.new(:test) do |t|
|
|
8
8
|
end
|
9
9
|
|
10
10
|
require 'rake/extensiontask'
|
11
|
-
Rake::ExtensionTask.new("
|
11
|
+
Rake::ExtensionTask.new("syslog_ext") do |ext|
|
12
|
+
ext.ext_dir = 'ext/syslog'
|
13
|
+
|
14
|
+
# In contrast to "gem install" a "rake compile" is expecting the C-ext file even on Windows.
|
15
|
+
# Work around by creating a dummy so file.
|
16
|
+
task "#{ext.tmp_dir}/#{ext.platform}/stage/lib" do |t|
|
17
|
+
touch "#{ext.tmp_dir}/#{ext.platform}/#{ext.name}/#{RUBY_VERSION}/#{ext.name}.so"
|
18
|
+
end
|
19
|
+
end
|
12
20
|
task :default => :test
|
data/ext/syslog/extconf.rb
CHANGED
@@ -4,10 +4,23 @@
|
|
4
4
|
|
5
5
|
require 'mkmf'
|
6
6
|
|
7
|
-
|
7
|
+
def generate_dummy_makefile
|
8
|
+
File.open("Makefile", "w") do |f|
|
9
|
+
f.puts dummy_makefile("syslog_ext").join
|
10
|
+
end
|
11
|
+
end
|
8
12
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
create_makefile("syslog")
|
13
|
+
def windows?
|
14
|
+
RbConfig::CONFIG["host_os"] =~ /mswin|mingw|cygwin/
|
15
|
+
end
|
13
16
|
|
17
|
+
if windows?
|
18
|
+
generate_dummy_makefile
|
19
|
+
else
|
20
|
+
have_library("log") # for Android
|
21
|
+
|
22
|
+
have_header("syslog.h") &&
|
23
|
+
have_func("openlog") &&
|
24
|
+
have_func("setlogmask") &&
|
25
|
+
create_makefile("syslog_ext")
|
26
|
+
end
|
data/ext/syslog/syslog.c
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
#include "ruby/util.h"
|
13
13
|
#include <syslog.h>
|
14
14
|
|
15
|
-
#define SYSLOG_VERSION "0.
|
15
|
+
#define SYSLOG_VERSION "0.2.0"
|
16
16
|
|
17
17
|
/* Syslog class */
|
18
18
|
static VALUE mSyslog;
|
@@ -415,7 +415,7 @@ static VALUE mSyslogMacros_included(VALUE mod, VALUE target)
|
|
415
415
|
*
|
416
416
|
* The syslog protocol is standardized in RFC 5424.
|
417
417
|
*/
|
418
|
-
void
|
418
|
+
void Init_syslog_ext(void)
|
419
419
|
{
|
420
420
|
#undef rb_intern
|
421
421
|
mSyslog = rb_define_module("Syslog");
|
data/lib/syslog.rb
ADDED
data/syslog.gemspec
CHANGED
@@ -22,7 +22,5 @@ Gem::Specification.new do |spec|
|
|
22
22
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
23
23
|
end
|
24
24
|
spec.extensions = ["ext/syslog/extconf.rb"]
|
25
|
-
spec.bindir = "exe"
|
26
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
27
25
|
spec.require_paths = ["lib"]
|
28
26
|
end
|
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.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Akinori MUSHA
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Ruby interface for the POSIX system logging facility.
|
14
14
|
email:
|
@@ -21,6 +21,7 @@ files:
|
|
21
21
|
- ".git-blame-ignore-revs"
|
22
22
|
- ".github/CODEOWNERS"
|
23
23
|
- ".github/dependabot.yml"
|
24
|
+
- ".github/workflows/push_gem.yml"
|
24
25
|
- ".github/workflows/test.yml"
|
25
26
|
- ".gitignore"
|
26
27
|
- Gemfile
|
@@ -32,6 +33,7 @@ files:
|
|
32
33
|
- ext/syslog/extconf.rb
|
33
34
|
- ext/syslog/syslog.c
|
34
35
|
- ext/syslog/syslog.txt
|
36
|
+
- lib/syslog.rb
|
35
37
|
- lib/syslog/logger.rb
|
36
38
|
- syslog.gemspec
|
37
39
|
homepage: https://github.com/ruby/syslog
|
@@ -56,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
56
58
|
- !ruby/object:Gem::Version
|
57
59
|
version: '0'
|
58
60
|
requirements: []
|
59
|
-
rubygems_version: 3.5.
|
61
|
+
rubygems_version: 3.5.11
|
60
62
|
signing_key:
|
61
63
|
specification_version: 4
|
62
64
|
summary: Ruby interface for the POSIX system logging facility.
|