windows-api 0.2.1 → 0.2.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.
- data/CHANGES +5 -0
- data/README +1 -2
- data/lib/windows/api.rb +18 -2
- data/test/tc_windows_api.rb +6 -2
- data/windows-api.gemspec +2 -1
- metadata +4 -4
data/CHANGES
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
= 0.2.2 - 17-Apr-2008
|
2
|
+
* Added the Windows::MSVCRT_DLL constant so that users can specify MSVCRT_DLL
|
3
|
+
for the DLL name and it will do the right thing, instead of having to worry
|
4
|
+
about specifying a DLL or associated DLL.
|
5
|
+
|
1
6
|
= 0.2.1 - 10-Feb-2008
|
2
7
|
* Added support for long data type names, e.g. 'DWORD' instead of 'L', for
|
3
8
|
both the prototype and return type.
|
data/README
CHANGED
data/lib/windows/api.rb
CHANGED
@@ -1,8 +1,24 @@
|
|
1
1
|
require 'win32/api'
|
2
|
+
require 'rbconfig'
|
3
|
+
include Config
|
2
4
|
|
3
5
|
module Windows
|
6
|
+
# With Microsoft Visual C++ 8 and later users should use the associated
|
7
|
+
# DLL instead of msvcrt directly, if possible.
|
8
|
+
if CONFIG['host_os'].split('_')[1]
|
9
|
+
if CONFIG['host_os'].split('_')[1].to_i >= 80 &&
|
10
|
+
File.exists?(File.join(CONFIG['bindir'], 'ruby.exe.manifest'))
|
11
|
+
then
|
12
|
+
MSVCRT_DLL = 'msvcr80'
|
13
|
+
else
|
14
|
+
MSVCRT_DLL = 'msvcrt'
|
15
|
+
end
|
16
|
+
else
|
17
|
+
MSVCRT_DLL = 'msvcrt'
|
18
|
+
end
|
19
|
+
|
4
20
|
class API
|
5
|
-
VERSION = '0.2.
|
21
|
+
VERSION = '0.2.2'
|
6
22
|
|
7
23
|
class Error < RuntimeError; end
|
8
24
|
|
@@ -456,4 +472,4 @@ module Windows
|
|
456
472
|
result
|
457
473
|
end
|
458
474
|
end
|
459
|
-
end
|
475
|
+
end
|
data/test/tc_windows_api.rb
CHANGED
@@ -43,14 +43,18 @@ class TC_Windows_API < Test::Unit::TestCase
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def test_version
|
46
|
-
assert_equal('0.2.
|
46
|
+
assert_equal('0.2.2', API::VERSION)
|
47
47
|
end
|
48
48
|
|
49
49
|
def test_full_data_types
|
50
50
|
assert_nothing_raised{
|
51
|
-
API.new('
|
51
|
+
API.new('GetWindowsDirectory', ['LPTSTR', 'UINT'], 'BOOL')
|
52
52
|
}
|
53
53
|
end
|
54
|
+
|
55
|
+
def test_msvcrt_constant
|
56
|
+
assert_equal(true, ['msvcrt', 'msvcr80'].include?(Windows::MSVCRT))
|
57
|
+
end
|
54
58
|
|
55
59
|
def test_auto_unicode
|
56
60
|
assert_not_nil(Windows::Bar::GetUserName)
|
data/windows-api.gemspec
CHANGED
@@ -2,10 +2,11 @@ require "rubygems"
|
|
2
2
|
|
3
3
|
spec = Gem::Specification.new do |gem|
|
4
4
|
gem.name = "windows-api"
|
5
|
-
gem.version = "0.2.
|
5
|
+
gem.version = "0.2.2"
|
6
6
|
gem.author = "Daniel J. Berger"
|
7
7
|
gem.email = "djberg96@gmail.com"
|
8
8
|
gem.homepage = "http://www.rubyforge.org/projects/win32utils"
|
9
|
+
gem.rubyforge_project = "win32utils"
|
9
10
|
gem.platform = Gem::Platform::RUBY
|
10
11
|
gem.summary = "An easier way to create methods using Win32API"
|
11
12
|
gem.description = "An easier way to create methods using Win32API"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: windows-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-04-17 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -64,8 +64,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
64
|
version:
|
65
65
|
requirements: []
|
66
66
|
|
67
|
-
rubyforge_project:
|
68
|
-
rubygems_version: 1.
|
67
|
+
rubyforge_project: win32utils
|
68
|
+
rubygems_version: 1.1.1
|
69
69
|
signing_key:
|
70
70
|
specification_version: 2
|
71
71
|
summary: An easier way to create methods using Win32API
|