winevt_c 0.9.1 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.clang-format +4 -4
- data/.github/workflows/linux.yml +26 -0
- data/Gemfile +6 -6
- data/LICENSE.txt +202 -202
- data/README.md +97 -97
- data/Rakefile +37 -37
- data/appveyor.yml +48 -26
- data/example/bookmark.rb +9 -9
- data/example/enumerate_channels.rb +13 -13
- data/example/eventlog.rb +13 -13
- data/example/locale.rb +13 -13
- data/example/rate_limit.rb +14 -14
- data/example/tailing.rb +21 -21
- data/ext/winevt/extconf.rb +24 -24
- data/ext/winevt/winevt.c +30 -30
- data/ext/winevt/winevt_bookmark.c +149 -149
- data/ext/winevt/winevt_c.h +133 -132
- data/ext/winevt/winevt_channel.c +327 -327
- data/ext/winevt/winevt_locale.c +92 -92
- data/ext/winevt/winevt_locale_info.c +68 -68
- data/ext/winevt/winevt_query.c +649 -650
- data/ext/winevt/winevt_session.c +425 -425
- data/ext/winevt/winevt_subscribe.c +756 -757
- data/ext/winevt/winevt_utils.cpp +790 -718
- data/lib/winevt/bookmark.rb +6 -6
- data/lib/winevt/query.rb +6 -6
- data/lib/winevt/session.rb +15 -15
- data/lib/winevt/subscribe.rb +18 -18
- data/lib/winevt/version.rb +3 -3
- data/lib/winevt.rb +14 -14
- data/winevt_c.gemspec +34 -34
- metadata +8 -9
- data/.travis.yml +0 -15
data/lib/winevt/bookmark.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
module Winevt
|
2
|
-
class EventLog
|
3
|
-
class Bookmark
|
4
|
-
end
|
5
|
-
end
|
6
|
-
end
|
1
|
+
module Winevt
|
2
|
+
class EventLog
|
3
|
+
class Bookmark
|
4
|
+
end
|
5
|
+
end
|
6
|
+
end
|
data/lib/winevt/query.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
module Winevt
|
2
|
-
class EventLog
|
3
|
-
class Query
|
4
|
-
end
|
5
|
-
end
|
6
|
-
end
|
1
|
+
module Winevt
|
2
|
+
class EventLog
|
3
|
+
class Query
|
4
|
+
end
|
5
|
+
end
|
6
|
+
end
|
data/lib/winevt/session.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
module Winevt
|
2
|
-
class EventLog
|
3
|
-
class Session
|
4
|
-
alias_method :initialize_raw, :initialize
|
5
|
-
|
6
|
-
def initialize(server, domain = nil, username = nil, password = nil)
|
7
|
-
initialize_raw
|
8
|
-
self.server = server
|
9
|
-
self.domain = domain if domain.is_a?(String)
|
10
|
-
self.username = username if username.is_a?(String)
|
11
|
-
self.password = password if password.is_a?(String)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
1
|
+
module Winevt
|
2
|
+
class EventLog
|
3
|
+
class Session
|
4
|
+
alias_method :initialize_raw, :initialize
|
5
|
+
|
6
|
+
def initialize(server, domain = nil, username = nil, password = nil)
|
7
|
+
initialize_raw
|
8
|
+
self.server = server
|
9
|
+
self.domain = domain if domain.is_a?(String)
|
10
|
+
self.username = username if username.is_a?(String)
|
11
|
+
self.password = password if password.is_a?(String)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/winevt/subscribe.rb
CHANGED
@@ -1,18 +1,18 @@
|
|
1
|
-
module Winevt
|
2
|
-
class EventLog
|
3
|
-
class Subscribe
|
4
|
-
alias_method :subscribe_raw, :subscribe
|
5
|
-
|
6
|
-
def subscribe(path, query, bookmark = nil, session = nil)
|
7
|
-
if bookmark.is_a?(Winevt::EventLog::Bookmark) &&
|
8
|
-
session.is_a?(Winevt::EventLog::Session)
|
9
|
-
subscribe_raw(path, query, bookmark.render, session)
|
10
|
-
elsif bookmark.is_a?(Winevt::EventLog::Bookmark)
|
11
|
-
subscribe_raw(path, query, bookmark.render)
|
12
|
-
else
|
13
|
-
subscribe_raw(path, query)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
1
|
+
module Winevt
|
2
|
+
class EventLog
|
3
|
+
class Subscribe
|
4
|
+
alias_method :subscribe_raw, :subscribe
|
5
|
+
|
6
|
+
def subscribe(path, query, bookmark = nil, session = nil)
|
7
|
+
if bookmark.is_a?(Winevt::EventLog::Bookmark) &&
|
8
|
+
session.is_a?(Winevt::EventLog::Session)
|
9
|
+
subscribe_raw(path, query, bookmark.render, session)
|
10
|
+
elsif bookmark.is_a?(Winevt::EventLog::Bookmark)
|
11
|
+
subscribe_raw(path, query, bookmark.render)
|
12
|
+
else
|
13
|
+
subscribe_raw(path, query)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/winevt/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
module Winevt
|
2
|
-
VERSION = "0.
|
3
|
-
end
|
1
|
+
module Winevt
|
2
|
+
VERSION = "0.10.0"
|
3
|
+
end
|
data/lib/winevt.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
begin
|
2
|
-
require "winevt/#{RUBY_VERSION[/\d+.\d+/]}/winevt"
|
3
|
-
rescue LoadError
|
4
|
-
require "winevt/winevt"
|
5
|
-
end
|
6
|
-
require "winevt/bookmark"
|
7
|
-
require "winevt/query"
|
8
|
-
require "winevt/subscribe"
|
9
|
-
require "winevt/version"
|
10
|
-
require "winevt/session"
|
11
|
-
|
12
|
-
module Winevt
|
13
|
-
# Your code goes here...
|
14
|
-
end
|
1
|
+
begin
|
2
|
+
require "winevt/#{RUBY_VERSION[/\d+.\d+/]}/winevt"
|
3
|
+
rescue LoadError
|
4
|
+
require "winevt/winevt"
|
5
|
+
end
|
6
|
+
require "winevt/bookmark"
|
7
|
+
require "winevt/query"
|
8
|
+
require "winevt/subscribe"
|
9
|
+
require "winevt/version"
|
10
|
+
require "winevt/session"
|
11
|
+
|
12
|
+
module Winevt
|
13
|
+
# Your code goes here...
|
14
|
+
end
|
data/winevt_c.gemspec
CHANGED
@@ -1,34 +1,34 @@
|
|
1
|
-
|
2
|
-
lib = File.expand_path("../lib", __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require "winevt/version"
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "winevt_c"
|
8
|
-
spec.version = Winevt::VERSION
|
9
|
-
spec.authors = ["Hiroshi Hatake"]
|
10
|
-
spec.email = ["cosmo0920.wp@gmail.com"]
|
11
|
-
|
12
|
-
spec.summary = %q{Windows Event Log API bindings from winevt.h.}
|
13
|
-
spec.description = spec.summary
|
14
|
-
spec.homepage = "https://github.com/fluent-plugins-nursery/winevt_c"
|
15
|
-
|
16
|
-
# Specify which files should be added to the gem when it is released.
|
17
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
18
|
-
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
19
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
-
end
|
21
|
-
spec.bindir = "exe"
|
22
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
|
-
spec.require_paths = ["lib"]
|
24
|
-
spec.extensions = ["ext/winevt/extconf.rb"]
|
25
|
-
spec.license = "Apache-2.0"
|
26
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.4".freeze)
|
27
|
-
|
28
|
-
spec.add_development_dependency "bundler", [">= 1.16", "< 3"]
|
29
|
-
spec.add_development_dependency "rake", "~>
|
30
|
-
spec.add_development_dependency "rake-compiler", "~> 1.0"
|
31
|
-
spec.add_development_dependency "rake-compiler-dock", "~> 1.
|
32
|
-
spec.add_development_dependency "test-unit", "~> 3.2"
|
33
|
-
spec.add_development_dependency "yard", "~> 0.9"
|
34
|
-
end
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "winevt/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "winevt_c"
|
8
|
+
spec.version = Winevt::VERSION
|
9
|
+
spec.authors = ["Hiroshi Hatake"]
|
10
|
+
spec.email = ["cosmo0920.wp@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Windows Event Log API bindings from winevt.h.}
|
13
|
+
spec.description = spec.summary
|
14
|
+
spec.homepage = "https://github.com/fluent-plugins-nursery/winevt_c"
|
15
|
+
|
16
|
+
# Specify which files should be added to the gem when it is released.
|
17
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
18
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
19
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
+
end
|
21
|
+
spec.bindir = "exe"
|
22
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
|
+
spec.require_paths = ["lib"]
|
24
|
+
spec.extensions = ["ext/winevt/extconf.rb"]
|
25
|
+
spec.license = "Apache-2.0"
|
26
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.4".freeze)
|
27
|
+
|
28
|
+
spec.add_development_dependency "bundler", [">= 1.16", "< 3"]
|
29
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
30
|
+
spec.add_development_dependency "rake-compiler", "~> 1.0"
|
31
|
+
spec.add_development_dependency "rake-compiler-dock", "~> 1.1.0"
|
32
|
+
spec.add_development_dependency "test-unit", "~> 3.2"
|
33
|
+
spec.add_development_dependency "yard", "~> 0.9"
|
34
|
+
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.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroshi Hatake
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -36,14 +36,14 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
39
|
+
version: '13.0'
|
40
40
|
type: :development
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
46
|
+
version: '13.0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rake-compiler
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -64,14 +64,14 @@ dependencies:
|
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: 1.
|
67
|
+
version: 1.1.0
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: 1.
|
74
|
+
version: 1.1.0
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: test-unit
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,8 +109,8 @@ extensions:
|
|
109
109
|
extra_rdoc_files: []
|
110
110
|
files:
|
111
111
|
- ".clang-format"
|
112
|
+
- ".github/workflows/linux.yml"
|
112
113
|
- ".gitignore"
|
113
|
-
- ".travis.yml"
|
114
114
|
- Gemfile
|
115
115
|
- LICENSE.txt
|
116
116
|
- README.md
|
@@ -161,8 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
161
|
- !ruby/object:Gem::Version
|
162
162
|
version: '0'
|
163
163
|
requirements: []
|
164
|
-
|
165
|
-
rubygems_version: 2.7.6.2
|
164
|
+
rubygems_version: 3.3.5
|
166
165
|
signing_key:
|
167
166
|
specification_version: 4
|
168
167
|
summary: Windows Event Log API bindings from winevt.h.
|