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.
Files changed (358) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES +174 -169
  3. data/Gemfile +4 -0
  4. data/Gemfile.lock +24 -0
  5. data/README +129 -131
  6. data/Rakefile +185 -182
  7. data/appveyor.yml +42 -0
  8. data/ext/win32/api.c +1092 -1092
  9. data/lib/win32/api.rb +14 -8
  10. data/lib/win32/ruby21_32/win32/api.so +0 -0
  11. data/lib/win32/ruby21_64/win32/api.so +0 -0
  12. data/lib/win32/ruby22_32/win32/api.so +0 -0
  13. data/lib/win32/ruby22_64/win32/api.so +0 -0
  14. data/lib/win32/ruby23_32/win32/api.so +0 -0
  15. data/lib/win32/ruby23_64/win32/api.so +0 -0
  16. data/lib/win32/ruby2_32/win32/api.so +0 -0
  17. data/lib/win32/ruby2_64/win32/api.so +0 -0
  18. data/test/test_win32_api.rb +145 -145
  19. data/vendor/bundle/ruby/2.2.0/bin/devkit +23 -0
  20. data/vendor/bundle/ruby/2.2.0/bin/devkit.bat +6 -0
  21. data/vendor/bundle/ruby/2.2.0/bin/rake +23 -0
  22. data/vendor/bundle/ruby/2.2.0/bin/rake.bat +6 -0
  23. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/CHANGELOG +55 -0
  24. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/LICENSE +339 -0
  25. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/README.md +73 -0
  26. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/Rakefile +8 -0
  27. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/colorize.gemspec +35 -0
  28. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/lib/colorize.rb +12 -0
  29. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/lib/colorize/class_methods.rb +116 -0
  30. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/lib/colorize/instance_methods.rb +135 -0
  31. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/test/test_colorize.rb +161 -0
  32. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/Gemfile +4 -0
  33. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/LICENSE.txt +22 -0
  34. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/README.md +34 -0
  35. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/Rakefile +1 -0
  36. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/Rspec-example-matchers.txt +184 -0
  37. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/bin/devkit +87 -0
  38. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/devkit.gemspec +27 -0
  39. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit.rb +18 -0
  40. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/core.rb +53 -0
  41. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/identity.rb +78 -0
  42. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/ssh_identity.rb +53 -0
  43. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/version.rb +3 -0
  44. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit/core_spec.rb +46 -0
  45. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit/identity_spec.rb +1 -0
  46. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit/ssh_identity_spec.rb +1 -0
  47. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit_spec.rb +5 -0
  48. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/spec_helper.rb +8 -0
  49. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/AUTHORS +3 -0
  50. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/COPYING +339 -0
  51. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/Changelog.md +415 -0
  52. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/Gemfile +9 -0
  53. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/INSTALL +59 -0
  54. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/LICENSE +7 -0
  55. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/README.rdoc +74 -0
  56. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/Rakefile +30 -0
  57. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/TODO +6 -0
  58. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/ansi_colors.rb +38 -0
  59. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/asking_for_arrays.rb +18 -0
  60. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/basic_usage.rb +75 -0
  61. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/color_scheme.rb +32 -0
  62. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/get_character.rb +12 -0
  63. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/limit.rb +12 -0
  64. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/menus.rb +65 -0
  65. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/overwrite.rb +19 -0
  66. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/page_and_wrap.rb +322 -0
  67. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/password.rb +7 -0
  68. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/repeat_entry.rb +21 -0
  69. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/trapping_eof.rb +22 -0
  70. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/using_readline.rb +17 -0
  71. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/highline.gemspec +37 -0
  72. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline.rb +1048 -0
  73. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/color_scheme.rb +134 -0
  74. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/compatibility.rb +16 -0
  75. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/import.rb +41 -0
  76. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/menu.rb +381 -0
  77. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/question.rb +480 -0
  78. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/simulate.rb +48 -0
  79. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/style.rb +192 -0
  80. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/version.rb +4 -0
  81. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/setup.rb +1360 -0
  82. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/site/highline.css +65 -0
  83. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/site/images/logo.png +0 -0
  84. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/site/index.html +58 -0
  85. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/string_methods.rb +32 -0
  86. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_color_scheme.rb +96 -0
  87. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_highline.rb +1402 -0
  88. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_import.rb +52 -0
  89. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_menu.rb +439 -0
  90. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_simulator.rb +23 -0
  91. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_string_highline.rb +38 -0
  92. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_style.rb +578 -0
  93. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/BSDL +22 -0
  94. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/COPYING +57 -0
  95. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/Gemfile +9 -0
  96. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/LEGAL +4 -0
  97. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/README.rdoc +19 -0
  98. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/Rakefile +16 -0
  99. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/benchmarks/bm_yhpg.rb +59 -0
  100. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/benchmarks/helper.rb +8 -0
  101. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/lib/power_assert.rb +338 -0
  102. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/lib/power_assert/enable_tracepoint_events.rb +82 -0
  103. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/lib/power_assert/version.rb +3 -0
  104. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/power_assert.gemspec +23 -0
  105. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/test/helper.rb +10 -0
  106. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/test/test_power_assert.rb +512 -0
  107. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/CONTRIBUTING.rdoc +38 -0
  108. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/History.rdoc +719 -0
  109. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/MIT-LICENSE +21 -0
  110. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/Manifest.txt +154 -0
  111. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/README.rdoc +157 -0
  112. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/Rakefile +82 -0
  113. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/bin/rake +33 -0
  114. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/command_line_usage.rdoc +158 -0
  115. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/Rakefile1 +38 -0
  116. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/Rakefile2 +35 -0
  117. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/a.c +6 -0
  118. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/b.c +6 -0
  119. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/main.c +11 -0
  120. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/glossary.rdoc +42 -0
  121. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/jamis.rb +591 -0
  122. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/proto_rake.rdoc +127 -0
  123. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/rake.1 +141 -0
  124. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/rakefile.rdoc +624 -0
  125. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/rational.rdoc +151 -0
  126. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.4.14.rdoc +23 -0
  127. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.4.15.rdoc +35 -0
  128. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.5.0.rdoc +53 -0
  129. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.5.3.rdoc +78 -0
  130. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.5.4.rdoc +46 -0
  131. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.6.0.rdoc +141 -0
  132. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.0.rdoc +119 -0
  133. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.1.rdoc +59 -0
  134. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.2.rdoc +121 -0
  135. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.3.rdoc +47 -0
  136. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.0.rdoc +114 -0
  137. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.2.rdoc +165 -0
  138. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.3.rdoc +112 -0
  139. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.4.rdoc +147 -0
  140. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.5.rdoc +53 -0
  141. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.6.rdoc +37 -0
  142. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.7.rdoc +55 -0
  143. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.0.rdoc +112 -0
  144. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.1.rdoc +52 -0
  145. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
  146. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.2.rdoc +49 -0
  147. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.3.rdoc +102 -0
  148. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.4.rdoc +60 -0
  149. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.5.rdoc +55 -0
  150. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.6.rdoc +64 -0
  151. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.0.rdoc +178 -0
  152. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.1.rdoc +58 -0
  153. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.2.rdoc +53 -0
  154. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.3.rdoc +191 -0
  155. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.1.0.rdoc +61 -0
  156. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake.rb +73 -0
  157. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/application.rb +787 -0
  158. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/backtrace.rb +23 -0
  159. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/clean.rb +76 -0
  160. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/cloneable.rb +16 -0
  161. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/contrib/compositepublisher.rb +21 -0
  162. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/contrib/ftptools.rb +137 -0
  163. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/contrib/sshpublisher.rb +60 -0
  164. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/cpu_counter.rb +120 -0
  165. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/default_loader.rb +14 -0
  166. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/dsl_definition.rb +194 -0
  167. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/early_time.rb +21 -0
  168. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_creation_task.rb +24 -0
  169. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_list.rb +436 -0
  170. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_task.rb +46 -0
  171. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_utils.rb +123 -0
  172. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/invocation_chain.rb +56 -0
  173. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/invocation_exception_mixin.rb +16 -0
  174. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/late_time.rb +17 -0
  175. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/linked_list.rb +111 -0
  176. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/loaders/makefile.rb +53 -0
  177. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/multi_task.rb +13 -0
  178. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/name_space.rb +38 -0
  179. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/packagetask.rb +199 -0
  180. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/phony.rb +15 -0
  181. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/private_reader.rb +20 -0
  182. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/promise.rb +99 -0
  183. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/pseudo_status.rb +29 -0
  184. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/rake_module.rb +38 -0
  185. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/rake_test_loader.rb +22 -0
  186. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/rule_recursion_overflow_error.rb +20 -0
  187. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/scope.rb +42 -0
  188. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task.rb +391 -0
  189. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task_argument_error.rb +7 -0
  190. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task_arguments.rb +102 -0
  191. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task_manager.rb +316 -0
  192. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/tasklib.rb +11 -0
  193. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/testtask.rb +204 -0
  194. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/thread_history_display.rb +48 -0
  195. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/thread_pool.rb +163 -0
  196. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/trace_output.rb +22 -0
  197. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/version.rb +7 -0
  198. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/win32.rb +50 -0
  199. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/rakelib/test_times.rake +25 -0
  200. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/file_creation.rb +34 -0
  201. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/helper.rb +134 -0
  202. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/support/rakefile_definitions.rb +476 -0
  203. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/support/ruby_runner.rb +34 -0
  204. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_private_reader.rb +42 -0
  205. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake.rb +40 -0
  206. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_application.rb +659 -0
  207. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_application_options.rb +468 -0
  208. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_backtrace.rb +119 -0
  209. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_clean.rb +61 -0
  210. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_cpu_counter.rb +68 -0
  211. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_definitions.rb +84 -0
  212. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_directory_task.rb +76 -0
  213. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_dsl.rb +40 -0
  214. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_early_time.rb +31 -0
  215. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_creation_task.rb +56 -0
  216. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_list.rb +687 -0
  217. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_list_path_map.rb +15 -0
  218. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_task.rb +197 -0
  219. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_utils.rb +318 -0
  220. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_ftp_file.rb +74 -0
  221. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_functional.rb +484 -0
  222. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_invocation_chain.rb +64 -0
  223. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_late_time.rb +18 -0
  224. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_linked_list.rb +84 -0
  225. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_makefile_loader.rb +46 -0
  226. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_multi_task.rb +64 -0
  227. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_name_space.rb +57 -0
  228. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_package_task.rb +79 -0
  229. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_path_map.rb +168 -0
  230. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_path_map_explode.rb +34 -0
  231. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_path_map_partial.rb +18 -0
  232. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_pseudo_status.rb +21 -0
  233. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_rake_test_loader.rb +20 -0
  234. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_reduce_compat.rb +26 -0
  235. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_require.rb +40 -0
  236. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_rules.rb +388 -0
  237. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_scope.rb +44 -0
  238. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task.rb +430 -0
  239. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_argument_parsing.rb +119 -0
  240. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_arguments.rb +134 -0
  241. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_manager.rb +178 -0
  242. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_manager_argument_resolution.rb +19 -0
  243. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_with_arguments.rb +172 -0
  244. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_test_task.rb +130 -0
  245. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_thread_pool.rb +145 -0
  246. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_top_level_functions.rb +71 -0
  247. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_win32.rb +72 -0
  248. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_thread_history_display.rb +101 -0
  249. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_trace_output.rb +52 -0
  250. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/COPYING +64 -0
  251. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/GPL +339 -0
  252. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/LGPL +502 -0
  253. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/PSFL +271 -0
  254. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/README.md +101 -0
  255. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/Rakefile +71 -0
  256. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test-unit.rb +34 -0
  257. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit.rb +505 -0
  258. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/assertion-failed-error.rb +25 -0
  259. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/assertions.rb +2218 -0
  260. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/attribute-matcher.rb +26 -0
  261. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/attribute.rb +158 -0
  262. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/auto-runner-loader.rb +17 -0
  263. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/autorunner.rb +536 -0
  264. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/code-snippet-fetcher.rb +58 -0
  265. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector.rb +73 -0
  266. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/descendant.rb +19 -0
  267. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/dir.rb +108 -0
  268. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/load.rb +202 -0
  269. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/objectspace.rb +34 -0
  270. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/xml.rb +249 -0
  271. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/color-scheme.rb +198 -0
  272. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/color.rb +134 -0
  273. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/data.rb +262 -0
  274. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/diff.rb +746 -0
  275. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/error.rb +158 -0
  276. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/exception-handler.rb +82 -0
  277. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/failure.rb +169 -0
  278. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/fault-location-detector.rb +100 -0
  279. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/fixture.rb +295 -0
  280. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/notification.rb +136 -0
  281. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/omission.rb +195 -0
  282. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/pending.rb +154 -0
  283. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/priority.rb +192 -0
  284. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/runner/console.rb +59 -0
  285. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/runner/emacs.rb +8 -0
  286. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/runner/xml.rb +15 -0
  287. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/test-suite-creator.rb +89 -0
  288. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/testcase.rb +811 -0
  289. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/testresult.rb +132 -0
  290. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/testsuite.rb +175 -0
  291. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/console/outputlevel.rb +15 -0
  292. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/console/testrunner.rb +693 -0
  293. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/emacs/testrunner.rb +49 -0
  294. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/testrunner.rb +53 -0
  295. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/testrunnermediator.rb +114 -0
  296. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/testrunnerutilities.rb +41 -0
  297. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/xml/testrunner.rb +224 -0
  298. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/backtracefilter.rb +59 -0
  299. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/method-owner-finder.rb +28 -0
  300. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/observable.rb +90 -0
  301. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/output.rb +31 -0
  302. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/procwrapper.rb +48 -0
  303. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/version.rb +5 -0
  304. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/adder.rb +13 -0
  305. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/subtracter.rb +12 -0
  306. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/test_adder.rb +20 -0
  307. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/test_subtracter.rb +20 -0
  308. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/test_user.rb +23 -0
  309. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test-descendant.rb +178 -0
  310. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test-load.rb +442 -0
  311. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test_dir.rb +406 -0
  312. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test_objectspace.rb +100 -0
  313. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header-label.csv +3 -0
  314. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header-label.tsv +3 -0
  315. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header.csv +3 -0
  316. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header.tsv +3 -0
  317. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/no-header.csv +2 -0
  318. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/no-header.tsv +2 -0
  319. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/plus.csv +3 -0
  320. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/run-test.rb +22 -0
  321. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-assertions.rb +2160 -0
  322. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-attribute-matcher.rb +38 -0
  323. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-attribute.rb +123 -0
  324. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-code-snippet.rb +37 -0
  325. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-color-scheme.rb +82 -0
  326. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-color.rb +47 -0
  327. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-data.rb +303 -0
  328. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-diff.rb +518 -0
  329. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-emacs-runner.rb +60 -0
  330. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-error.rb +26 -0
  331. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-failure.rb +33 -0
  332. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-fault-location-detector.rb +163 -0
  333. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-fixture.rb +713 -0
  334. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-notification.rb +33 -0
  335. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-omission.rb +81 -0
  336. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-pending.rb +70 -0
  337. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-priority.rb +173 -0
  338. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-case.rb +1171 -0
  339. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-result.rb +113 -0
  340. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-suite-creator.rb +97 -0
  341. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-suite.rb +150 -0
  342. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/testunit-test-util.rb +31 -0
  343. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/ui/test_testrunmediator.rb +20 -0
  344. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test-method-owner-finder.rb +38 -0
  345. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test-output.rb +11 -0
  346. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test_backtracefilter.rb +52 -0
  347. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test_observable.rb +102 -0
  348. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test_procwrapper.rb +36 -0
  349. data/vendor/bundle/ruby/2.2.0/specifications/colorize-0.7.7.gemspec +38 -0
  350. data/vendor/bundle/ruby/2.2.0/specifications/devkit-0.1.0.gemspec +46 -0
  351. data/vendor/bundle/ruby/2.2.0/specifications/highline-1.7.8.gemspec +37 -0
  352. data/vendor/bundle/ruby/2.2.0/specifications/power_assert-0.3.0.gemspec +41 -0
  353. data/vendor/bundle/ruby/2.2.0/specifications/rake-11.1.2.gemspec +43 -0
  354. data/vendor/bundle/ruby/2.2.0/specifications/test-unit-3.1.9.gemspec +47 -0
  355. data/win32-api.gemspec +27 -27
  356. metadata +345 -5
  357. data/lib/win32/ruby18/win32/api.so +0 -0
  358. data/lib/win32/ruby19/win32/api.so +0 -0
@@ -0,0 +1,26 @@
1
+ module Test
2
+ module Unit
3
+ class AttributeMatcher
4
+ def initialize(test)
5
+ @test = test
6
+ end
7
+
8
+ def match?(expression)
9
+ matched = instance_eval(expression)
10
+ if matched.nil?
11
+ false
12
+ else
13
+ matched
14
+ end
15
+ end
16
+
17
+ def method_missing(name, *args)
18
+ if args.empty?
19
+ @test[name]
20
+ else
21
+ super
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,158 @@
1
+ module Test
2
+ module Unit
3
+ module Attribute
4
+ class StringifyKeyHash < Hash
5
+ class << self
6
+ def stringify(object)
7
+ object.to_s
8
+ end
9
+ end
10
+
11
+ def key?(key)
12
+ super(self.class.stringify(key))
13
+ end
14
+
15
+ def [](key)
16
+ super(self.class.stringify(key))
17
+ end
18
+
19
+ def []=(key, value)
20
+ super(self.class.stringify(key), value)
21
+ end
22
+ end
23
+
24
+ class << self
25
+ def included(base)
26
+ base.extend(BaseClassMethods)
27
+ base.extend(ClassMethods)
28
+ end
29
+ end
30
+
31
+ module BaseClassMethods
32
+ def attributes_table
33
+ {}
34
+ end
35
+ end
36
+
37
+ module ClassMethods
38
+ def method_added(name)
39
+ super
40
+ return unless defined?(@current_attributes)
41
+
42
+ attributes = {}
43
+ kept_attributes = StringifyKeyHash.new
44
+ @current_attributes.each do |attribute_name, attribute|
45
+ attributes[attribute_name] = attribute[:value]
46
+ kept_attributes[attribute_name] = attribute if attribute[:keep]
47
+ end
48
+ set_attributes(name, attributes)
49
+ @current_attributes = kept_attributes
50
+ end
51
+
52
+ def attribute(name, value, options={}, *method_names)
53
+ unless options.is_a?(Hash)
54
+ method_names << options
55
+ options = {}
56
+ end
57
+ if method_names.empty?
58
+ current_attributes[name] = options.merge(:value => value)
59
+ else
60
+ method_names.each do |method_name|
61
+ set_attributes(method_name, {name => value})
62
+ end
63
+ end
64
+ end
65
+
66
+ def current_attributes
67
+ @current_attributes ||= StringifyKeyHash.new
68
+ end
69
+
70
+ def current_attribute(name)
71
+ current_attributes[name] || StringifyKeyHash.new
72
+ end
73
+
74
+ def attributes_table
75
+ @attributes_table ||= StringifyKeyHash.new
76
+ super.merge(@attributes_table)
77
+ end
78
+
79
+ def set_attributes(method_name, new_attributes)
80
+ return if new_attributes.empty?
81
+ @attributes_table ||= StringifyKeyHash.new
82
+ @attributes_table[method_name] ||= StringifyKeyHash.new
83
+ current_attributes = @attributes_table[method_name]
84
+ new_attributes.each do |key, value|
85
+ observers = attribute_observers(key) || []
86
+ observers.each do |observer|
87
+ observer.call(self,
88
+ StringifyKeyHash.stringify(key),
89
+ (attributes(method_name) || {})[key],
90
+ value,
91
+ method_name)
92
+ end
93
+ current_attributes[key] = value
94
+ end
95
+ end
96
+
97
+ def attributes(method_name)
98
+ attributes = attributes_table[method_name]
99
+ ancestors.each do |ancestor|
100
+ next if ancestor == self
101
+ if ancestor.is_a?(Class) and ancestor < Test::Unit::Attribute
102
+ parent_attributes = ancestor.attributes(method_name)
103
+ if attributes
104
+ attributes = (parent_attributes || {}).merge(attributes)
105
+ else
106
+ attributes = parent_attributes
107
+ end
108
+ break
109
+ end
110
+ end
111
+ attributes || StringifyKeyHash.new
112
+ end
113
+
114
+ def find_attribute(method_name, name, options={})
115
+ recursive_p = options[:recursive]
116
+ recursive_p = true if recursive_p.nil?
117
+
118
+ @attributes_table ||= StringifyKeyHash.new
119
+ if @attributes_table.key?(method_name)
120
+ attributes = @attributes_table[method_name]
121
+ if attributes.key?(name)
122
+ return attributes[name]
123
+ end
124
+ end
125
+
126
+ return nil unless recursive_p
127
+ return nil if self == TestCase
128
+
129
+ @cached_parent_test_case ||= ancestors.find do |ancestor|
130
+ ancestor != self and
131
+ ancestor.is_a?(Class) and
132
+ ancestor < Test::Unit::Attribute
133
+ end
134
+
135
+ @cached_parent_test_case.find_attribute(method_name, name, options)
136
+ end
137
+
138
+ @@attribute_observers = StringifyKeyHash.new
139
+ def register_attribute_observer(attribute_name, observer=Proc.new)
140
+ @@attribute_observers[attribute_name] ||= []
141
+ @@attribute_observers[attribute_name] << observer
142
+ end
143
+
144
+ def attribute_observers(attribute_name)
145
+ @@attribute_observers[attribute_name]
146
+ end
147
+ end
148
+
149
+ def attributes
150
+ self.class.attributes(@method_name) || StringifyKeyHash.new
151
+ end
152
+
153
+ def [](name)
154
+ self.class.find_attribute(@method_name, name)
155
+ end
156
+ end
157
+ end
158
+ end
@@ -0,0 +1,17 @@
1
+ require "test/unit/test-suite-creator"
2
+
3
+ module Test
4
+ module Unit
5
+ module AutoRunnerLoader
6
+ @loaded = false
7
+ class << self
8
+ def check(test_case, method_name)
9
+ return if @loaded
10
+ return unless TestSuiteCreator.test_method?(test_case, method_name)
11
+ require "test/unit"
12
+ @loaded = true
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,536 @@
1
+ require "English"
2
+
3
+ require "test/unit/color-scheme"
4
+ require "test/unit/priority"
5
+ require "test/unit/attribute-matcher"
6
+ require "test/unit/testcase"
7
+ require "optparse"
8
+
9
+ module Test
10
+ module Unit
11
+ class AutoRunner
12
+ RUNNERS = {}
13
+ COLLECTORS = {}
14
+ ADDITIONAL_OPTIONS = []
15
+ PREPARE_HOOKS = []
16
+
17
+ class << self
18
+ def register_runner(id, runner_builder=Proc.new)
19
+ RUNNERS[id] = runner_builder
20
+ RUNNERS[id.to_s] = runner_builder
21
+ end
22
+
23
+ def runner(id)
24
+ RUNNERS[id.to_s]
25
+ end
26
+
27
+ @@default_runner = nil
28
+ def default_runner
29
+ runner(@@default_runner)
30
+ end
31
+
32
+ def default_runner=(id)
33
+ @@default_runner = id
34
+ end
35
+
36
+ def register_collector(id, collector_builder=Proc.new)
37
+ COLLECTORS[id] = collector_builder
38
+ COLLECTORS[id.to_s] = collector_builder
39
+ end
40
+
41
+ def collector(id)
42
+ COLLECTORS[id.to_s]
43
+ end
44
+
45
+ def register_color_scheme(id, scheme)
46
+ ColorScheme[id] = scheme
47
+ end
48
+
49
+ def setup_option(option_builder=Proc.new)
50
+ ADDITIONAL_OPTIONS << option_builder
51
+ end
52
+
53
+ def prepare(hook=Proc.new)
54
+ PREPARE_HOOKS << hook
55
+ end
56
+
57
+ def run(force_standalone=false, default_dir=nil, argv=ARGV, &block)
58
+ r = new(force_standalone || standalone?, &block)
59
+ r.base = default_dir
60
+ r.prepare
61
+ r.process_args(argv)
62
+ r.run
63
+ end
64
+
65
+ def standalone?
66
+ return false unless("-e" == $0)
67
+ ObjectSpace.each_object(Class) do |klass|
68
+ return false if(klass < TestCase)
69
+ end
70
+ true
71
+ end
72
+
73
+ @@need_auto_run = true
74
+ def need_auto_run?
75
+ @@need_auto_run
76
+ end
77
+
78
+ def need_auto_run=(need)
79
+ @@need_auto_run = need
80
+ end
81
+ end
82
+
83
+ register_collector(:descendant) do |auto_runner|
84
+ require "test/unit/collector/descendant"
85
+ collector = Collector::Descendant.new
86
+ collector.filter = auto_runner.filters
87
+ collector.collect($0.sub(/\.rb\Z/, ""))
88
+ end
89
+
90
+ register_collector(:load) do |auto_runner|
91
+ require "test/unit/collector/load"
92
+ collector = Collector::Load.new
93
+ unless auto_runner.pattern.empty?
94
+ collector.patterns.replace(auto_runner.pattern)
95
+ end
96
+ unless auto_runner.exclude.empty?
97
+ collector.excludes.replace(auto_runner.exclude)
98
+ end
99
+ collector.base = auto_runner.base
100
+ collector.default_test_paths = auto_runner.default_test_paths
101
+ collector.filter = auto_runner.filters
102
+ collector.collect(*auto_runner.to_run)
103
+ end
104
+
105
+ # JUST TEST!
106
+ # register_collector(:xml) do |auto_runner|
107
+ # require "test/unit/collector/xml"
108
+ # collector = Collector::XML.new
109
+ # collector.filter = auto_runner.filters
110
+ # collector.collect(auto_runner.to_run[0])
111
+ # end
112
+
113
+ # deprecated
114
+ register_collector(:object_space) do |auto_runner|
115
+ require "test/unit/collector/objectspace"
116
+ c = Collector::ObjectSpace.new
117
+ c.filter = auto_runner.filters
118
+ c.collect($0.sub(/\.rb\Z/, ""))
119
+ end
120
+
121
+ # deprecated
122
+ register_collector(:dir) do |auto_runner|
123
+ require "test/unit/collector/dir"
124
+ c = Collector::Dir.new
125
+ c.filter = auto_runner.filters
126
+ unless auto_runner.pattern.empty?
127
+ c.pattern.replace(auto_runner.pattern)
128
+ end
129
+ unless auto_runner.exclude.empty?
130
+ c.exclude.replace(auto_runner.exclude)
131
+ end
132
+ c.base = auto_runner.base
133
+ $:.push(auto_runner.base) if auto_runner.base
134
+ c.collect(*(auto_runner.to_run.empty? ? ["."] : auto_runner.to_run))
135
+ end
136
+
137
+ attr_reader :suite, :runner_options
138
+ attr_accessor :filters, :to_run
139
+ attr_accessor :default_test_paths
140
+ attr_accessor :pattern, :exclude, :base, :workdir
141
+ attr_accessor :color_scheme, :listeners
142
+ attr_writer :stop_on_failuere
143
+ attr_writer :runner, :collector
144
+
145
+ def initialize(standalone)
146
+ @standalone = standalone
147
+ @runner = default_runner
148
+ @collector = default_collector
149
+ @filters = []
150
+ @to_run = []
151
+ @default_test_paths = []
152
+ @color_scheme = ColorScheme.default
153
+ @runner_options = {}
154
+ @default_arguments = []
155
+ @workdir = nil
156
+ @listeners = []
157
+ @stop_on_failure = false
158
+ config_file = "test-unit.yml"
159
+ if File.exist?(config_file)
160
+ load_config(config_file)
161
+ else
162
+ load_global_config
163
+ end
164
+ yield(self) if block_given?
165
+ end
166
+
167
+ def stop_on_failure?
168
+ @stop_on_failure
169
+ end
170
+
171
+ def prepare
172
+ PREPARE_HOOKS.each do |handler|
173
+ handler.call(self)
174
+ end
175
+ end
176
+
177
+ def process_args(args=ARGV)
178
+ begin
179
+ args.unshift(*@default_arguments)
180
+ options.order!(args) {|arg| add_test_path(arg)}
181
+ rescue OptionParser::ParseError => e
182
+ puts e
183
+ puts options
184
+ exit(false)
185
+ end
186
+ not @to_run.empty?
187
+ end
188
+
189
+ def options
190
+ @options ||= OptionParser.new do |o|
191
+ o.banner = "Test::Unit automatic runner."
192
+ o.banner << "\nUsage: #{$0} [options] [-- untouched arguments]"
193
+
194
+ o.on("-r", "--runner=RUNNER", RUNNERS,
195
+ "Use the given RUNNER.",
196
+ "(" + keyword_display(RUNNERS) + ")") do |r|
197
+ @runner = r
198
+ end
199
+
200
+ o.on("--collector=COLLECTOR", COLLECTORS,
201
+ "Use the given COLLECTOR.",
202
+ "(" + keyword_display(COLLECTORS) + ")") do |collector|
203
+ @collector = collector
204
+ end
205
+
206
+ if (@standalone)
207
+ o.on("-b", "--basedir=DIR", "Base directory of test suites.") do |b|
208
+ @base = b
209
+ end
210
+
211
+ o.on("-w", "--workdir=DIR", "Working directory to run tests.") do |w|
212
+ @workdir = w
213
+ end
214
+
215
+ o.on("--default-test-path=PATH",
216
+ "Add PATH to the default test paths.",
217
+ "The PATH is used when user doesn't specify any test path.",
218
+ "You can specify this option multiple times.") do |path|
219
+ @default_test_paths << path
220
+ end
221
+
222
+ o.on("-a", "--add=TORUN", Array,
223
+ "Add TORUN to the list of things to run;",
224
+ "can be a file or a directory.") do |paths|
225
+ paths.each do |path|
226
+ add_test_path(path)
227
+ end
228
+ end
229
+
230
+ @pattern = []
231
+ o.on("-p", "--pattern=PATTERN", Regexp,
232
+ "Match files to collect against PATTERN.") do |e|
233
+ @pattern << e
234
+ end
235
+
236
+ @exclude = []
237
+ o.on("-x", "--exclude=PATTERN", Regexp,
238
+ "Ignore files to collect against PATTERN.") do |e|
239
+ @exclude << e
240
+ end
241
+ end
242
+
243
+ o.on("-n", "--name=NAME", String,
244
+ "Runs tests matching NAME.",
245
+ "Use '/PATTERN/' for NAME to use regular expression.") do |name|
246
+ name = (%r{\A/(.*)/\Z} =~ name ? Regexp.new($1) : name)
247
+ @filters << lambda do |test|
248
+ return true if name === test.method_name
249
+ test_name_without_class_name = test.name.gsub(/\(.+?\)\z/, "")
250
+ if test_name_without_class_name != test.method_name
251
+ return true if name === test_name_without_class_name
252
+ end
253
+ false
254
+ end
255
+ end
256
+
257
+ o.on("--ignore-name=NAME", String,
258
+ "Ignores tests matching NAME.",
259
+ "Use '/PATTERN/' for NAME to use regular expression.") do |n|
260
+ n = (%r{\A/(.*)/\Z} =~ n ? Regexp.new($1) : n)
261
+ case n
262
+ when Regexp
263
+ @filters << proc {|t| n =~ t.method_name ? false : true}
264
+ else
265
+ @filters << proc {|t| n != t.method_name}
266
+ end
267
+ end
268
+
269
+ o.on("-t", "--testcase=TESTCASE", String,
270
+ "Runs tests in TestCases matching TESTCASE.",
271
+ "Use '/PATTERN/' for TESTCASE to use regular expression.") do |n|
272
+ n = (%r{\A/(.*)/\Z} =~ n ? Regexp.new($1) : n)
273
+ @filters << lambda do |test|
274
+ match_test_case_name(test, n)
275
+ end
276
+ end
277
+
278
+ o.on("--ignore-testcase=TESTCASE", String,
279
+ "Ignores tests in TestCases matching TESTCASE.",
280
+ "Use '/PATTERN/' for TESTCASE to use regular expression.") do |n|
281
+ n = (%r{\A/(.*)/\Z} =~ n ? Regexp.new($1) : n)
282
+ @filters << lambda do |test|
283
+ not match_test_case_name(test, n)
284
+ end
285
+ end
286
+
287
+ o.on("--location=LOCATION", String,
288
+ "Runs tests that defined in LOCATION.",
289
+ "LOCATION is one of PATH:LINE, PATH or LINE") do |location|
290
+ if /\A\d+\z/ =~ location
291
+ path = nil
292
+ line = location.to_i
293
+ else
294
+ path, line, = location.split(/:(\d+)/, 2)
295
+ line = line.to_i unless line.nil?
296
+ end
297
+ add_location_filter(path, line)
298
+ end
299
+
300
+ o.on("--attribute=EXPRESSION", String,
301
+ "Runs tests that matches EXPRESSION.",
302
+ "EXPRESSION is evaluated as Ruby's expression.",
303
+ "Test attribute name can be used with no receiver in EXPRESSION.",
304
+ "EXPRESSION examples:",
305
+ " !slow",
306
+ " tag == 'important' and !slow") do |expression|
307
+ @filters << lambda do |test|
308
+ matcher = AttributeMatcher.new(test)
309
+ matcher.match?(expression)
310
+ end
311
+ end
312
+
313
+ priority_filter = Proc.new do |test|
314
+ if @filters == [priority_filter]
315
+ Priority::Checker.new(test).need_to_run?
316
+ else
317
+ nil
318
+ end
319
+ end
320
+ o.on("--[no-]priority-mode",
321
+ "Runs some tests based on their priority.") do |priority_mode|
322
+ if priority_mode
323
+ Priority.enable
324
+ @filters |= [priority_filter]
325
+ else
326
+ Priority.disable
327
+ @filters -= [priority_filter]
328
+ end
329
+ end
330
+
331
+ o.on("--default-priority=PRIORITY",
332
+ Priority.available_values,
333
+ "Uses PRIORITY as default priority",
334
+ "(#{keyword_display(Priority.available_values)})") do |priority|
335
+ Priority.default = priority
336
+ end
337
+
338
+ o.on("-I", "--load-path=DIR[#{File::PATH_SEPARATOR}DIR...]",
339
+ "Appends directory list to $LOAD_PATH.") do |dirs|
340
+ $LOAD_PATH.concat(dirs.split(File::PATH_SEPARATOR))
341
+ end
342
+
343
+ color_schemes = ColorScheme.all
344
+ o.on("--color-scheme=SCHEME", color_schemes,
345
+ "Use SCHEME as color scheme.",
346
+ "(#{keyword_display(color_schemes)})") do |scheme|
347
+ @color_scheme = scheme
348
+ end
349
+
350
+ o.on("--config=FILE",
351
+ "Use YAML fomat FILE content as configuration file.") do |file|
352
+ load_config(file)
353
+ end
354
+
355
+ o.on("--order=ORDER", TestCase::AVAILABLE_ORDERS,
356
+ "Run tests in a test case in ORDER order.",
357
+ "(#{keyword_display(TestCase::AVAILABLE_ORDERS)})") do |order|
358
+ TestCase.test_order = order
359
+ end
360
+
361
+ assertion_message_class = Test::Unit::Assertions::AssertionMessage
362
+ o.on("--max-diff-target-string-size=SIZE", Integer,
363
+ "Shows diff if both expected result string size and " +
364
+ "actual result string size are " +
365
+ "less than or equal SIZE in bytes.",
366
+ "(#{assertion_message_class.max_diff_target_string_size})") do |size|
367
+ assertion_message_class.max_diff_target_string_size = size
368
+ end
369
+
370
+ o.on("--[no-]stop-on-failure",
371
+ "Stops immediately on the first non success test",
372
+ "(#{@stop_on_failure})") do |boolean|
373
+ @stop_on_failure = boolean
374
+ end
375
+
376
+ ADDITIONAL_OPTIONS.each do |option_builder|
377
+ option_builder.call(self, o)
378
+ end
379
+
380
+ o.on("--",
381
+ "Stop processing options so that the",
382
+ "remaining options will be passed to the",
383
+ "test."){o.terminate}
384
+
385
+ o.on("-h", "--help", "Display this help."){puts o; exit}
386
+
387
+ o.on_tail
388
+ o.on_tail("Deprecated options:")
389
+
390
+ o.on_tail("--console", "Console runner (use --runner).") do
391
+ warn("Deprecated option (--console).")
392
+ @runner = self.class.runner(:console)
393
+ end
394
+
395
+ if RUNNERS[:fox]
396
+ o.on_tail("--fox", "Fox runner (use --runner).") do
397
+ warn("Deprecated option (--fox).")
398
+ @runner = self.class.runner(:fox)
399
+ end
400
+ end
401
+
402
+ o.on_tail
403
+ end
404
+ end
405
+
406
+ def keyword_display(keywords)
407
+ keywords = keywords.collect do |keyword, _|
408
+ keyword.to_s
409
+ end.uniq.sort
410
+
411
+ i = 0
412
+ keywords.collect do |keyword|
413
+ if (i > 0 and keyword[0] == keywords[i - 1][0]) or
414
+ ((i < keywords.size - 1) and (keyword[0] == keywords[i + 1][0]))
415
+ n = 2
416
+ else
417
+ n = 1
418
+ end
419
+ i += 1
420
+ keyword.sub(/^(.{#{n}})([A-Za-z]+)(?=\w*$)/, '\\1[\\2]')
421
+ end.join(", ")
422
+ end
423
+
424
+ def run
425
+ self.class.need_auto_run = false
426
+ suite = @collector[self]
427
+ return false if suite.nil?
428
+ return true if suite.empty?
429
+ runner = @runner[self]
430
+ return false if runner.nil?
431
+ @runner_options[:color_scheme] ||= @color_scheme
432
+ @runner_options[:listeners] ||= []
433
+ @runner_options[:listeners].concat(@listeners)
434
+ if @stop_on_failure
435
+ @runner_options[:listeners] << StopOnFailureListener.new
436
+ end
437
+ change_work_directory do
438
+ runner.run(suite, @runner_options).passed?
439
+ end
440
+ end
441
+
442
+ def load_config(file)
443
+ require "yaml"
444
+ config = YAML.load(File.read(file))
445
+ runner_name = config["runner"]
446
+ @runner = self.class.runner(runner_name) || @runner
447
+ @collector = self.class.collector(config["collector"]) || @collector
448
+ (config["color_schemes"] || {}).each do |name, options|
449
+ ColorScheme[name] = options
450
+ end
451
+ runner_options = {}
452
+ (config["#{runner_name}_options"] || {}).each do |key, value|
453
+ key = key.to_sym
454
+ value = ColorScheme[value] if key == :color_scheme
455
+ if key == :arguments
456
+ @default_arguments.concat(value.split)
457
+ else
458
+ runner_options[key.to_sym] = value
459
+ end
460
+ end
461
+ @runner_options = @runner_options.merge(runner_options)
462
+ end
463
+
464
+ private
465
+ def default_runner
466
+ runner = self.class.default_runner
467
+ if ENV["EMACS"] == "t"
468
+ runner ||= self.class.runner(:emacs)
469
+ else
470
+ runner ||= self.class.runner(:console)
471
+ end
472
+ runner
473
+ end
474
+
475
+ def default_collector
476
+ self.class.collector(@standalone ? :load : :descendant)
477
+ end
478
+
479
+ def global_config_file
480
+ File.expand_path("~/.test-unit.yml")
481
+ rescue ArgumentError
482
+ nil
483
+ end
484
+
485
+ def load_global_config
486
+ file = global_config_file
487
+ load_config(file) if file and File.exist?(file)
488
+ end
489
+
490
+ def change_work_directory(&block)
491
+ if @workdir
492
+ Dir.chdir(@workdir, &block)
493
+ else
494
+ yield
495
+ end
496
+ end
497
+
498
+ def match_test_case_name(test, pattern)
499
+ test.class.ancestors.each do |test_class|
500
+ break if test_class == TestCase
501
+ return true if pattern === test_class.name
502
+ end
503
+ false
504
+ end
505
+
506
+ def add_test_path(path)
507
+ if /:(\d+)\z/ =~ path
508
+ line = $1.to_i
509
+ path = $PREMATCH
510
+ add_location_filter(path, line)
511
+ end
512
+ @to_run << path
513
+ end
514
+
515
+ def add_location_filter(path, line)
516
+ @filters << lambda do |test|
517
+ test.class.test_defined?(:path => path,
518
+ :line => line,
519
+ :method_name => test.method_name)
520
+ end
521
+ end
522
+
523
+ class StopOnFailureListener
524
+ def attach_to_mediator(mediator)
525
+ mediator.add_listener(TestResult::FINISHED) do |result|
526
+ result.stop unless result.passed?
527
+ end
528
+ end
529
+ end
530
+ end
531
+ end
532
+ end
533
+
534
+ require "test/unit/runner/console"
535
+ require "test/unit/runner/emacs"
536
+ require "test/unit/runner/xml"