winevt_c 0.11.1 → 0.11.2
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/test.yml +21 -0
- data/README.md +1 -1
- data/Rakefile +3 -20
- data/ext/winevt/winevt_channel.c +0 -4
- data/lib/winevt/version.rb +1 -1
- data/winevt_c.gemspec +0 -1
- metadata +7 -23
- data/.github/workflows/linux.yml +0 -26
- data/appveyor.yml +0 -53
- data/ruby_install.ps1 +0 -92
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1bd74653021fdb2b8c8ad8b55db339684b7d67bbfebac0bcf10389ff5244ac8
|
4
|
+
data.tar.gz: b285469c152002ff14dbccb2fefe5e1e8e78ebcb9b939813f8488b4dca258f50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a97aff89384dc6d98e69851387c236ba933858226bb6aa3e090ad2e874a3733bfd896b7da7508fa159afff6528832c8c772eff16c4f63b55ee4db41928df98c0
|
7
|
+
data.tar.gz: e9fcd3b436c362d82468f39a4492434792ad2afd59e1ac8b44fc43051d5ebc3554e61489af728984098f89f8fa6b91cc239b8953240910afdf5a0a686d751c45
|
@@ -0,0 +1,21 @@
|
|
1
|
+
name: Test
|
2
|
+
on:
|
3
|
+
- push
|
4
|
+
- pull_request
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: 'windows-latest'
|
8
|
+
strategy:
|
9
|
+
fail-fast: false
|
10
|
+
matrix:
|
11
|
+
ruby: [ '3.1', '3.2', '3.3', '3.4' ]
|
12
|
+
name: Ruby ${{ matrix.ruby }}
|
13
|
+
steps:
|
14
|
+
- uses: actions/checkout@v4
|
15
|
+
- uses: ruby/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
ruby-version: ${{ matrix.ruby }}
|
18
|
+
- name: Run tests
|
19
|
+
run: |
|
20
|
+
bundle install --jobs 4 --retry 3
|
21
|
+
bundle exec rake
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# winevt_c
|
2
2
|
|
3
|
-
[](https://github.com/fluent-plugins-nursery/winevt_c/actions/workflows/test.yml)
|
4
4
|
|
5
5
|
## Prerequisites
|
6
6
|
|
data/Rakefile
CHANGED
@@ -1,8 +1,5 @@
|
|
1
|
-
require
|
2
|
-
Bundler::GemHelper.install_tasks
|
3
|
-
|
1
|
+
require "bundler/gem_tasks"
|
4
2
|
require "rake/testtask"
|
5
|
-
require 'rake_compiler_dock'
|
6
3
|
require 'rake/clean'
|
7
4
|
|
8
5
|
Rake::TestTask.new(:test) do |t|
|
@@ -13,23 +10,9 @@ end
|
|
13
10
|
|
14
11
|
require "rake/extensiontask"
|
15
12
|
|
16
|
-
|
17
|
-
|
18
|
-
Rake::ExtensionTask.new("winevt", spec) do |ext|
|
13
|
+
Rake::ExtensionTask.new("winevt") do |ext|
|
19
14
|
ext.ext_dir = 'ext/winevt'
|
20
|
-
ext.
|
21
|
-
ext.lib_dir = File.join(*['lib', 'winevt', ENV['FAT_DIR']].compact)
|
22
|
-
# cross_platform names are of MRI's platform name
|
23
|
-
ext.cross_platform = ['x86-mingw32', 'x64-mingw32']
|
24
|
-
end
|
25
|
-
|
26
|
-
desc 'Build gems for Windows per rake-compiler-dock'
|
27
|
-
task 'gem:native' do
|
28
|
-
sh "bundle package"
|
29
|
-
# See RUBY_CC_VERSION in https://github.com/rake-compiler/rake-compiler-dock/blob/master/Dockerfile.mri
|
30
|
-
%w[ x86-mingw32 x64-mingw32 ].each do |plat|
|
31
|
-
RakeCompilerDock.sh "bundle --local && bundle exec rake native:#{plat} gem RUBY_CC_VERSION=2.4.0:2.5.0:2.6.0:2.7.0:3.0.0", platform: plat
|
32
|
-
end
|
15
|
+
ext.lib_dir = 'lib/winevt'
|
33
16
|
end
|
34
17
|
|
35
18
|
CLEAN.include('lib/winevt/winevt.*')
|
data/ext/winevt/winevt_channel.c
CHANGED
@@ -132,8 +132,6 @@ DWORD is_subscribable_channel_p(EVT_HANDLE hChannel, BOOL force_enumerate)
|
|
132
132
|
EvtGetChannelConfigProperty(hChannel, (EVT_CHANNEL_CONFIG_PROPERTY_ID)Id, 0, dwBufferSize, pProperty, &dwBufferUsed);
|
133
133
|
status = GetLastError();
|
134
134
|
} else {
|
135
|
-
free(pProperty);
|
136
|
-
|
137
135
|
status = ERROR_OUTOFMEMORY;
|
138
136
|
|
139
137
|
goto cleanup;
|
@@ -141,8 +139,6 @@ DWORD is_subscribable_channel_p(EVT_HANDLE hChannel, BOOL force_enumerate)
|
|
141
139
|
}
|
142
140
|
|
143
141
|
if (ERROR_SUCCESS != status) {
|
144
|
-
free(pProperty);
|
145
|
-
|
146
142
|
goto cleanup;
|
147
143
|
}
|
148
144
|
}
|
data/lib/winevt/version.rb
CHANGED
data/winevt_c.gemspec
CHANGED
@@ -28,7 +28,6 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.add_development_dependency "bundler", [">= 1.16", "< 3"]
|
29
29
|
spec.add_development_dependency "rake", "~> 13.0"
|
30
30
|
spec.add_development_dependency "rake-compiler", "~> 1.0"
|
31
|
-
spec.add_development_dependency "rake-compiler-dock", "~> 1.1.0"
|
32
31
|
spec.add_development_dependency "test-unit", "~> 3.2"
|
33
32
|
spec.add_development_dependency "yard", "~> 0.9"
|
34
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: winevt_c
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroshi Hatake
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -58,20 +58,6 @@ dependencies:
|
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '1.0'
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: rake-compiler-dock
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: 1.1.0
|
68
|
-
type: :development
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - "~>"
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: 1.1.0
|
75
61
|
- !ruby/object:Gem::Dependency
|
76
62
|
name: test-unit
|
77
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,13 +95,12 @@ extensions:
|
|
109
95
|
extra_rdoc_files: []
|
110
96
|
files:
|
111
97
|
- ".clang-format"
|
112
|
-
- ".github/workflows/
|
98
|
+
- ".github/workflows/test.yml"
|
113
99
|
- ".gitignore"
|
114
100
|
- Gemfile
|
115
101
|
- LICENSE.txt
|
116
102
|
- README.md
|
117
103
|
- Rakefile
|
118
|
-
- appveyor.yml
|
119
104
|
- bin/console
|
120
105
|
- bin/setup
|
121
106
|
- example/bookmark.rb
|
@@ -141,13 +126,12 @@ files:
|
|
141
126
|
- lib/winevt/session.rb
|
142
127
|
- lib/winevt/subscribe.rb
|
143
128
|
- lib/winevt/version.rb
|
144
|
-
- ruby_install.ps1
|
145
129
|
- winevt_c.gemspec
|
146
130
|
homepage: https://github.com/fluent-plugins-nursery/winevt_c
|
147
131
|
licenses:
|
148
132
|
- Apache-2.0
|
149
133
|
metadata: {}
|
150
|
-
post_install_message:
|
134
|
+
post_install_message:
|
151
135
|
rdoc_options: []
|
152
136
|
require_paths:
|
153
137
|
- lib
|
@@ -162,8 +146,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
146
|
- !ruby/object:Gem::Version
|
163
147
|
version: '0'
|
164
148
|
requirements: []
|
165
|
-
rubygems_version: 3.3
|
166
|
-
signing_key:
|
149
|
+
rubygems_version: 3.5.3
|
150
|
+
signing_key:
|
167
151
|
specification_version: 4
|
168
152
|
summary: Windows Event Log API bindings from winevt.h.
|
169
153
|
test_files: []
|
data/.github/workflows/linux.yml
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
name: Building fat gem
|
2
|
-
on:
|
3
|
-
- push
|
4
|
-
- pull_request
|
5
|
-
jobs:
|
6
|
-
build:
|
7
|
-
runs-on: ${{ matrix.os }}
|
8
|
-
strategy:
|
9
|
-
fail-fast: false
|
10
|
-
matrix:
|
11
|
-
ruby: [ '3.0', '3.1', '3.2' ]
|
12
|
-
os:
|
13
|
-
- ubuntu-latest
|
14
|
-
name: Ruby ${{ matrix.ruby }} building fat gem testing on ${{ matrix.os }}
|
15
|
-
steps:
|
16
|
-
- uses: actions/checkout@v2
|
17
|
-
- uses: ruby/setup-ruby@v1
|
18
|
-
with:
|
19
|
-
ruby-version: ${{ matrix.ruby }}
|
20
|
-
- name: building fat gem
|
21
|
-
env:
|
22
|
-
CI: true
|
23
|
-
run: |
|
24
|
-
gem install bundler rake
|
25
|
-
bundle install --jobs 4 --retry 3
|
26
|
-
bundle exec rake gem:native
|
data/appveyor.yml
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
version: '{build}'
|
2
|
-
|
3
|
-
image: Visual Studio 2019
|
4
|
-
|
5
|
-
# init:
|
6
|
-
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
7
|
-
|
8
|
-
install:
|
9
|
-
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
|
10
|
-
- ruby --version
|
11
|
-
- gem --version
|
12
|
-
- bundle --version
|
13
|
-
- bundle install
|
14
|
-
- ridk.cmd exec bundle exec rake compile
|
15
|
-
build: off
|
16
|
-
test_script:
|
17
|
-
# - bundle exec rake test
|
18
|
-
- bundle exec rake test TESTOPTS=-v
|
19
|
-
|
20
|
-
# https://www.appveyor.com/docs/installed-software/#ruby
|
21
|
-
environment:
|
22
|
-
matrix:
|
23
|
-
- ruby_version: "31-x64"
|
24
|
-
- ruby_version: "31"
|
25
|
-
- ruby_version: "30-x64"
|
26
|
-
- ruby_version: "30"
|
27
|
-
- ruby_version: "27-x64"
|
28
|
-
- ruby_version: "27"
|
29
|
-
- ruby_version: "26-x64"
|
30
|
-
- ruby_version: "26"
|
31
|
-
- ruby_version: "25-x64"
|
32
|
-
- ruby_version: "25"
|
33
|
-
- ruby_version: "24-x64"
|
34
|
-
- ruby_version: "24"
|
35
|
-
|
36
|
-
for:
|
37
|
-
-
|
38
|
-
matrix:
|
39
|
-
only:
|
40
|
-
- ruby_version: "31-x64"
|
41
|
-
- ruby_version: "27-x64"
|
42
|
-
- ruby_version: "27"
|
43
|
-
- ruby_version: "26-x64"
|
44
|
-
- ruby_version: "26"
|
45
|
-
install:
|
46
|
-
- ps: if ($ENV:ruby_version -ne "31-x64") { .\ruby_install.ps1 }
|
47
|
-
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
|
48
|
-
- ruby --version
|
49
|
-
- gem --version
|
50
|
-
- bundle --version
|
51
|
-
- ps: if ($ENV:ruby_version -eq "31-x64") { ridk.ps1 install 1 3 }
|
52
|
-
- ridk.cmd exec bundle install
|
53
|
-
- ridk.cmd exec bundle exec rake compile
|
data/ruby_install.ps1
DELETED
@@ -1,92 +0,0 @@
|
|
1
|
-
$rubies = @(
|
2
|
-
@{
|
3
|
-
"version" = "Ruby 2.6.9-1"
|
4
|
-
"install_path" = "C:\Ruby26"
|
5
|
-
"download_url" = "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.9-1/rubyinstaller-2.6.9-1-x86.exe"
|
6
|
-
"devkit_url" = ""
|
7
|
-
"devkit_paths" = @()
|
8
|
-
"bundlerV2" = $true
|
9
|
-
}
|
10
|
-
@{
|
11
|
-
"version" = "Ruby 2.6.9-1 (x64)"
|
12
|
-
"install_path" = "C:\Ruby26-x64"
|
13
|
-
"download_url" = "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.9-1/rubyinstaller-2.6.9-1-x64.exe"
|
14
|
-
"devkit_url" = ""
|
15
|
-
"devkit_paths" = @()
|
16
|
-
"bundlerV2" = $true
|
17
|
-
}
|
18
|
-
@{
|
19
|
-
"version" = "Ruby 2.7.8-1"
|
20
|
-
"install_path" = "C:\Ruby27"
|
21
|
-
"download_url" = "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.8-1/rubyinstaller-2.7.8-1-x86.exe"
|
22
|
-
"devkit_url" = ""
|
23
|
-
"devkit_paths" = @()
|
24
|
-
"bundlerV2" = $true
|
25
|
-
}
|
26
|
-
@{
|
27
|
-
"version" = "Ruby 2.7.8-1 (x64)"
|
28
|
-
"install_path" = "C:\Ruby27-x64"
|
29
|
-
"download_url" = "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.8-1/rubyinstaller-2.7.8-1-x64.exe"
|
30
|
-
"devkit_url" = ""
|
31
|
-
"devkit_paths" = @()
|
32
|
-
"bundlerV2" = $true
|
33
|
-
}
|
34
|
-
)
|
35
|
-
|
36
|
-
function UpdateRubyPath($rubyPath) {
|
37
|
-
$env:path = ($env:path -split ';' | Where-Object { -not $_.contains('\Ruby') }) -join ';'
|
38
|
-
$env:path = "$rubyPath;$env:path"
|
39
|
-
}
|
40
|
-
|
41
|
-
function Install-Ruby($ruby) {
|
42
|
-
Write-Host "Installing $($ruby.version)" -ForegroundColor Cyan
|
43
|
-
|
44
|
-
# uninstall existing
|
45
|
-
$rubyUninstallPath = "$ruby.install_path\unins000.exe"
|
46
|
-
if ([IO.File]::Exists($rubyUninstallPath)) {
|
47
|
-
Write-Host " Uninstalling previous Ruby 2.4..." -ForegroundColor Gray
|
48
|
-
"`"$rubyUninstallPath`" /silent" | out-file "$env:temp\uninstall-ruby.cmd" -Encoding ASCII
|
49
|
-
& "$env:temp\uninstall-ruby.cmd"
|
50
|
-
del "$env:temp\uninstall-ruby.cmd"
|
51
|
-
Start-Sleep -s 5
|
52
|
-
}
|
53
|
-
|
54
|
-
if (Test-Path $ruby.install_path) {
|
55
|
-
Write-Host " Deleting $($ruby.install_path)" -ForegroundColor Gray
|
56
|
-
Remove-Item $ruby.install_path -Force -Recurse
|
57
|
-
}
|
58
|
-
|
59
|
-
$exePath = "$($env:TEMP)\rubyinstaller.exe"
|
60
|
-
|
61
|
-
Write-Host " Downloading $($ruby.version) from $($ruby.download_url)" -ForegroundColor Gray
|
62
|
-
(New-Object Net.WebClient).DownloadFile($ruby.download_url, $exePath)
|
63
|
-
|
64
|
-
Write-Host "Installing..." -ForegroundColor Gray
|
65
|
-
cmd /c start /wait $exePath /verysilent /allusers /dir="$($ruby.install_path.replace('\', '/'))" /tasks="noassocfiles,nomodpath,noridkinstall"
|
66
|
-
del $exePath
|
67
|
-
Write-Host "Installed" -ForegroundColor Green
|
68
|
-
|
69
|
-
# setup Ruby
|
70
|
-
UpdateRubyPath "$($ruby.install_path)\bin"
|
71
|
-
Write-Host "ruby --version" -ForegroundColor Gray
|
72
|
-
cmd /c ruby --version
|
73
|
-
|
74
|
-
Write-Host "gem --version" -ForegroundColor Gray
|
75
|
-
cmd /c gem --version
|
76
|
-
|
77
|
-
# list installed gems
|
78
|
-
Write-Host "gem list --local" -ForegroundColor Gray
|
79
|
-
cmd /c gem list --local
|
80
|
-
|
81
|
-
# delete temp path
|
82
|
-
if ($tempPath) {
|
83
|
-
Write-Host " Cleaning up..." -ForegroundColor Gray
|
84
|
-
Remove-Item $tempPath -Force -Recurse
|
85
|
-
}
|
86
|
-
|
87
|
-
Write-Host " Done!" -ForegroundColor Green
|
88
|
-
}
|
89
|
-
|
90
|
-
for ($i = 0; $i -lt $rubies.Count; $i++) {
|
91
|
-
Install-Ruby $rubies[$i]
|
92
|
-
}
|