win32-api 1.5.3-universal-mingw32 → 1.6.0-universal-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES +174 -169
- data/Gemfile +4 -0
- data/Gemfile.lock +24 -0
- data/README +129 -131
- data/Rakefile +185 -182
- data/appveyor.yml +42 -0
- data/ext/win32/api.c +1092 -1092
- data/lib/win32/api.rb +14 -8
- data/lib/win32/ruby21_32/win32/api.so +0 -0
- data/lib/win32/ruby21_64/win32/api.so +0 -0
- data/lib/win32/ruby22_32/win32/api.so +0 -0
- data/lib/win32/ruby22_64/win32/api.so +0 -0
- data/lib/win32/ruby23_32/win32/api.so +0 -0
- data/lib/win32/ruby23_64/win32/api.so +0 -0
- data/lib/win32/ruby2_32/win32/api.so +0 -0
- data/lib/win32/ruby2_64/win32/api.so +0 -0
- data/test/test_win32_api.rb +145 -145
- data/vendor/bundle/ruby/2.2.0/bin/devkit +23 -0
- data/vendor/bundle/ruby/2.2.0/bin/devkit.bat +6 -0
- data/vendor/bundle/ruby/2.2.0/bin/rake +23 -0
- data/vendor/bundle/ruby/2.2.0/bin/rake.bat +6 -0
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/CHANGELOG +55 -0
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/LICENSE +339 -0
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/README.md +73 -0
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/Rakefile +8 -0
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/colorize.gemspec +35 -0
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/lib/colorize.rb +12 -0
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/lib/colorize/class_methods.rb +116 -0
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/lib/colorize/instance_methods.rb +135 -0
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/test/test_colorize.rb +161 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/Gemfile +4 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/README.md +34 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/Rakefile +1 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/Rspec-example-matchers.txt +184 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/bin/devkit +87 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/devkit.gemspec +27 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit.rb +18 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/core.rb +53 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/identity.rb +78 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/ssh_identity.rb +53 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/version.rb +3 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit/core_spec.rb +46 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit/identity_spec.rb +1 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit/ssh_identity_spec.rb +1 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit_spec.rb +5 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/spec_helper.rb +8 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/AUTHORS +3 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/COPYING +339 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/Changelog.md +415 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/Gemfile +9 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/INSTALL +59 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/LICENSE +7 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/README.rdoc +74 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/Rakefile +30 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/TODO +6 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/ansi_colors.rb +38 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/asking_for_arrays.rb +18 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/basic_usage.rb +75 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/color_scheme.rb +32 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/get_character.rb +12 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/limit.rb +12 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/menus.rb +65 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/overwrite.rb +19 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/page_and_wrap.rb +322 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/password.rb +7 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/repeat_entry.rb +21 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/trapping_eof.rb +22 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/using_readline.rb +17 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/highline.gemspec +37 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline.rb +1048 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/color_scheme.rb +134 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/compatibility.rb +16 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/import.rb +41 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/menu.rb +381 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/question.rb +480 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/simulate.rb +48 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/style.rb +192 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/version.rb +4 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/setup.rb +1360 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/site/highline.css +65 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/site/images/logo.png +0 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/site/index.html +58 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/string_methods.rb +32 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_color_scheme.rb +96 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_highline.rb +1402 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_import.rb +52 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_menu.rb +439 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_simulator.rb +23 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_string_highline.rb +38 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_style.rb +578 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/BSDL +22 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/COPYING +57 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/Gemfile +9 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/LEGAL +4 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/README.rdoc +19 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/Rakefile +16 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/benchmarks/bm_yhpg.rb +59 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/benchmarks/helper.rb +8 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/lib/power_assert.rb +338 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/lib/power_assert/enable_tracepoint_events.rb +82 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/lib/power_assert/version.rb +3 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/power_assert.gemspec +23 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/test/helper.rb +10 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/test/test_power_assert.rb +512 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/CONTRIBUTING.rdoc +38 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/History.rdoc +719 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/Manifest.txt +154 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/README.rdoc +157 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/Rakefile +82 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/bin/rake +33 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/command_line_usage.rdoc +158 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/Rakefile1 +38 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/Rakefile2 +35 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/a.c +6 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/b.c +6 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/main.c +11 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/glossary.rdoc +42 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/jamis.rb +591 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/proto_rake.rdoc +127 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/rake.1 +141 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/rakefile.rdoc +624 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/rational.rdoc +151 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.4.14.rdoc +23 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.4.15.rdoc +35 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.5.0.rdoc +53 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.5.3.rdoc +78 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.5.4.rdoc +46 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.6.0.rdoc +141 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.0.rdoc +119 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.1.rdoc +59 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.2.rdoc +121 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.3.rdoc +47 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.0.rdoc +114 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.2.rdoc +165 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.3.rdoc +112 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.4.rdoc +147 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.5.rdoc +53 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.6.rdoc +37 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.7.rdoc +55 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.0.rdoc +112 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.1.rdoc +52 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.2.rdoc +49 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.3.rdoc +102 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.4.rdoc +60 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.5.rdoc +55 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.6.rdoc +64 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.0.rdoc +178 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.1.rdoc +58 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.2.rdoc +53 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.3.rdoc +191 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.1.0.rdoc +61 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake.rb +73 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/application.rb +787 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/backtrace.rb +23 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/clean.rb +76 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/cloneable.rb +16 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/contrib/compositepublisher.rb +21 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/contrib/ftptools.rb +137 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/contrib/sshpublisher.rb +60 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/cpu_counter.rb +120 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/default_loader.rb +14 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/dsl_definition.rb +194 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/early_time.rb +21 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_creation_task.rb +24 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_list.rb +436 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_task.rb +46 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_utils.rb +123 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/invocation_chain.rb +56 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/invocation_exception_mixin.rb +16 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/late_time.rb +17 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/linked_list.rb +111 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/loaders/makefile.rb +53 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/multi_task.rb +13 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/name_space.rb +38 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/packagetask.rb +199 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/phony.rb +15 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/private_reader.rb +20 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/promise.rb +99 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/pseudo_status.rb +29 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/rake_module.rb +38 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/rake_test_loader.rb +22 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/scope.rb +42 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task.rb +391 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task_argument_error.rb +7 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task_arguments.rb +102 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task_manager.rb +316 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/tasklib.rb +11 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/testtask.rb +204 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/thread_history_display.rb +48 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/thread_pool.rb +163 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/trace_output.rb +22 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/version.rb +7 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/win32.rb +50 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/rakelib/test_times.rake +25 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/file_creation.rb +34 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/helper.rb +134 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/support/rakefile_definitions.rb +476 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/support/ruby_runner.rb +34 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_private_reader.rb +42 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake.rb +40 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_application.rb +659 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_application_options.rb +468 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_backtrace.rb +119 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_clean.rb +61 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_cpu_counter.rb +68 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_definitions.rb +84 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_directory_task.rb +76 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_dsl.rb +40 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_early_time.rb +31 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_creation_task.rb +56 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_list.rb +687 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_list_path_map.rb +15 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_task.rb +197 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_utils.rb +318 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_ftp_file.rb +74 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_functional.rb +484 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_invocation_chain.rb +64 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_late_time.rb +18 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_linked_list.rb +84 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_makefile_loader.rb +46 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_multi_task.rb +64 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_name_space.rb +57 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_package_task.rb +79 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_path_map.rb +168 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_path_map_explode.rb +34 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_path_map_partial.rb +18 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_pseudo_status.rb +21 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_rake_test_loader.rb +20 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_reduce_compat.rb +26 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_require.rb +40 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_rules.rb +388 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_scope.rb +44 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task.rb +430 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_argument_parsing.rb +119 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_arguments.rb +134 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_manager.rb +178 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_manager_argument_resolution.rb +19 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_with_arguments.rb +172 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_test_task.rb +130 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_thread_pool.rb +145 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_top_level_functions.rb +71 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_win32.rb +72 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_thread_history_display.rb +101 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_trace_output.rb +52 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/COPYING +64 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/GPL +339 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/LGPL +502 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/PSFL +271 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/README.md +101 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/Rakefile +71 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test-unit.rb +34 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit.rb +505 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/assertion-failed-error.rb +25 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/assertions.rb +2218 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/attribute-matcher.rb +26 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/attribute.rb +158 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/auto-runner-loader.rb +17 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/autorunner.rb +536 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/code-snippet-fetcher.rb +58 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector.rb +73 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/descendant.rb +19 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/dir.rb +108 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/load.rb +202 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/objectspace.rb +34 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/xml.rb +249 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/color-scheme.rb +198 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/color.rb +134 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/data.rb +262 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/diff.rb +746 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/error.rb +158 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/exception-handler.rb +82 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/failure.rb +169 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/fault-location-detector.rb +100 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/fixture.rb +295 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/notification.rb +136 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/omission.rb +195 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/pending.rb +154 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/priority.rb +192 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/runner/console.rb +59 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/runner/emacs.rb +8 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/runner/xml.rb +15 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/test-suite-creator.rb +89 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/testcase.rb +811 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/testresult.rb +132 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/testsuite.rb +175 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/console/outputlevel.rb +15 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/console/testrunner.rb +693 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/emacs/testrunner.rb +49 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/testrunner.rb +53 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/testrunnermediator.rb +114 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/testrunnerutilities.rb +41 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/xml/testrunner.rb +224 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/backtracefilter.rb +59 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/method-owner-finder.rb +28 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/observable.rb +90 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/output.rb +31 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/procwrapper.rb +48 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/version.rb +5 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/adder.rb +13 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/subtracter.rb +12 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/test_adder.rb +20 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/test_subtracter.rb +20 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/test_user.rb +23 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test-descendant.rb +178 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test-load.rb +442 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test_dir.rb +406 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test_objectspace.rb +100 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header-label.csv +3 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header-label.tsv +3 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header.csv +3 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header.tsv +3 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/no-header.csv +2 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/no-header.tsv +2 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/plus.csv +3 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/run-test.rb +22 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-assertions.rb +2160 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-attribute-matcher.rb +38 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-attribute.rb +123 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-code-snippet.rb +37 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-color-scheme.rb +82 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-color.rb +47 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-data.rb +303 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-diff.rb +518 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-emacs-runner.rb +60 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-error.rb +26 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-failure.rb +33 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-fault-location-detector.rb +163 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-fixture.rb +713 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-notification.rb +33 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-omission.rb +81 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-pending.rb +70 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-priority.rb +173 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-case.rb +1171 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-result.rb +113 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-suite-creator.rb +97 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-suite.rb +150 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/testunit-test-util.rb +31 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/ui/test_testrunmediator.rb +20 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test-method-owner-finder.rb +38 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test-output.rb +11 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test_backtracefilter.rb +52 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test_observable.rb +102 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test_procwrapper.rb +36 -0
- data/vendor/bundle/ruby/2.2.0/specifications/colorize-0.7.7.gemspec +38 -0
- data/vendor/bundle/ruby/2.2.0/specifications/devkit-0.1.0.gemspec +46 -0
- data/vendor/bundle/ruby/2.2.0/specifications/highline-1.7.8.gemspec +37 -0
- data/vendor/bundle/ruby/2.2.0/specifications/power_assert-0.3.0.gemspec +41 -0
- data/vendor/bundle/ruby/2.2.0/specifications/rake-11.1.2.gemspec +43 -0
- data/vendor/bundle/ruby/2.2.0/specifications/test-unit-3.1.9.gemspec +47 -0
- data/win32-api.gemspec +27 -27
- metadata +345 -5
- data/lib/win32/ruby18/win32/api.so +0 -0
- data/lib/win32/ruby19/win32/api.so +0 -0
data/lib/win32/api.rb
CHANGED
@@ -1,12 +1,6 @@
|
|
1
1
|
require 'rbconfig'
|
2
|
-
|
3
|
-
case RbConfig::CONFIG['MAJOR']
|
4
|
-
when '1'
|
5
|
-
if RbConfig::CONFIG['MINOR'] == '8'
|
6
|
-
require File.join(File.dirname(__FILE__), 'ruby18/win32/api')
|
7
|
-
else
|
8
|
-
require File.join(File.dirname(__FILE__), 'ruby19/win32/api')
|
9
|
-
end
|
2
|
+
begin
|
3
|
+
case RbConfig::CONFIG['MAJOR']
|
10
4
|
when '2'
|
11
5
|
if RbConfig::CONFIG['MINOR'] == '0'
|
12
6
|
if RbConfig::CONFIG['arch'] =~ /x64/i
|
@@ -31,4 +25,16 @@ case RbConfig::CONFIG['MAJOR']
|
|
31
25
|
require File.join(File.dirname(__FILE__), 'ruby22_32/win32/api')
|
32
26
|
end
|
33
27
|
end
|
28
|
+
|
29
|
+
if RbConfig::CONFIG['MINOR'] == '3'
|
30
|
+
if RbConfig::CONFIG['arch'] =~ /x64/i
|
31
|
+
require File.join(File.dirname(__FILE__), 'ruby23_64/win32/api')
|
32
|
+
else
|
33
|
+
require File.join(File.dirname(__FILE__), 'ruby23_32/win32/api')
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
rescue LoadError
|
39
|
+
require File.join(File.dirname(__FILE__), '../../ext/api')
|
34
40
|
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/test/test_win32_api.rb
CHANGED
@@ -1,145 +1,145 @@
|
|
1
|
-
############################################################################
|
2
|
-
# test_win32_api.rb
|
3
|
-
#
|
4
|
-
# Test case for the Win32::API class. You should run this as Rake task,
|
5
|
-
# i.e. 'rake test', instead of running it directly.
|
6
|
-
############################################################################
|
7
|
-
require 'win32/api'
|
8
|
-
require 'test-unit'
|
9
|
-
include Win32
|
10
|
-
|
11
|
-
class TC_Win32_API < Test::Unit::TestCase
|
12
|
-
def setup
|
13
|
-
@buf = 0.chr * 260
|
14
|
-
@gfa = API.new('GetFileAttributes', 'S', 'L')
|
15
|
-
@gcd = API.new('GetCurrentDirectory', 'LP')
|
16
|
-
@gle = API.new('GetLastError', 'V', 'L')
|
17
|
-
@str = API.new('strstr', 'PP', 'P', 'msvcrt')
|
18
|
-
end
|
19
|
-
|
20
|
-
def test_version
|
21
|
-
assert_equal('1.
|
22
|
-
end
|
23
|
-
|
24
|
-
def test_constructor_basic
|
25
|
-
assert_nothing_raised{ API.new('GetCurrentDirectory') }
|
26
|
-
assert_nothing_raised{ API.new('GetCurrentDirectory', 'LP') }
|
27
|
-
assert_nothing_raised{ API.new('GetCurrentDirectory', 'LP', 'L') }
|
28
|
-
assert_nothing_raised{ API.new('GetCurrentDirectory', 'LP', 'L', 'kernel32') }
|
29
|
-
end
|
30
|
-
|
31
|
-
def test_call
|
32
|
-
assert_respond_to(@gcd, :call)
|
33
|
-
assert_nothing_raised{ @gcd.call(@buf.length, @buf) }
|
34
|
-
assert_equal(Dir.pwd.tr('/', "\\"), @buf.strip)
|
35
|
-
end
|
36
|
-
|
37
|
-
def test_call_with_void
|
38
|
-
assert_nothing_raised{ @gle.call }
|
39
|
-
assert_nothing_raised{ @gle.call(nil) }
|
40
|
-
end
|
41
|
-
|
42
|
-
def test_call_return_value_on_failure
|
43
|
-
assert_equal(0xFFFFFFFF, @gfa.call('C:/foobarbazblah'))
|
44
|
-
end
|
45
|
-
|
46
|
-
def test_dll_name
|
47
|
-
assert_respond_to(@gcd, :dll_name)
|
48
|
-
assert_equal('kernel32', @gcd.dll_name)
|
49
|
-
end
|
50
|
-
|
51
|
-
def test_function_name
|
52
|
-
assert_respond_to(@gcd, :function_name)
|
53
|
-
assert_equal('GetCurrentDirectory', @gcd.function_name)
|
54
|
-
assert_equal('strstr', @str.function_name)
|
55
|
-
end
|
56
|
-
|
57
|
-
def test_effective_function_name_default
|
58
|
-
assert_respond_to(@gcd, :effective_function_name)
|
59
|
-
assert_equal('GetCurrentDirectoryA', @gcd.effective_function_name)
|
60
|
-
assert_equal('strstr', @str.effective_function_name)
|
61
|
-
end
|
62
|
-
|
63
|
-
def test_effective_function_name_default_explicit_ansi
|
64
|
-
@gcd = API.new('GetCurrentDirectoryA', 'LP')
|
65
|
-
assert_equal('GetCurrentDirectoryA', @gcd.effective_function_name)
|
66
|
-
end
|
67
|
-
|
68
|
-
def test_effective_function_name_default_explicit_wide
|
69
|
-
@gcd = API.new('GetCurrentDirectoryW', 'LP')
|
70
|
-
assert_equal('GetCurrentDirectoryW', @gcd.effective_function_name)
|
71
|
-
end
|
72
|
-
|
73
|
-
def test_prototype
|
74
|
-
assert_respond_to(@gcd, :prototype)
|
75
|
-
assert_equal(['L', 'P'], @gcd.prototype)
|
76
|
-
end
|
77
|
-
|
78
|
-
def test_return_type
|
79
|
-
assert_respond_to(@gcd, :return_type)
|
80
|
-
assert_equal('L', @gcd.return_type)
|
81
|
-
end
|
82
|
-
|
83
|
-
def test_constructor_high_iteration
|
84
|
-
assert_nothing_raised{
|
85
|
-
1000.times{ API.new('GetUserName', 'P', 'P', 'advapi32') }
|
86
|
-
}
|
87
|
-
end
|
88
|
-
|
89
|
-
def test_constructor_expected_failures
|
90
|
-
assert_raise(ArgumentError){ API.new }
|
91
|
-
assert_raise(ArgumentError){ API.new('GetUserName', ('L' * 21), 'X') }
|
92
|
-
assert_raise(API::LoadLibraryError){ API.new('GetUserName', 'PL', 'I', 'foo') }
|
93
|
-
assert_raise(API::PrototypeError){ API.new('GetUserName', 'X', 'I', 'advapi32') }
|
94
|
-
assert_raise(API::PrototypeError){ API.new('GetUserName', 'PL', 'X', 'advapi32') }
|
95
|
-
end
|
96
|
-
|
97
|
-
test "constructor returns expected error message if function not found" do
|
98
|
-
msg = "Unable to load function "
|
99
|
-
assert_raise_message(msg + "'Zap', 'ZapA', or 'ZapW'"){ API.new('Zap') }
|
100
|
-
assert_raise_message(msg + "'strxxx'"){ API.new('strxxx', 'P', 'L', 'msvcrt') }
|
101
|
-
end
|
102
|
-
|
103
|
-
test "constructor returns expected error message if prototype is invalid" do
|
104
|
-
msg = "Illegal prototype 'X'"
|
105
|
-
assert_raise_message(msg){ API.new('GetUserName', 'X', 'I', 'advapi32') }
|
106
|
-
end
|
107
|
-
|
108
|
-
test "constructor returns expected error message if return type is invalid" do
|
109
|
-
msg = "Illegal return type 'Y'"
|
110
|
-
assert_raise_message(msg){ API.new('GetUserName', 'PL', 'Y', 'advapi32') }
|
111
|
-
end
|
112
|
-
|
113
|
-
test "constructor returns expected error message if too many parameters" do
|
114
|
-
msg = "too many parameters: 25"
|
115
|
-
assert_raise_message(msg){ API.new('GetFileAttributes', 'S' * 25, 'L') }
|
116
|
-
end
|
117
|
-
|
118
|
-
test "call method returns expected error message if too many parameters" do
|
119
|
-
msg = "wrong number of parameters: expected 2, got 3"
|
120
|
-
assert_raise_message(msg){ @str.call('test', 'test', 'test') }
|
121
|
-
end
|
122
|
-
|
123
|
-
def test_call_expected_failures
|
124
|
-
assert_raise(TypeError){ @gcd.call('test', @buf) }
|
125
|
-
end
|
126
|
-
|
127
|
-
def test_error_classes
|
128
|
-
assert_not_nil(Win32::API::Error)
|
129
|
-
assert_not_nil(Win32::API::LoadLibraryError)
|
130
|
-
assert_not_nil(Win32::API::PrototypeError)
|
131
|
-
end
|
132
|
-
|
133
|
-
def test_error_class_relationships
|
134
|
-
assert_kind_of(RuntimeError, Win32::API::Error.new)
|
135
|
-
assert_kind_of(Win32::API::Error, Win32::API::LoadLibraryError.new)
|
136
|
-
assert_kind_of(Win32::API::Error, Win32::API::PrototypeError.new)
|
137
|
-
end
|
138
|
-
|
139
|
-
def teardown
|
140
|
-
@buf = nil
|
141
|
-
@gcd = nil
|
142
|
-
@gle = nil
|
143
|
-
@str = nil
|
144
|
-
end
|
145
|
-
end
|
1
|
+
############################################################################
|
2
|
+
# test_win32_api.rb
|
3
|
+
#
|
4
|
+
# Test case for the Win32::API class. You should run this as Rake task,
|
5
|
+
# i.e. 'rake test', instead of running it directly.
|
6
|
+
############################################################################
|
7
|
+
require 'win32/api'
|
8
|
+
require 'test-unit'
|
9
|
+
include Win32
|
10
|
+
|
11
|
+
class TC_Win32_API < Test::Unit::TestCase
|
12
|
+
def setup
|
13
|
+
@buf = 0.chr * 260
|
14
|
+
@gfa = API.new('GetFileAttributes', 'S', 'L')
|
15
|
+
@gcd = API.new('GetCurrentDirectory', 'LP')
|
16
|
+
@gle = API.new('GetLastError', 'V', 'L')
|
17
|
+
@str = API.new('strstr', 'PP', 'P', 'msvcrt')
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_version
|
21
|
+
assert_equal('1.6.0', API::VERSION)
|
22
|
+
end
|
23
|
+
|
24
|
+
def test_constructor_basic
|
25
|
+
assert_nothing_raised{ API.new('GetCurrentDirectory') }
|
26
|
+
assert_nothing_raised{ API.new('GetCurrentDirectory', 'LP') }
|
27
|
+
assert_nothing_raised{ API.new('GetCurrentDirectory', 'LP', 'L') }
|
28
|
+
assert_nothing_raised{ API.new('GetCurrentDirectory', 'LP', 'L', 'kernel32') }
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_call
|
32
|
+
assert_respond_to(@gcd, :call)
|
33
|
+
assert_nothing_raised{ @gcd.call(@buf.length, @buf) }
|
34
|
+
assert_equal(Dir.pwd.tr('/', "\\"), @buf.strip)
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_call_with_void
|
38
|
+
assert_nothing_raised{ @gle.call }
|
39
|
+
assert_nothing_raised{ @gle.call(nil) }
|
40
|
+
end
|
41
|
+
|
42
|
+
def test_call_return_value_on_failure
|
43
|
+
assert_equal(0xFFFFFFFF, @gfa.call('C:/foobarbazblah'))
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_dll_name
|
47
|
+
assert_respond_to(@gcd, :dll_name)
|
48
|
+
assert_equal('kernel32', @gcd.dll_name)
|
49
|
+
end
|
50
|
+
|
51
|
+
def test_function_name
|
52
|
+
assert_respond_to(@gcd, :function_name)
|
53
|
+
assert_equal('GetCurrentDirectory', @gcd.function_name)
|
54
|
+
assert_equal('strstr', @str.function_name)
|
55
|
+
end
|
56
|
+
|
57
|
+
def test_effective_function_name_default
|
58
|
+
assert_respond_to(@gcd, :effective_function_name)
|
59
|
+
assert_equal('GetCurrentDirectoryA', @gcd.effective_function_name)
|
60
|
+
assert_equal('strstr', @str.effective_function_name)
|
61
|
+
end
|
62
|
+
|
63
|
+
def test_effective_function_name_default_explicit_ansi
|
64
|
+
@gcd = API.new('GetCurrentDirectoryA', 'LP')
|
65
|
+
assert_equal('GetCurrentDirectoryA', @gcd.effective_function_name)
|
66
|
+
end
|
67
|
+
|
68
|
+
def test_effective_function_name_default_explicit_wide
|
69
|
+
@gcd = API.new('GetCurrentDirectoryW', 'LP')
|
70
|
+
assert_equal('GetCurrentDirectoryW', @gcd.effective_function_name)
|
71
|
+
end
|
72
|
+
|
73
|
+
def test_prototype
|
74
|
+
assert_respond_to(@gcd, :prototype)
|
75
|
+
assert_equal(['L', 'P'], @gcd.prototype)
|
76
|
+
end
|
77
|
+
|
78
|
+
def test_return_type
|
79
|
+
assert_respond_to(@gcd, :return_type)
|
80
|
+
assert_equal('L', @gcd.return_type)
|
81
|
+
end
|
82
|
+
|
83
|
+
def test_constructor_high_iteration
|
84
|
+
assert_nothing_raised{
|
85
|
+
1000.times{ API.new('GetUserName', 'P', 'P', 'advapi32') }
|
86
|
+
}
|
87
|
+
end
|
88
|
+
|
89
|
+
def test_constructor_expected_failures
|
90
|
+
assert_raise(ArgumentError){ API.new }
|
91
|
+
assert_raise(ArgumentError){ API.new('GetUserName', ('L' * 21), 'X') }
|
92
|
+
assert_raise(API::LoadLibraryError){ API.new('GetUserName', 'PL', 'I', 'foo') }
|
93
|
+
assert_raise(API::PrototypeError){ API.new('GetUserName', 'X', 'I', 'advapi32') }
|
94
|
+
assert_raise(API::PrototypeError){ API.new('GetUserName', 'PL', 'X', 'advapi32') }
|
95
|
+
end
|
96
|
+
|
97
|
+
test "constructor returns expected error message if function not found" do
|
98
|
+
msg = "Unable to load function "
|
99
|
+
assert_raise_message(msg + "'Zap', 'ZapA', or 'ZapW'"){ API.new('Zap') }
|
100
|
+
assert_raise_message(msg + "'strxxx'"){ API.new('strxxx', 'P', 'L', 'msvcrt') }
|
101
|
+
end
|
102
|
+
|
103
|
+
test "constructor returns expected error message if prototype is invalid" do
|
104
|
+
msg = "Illegal prototype 'X'"
|
105
|
+
assert_raise_message(msg){ API.new('GetUserName', 'X', 'I', 'advapi32') }
|
106
|
+
end
|
107
|
+
|
108
|
+
test "constructor returns expected error message if return type is invalid" do
|
109
|
+
msg = "Illegal return type 'Y'"
|
110
|
+
assert_raise_message(msg){ API.new('GetUserName', 'PL', 'Y', 'advapi32') }
|
111
|
+
end
|
112
|
+
|
113
|
+
test "constructor returns expected error message if too many parameters" do
|
114
|
+
msg = "too many parameters: 25"
|
115
|
+
assert_raise_message(msg){ API.new('GetFileAttributes', 'S' * 25, 'L') }
|
116
|
+
end
|
117
|
+
|
118
|
+
test "call method returns expected error message if too many parameters" do
|
119
|
+
msg = "wrong number of parameters: expected 2, got 3"
|
120
|
+
assert_raise_message(msg){ @str.call('test', 'test', 'test') }
|
121
|
+
end
|
122
|
+
|
123
|
+
def test_call_expected_failures
|
124
|
+
assert_raise(TypeError){ @gcd.call('test', @buf) }
|
125
|
+
end
|
126
|
+
|
127
|
+
def test_error_classes
|
128
|
+
assert_not_nil(Win32::API::Error)
|
129
|
+
assert_not_nil(Win32::API::LoadLibraryError)
|
130
|
+
assert_not_nil(Win32::API::PrototypeError)
|
131
|
+
end
|
132
|
+
|
133
|
+
def test_error_class_relationships
|
134
|
+
assert_kind_of(RuntimeError, Win32::API::Error.new)
|
135
|
+
assert_kind_of(Win32::API::Error, Win32::API::LoadLibraryError.new)
|
136
|
+
assert_kind_of(Win32::API::Error, Win32::API::PrototypeError.new)
|
137
|
+
end
|
138
|
+
|
139
|
+
def teardown
|
140
|
+
@buf = nil
|
141
|
+
@gcd = nil
|
142
|
+
@gle = nil
|
143
|
+
@str = nil
|
144
|
+
end
|
145
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
#! ruby
|
2
|
+
#
|
3
|
+
# This file was generated by RubyGems.
|
4
|
+
#
|
5
|
+
# The application 'devkit' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'rubygems'
|
10
|
+
|
11
|
+
version = ">= 0"
|
12
|
+
|
13
|
+
if ARGV.first
|
14
|
+
str = ARGV.first
|
15
|
+
str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
|
16
|
+
if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
|
17
|
+
version = $1
|
18
|
+
ARGV.shift
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
gem 'devkit', version
|
23
|
+
load Gem.bin_path('devkit', 'devkit', version)
|
@@ -0,0 +1,23 @@
|
|
1
|
+
#! ruby
|
2
|
+
#
|
3
|
+
# This file was generated by RubyGems.
|
4
|
+
#
|
5
|
+
# The application 'rake' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'rubygems'
|
10
|
+
|
11
|
+
version = ">= 0"
|
12
|
+
|
13
|
+
if ARGV.first
|
14
|
+
str = ARGV.first
|
15
|
+
str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
|
16
|
+
if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
|
17
|
+
version = $1
|
18
|
+
ARGV.shift
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
gem 'rake', version
|
23
|
+
load Gem.bin_path('rake', 'rake', version)
|
@@ -0,0 +1,55 @@
|
|
1
|
+
== 0.7.7 / 2015-04-19
|
2
|
+
* update gems
|
3
|
+
|
4
|
+
== 0.7.6 / 2015-04-18
|
5
|
+
* fix bugs
|
6
|
+
|
7
|
+
== 0.7.5 / 2014-12-11
|
8
|
+
* big code refactoring
|
9
|
+
* disable_colorization feature added
|
10
|
+
|
11
|
+
== 0.7.4 / 2014-12-10
|
12
|
+
* code cleanups
|
13
|
+
|
14
|
+
== 0.7.3 / 2014-05-19
|
15
|
+
* fix new line maching
|
16
|
+
|
17
|
+
== 0.7.2 / 2014-04-08
|
18
|
+
* tests cleanups
|
19
|
+
* gem release date fixed
|
20
|
+
|
21
|
+
== 0.7.1 / 2014-04-02
|
22
|
+
* handling wrong color values
|
23
|
+
|
24
|
+
== 0.7.0 / 2014-03-12
|
25
|
+
* refactored to use regexp pattern matching
|
26
|
+
* works with frozen strings
|
27
|
+
* works with concatenated string
|
28
|
+
|
29
|
+
== 0.6.0 / 2013-09-25
|
30
|
+
* code cleanups
|
31
|
+
* bold mode fixed
|
32
|
+
* STDOUT.isatty condition removed
|
33
|
+
* doc updated
|
34
|
+
* jeweler tasks removed
|
35
|
+
* Rakefile updated
|
36
|
+
|
37
|
+
== 0.5.8 / 2009-12-02
|
38
|
+
* code cleanups
|
39
|
+
* removed 'ruby -w' warnings
|
40
|
+
|
41
|
+
== 0.5.7 / 2009-11-24
|
42
|
+
* moved to github/gemcutter
|
43
|
+
* 1.9 compatible
|
44
|
+
|
45
|
+
== 0.5.6 / 2007-08-27
|
46
|
+
* rdocs Allison template
|
47
|
+
* cleanups
|
48
|
+
|
49
|
+
== 0.5.5 / 2007-08-11
|
50
|
+
* added effects methods
|
51
|
+
* README files
|
52
|
+
* new rake file
|
53
|
+
|
54
|
+
== 0.5.0 / 2007-04-22
|
55
|
+
* initial rewritten version
|