windows-api 0.3.0 → 0.3.1

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 CHANGED
@@ -1,10 +1,16 @@
1
- = 0.3.0 - 1-Feb-2009
1
+ == 0.3.1 - 18-Aug-2009
2
+ * Changed license to Artistic 2.0.
3
+ * Some gemspec updates, including the addition of a license, an updated
4
+ description and a dependency update.
5
+ * One test update for VC++ 9.
6
+
7
+ == 0.3.0 - 1-Feb-2009
2
8
  * No longer explicitly checks for an error in the constructor. It lets the
3
9
  underlying Win32::API library deal with it.
4
10
  * More dynamic handling and setting of the MSVCRT_DLL variable.
5
11
  * Added a WideString implementation. Internal use only.
6
12
 
7
- = 0.2.4 - 18-Jul-2008
13
+ == 0.2.4 - 18-Jul-2008
8
14
  * Eliminated unnecessary LoadLibrary() attempts for functions that explicitly
9
15
  end with an 'A' or 'W', and all MSVCRT functions, since they have no 'A'
10
16
  or 'W' equivalent.
@@ -15,25 +21,25 @@
15
21
  * Added more tests, and fixed one assertion that was wrong (the prototype).
16
22
  * Some documentation additions.
17
23
 
18
- = 0.2.3 - 26-Apr-2008
24
+ == 0.2.3 - 26-Apr-2008
19
25
  * Improved API.auto_constant and API.auto_method handling for functions that
20
26
  start with a lower case character or an underscore.
21
27
 
22
- = 0.2.2 - 17-Apr-2008
28
+ == 0.2.2 - 17-Apr-2008
23
29
  * Added the Windows::MSVCRT_DLL constant so that users can specify MSVCRT_DLL
24
30
  for the DLL name and it will do the right thing, instead of having to worry
25
31
  about specifying a DLL or associated DLL.
26
32
 
27
- = 0.2.1 - 10-Feb-2008
33
+ == 0.2.1 - 10-Feb-2008
28
34
  * Added support for long data type names, e.g. 'DWORD' instead of 'L', for
29
35
  both the prototype and return type.
30
36
 
31
- = 0.2.0 - 20-Sep-2007
37
+ == 0.2.0 - 20-Sep-2007
32
38
  * Now requires the win32-api library.
33
39
  * Replaced class variables with class instance variables to prevent conflicts.
34
40
 
35
- = 0.1.1 - 25-May-2007
41
+ == 0.1.1 - 25-May-2007
36
42
  * Fixed a void parameter bug.
37
43
 
38
- = 0.1.0 - 24-May-2007
44
+ == 0.1.0 - 24-May-2007
39
45
  * Initial release
data/README CHANGED
@@ -1,8 +1,8 @@
1
- = Description
1
+ == Description
2
2
  This is a wrapper for Win32::API that simplifies various idioms typically
3
3
  used by people who use Win32::API.
4
4
 
5
- = Synopsis
5
+ == Synopsis
6
6
  require 'windows/api'
7
7
  include Windows
8
8
 
@@ -62,26 +62,26 @@
62
62
  end
63
63
  end
64
64
 
65
- = Advantages over plain Win32::API
65
+ == Advantages over plain Win32::API
66
66
  * Automatic constant generation.
67
67
  * Automatic definition of ANSI and Unicode method wrappers, including
68
68
  special handling for boolean methods.
69
69
  * Ability to use more familiar Windows data types, e.g. DWORD.
70
70
  * Automatic handling of msvcrt vs msvcrXX via MSVCRT_DLL constant.
71
71
 
72
- = More documentation
72
+ == More documentation
73
73
  See the RDoc documentation, which should have been automatically generated
74
74
  if you installed this as a gem.
75
75
 
76
- = Bugs
76
+ == Bugs
77
77
  None that I'm aware of. Please submit any bugs to the project page at
78
78
  http://www.rubyforge.org/projects/win32utils.
79
79
 
80
- = Copyright
81
- (C) 2007-2008, Daniel J. Berger
80
+ == Copyright
81
+ (C) 2007-2009, Daniel J. Berger
82
82
 
83
- = License
84
- Ruby's
83
+ == License
84
+ Artistic 2.0
85
85
 
86
- = Author
86
+ == Author
87
87
  Daniel Berger
data/lib/windows/api.rb CHANGED
@@ -24,8 +24,8 @@ module Windows
24
24
  class API
25
25
  extend Forwardable
26
26
 
27
- # The version of this library
28
- VERSION = '0.3.0'
27
+ # The version of the windows-api library
28
+ VERSION = '0.3.1'
29
29
 
30
30
  # The methods from Win32::API are delegated to the appropriate object
31
31
  def_delegators(:@api, :function_name, :dll_name, :prototype)
@@ -219,9 +219,12 @@ module Windows
219
219
  # API.auto_namespace = 'Windows::File'
220
220
  # API.auto_constant = true
221
221
  # API.auto_method = true
222
- # GetFileAttributes = API.new('GetFileAttributes', 'P', 'L')
222
+ # API.new('GetFileAttributes', 'P', 'L')
223
223
  # end
224
224
  # end
225
+ #
226
+ # include Windows::File
227
+ # GetFileAttributes('C:/test.txt') # vs. GetFileAttributes.call
225
228
  #
226
229
  # If the Windows::API object is declared to be a boolean in the
227
230
  # constructor, then the method definition automatically includes a
@@ -52,10 +52,11 @@ class TC_Windows_API < Test::Unit::TestCase
52
52
 
53
53
  def setup
54
54
  @buf = 0.chr * 256
55
+ @runtimes = ['msvcrt', 'msvcr80', 'msvcr90']
55
56
  end
56
57
 
57
58
  def test_version
58
- assert_equal('0.3.0', API::VERSION)
59
+ assert_equal('0.3.1', API::VERSION)
59
60
  end
60
61
 
61
62
  def test_full_data_types
@@ -65,7 +66,7 @@ class TC_Windows_API < Test::Unit::TestCase
65
66
  end
66
67
 
67
68
  def test_msvcrt_constant
68
- assert_equal(true, ['msvcrt', 'msvcr80'].include?(Windows::MSVCRT_DLL))
69
+ assert_equal(true, @runtimes.include?(Windows::MSVCRT_DLL))
69
70
  end
70
71
 
71
72
  # Validate that functions like 'strstr' get an uppercase constant like 'Strstr'
@@ -159,5 +160,6 @@ class TC_Windows_API < Test::Unit::TestCase
159
160
 
160
161
  def teardown
161
162
  @buf = nil
163
+ @runtimes = nil
162
164
  end
163
165
  end
data/windows-api.gemspec CHANGED
@@ -1,24 +1,30 @@
1
- require "rubygems"
1
+ require 'rubygems'
2
2
 
3
3
  spec = Gem::Specification.new do |gem|
4
- gem.name = "windows-api"
5
- gem.version = "0.3.0"
6
- gem.author = "Daniel J. Berger"
7
- gem.email = "djberg96@gmail.com"
8
- gem.homepage = "http://www.rubyforge.org/projects/win32utils"
9
- gem.rubyforge_project = "win32utils"
10
- gem.platform = Gem::Platform::RUBY
11
- gem.summary = "An easier way to create methods using Win32API"
12
- gem.description = "An easier way to create methods using Win32API"
13
- gem.test_file = "test/test_windows_api.rb"
14
- gem.has_rdoc = true
15
- gem.files = Dir["lib/windows/*.rb"] + Dir["test/*"] + Dir["[A-Z]*"]
16
- gem.files.reject! { |fn| fn.include? "CVS" }
17
- gem.require_path = "lib"
18
- gem.extra_rdoc_files = ["README", "CHANGES", "MANIFEST"]
19
- gem.add_dependency("win32-api", ">= 1.3.0")
20
- end
4
+ gem.name = 'windows-api'
5
+ gem.version = '0.3.1'
6
+ gem.author = 'Daniel J. Berger'
7
+ gem.license = 'Artistic 2.0'
8
+ gem.email = 'djberg96@gmail.com'
9
+ gem.homepage = 'http://www.rubyforge.org/projects/win32utils'
10
+ gem.platform = Gem::Platform::RUBY
11
+ gem.summary = 'An easier way to create methods using Win32::API'
12
+ gem.test_file = 'test/test_windows_api.rb'
13
+ gem.has_rdoc = true
14
+ gem.files = Dir['**/*'].reject{ |f| f.include?('CVS') }
15
+
16
+ gem.rubyforge_project = 'win32utils'
17
+ gem.extra_rdoc_files = ['README', 'CHANGES', 'MANIFEST']
21
18
 
22
- if $0 == __FILE__
23
- Gem::Builder.new(spec).build
19
+ gem.add_dependency('win32-api', '>= 1.4.4')
20
+
21
+ gem.description = <<-EOF
22
+ The windows-api library provides features over and above the basic
23
+ interface provided by the win32-api library. Features included automatic
24
+ constant generation, automatic defintion of ANSI and Unicode methods,
25
+ special handling of functions that return a boolean value, and the
26
+ ability to use native Windows type declarations.
27
+ EOF
24
28
  end
29
+
30
+ Gem::Builder.new(spec).build
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.3.0
4
+ version: 0.3.1
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: 2009-02-01 00:00:00 -07:00
12
+ date: 2009-08-18 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,9 +20,9 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 1.3.0
23
+ version: 1.4.4
24
24
  version:
25
- description: An easier way to create methods using Win32API
25
+ description: " The windows-api library provides features over and above the basic\n interface provided by the win32-api library. Features included automatic\n constant generation, automatic defintion of ANSI and Unicode methods,\n special handling of functions that return a boolean value, and the\n ability to use native Windows type declarations.\n"
26
26
  email: djberg96@gmail.com
27
27
  executables: []
28
28
 
@@ -33,21 +33,19 @@ extra_rdoc_files:
33
33
  - CHANGES
34
34
  - MANIFEST
35
35
  files:
36
+ - CHANGES
36
37
  - lib/windows/api.rb
37
38
  - lib/windows/wide_string.rb
38
- - test/test_wide_string.rb
39
- - test/test_windows_api.rb
40
- - CHANGES
41
- - lib
42
39
  - MANIFEST
43
40
  - Rakefile
44
41
  - README
45
- - test
42
+ - test/test_wide_string.rb
43
+ - test/test_windows_api.rb
46
44
  - windows-api.gemspec
47
45
  has_rdoc: true
48
46
  homepage: http://www.rubyforge.org/projects/win32utils
49
- licenses: []
50
-
47
+ licenses:
48
+ - Artistic 2.0
51
49
  post_install_message:
52
50
  rdoc_options: []
53
51
 
@@ -68,9 +66,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
66
  requirements: []
69
67
 
70
68
  rubyforge_project: win32utils
71
- rubygems_version: 1.3.1
69
+ rubygems_version: 1.3.5
72
70
  signing_key:
73
71
  specification_version: 3
74
- summary: An easier way to create methods using Win32API
72
+ summary: An easier way to create methods using Win32::API
75
73
  test_files:
76
74
  - test/test_windows_api.rb