win32-eventlog 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 88fd3143cff77fa6e55e35cd8e3f33f4ec03b887
4
- data.tar.gz: b9532c5facf8c98af6c3072f679b98dcc49f2856
3
+ metadata.gz: 12908150b3dd2c2afb8fe749da5be35f4c609302
4
+ data.tar.gz: d3ea9396d09a025de609d2e5ef632c20e6a08d4b
5
5
  SHA512:
6
- metadata.gz: c128e20a50648bc052ab926e32c06f46702a75f76040db23f4480a04450e17211927fa4054a99ac049e724951dcc45104df3847500d92ff96d0e692191201c0d
7
- data.tar.gz: c513a361ef15f70f887433ff9cc6ebd32a630e2f71f96a752ff2bd77f06fb9a01f027b395048ef5c9816cbfb5dd6cbb3b48df96f0dfaf4231f9e882830fd4b06
6
+ metadata.gz: 94caca2282b4e43322c9df323fa8fcd3d526b47f12ed9fbfccc1771986814b37ece4de21dcb7c441b1176c27d0c2b0f75bfa0063d8cd777d0a5ac7fc2d3777cc
7
+ data.tar.gz: 9232bf237b4553fe19c4530527a8a1303c4b2571a0beb3f2737ec1520a1fdbac1ee8120d30e3601966bd6b4caf148e832855a2db01a769cb7690e51c94265232
data/CHANGES CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.6.2 - 6-Oct-2014
2
+ * Now rescues LoadError if the wevtapi lib cannot be found. Thanks go to
3
+ Josh Cooper for the patch.
4
+
1
5
  == 0.6.1 - 1-Jun-2014
2
6
  * Added the read_last_event instance method. This was already in the code as
3
7
  as a private method but it is now public.
data/Rakefile CHANGED
@@ -20,7 +20,7 @@ namespace :gem do
20
20
  task :install => [:create] do
21
21
  ruby 'win32-eventlog.gemspec'
22
22
  file = Dir["*.gem"].first
23
- sh "gem install #{file}"
23
+ sh "gem install -l #{file}"
24
24
  end
25
25
  end
26
26
 
@@ -17,13 +17,10 @@ sleep 1
17
17
 
18
18
  el = EventLog.new("Application")
19
19
  el.read{ |log|
20
- #p log.description if !log.description.empty?
21
- p log
20
+ p log
22
21
  }
23
- #p el.read_last_event
24
22
  el.close
25
23
 
26
- =begin
27
24
  EventLog.read("Application"){ |log|
28
25
  p log
29
26
  puts
@@ -84,5 +81,4 @@ e4.read{ |elr|
84
81
  puts "Finished reading backup file"
85
82
  e4.close
86
83
 
87
- File.delete(backup_file)
88
- =end
84
+ File.delete(backup_file)
@@ -18,7 +18,7 @@ module Win32
18
18
  class Error < StandardError; end
19
19
 
20
20
  # The version of the win32-eventlog library
21
- VERSION = '0.6.1'
21
+ VERSION = '0.6.2'
22
22
 
23
23
  # The log is read in chronological order, i.e. oldest to newest.
24
24
  FORWARDS_READ = EVENTLOG_FORWARDS_READ
@@ -42,10 +42,14 @@ module Windows
42
42
  attach_function :Wow64DisableWow64FsRedirection, [:pointer], :bool
43
43
  attach_function :Wow64RevertWow64FsRedirection, [:ulong], :bool
44
44
 
45
- ffi_lib :wevtapi
45
+ begin
46
+ ffi_lib :wevtapi
46
47
 
47
- attach_function :EvtClose, [:handle], :bool
48
- attach_function :EvtOpenPublisherMetadata, [:handle, :buffer_in, :buffer_in, :dword, :dword], :handle
49
- attach_function :EvtGetPublisherMetadataProperty, [:handle, :int, :dword, :dword, :pointer, :pointer], :bool
48
+ attach_function :EvtClose, [:handle], :bool
49
+ attach_function :EvtOpenPublisherMetadata, [:handle, :buffer_in, :buffer_in, :dword, :dword], :handle
50
+ attach_function :EvtGetPublisherMetadataProperty, [:handle, :int, :dword, :dword, :pointer, :pointer], :bool
51
+ rescue LoadError
52
+ # 2003
53
+ end
50
54
  end
51
55
  end
@@ -25,7 +25,7 @@ class TC_Win32_EventLog < Test::Unit::TestCase
25
25
  end
26
26
 
27
27
  test "version constant is set to expected value" do
28
- assert_equal('0.6.1', EventLog::VERSION)
28
+ assert_equal('0.6.2', EventLog::VERSION)
29
29
  end
30
30
 
31
31
  test "constructor basic functionality" do
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'win32-eventlog'
5
- spec.version = '0.6.1'
5
+ spec.version = '0.6.2'
6
6
  spec.authors = ['Daniel J. Berger', 'Park Heesob']
7
7
  spec.license = 'Artistic 2.0'
8
8
  spec.email = 'djberg96@gmail.com'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: win32-eventlog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel J. Berger
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-01 00:00:00.000000000 Z
12
+ date: 2014-10-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  version: '0'
124
124
  requirements: []
125
125
  rubyforge_project: win32utils
126
- rubygems_version: 2.2.2
126
+ rubygems_version: 2.4.1
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: Interface for the MS Windows Event Log.