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,34 @@
1
+ module RubyRunner
2
+ include FileUtils
3
+
4
+ # Run a shell Ruby command with command line options (using the
5
+ # default test options). Output is captured in @out and @err
6
+ def ruby(*option_list)
7
+ run_ruby(@ruby_options + option_list)
8
+ end
9
+
10
+ # Run a command line rake with the give rake options. Default
11
+ # command line ruby options are included. Output is captured in
12
+ # @out and @err
13
+ def rake(*rake_options)
14
+ run_ruby @ruby_options + [@rake_exec] + rake_options
15
+ end
16
+
17
+ # Low level ruby command runner ...
18
+ def run_ruby(option_list)
19
+ puts "COMMAND: [#{RUBY} #{option_list.join ' '}]" if @verbose
20
+
21
+ Open3.popen3(RUBY, *option_list) {|inn, out, err, wait|
22
+ inn.close
23
+
24
+ @exit = wait ? wait.value : $?
25
+ @out = out.read
26
+ @err = err.read
27
+ }
28
+
29
+ puts "OUTPUT: [#{@out}]" if @verbose
30
+ puts "ERROR: [#{@err}]" if @verbose
31
+ puts "EXIT: [#{@exit.inspect}]" if @verbose
32
+ puts "PWD: [#{Dir.pwd}]" if @verbose
33
+ end
34
+ end
@@ -0,0 +1,42 @@
1
+ require File.expand_path('../helper', __FILE__)
2
+ require 'rake/private_reader'
3
+
4
+ class TestPrivateAttrs < Rake::TestCase
5
+
6
+ class Sample
7
+ include Rake::PrivateReader
8
+
9
+ private_reader :reader, :a
10
+
11
+ def initialize
12
+ @reader = :RVALUE
13
+ end
14
+
15
+ def get_reader
16
+ reader
17
+ end
18
+
19
+ end
20
+
21
+ def setup
22
+ super
23
+ @sample = Sample.new
24
+ end
25
+
26
+ def test_private_reader_is_private
27
+ assert_private do @sample.reader end
28
+ assert_private do @sample.a end
29
+ end
30
+
31
+ def test_private_reader_returns_data
32
+ assert_equal :RVALUE, @sample.get_reader
33
+ end
34
+
35
+ private
36
+
37
+ def assert_private
38
+ ex = assert_raises(NoMethodError) do yield end
39
+ assert_match(/private/, ex.message)
40
+ end
41
+
42
+ end
@@ -0,0 +1,40 @@
1
+ require File.expand_path('../helper', __FILE__)
2
+
3
+ class TestRake < Rake::TestCase
4
+ def test_each_dir_parent
5
+ assert_equal ['a'], alldirs('a')
6
+ assert_equal ['a/b', 'a'], alldirs('a/b')
7
+ assert_equal ['/a/b', '/a', '/'], alldirs('/a/b')
8
+ if File.dirname("c:/foo") == "c:"
9
+ # Under Unix
10
+ assert_equal ['c:/a/b', 'c:/a', 'c:'], alldirs('c:/a/b')
11
+ assert_equal ['c:a/b', 'c:a'], alldirs('c:a/b')
12
+ else
13
+ # Under Windows
14
+ assert_equal ['c:/a/b', 'c:/a', 'c:/'], alldirs('c:/a/b')
15
+ assert_equal ['c:a/b', 'c:a'], alldirs('c:a/b')
16
+ end
17
+ end
18
+
19
+ def alldirs(fn)
20
+ result = []
21
+ Rake.each_dir_parent(fn) { |d| result << d }
22
+ result
23
+ end
24
+
25
+ def test_can_override_application
26
+ old_app = Rake.application
27
+ fake_app = Object.new
28
+ Rake.application = fake_app
29
+
30
+ assert_equal fake_app, Rake.application
31
+
32
+ ensure
33
+ Rake.application = old_app
34
+ end
35
+
36
+ def test_original_dir_reports_current_dir
37
+ assert_equal @tempdir, Rake.original_dir
38
+ end
39
+
40
+ end
@@ -0,0 +1,659 @@
1
+ #encoding: UTF-8
2
+ require File.expand_path('../helper', __FILE__)
3
+
4
+ class TestRakeApplication < Rake::TestCase
5
+
6
+ def setup
7
+ super
8
+
9
+ @app = Rake.application
10
+ @app.options.rakelib = []
11
+ end
12
+
13
+ def setup_command_line(*options)
14
+ ARGV.clear
15
+ options.each do |option|
16
+ ARGV << option
17
+ end
18
+ end
19
+
20
+ def test_display_exception_details
21
+ obj = Object.new
22
+ obj.instance_eval("def #{__method__}; raise 'test'; end", "ruby")
23
+ begin
24
+ obj.__send__(__method__)
25
+ rescue => ex
26
+ end
27
+
28
+ out, err = capture_io do
29
+ @app.display_error_message ex
30
+ end
31
+
32
+ assert_empty out
33
+
34
+ assert_match 'rake aborted!', err
35
+ assert_match __method__.to_s, err
36
+ end
37
+
38
+ def test_display_exception_details_bad_encoding
39
+ begin
40
+ raise 'El Niño is coming!'.force_encoding('US-ASCII')
41
+ rescue => ex
42
+ end
43
+
44
+ out, err = capture_io do
45
+ @app.display_error_message ex
46
+ end
47
+
48
+ assert_empty out
49
+ assert_match 'El Niño is coming!', err.force_encoding('UTF-8')
50
+ end
51
+
52
+ def test_display_exception_details_cause
53
+ skip 'Exception#cause not implemented' unless
54
+ Exception.method_defined? :cause
55
+
56
+ begin
57
+ raise 'cause a'
58
+ rescue
59
+ begin
60
+ raise 'cause b'
61
+ rescue => ex
62
+ end
63
+ end
64
+
65
+ out, err = capture_io do
66
+ @app.display_error_message ex
67
+ end
68
+
69
+ assert_empty out
70
+
71
+ assert_match 'cause a', err
72
+ assert_match 'cause b', err
73
+ end
74
+
75
+ def test_display_exception_details_cause_loop
76
+ skip 'Exception#cause not implemented' unless
77
+ Exception.method_defined? :cause
78
+ skip if jruby9? # https://github.com/jruby/jruby/issues/3654
79
+
80
+ begin
81
+ begin
82
+ raise 'cause a'
83
+ rescue => a
84
+ begin
85
+ raise 'cause b'
86
+ rescue
87
+ raise a
88
+ end
89
+ end
90
+ rescue => ex
91
+ end
92
+
93
+ out, err = capture_io do
94
+ @app.display_error_message ex
95
+ end
96
+
97
+ assert_empty out
98
+
99
+ assert_match 'cause a', err
100
+ assert_match 'cause b', err
101
+ end
102
+
103
+ def test_display_tasks
104
+ @app.options.show_tasks = :tasks
105
+ @app.options.show_task_pattern = //
106
+ @app.last_description = "COMMENT"
107
+ @app.define_task(Rake::Task, "t")
108
+ out, = capture_io do @app.instance_eval { display_tasks_and_comments } end
109
+ assert_match(/^rake t/, out)
110
+ assert_match(/# COMMENT/, out)
111
+ end
112
+
113
+ def test_display_tasks_with_long_comments
114
+ @app.terminal_columns = 80
115
+ @app.options.show_tasks = :tasks
116
+ @app.options.show_task_pattern = //
117
+ numbers = "1234567890" * 8
118
+ @app.last_description = numbers
119
+ @app.define_task(Rake::Task, "t")
120
+
121
+ out, = capture_io do @app.instance_eval { display_tasks_and_comments } end
122
+
123
+ assert_match(/^rake t/, out)
124
+ assert_match(/# #{numbers[0, 65]}\.\.\./, out)
125
+ end
126
+
127
+ def test_display_tasks_with_task_name_wider_than_tty_display
128
+ @app.terminal_columns = 80
129
+ @app.options.show_tasks = :tasks
130
+ @app.options.show_task_pattern = //
131
+ task_name = "task name" * 80
132
+ @app.last_description = "something short"
133
+ @app.define_task(Rake::Task, task_name)
134
+
135
+ out, = capture_io do @app.instance_eval { display_tasks_and_comments } end
136
+
137
+ # Ensure the entire task name is output and we end up showing no description
138
+ assert_match(/rake #{task_name} # .../, out)
139
+ end
140
+
141
+ def test_display_tasks_with_very_long_task_name_to_a_non_tty_shows_name_and_comment
142
+ @app.options.show_tasks = :tasks
143
+ @app.options.show_task_pattern = //
144
+ @app.tty_output = false
145
+ description = "something short"
146
+ task_name = "task name" * 80
147
+ @app.last_description = "something short"
148
+ @app.define_task(Rake::Task, task_name)
149
+
150
+ out, = capture_io do @app.instance_eval { display_tasks_and_comments } end
151
+
152
+ # Ensure the entire task name is output and we end up showing no description
153
+ assert_match(/rake #{task_name} # #{description}/, out)
154
+ end
155
+
156
+ def test_display_tasks_with_long_comments_to_a_non_tty_shows_entire_comment
157
+ @app.options.show_tasks = :tasks
158
+ @app.options.show_task_pattern = //
159
+ @app.tty_output = false
160
+ @app.last_description = "1234567890" * 8
161
+ @app.define_task(Rake::Task, "t")
162
+ out, = capture_io do @app.instance_eval { display_tasks_and_comments } end
163
+ assert_match(/^rake t/, out)
164
+ assert_match(/# #{@app.last_description}/, out)
165
+ end
166
+
167
+ def test_truncating_comments_to_a_non_tty
168
+ @app.terminal_columns = 80
169
+ @app.options.show_tasks = :tasks
170
+ @app.options.show_task_pattern = //
171
+ @app.tty_output = false
172
+ numbers = "1234567890" * 8
173
+ @app.last_description = numbers
174
+ @app.define_task(Rake::Task, "t")
175
+
176
+ out, = capture_io do @app.instance_eval { display_tasks_and_comments } end
177
+
178
+ assert_match(/^rake t/, out)
179
+ assert_match(/# #{numbers[0, 65]}\.\.\./, out)
180
+ end
181
+
182
+ def test_describe_tasks
183
+ @app.options.show_tasks = :describe
184
+ @app.options.show_task_pattern = //
185
+ @app.last_description = "COMMENT"
186
+ @app.define_task(Rake::Task, "t")
187
+ out, = capture_io do @app.instance_eval { display_tasks_and_comments } end
188
+ assert_match(/^rake t$/, out)
189
+ assert_match(/^ {4}COMMENT$/, out)
190
+ end
191
+
192
+ def test_show_lines
193
+ @app.options.show_tasks = :lines
194
+ @app.options.show_task_pattern = //
195
+ @app.last_description = "COMMENT"
196
+ @app.define_task(Rake::Task, "t")
197
+ @app['t'].locations << "HERE:1"
198
+ out, = capture_io do @app.instance_eval { display_tasks_and_comments } end
199
+ assert_match(/^rake t +[^:]+:\d+ *$/, out)
200
+ end
201
+
202
+ def test_finding_rakefile
203
+ rakefile_default
204
+
205
+ assert_match(/Rakefile/i, @app.instance_eval { have_rakefile })
206
+ end
207
+
208
+ def test_not_finding_rakefile
209
+ @app.instance_eval { @rakefiles = ['NEVER_FOUND'] }
210
+ assert(! @app.instance_eval do have_rakefile end)
211
+ assert_nil @app.rakefile
212
+ end
213
+
214
+ def test_load_rakefile
215
+ rakefile_unittest
216
+
217
+ @app.instance_eval do
218
+ handle_options
219
+ options.silent = true
220
+ load_rakefile
221
+ end
222
+
223
+ assert_equal "rakefile", @app.rakefile.downcase
224
+ assert_equal @tempdir, Dir.pwd
225
+ end
226
+
227
+ def test_load_rakefile_doesnt_print_rakefile_directory_from_same_dir
228
+ rakefile_unittest
229
+
230
+ _, err = capture_io do
231
+ @app.instance_eval do
232
+ # pretend we started from the unittest dir
233
+ @original_dir = File.expand_path(".")
234
+ raw_load_rakefile
235
+ end
236
+ end
237
+
238
+ assert_empty err
239
+ end
240
+
241
+ def test_load_rakefile_from_subdir
242
+ rakefile_unittest
243
+ Dir.chdir 'subdir'
244
+
245
+ @app.instance_eval do
246
+ handle_options
247
+ options.silent = true
248
+ load_rakefile
249
+ end
250
+
251
+ assert_equal "rakefile", @app.rakefile.downcase
252
+ assert_equal @tempdir, Dir.pwd
253
+ end
254
+
255
+ def test_load_rakefile_prints_rakefile_directory_from_subdir
256
+ rakefile_unittest
257
+ Dir.chdir 'subdir'
258
+
259
+ app = Rake::Application.new
260
+ app.options.rakelib = []
261
+
262
+ _, err = capture_io do
263
+ app.instance_eval do
264
+ raw_load_rakefile
265
+ end
266
+ end
267
+
268
+ assert_equal "(in #{@tempdir}\)\n", err
269
+ end
270
+
271
+ def test_load_rakefile_doesnt_print_rakefile_directory_from_subdir_if_silent
272
+ rakefile_unittest
273
+ Dir.chdir 'subdir'
274
+
275
+ _, err = capture_io do
276
+ @app.instance_eval do
277
+ handle_options
278
+ options.silent = true
279
+ raw_load_rakefile
280
+ end
281
+ end
282
+
283
+ assert_empty err
284
+ end
285
+
286
+ def test_load_rakefile_not_found
287
+ ARGV.clear
288
+ Dir.chdir @tempdir
289
+ ENV['RAKE_SYSTEM'] = 'not_exist'
290
+
291
+ @app.instance_eval do
292
+ handle_options
293
+ options.silent = true
294
+ end
295
+
296
+
297
+ ex = assert_raises(RuntimeError) do
298
+ @app.instance_eval do
299
+ raw_load_rakefile
300
+ end
301
+ end
302
+
303
+ assert_match(/no rakefile found/i, ex.message)
304
+ end
305
+
306
+ def test_load_from_system_rakefile
307
+ rake_system_dir
308
+
309
+ @app.instance_eval do
310
+ handle_options
311
+ options.silent = true
312
+ options.load_system = true
313
+ options.rakelib = []
314
+ load_rakefile
315
+ end
316
+
317
+ assert_equal @system_dir, @app.system_dir
318
+ assert_nil @app.rakefile
319
+ rescue SystemExit
320
+ flunk 'failed to load rakefile'
321
+ end
322
+
323
+ def test_load_from_calculated_system_rakefile
324
+ rakefile_default
325
+ def @app.standard_system_dir
326
+ "__STD_SYS_DIR__"
327
+ end
328
+
329
+ ENV['RAKE_SYSTEM'] = nil
330
+
331
+ @app.instance_eval do
332
+ handle_options
333
+ options.silent = true
334
+ options.load_system = true
335
+ options.rakelib = []
336
+ load_rakefile
337
+ end
338
+
339
+ assert_equal "__STD_SYS_DIR__", @app.system_dir
340
+ rescue SystemExit
341
+ flunk 'failed to find system rakefile'
342
+ end
343
+
344
+ def test_terminal_columns
345
+ old_rake_columns = ENV['RAKE_COLUMNS']
346
+
347
+ ENV['RAKE_COLUMNS'] = '42'
348
+
349
+ app = Rake::Application.new
350
+
351
+ assert_equal 42, app.terminal_columns
352
+ ensure
353
+ if old_rake_columns
354
+ ENV['RAKE_COLUMNS'].delete
355
+ else
356
+ ENV['RAKE_COLUMNS'] = old_rake_columns
357
+ end
358
+ end
359
+
360
+ def test_windows
361
+ assert ! (@app.windows? && @app.unix?)
362
+ end
363
+
364
+ def test_loading_imports
365
+ loader = util_loader
366
+
367
+ @app.instance_eval do
368
+ add_loader("dummy", loader)
369
+ add_import("x.dummy")
370
+ load_imports
371
+ end
372
+
373
+ # HACK no assertions
374
+ end
375
+
376
+ def test_building_imported_files_on_demand
377
+ loader = util_loader
378
+
379
+ @app.instance_eval do
380
+ intern(Rake::Task, "x.dummy").enhance do loader.make_dummy end
381
+ add_loader("dummy", loader)
382
+ add_import("x.dummy")
383
+ load_imports
384
+ end
385
+
386
+ # HACK no assertions
387
+ end
388
+
389
+ def test_handle_options_should_not_strip_options_from_argv
390
+ assert !@app.options.trace
391
+
392
+ valid_option = '--trace'
393
+ setup_command_line(valid_option)
394
+
395
+ @app.handle_options
396
+
397
+ assert ARGV.include?(valid_option)
398
+ assert @app.options.trace
399
+ end
400
+
401
+ def test_handle_options_trace_default_is_stderr
402
+ setup_command_line("--trace")
403
+
404
+ @app.handle_options
405
+
406
+ assert_equal STDERR, @app.options.trace_output
407
+ assert @app.options.trace
408
+ end
409
+
410
+ def test_handle_options_trace_overrides_to_stdout
411
+ setup_command_line("--trace=stdout")
412
+
413
+ @app.handle_options
414
+
415
+ assert_equal STDOUT, @app.options.trace_output
416
+ assert @app.options.trace
417
+ end
418
+
419
+ def test_handle_options_trace_does_not_eat_following_task_names
420
+ assert !@app.options.trace
421
+
422
+ setup_command_line("--trace", "sometask")
423
+
424
+ @app.handle_options
425
+ assert ARGV.include?("sometask")
426
+ assert @app.options.trace
427
+ end
428
+
429
+ def test_good_run
430
+ ran = false
431
+
432
+ ARGV << '--rakelib=""'
433
+
434
+ @app.options.silent = true
435
+
436
+ @app.instance_eval do
437
+ intern(Rake::Task, "default").enhance { ran = true }
438
+ end
439
+
440
+ rakefile_default
441
+
442
+ out, err = capture_io do
443
+ @app.run
444
+ end
445
+
446
+ assert ran
447
+ assert_empty err
448
+ assert_equal "DEFAULT\n", out
449
+ end
450
+
451
+ def test_display_task_run
452
+ ran = false
453
+ setup_command_line('-f', '-s', '--tasks', '--rakelib=""')
454
+ @app.last_description = "COMMENT"
455
+ @app.define_task(Rake::Task, "default")
456
+ out, = capture_io { @app.run }
457
+ assert @app.options.show_tasks
458
+ assert ! ran
459
+ assert_match(/rake default/, out)
460
+ assert_match(/# COMMENT/, out)
461
+ end
462
+
463
+ def test_display_prereqs
464
+ ran = false
465
+ setup_command_line('-f', '-s', '--prereqs', '--rakelib=""')
466
+ @app.last_description = "COMMENT"
467
+ t = @app.define_task(Rake::Task, "default")
468
+ t.enhance([:a, :b])
469
+ @app.define_task(Rake::Task, "a")
470
+ @app.define_task(Rake::Task, "b")
471
+ out, = capture_io { @app.run }
472
+ assert @app.options.show_prereqs
473
+ assert ! ran
474
+ assert_match(/rake a$/, out)
475
+ assert_match(/rake b$/, out)
476
+ assert_match(/rake default\n( *(a|b)\n){2}/m, out)
477
+ end
478
+
479
+ def test_bad_run
480
+ @app.intern(Rake::Task, "default").enhance { fail }
481
+ setup_command_line('-f', '-s', '--rakelib=""')
482
+ _, err = capture_io {
483
+ assert_raises(SystemExit){ @app.run }
484
+ }
485
+ assert_match(/see full trace/i, err)
486
+ ensure
487
+ ARGV.clear
488
+ end
489
+
490
+ def test_bad_run_with_trace
491
+ @app.intern(Rake::Task, "default").enhance { fail }
492
+ setup_command_line('-f', '-s', '-t')
493
+ _, err = capture_io {
494
+ assert_raises(SystemExit) { @app.run }
495
+ }
496
+ refute_match(/see full trace/i, err)
497
+ ensure
498
+ ARGV.clear
499
+ end
500
+
501
+ def test_bad_run_with_backtrace
502
+ @app.intern(Rake::Task, "default").enhance { fail }
503
+ setup_command_line('-f', '-s', '--backtrace')
504
+ _, err = capture_io {
505
+ assert_raises(SystemExit) {
506
+ @app.run
507
+ }
508
+ }
509
+ refute_match(/see full trace/, err)
510
+ ensure
511
+ ARGV.clear
512
+ end
513
+
514
+ CustomError = Class.new(RuntimeError)
515
+
516
+ def test_bad_run_includes_exception_name
517
+ @app.intern(Rake::Task, "default").enhance {
518
+ raise CustomError, "intentional"
519
+ }
520
+ setup_command_line('-f', '-s')
521
+ _, err = capture_io {
522
+ assert_raises(SystemExit) {
523
+ @app.run
524
+ }
525
+ }
526
+ assert_match(/CustomError: intentional/, err)
527
+ end
528
+
529
+ def test_rake_error_excludes_exception_name
530
+ @app.intern(Rake::Task, "default").enhance {
531
+ fail "intentional"
532
+ }
533
+ setup_command_line('-f', '-s')
534
+ _, err = capture_io {
535
+ assert_raises(SystemExit) {
536
+ @app.run
537
+ }
538
+ }
539
+ refute_match(/RuntimeError/, err)
540
+ assert_match(/intentional/, err)
541
+ end
542
+
543
+ def cause_supported?
544
+ ex = StandardError.new
545
+ ex.respond_to?(:cause)
546
+ end
547
+
548
+ def test_printing_original_exception_cause
549
+ custom_error = Class.new(StandardError)
550
+ @app.intern(Rake::Task, "default").enhance {
551
+ begin
552
+ raise custom_error, "Original Error"
553
+ rescue custom_error
554
+ raise custom_error, "Secondary Error"
555
+ end
556
+ }
557
+ setup_command_line('-f', '-s')
558
+ _ ,err = capture_io {
559
+ assert_raises(SystemExit) {
560
+ @app.run
561
+ }
562
+ }
563
+ if cause_supported?
564
+ assert_match(/Original Error/, err)
565
+ end
566
+ assert_match(/Secondary Error/, err)
567
+ ensure
568
+ ARGV.clear
569
+ end
570
+
571
+ def test_run_with_bad_options
572
+ @app.intern(Rake::Task, "default").enhance { fail }
573
+ setup_command_line('-f', '-s', '--xyzzy')
574
+ assert_raises(SystemExit) {
575
+ capture_io { @app.run }
576
+ }
577
+ ensure
578
+ ARGV.clear
579
+ end
580
+
581
+ def test_standard_exception_handling_invalid_option
582
+ out, err = capture_io do
583
+ e = assert_raises SystemExit do
584
+ @app.standard_exception_handling do
585
+ raise OptionParser::InvalidOption, 'blah'
586
+ end
587
+ end
588
+
589
+ assert_equal 1, e.status
590
+ end
591
+
592
+ assert_empty out
593
+ assert_equal "invalid option: blah\n", err
594
+ end
595
+
596
+ def test_standard_exception_handling_other
597
+ out, err = capture_io do
598
+ e = assert_raises SystemExit do
599
+ @app.standard_exception_handling do
600
+ raise 'blah'
601
+ end
602
+ end
603
+
604
+ assert_equal 1, e.status
605
+ end
606
+
607
+ assert_empty out
608
+ assert_match "rake aborted!\n", err
609
+ assert_match "blah\n", err
610
+ end
611
+
612
+ def test_standard_exception_handling_system_exit
613
+ out, err = capture_io do
614
+ e = assert_raises SystemExit do
615
+ @app.standard_exception_handling do
616
+ exit 0
617
+ end
618
+ end
619
+
620
+ assert_equal 0, e.status
621
+ end
622
+
623
+ assert_empty out
624
+ assert_empty err
625
+ end
626
+
627
+ def test_standard_exception_handling_system_exit_nonzero
628
+ out, err = capture_io do
629
+ e = assert_raises SystemExit do
630
+ @app.standard_exception_handling do
631
+ exit 5
632
+ end
633
+ end
634
+
635
+ assert_equal 5, e.status
636
+ end
637
+
638
+ assert_empty out
639
+ assert_empty err
640
+ end
641
+
642
+ def util_loader
643
+ loader = Object.new
644
+
645
+ loader.instance_variable_set :@load_called, false
646
+ def loader.load arg
647
+ raise ArgumentError, arg unless arg == 'x.dummy'
648
+ @load_called = true
649
+ end
650
+
651
+ loader.instance_variable_set :@make_dummy_called, false
652
+ def loader.make_dummy
653
+ @make_dummy_called = true
654
+ end
655
+
656
+ loader
657
+ end
658
+
659
+ end