rb2exe 0.1.11 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1008) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +22 -0
  3. data/README.md +18 -22
  4. data/bin/build +24 -0
  5. data/bin/decompress +17 -0
  6. data/bin/installer +19 -0
  7. data/bin/rb2exe +3 -0
  8. data/bin/rb2exe.rb +49 -0
  9. data/bin/traveling-ruby-2.2.2/bin.real/bundle +23 -0
  10. data/bin/traveling-ruby-2.2.2/bin.real/bundler +23 -0
  11. data/bin/traveling-ruby-2.2.2/bin.real/gem +25 -0
  12. data/bin/traveling-ruby-2.2.2/bin.real/irb +11 -0
  13. data/bin/traveling-ruby-2.2.2/bin.real/nokogiri +23 -0
  14. data/bin/traveling-ruby-2.2.2/bin.real/posix-spawn-benchmark +23 -0
  15. data/bin/traveling-ruby-2.2.2/bin.real/puma +23 -0
  16. data/bin/traveling-ruby-2.2.2/bin.real/pumactl +23 -0
  17. data/bin/traveling-ruby-2.2.2/bin.real/rackup +23 -0
  18. data/bin/traveling-ruby-2.2.2/bin.real/rake +33 -0
  19. data/bin/traveling-ruby-2.2.2/bin.real/redcarpet +23 -0
  20. data/bin/traveling-ruby-2.2.2/bin.real/redcloth +23 -0
  21. data/bin/traveling-ruby-2.2.2/bin.real/ruby +0 -0
  22. data/bin/traveling-ruby-2.2.2/bin.real/thin +23 -0
  23. data/bin/traveling-ruby-2.2.2/bin.real/unicorn +23 -0
  24. data/bin/traveling-ruby-2.2.2/bin.real/unicorn_rails +23 -0
  25. data/bin/traveling-ruby-2.2.2/bin/gem +6 -0
  26. data/bin/traveling-ruby-2.2.2/bin/irb +6 -0
  27. data/bin/traveling-ruby-2.2.2/bin/rake +6 -0
  28. data/bin/traveling-ruby-2.2.2/bin/ruby +6 -0
  29. data/bin/traveling-ruby-2.2.2/bin/ruby_environment +33 -0
  30. data/bin/traveling-ruby-2.2.2/info/GEM_EXTENSION_API_VERSION +1 -0
  31. data/bin/traveling-ruby-2.2.2/info/GEM_PLATFORM +1 -0
  32. data/bin/traveling-ruby-2.2.2/info/RUBY_ARCH +1 -0
  33. data/bin/traveling-ruby-2.2.2/info/RUBY_COMPAT_VERSION +1 -0
  34. data/bin/traveling-ruby-2.2.2/lib/ca-bundle.crt +13885 -0
  35. data/bin/traveling-ruby-2.2.2/lib/libffi.so.6 +0 -0
  36. data/bin/traveling-ruby-2.2.2/lib/libreadline.so.5 +0 -0
  37. data/bin/traveling-ruby-2.2.2/lib/libtermcap.so.2 +0 -0
  38. data/bin/traveling-ruby-2.2.2/lib/libz.so.1 +0 -0
  39. data/bin/traveling-ruby-2.2.2/lib/restore_environment.rb +17 -0
  40. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/English.rb +185 -0
  41. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/abbrev.rb +131 -0
  42. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/base64.rb +91 -0
  43. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/benchmark.rb +557 -0
  44. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/bigdecimal/jacobian.rb +87 -0
  45. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/bigdecimal/ludcmp.rb +88 -0
  46. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/bigdecimal/math.rb +231 -0
  47. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/bigdecimal/newton.rb +79 -0
  48. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/bigdecimal/util.rb +127 -0
  49. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cgi.rb +295 -0
  50. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cgi/cookie.rb +170 -0
  51. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cgi/core.rb +880 -0
  52. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cgi/html.rb +1034 -0
  53. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cgi/session.rb +531 -0
  54. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cgi/session/pstore.rb +100 -0
  55. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cgi/util.rb +194 -0
  56. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cmath.rb +400 -0
  57. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/csv.rb +2341 -0
  58. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/date.rb +60 -0
  59. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/debug.rb +1087 -0
  60. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/delegate.rb +417 -0
  61. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/digest.rb +108 -0
  62. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/digest/sha2.rb +107 -0
  63. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb.rb +2 -0
  64. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/acl.rb +232 -0
  65. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/drb.rb +1864 -0
  66. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/eq.rb +14 -0
  67. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/extserv.rb +43 -0
  68. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/extservm.rb +93 -0
  69. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/gw.rb +160 -0
  70. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/invokemethod.rb +34 -0
  71. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/observer.rb +25 -0
  72. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/ssl.rb +345 -0
  73. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/timeridconv.rb +101 -0
  74. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/unix.rb +117 -0
  75. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/e2mmap.rb +172 -0
  76. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/erb.rb +1022 -0
  77. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/expect.rb +71 -0
  78. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle.rb +55 -0
  79. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/closure.rb +48 -0
  80. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/cparser.rb +176 -0
  81. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/function.rb +17 -0
  82. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/import.rb +314 -0
  83. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/pack.rb +128 -0
  84. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/struct.rb +243 -0
  85. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/types.rb +71 -0
  86. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/value.rb +112 -0
  87. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fileutils.rb +1761 -0
  88. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/find.rb +88 -0
  89. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/forwardable.rb +289 -0
  90. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/getoptlong.rb +612 -0
  91. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/bigdecimal.so +0 -0
  92. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/continuation.so +0 -0
  93. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/date_core.so +0 -0
  94. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/digest.so +0 -0
  95. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/digest/bubblebabble.so +0 -0
  96. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/digest/md5.so +0 -0
  97. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/digest/rmd160.so +0 -0
  98. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/digest/sha1.so +0 -0
  99. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/digest/sha2.so +0 -0
  100. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/big5.so +0 -0
  101. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/cp949.so +0 -0
  102. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/emacs_mule.so +0 -0
  103. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/encdb.so +0 -0
  104. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/euc_jp.so +0 -0
  105. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/euc_kr.so +0 -0
  106. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/euc_tw.so +0 -0
  107. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/gb18030.so +0 -0
  108. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/gb2312.so +0 -0
  109. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/gbk.so +0 -0
  110. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_1.so +0 -0
  111. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_10.so +0 -0
  112. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_11.so +0 -0
  113. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_13.so +0 -0
  114. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_14.so +0 -0
  115. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_15.so +0 -0
  116. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_16.so +0 -0
  117. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_2.so +0 -0
  118. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_3.so +0 -0
  119. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_4.so +0 -0
  120. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_5.so +0 -0
  121. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_6.so +0 -0
  122. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_7.so +0 -0
  123. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_8.so +0 -0
  124. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_9.so +0 -0
  125. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/koi8_r.so +0 -0
  126. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/koi8_u.so +0 -0
  127. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/shift_jis.so +0 -0
  128. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/big5.so +0 -0
  129. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/chinese.so +0 -0
  130. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/emoji.so +0 -0
  131. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/emoji_iso2022_kddi.so +0 -0
  132. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/emoji_sjis_docomo.so +0 -0
  133. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/emoji_sjis_kddi.so +0 -0
  134. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/emoji_sjis_softbank.so +0 -0
  135. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/escape.so +0 -0
  136. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/gb18030.so +0 -0
  137. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/gbk.so +0 -0
  138. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/iso2022.so +0 -0
  139. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/japanese.so +0 -0
  140. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/japanese_euc.so +0 -0
  141. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/japanese_sjis.so +0 -0
  142. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/korean.so +0 -0
  143. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/single_byte.so +0 -0
  144. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/transdb.so +0 -0
  145. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/utf8_mac.so +0 -0
  146. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/utf_16_32.so +0 -0
  147. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/utf_16be.so +0 -0
  148. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/utf_16le.so +0 -0
  149. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/utf_32be.so +0 -0
  150. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/utf_32le.so +0 -0
  151. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/windows_1251.so +0 -0
  152. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/windows_31j.so +0 -0
  153. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/etc.so +0 -0
  154. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/fcntl.so +0 -0
  155. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/fiber.so +0 -0
  156. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/fiddle.so +0 -0
  157. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/io/console.so +0 -0
  158. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/io/nonblock.so +0 -0
  159. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/io/wait.so +0 -0
  160. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/json/ext/generator.so +0 -0
  161. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/json/ext/parser.so +0 -0
  162. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/mathn/complex.so +0 -0
  163. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/mathn/rational.so +0 -0
  164. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/nkf.so +0 -0
  165. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/objspace.so +0 -0
  166. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/openssl.so +0 -0
  167. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/pathname.so +0 -0
  168. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/psych.so +0 -0
  169. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/pty.so +0 -0
  170. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/racc/cparse.so +0 -0
  171. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/rbconfig.rb +279 -0
  172. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/rbconfig/sizeof.so +0 -0
  173. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/readline.so +0 -0
  174. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/ripper.so +0 -0
  175. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/socket.so +0 -0
  176. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/stringio.so +0 -0
  177. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/strscan.so +0 -0
  178. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/syslog.so +0 -0
  179. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/thread.so +0 -0
  180. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/zlib.so +0 -0
  181. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/io/console/size.rb +22 -0
  182. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ipaddr.rb +658 -0
  183. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb.rb +703 -0
  184. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/cmd/chws.rb +33 -0
  185. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/cmd/fork.rb +38 -0
  186. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/cmd/help.rb +41 -0
  187. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/cmd/load.rb +66 -0
  188. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/cmd/nop.rb +38 -0
  189. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/cmd/pushws.rb +40 -0
  190. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/cmd/subirb.rb +42 -0
  191. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/completion.rb +227 -0
  192. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/context.rb +419 -0
  193. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/change-ws.rb +45 -0
  194. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/history.rb +118 -0
  195. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/loader.rb +128 -0
  196. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/math-mode.rb +47 -0
  197. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/multi-irb.rb +265 -0
  198. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/save-history.rb +103 -0
  199. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/tracer.rb +71 -0
  200. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/use-loader.rb +73 -0
  201. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/workspaces.rb +66 -0
  202. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/extend-command.rb +308 -0
  203. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/frame.rb +80 -0
  204. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/help.rb +36 -0
  205. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/init.rb +304 -0
  206. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/input-method.rb +191 -0
  207. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/inspector.rb +131 -0
  208. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/lc/error.rb +31 -0
  209. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/lc/help-message +50 -0
  210. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/lc/ja/encoding_aliases.rb +10 -0
  211. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/lc/ja/error.rb +30 -0
  212. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/lc/ja/help-message +53 -0
  213. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/locale.rb +181 -0
  214. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/magic-file.rb +37 -0
  215. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/notifier.rb +231 -0
  216. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/output-method.rb +91 -0
  217. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ruby-lex.rb +1170 -0
  218. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ruby-token.rb +266 -0
  219. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/slex.rb +281 -0
  220. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/src_encoding.rb +4 -0
  221. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/version.rb +15 -0
  222. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/workspace.rb +114 -0
  223. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ws-for-case-2.rb +14 -0
  224. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/xmp.rb +169 -0
  225. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json.rb +62 -0
  226. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/bigdecimal.rb +28 -0
  227. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/complex.rb +22 -0
  228. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/core.rb +11 -0
  229. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/date.rb +34 -0
  230. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/date_time.rb +50 -0
  231. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/exception.rb +31 -0
  232. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/ostruct.rb +31 -0
  233. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/range.rb +29 -0
  234. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/rational.rb +22 -0
  235. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/regexp.rb +30 -0
  236. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/struct.rb +30 -0
  237. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/symbol.rb +25 -0
  238. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/time.rb +38 -0
  239. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/common.rb +484 -0
  240. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/ext.rb +21 -0
  241. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/generic_object.rb +70 -0
  242. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/version.rb +8 -0
  243. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/kconv.rb +282 -0
  244. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/logger.rb +737 -0
  245. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/mathn.rb +191 -0
  246. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/matrix.rb +2161 -0
  247. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/matrix/eigenvalue_decomposition.rb +882 -0
  248. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/matrix/lup_decomposition.rb +218 -0
  249. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb +2677 -0
  250. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/monitor.rb +300 -0
  251. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/mutex_m.rb +111 -0
  252. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/ftp.rb +1126 -0
  253. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http.rb +1559 -0
  254. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/backward.rb +25 -0
  255. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/exceptions.rb +25 -0
  256. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/generic_request.rb +332 -0
  257. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/header.rb +452 -0
  258. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/proxy_delta.rb +16 -0
  259. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/request.rb +20 -0
  260. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/requests.rb +122 -0
  261. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/response.rb +414 -0
  262. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/responses.rb +273 -0
  263. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/https.rb +22 -0
  264. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/imap.rb +3616 -0
  265. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/pop.rb +1021 -0
  266. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/protocol.rb +420 -0
  267. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/smtp.rb +1073 -0
  268. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/telnet.rb +763 -0
  269. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/observer.rb +203 -0
  270. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb +801 -0
  271. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/open3.rb +663 -0
  272. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl.rb +24 -0
  273. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl/bn.rb +45 -0
  274. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl/buffering.rb +457 -0
  275. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl/cipher.rb +65 -0
  276. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl/config.rb +472 -0
  277. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl/digest.rb +88 -0
  278. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl/ssl.rb +308 -0
  279. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl/x509.rb +182 -0
  280. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optionparser.rb +1 -0
  281. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optparse.rb +1997 -0
  282. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optparse/ac.rb +50 -0
  283. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optparse/date.rb +17 -0
  284. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optparse/shellwords.rb +6 -0
  285. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optparse/time.rb +10 -0
  286. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optparse/uri.rb +6 -0
  287. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optparse/version.rb +70 -0
  288. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ostruct.rb +286 -0
  289. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/pathname.rb +579 -0
  290. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/pp.rb +546 -0
  291. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/prettyprint.rb +554 -0
  292. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/prime.rb +487 -0
  293. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/profile.rb +10 -0
  294. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/profiler.rb +148 -0
  295. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/pstore.rb +484 -0
  296. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych.rb +498 -0
  297. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/class_loader.rb +101 -0
  298. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/coder.rb +94 -0
  299. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/core_ext.rb +35 -0
  300. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/deprecated.rb +85 -0
  301. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/exception.rb +13 -0
  302. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/handler.rb +249 -0
  303. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/handlers/document_stream.rb +22 -0
  304. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/handlers/recorder.rb +39 -0
  305. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/json/ruby_events.rb +19 -0
  306. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/json/stream.rb +16 -0
  307. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/json/tree_builder.rb +12 -0
  308. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/json/yaml_events.rb +29 -0
  309. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes.rb +77 -0
  310. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes/alias.rb +18 -0
  311. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes/document.rb +60 -0
  312. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes/mapping.rb +56 -0
  313. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes/node.rb +55 -0
  314. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes/scalar.rb +67 -0
  315. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes/sequence.rb +81 -0
  316. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes/stream.rb +37 -0
  317. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/omap.rb +4 -0
  318. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/parser.rb +51 -0
  319. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/scalar_scanner.rb +149 -0
  320. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/set.rb +4 -0
  321. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/stream.rb +37 -0
  322. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/streaming.rb +27 -0
  323. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/syntax_error.rb +21 -0
  324. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/tree_builder.rb +96 -0
  325. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/visitors.rb +6 -0
  326. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/visitors/depth_first.rb +26 -0
  327. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/visitors/emitter.rb +51 -0
  328. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/visitors/json_tree.rb +24 -0
  329. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/visitors/to_ruby.rb +389 -0
  330. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/visitors/visitor.rb +19 -0
  331. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/visitors/yaml_tree.rb +565 -0
  332. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/y.rb +9 -0
  333. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/racc/parser.rb +622 -0
  334. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake.rb +79 -0
  335. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/alt_system.rb +110 -0
  336. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb +790 -0
  337. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/backtrace.rb +23 -0
  338. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/clean.rb +76 -0
  339. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/cloneable.rb +16 -0
  340. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/contrib/compositepublisher.rb +21 -0
  341. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/contrib/ftptools.rb +137 -0
  342. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/contrib/publisher.rb +81 -0
  343. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/contrib/rubyforgepublisher.rb +18 -0
  344. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/contrib/sshpublisher.rb +61 -0
  345. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/contrib/sys.rb +4 -0
  346. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/cpu_counter.rb +125 -0
  347. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/default_loader.rb +14 -0
  348. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/dsl_definition.rb +201 -0
  349. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/early_time.rb +21 -0
  350. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/ext/core.rb +25 -0
  351. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/ext/module.rb +2 -0
  352. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/ext/pathname.rb +25 -0
  353. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/ext/string.rb +173 -0
  354. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/ext/time.rb +16 -0
  355. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/file_creation_task.rb +24 -0
  356. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/file_list.rb +428 -0
  357. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/file_task.rb +46 -0
  358. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/file_utils.rb +128 -0
  359. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/file_utils_ext.rb +144 -0
  360. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/gempackagetask.rb +4 -0
  361. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/invocation_chain.rb +56 -0
  362. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/invocation_exception_mixin.rb +16 -0
  363. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/late_time.rb +17 -0
  364. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/linked_list.rb +103 -0
  365. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/loaders/makefile.rb +40 -0
  366. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/multi_task.rb +13 -0
  367. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/name_space.rb +38 -0
  368. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/packagetask.rb +199 -0
  369. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/pathmap.rb +3 -0
  370. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/phony.rb +15 -0
  371. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/private_reader.rb +20 -0
  372. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/promise.rb +99 -0
  373. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/pseudo_status.rb +29 -0
  374. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/rake_module.rb +38 -0
  375. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/rake_test_loader.rb +22 -0
  376. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/rdoctask.rb +4 -0
  377. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/ruby182_test_unit_fix.rb +29 -0
  378. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/rule_recursion_overflow_error.rb +20 -0
  379. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/runtest.rb +27 -0
  380. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/scope.rb +42 -0
  381. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/task.rb +383 -0
  382. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/task_argument_error.rb +7 -0
  383. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/task_arguments.rb +98 -0
  384. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/task_manager.rb +310 -0
  385. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/tasklib.rb +24 -0
  386. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/testtask.rb +212 -0
  387. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/thread_history_display.rb +48 -0
  388. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/thread_pool.rb +164 -0
  389. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/trace_output.rb +22 -0
  390. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/version.rb +7 -0
  391. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/win32.rb +56 -0
  392. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rbconfig/datadir.rb +13 -0
  393. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc.rb +185 -0
  394. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/alias.rb +111 -0
  395. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/anon_class.rb +10 -0
  396. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/any_method.rb +316 -0
  397. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/attr.rb +175 -0
  398. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/class_module.rb +799 -0
  399. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/code_object.rb +429 -0
  400. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/code_objects.rb +5 -0
  401. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/comment.rb +229 -0
  402. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/constant.rb +186 -0
  403. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/context.rb +1211 -0
  404. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/context/section.rb +238 -0
  405. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/cross_reference.rb +183 -0
  406. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/encoding.rb +99 -0
  407. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/erb_partial.rb +18 -0
  408. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/erbio.rb +37 -0
  409. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/extend.rb +9 -0
  410. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/generator.rb +51 -0
  411. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ghost_method.rb +6 -0
  412. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/i18n.rb +9 -0
  413. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/i18n/locale.rb +101 -0
  414. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/i18n/text.rb +125 -0
  415. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/include.rb +9 -0
  416. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/known_classes.rb +72 -0
  417. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markdown.rb +16133 -0
  418. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markdown/entities.rb +2131 -0
  419. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markdown/literals_1_9.rb +420 -0
  420. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup.rb +869 -0
  421. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/attr_changer.rb +22 -0
  422. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/attr_span.rb +29 -0
  423. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/attribute_manager.rb +343 -0
  424. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/attributes.rb +70 -0
  425. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/blank_line.rb +27 -0
  426. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/block_quote.rb +14 -0
  427. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/document.rb +164 -0
  428. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/formatter.rb +264 -0
  429. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/formatter_test_case.rb +767 -0
  430. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/hard_break.rb +31 -0
  431. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/heading.rb +78 -0
  432. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/include.rb +42 -0
  433. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/indented_paragraph.rb +47 -0
  434. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/inline.rb +1 -0
  435. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/list.rb +101 -0
  436. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/list_item.rb +99 -0
  437. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/paragraph.rb +28 -0
  438. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/parser.rb +558 -0
  439. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/pre_process.rb +293 -0
  440. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/raw.rb +69 -0
  441. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/rule.rb +20 -0
  442. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/special.rb +40 -0
  443. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/text_formatter_test_case.rb +114 -0
  444. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_ansi.rb +93 -0
  445. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_bs.rb +78 -0
  446. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_html.rb +398 -0
  447. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_html_crossref.rb +160 -0
  448. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_html_snippet.rb +284 -0
  449. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_joined_paragraph.rb +71 -0
  450. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_label.rb +74 -0
  451. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_markdown.rb +191 -0
  452. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_rdoc.rb +333 -0
  453. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_table_of_contents.rb +87 -0
  454. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_test.rb +69 -0
  455. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_tt_only.rb +120 -0
  456. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/verbatim.rb +83 -0
  457. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/meta_method.rb +6 -0
  458. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/method_attr.rb +418 -0
  459. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/mixin.rb +120 -0
  460. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/normal_class.rb +92 -0
  461. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/normal_module.rb +73 -0
  462. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/options.rb +1251 -0
  463. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser.rb +310 -0
  464. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/c.rb +1229 -0
  465. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/changelog.rb +198 -0
  466. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/markdown.rb +23 -0
  467. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/rd.rb +22 -0
  468. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/ruby.rb +2160 -0
  469. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/ruby_tools.rb +167 -0
  470. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/simple.rb +61 -0
  471. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/text.rb +11 -0
  472. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/rd.rb +99 -0
  473. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/rd/block_parser.rb +1055 -0
  474. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/rd/inline.rb +71 -0
  475. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/rd/inline_parser.rb +1207 -0
  476. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/rdoc.rb +570 -0
  477. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/require.rb +51 -0
  478. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ri.rb +20 -0
  479. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ri/driver.rb +1497 -0
  480. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ri/formatter.rb +5 -0
  481. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ri/paths.rb +187 -0
  482. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ri/store.rb +6 -0
  483. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ri/task.rb +71 -0
  484. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ruby_lex.rb +1377 -0
  485. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ruby_token.rb +460 -0
  486. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/rubygems_hook.rb +253 -0
  487. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/servlet.rb +441 -0
  488. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/single_class.rb +25 -0
  489. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/stats.rb +461 -0
  490. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/stats/normal.rb +59 -0
  491. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/stats/quiet.rb +59 -0
  492. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/stats/verbose.rb +45 -0
  493. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/store.rb +979 -0
  494. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/task.rb +330 -0
  495. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/test_case.rb +217 -0
  496. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/text.rb +324 -0
  497. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/token_stream.rb +95 -0
  498. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/tom_doc.rb +257 -0
  499. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/top_level.rb +282 -0
  500. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/resolv-replace.rb +74 -0
  501. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/resolv.rb +2836 -0
  502. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/attlistdecl.rb +62 -0
  503. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/attribute.rb +191 -0
  504. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/cdata.rb +67 -0
  505. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/child.rb +96 -0
  506. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/comment.rb +79 -0
  507. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/doctype.rb +269 -0
  508. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/document.rb +290 -0
  509. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/dtd/attlistdecl.rb +10 -0
  510. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/dtd/dtd.rb +46 -0
  511. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/dtd/elementdecl.rb +17 -0
  512. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/dtd/entitydecl.rb +56 -0
  513. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/dtd/notationdecl.rb +39 -0
  514. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/element.rb +1240 -0
  515. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/encoding.rb +50 -0
  516. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/entity.rb +173 -0
  517. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/formatters/default.rb +111 -0
  518. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/formatters/pretty.rb +141 -0
  519. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/formatters/transitive.rb +57 -0
  520. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/functions.rb +394 -0
  521. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/instruction.rb +70 -0
  522. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/light/node.rb +195 -0
  523. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/namespace.rb +47 -0
  524. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/node.rb +75 -0
  525. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/output.rb +29 -0
  526. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parent.rb +165 -0
  527. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parseexception.rb +51 -0
  528. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/baseparser.rb +532 -0
  529. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/lightparser.rb +58 -0
  530. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/pullparser.rb +196 -0
  531. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/sax2parser.rb +272 -0
  532. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/streamparser.rb +52 -0
  533. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/treeparser.rb +100 -0
  534. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/ultralightparser.rb +56 -0
  535. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/xpathparser.rb +656 -0
  536. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/quickpath.rb +265 -0
  537. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/rexml.rb +31 -0
  538. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/sax2listener.rb +97 -0
  539. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/security.rb +27 -0
  540. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/source.rb +296 -0
  541. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/streamlistener.rb +92 -0
  542. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/syncenumerator.rb +32 -0
  543. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/text.rb +425 -0
  544. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/undefinednamespaceexception.rb +8 -0
  545. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/validation/relaxng.rb +538 -0
  546. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/validation/validation.rb +143 -0
  547. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/validation/validationexception.rb +9 -0
  548. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/xmldecl.rb +115 -0
  549. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/xmltokens.rb +84 -0
  550. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/xpath.rb +80 -0
  551. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/xpath_parser.rb +703 -0
  552. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rinda/rinda.rb +327 -0
  553. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rinda/ring.rb +480 -0
  554. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rinda/tuplespace.rb +642 -0
  555. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ripper.rb +73 -0
  556. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ripper/core.rb +70 -0
  557. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ripper/filter.rb +77 -0
  558. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ripper/lexer.rb +186 -0
  559. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ripper/sexp.rb +118 -0
  560. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss.rb +91 -0
  561. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/0.9.rb +461 -0
  562. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/1.0.rb +484 -0
  563. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/2.0.rb +142 -0
  564. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/atom.rb +839 -0
  565. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/content.rb +33 -0
  566. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/content/1.0.rb +9 -0
  567. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/content/2.0.rb +11 -0
  568. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/converter.rb +170 -0
  569. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/dublincore.rb +163 -0
  570. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/dublincore/1.0.rb +12 -0
  571. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/dublincore/2.0.rb +12 -0
  572. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/dublincore/atom.rb +16 -0
  573. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/image.rb +197 -0
  574. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/itunes.rb +412 -0
  575. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker.rb +78 -0
  576. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/0.9.rb +508 -0
  577. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/1.0.rb +435 -0
  578. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/2.0.rb +223 -0
  579. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/atom.rb +172 -0
  580. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/base.rb +944 -0
  581. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/content.rb +21 -0
  582. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/dublincore.rb +121 -0
  583. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/entry.rb +163 -0
  584. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/feed.rb +426 -0
  585. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/image.rb +111 -0
  586. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/itunes.rb +242 -0
  587. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/slash.rb +33 -0
  588. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/syndication.rb +18 -0
  589. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/taxonomy.rb +118 -0
  590. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/trackback.rb +61 -0
  591. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/parser.rb +570 -0
  592. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/rexmlparser.rb +49 -0
  593. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/rss.rb +1352 -0
  594. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/slash.rb +51 -0
  595. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/syndication.rb +68 -0
  596. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/taxonomy.rb +147 -0
  597. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/trackback.rb +290 -0
  598. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/utils.rb +199 -0
  599. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/xml-stylesheet.rb +105 -0
  600. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/xml.rb +71 -0
  601. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/xmlparser.rb +94 -0
  602. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/xmlscanner.rb +121 -0
  603. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems.rb +1245 -0
  604. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/available_set.rb +164 -0
  605. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/basic_specification.rb +290 -0
  606. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/command.rb +582 -0
  607. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/command_manager.rb +218 -0
  608. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/build_command.rb +60 -0
  609. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/cert_command.rb +276 -0
  610. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/check_command.rb +93 -0
  611. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/cleanup_command.rb +165 -0
  612. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/contents_command.rb +190 -0
  613. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/dependency_command.rb +207 -0
  614. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/environment_command.rb +158 -0
  615. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/fetch_command.rb +77 -0
  616. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/generate_index_command.rb +84 -0
  617. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/help_command.rb +384 -0
  618. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/install_command.rb +347 -0
  619. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/list_command.rb +40 -0
  620. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/lock_command.rb +110 -0
  621. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/mirror_command.rb +25 -0
  622. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/open_command.rb +74 -0
  623. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/outdated_command.rb +32 -0
  624. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/owner_command.rb +99 -0
  625. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/pristine_command.rb +165 -0
  626. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/push_command.rb +98 -0
  627. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/query_command.rb +343 -0
  628. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/rdoc_command.rb +96 -0
  629. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/search_command.rb +40 -0
  630. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/server_command.rb +86 -0
  631. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/setup_command.rb +483 -0
  632. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/sources_command.rb +210 -0
  633. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/specification_command.rb +145 -0
  634. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/stale_command.rb +38 -0
  635. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/uninstall_command.rb +164 -0
  636. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/unpack_command.rb +182 -0
  637. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/update_command.rb +277 -0
  638. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/which_command.rb +90 -0
  639. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/yank_command.rb +107 -0
  640. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/compatibility.rb +59 -0
  641. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/config_file.rb +483 -0
  642. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_gem.rb +73 -0
  643. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb +139 -0
  644. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/defaults.rb +177 -0
  645. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/dependency.rb +334 -0
  646. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/dependency_installer.rb +480 -0
  647. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/dependency_list.rb +240 -0
  648. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/deprecate.rb +70 -0
  649. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/doctor.rb +131 -0
  650. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/errors.rb +137 -0
  651. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/exceptions.rb +270 -0
  652. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ext.rb +18 -0
  653. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ext/build_error.rb +6 -0
  654. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ext/builder.rb +218 -0
  655. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ext/cmake_builder.rb +16 -0
  656. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ext/configure_builder.rb +23 -0
  657. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ext/ext_conf_builder.rb +78 -0
  658. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ext/rake_builder.rb +36 -0
  659. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/gem_runner.rb +81 -0
  660. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/gemcutter_utilities.rb +154 -0
  661. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/indexer.rb +498 -0
  662. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/install_default_message.rb +12 -0
  663. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/install_message.rb +12 -0
  664. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/install_update_options.rb +186 -0
  665. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/installer.rb +819 -0
  666. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/installer_test_case.rb +193 -0
  667. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/local_remote_options.rb +148 -0
  668. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/mock_gem_ui.rb +88 -0
  669. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/name_tuple.rb +123 -0
  670. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package.rb +613 -0
  671. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/digest_io.rb +64 -0
  672. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/file_source.rb +33 -0
  673. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/io_source.rb +45 -0
  674. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/old.rb +178 -0
  675. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/source.rb +3 -0
  676. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/tar_header.rb +229 -0
  677. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/tar_reader.rb +123 -0
  678. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/tar_reader/entry.rb +147 -0
  679. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/tar_test_case.rb +137 -0
  680. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/tar_writer.rb +326 -0
  681. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package_task.rb +128 -0
  682. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/path_support.rb +87 -0
  683. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/platform.rb +204 -0
  684. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/psych_additions.rb +9 -0
  685. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/psych_tree.rb +31 -0
  686. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/rdoc.rb +335 -0
  687. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/remote_fetcher.rb +398 -0
  688. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/request.rb +244 -0
  689. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/request/connection_pools.rb +83 -0
  690. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/request/http_pool.rb +47 -0
  691. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/request/https_pool.rb +10 -0
  692. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/request_set.rb +413 -0
  693. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/request_set/gem_dependency_api.rb +801 -0
  694. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/request_set/lockfile.rb +650 -0
  695. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/requirement.rb +273 -0
  696. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver.rb +485 -0
  697. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/activation_request.rb +172 -0
  698. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/api_set.rb +125 -0
  699. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/api_specification.rb +85 -0
  700. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/best_set.rb +78 -0
  701. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/composed_set.rb +66 -0
  702. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/conflict.rb +160 -0
  703. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/current_set.rb +13 -0
  704. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/dependency_request.rb +116 -0
  705. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/git_set.rb +122 -0
  706. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/git_specification.rb +59 -0
  707. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/index_set.rb +80 -0
  708. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/index_specification.rb +69 -0
  709. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/installed_specification.rb +58 -0
  710. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/installer_set.rb +224 -0
  711. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/local_specification.rb +41 -0
  712. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/lock_set.rb +84 -0
  713. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/lock_specification.rb +84 -0
  714. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/requirement_list.rb +81 -0
  715. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/set.rb +56 -0
  716. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/spec_specification.rb +56 -0
  717. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/specification.rb +110 -0
  718. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/stats.rb +44 -0
  719. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/vendor_set.rb +87 -0
  720. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/vendor_specification.rb +24 -0
  721. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/security.rb +595 -0
  722. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/security/policies.rb +115 -0
  723. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/security/policy.rb +295 -0
  724. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/security/signer.rb +154 -0
  725. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/security/trust_dir.rb +118 -0
  726. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/server.rb +868 -0
  727. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source.rb +234 -0
  728. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source/git.rb +240 -0
  729. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source/installed.rb +40 -0
  730. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source/local.rb +129 -0
  731. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source/lock.rb +48 -0
  732. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source/specific_file.rb +72 -0
  733. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source/vendor.rb +27 -0
  734. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source_list.rb +149 -0
  735. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source_local.rb +5 -0
  736. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source_specific_file.rb +4 -0
  737. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/spec_fetcher.rb +269 -0
  738. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/specification.rb +2800 -0
  739. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ssl_certs/AddTrustExternalCARoot-2048.pem +25 -0
  740. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ssl_certs/AddTrustExternalCARoot.pem +32 -0
  741. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ssl_certs/Class3PublicPrimaryCertificationAuthority.pem +14 -0
  742. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ssl_certs/DigiCertHighAssuranceEVRootCA.pem +23 -0
  743. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ssl_certs/EntrustnetSecureServerCertificationAuthority.pem +28 -0
  744. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ssl_certs/GeoTrustGlobalCA.pem +20 -0
  745. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/stub_specification.rb +196 -0
  746. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/syck_hack.rb +76 -0
  747. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/test_case.rb +1430 -0
  748. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/test_utilities.rb +383 -0
  749. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/text.rb +75 -0
  750. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/uninstaller.rb +345 -0
  751. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/uri_formatter.rb +49 -0
  752. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/user_interaction.rb +711 -0
  753. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util.rb +134 -0
  754. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util/list.rb +48 -0
  755. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util/stringio.rb +34 -0
  756. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/validator.rb +165 -0
  757. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/version.rb +356 -0
  758. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/version_option.rb +71 -0
  759. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/scanf.rb +776 -0
  760. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/securerandom.rb +293 -0
  761. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/set.rb +787 -0
  762. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell.rb +458 -0
  763. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell/builtin-command.rb +146 -0
  764. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell/command-processor.rb +667 -0
  765. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell/error.rb +25 -0
  766. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell/filter.rb +137 -0
  767. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell/process-controller.rb +310 -0
  768. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell/system-command.rb +158 -0
  769. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell/version.rb +15 -0
  770. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shellwords.rb +215 -0
  771. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/singleton.rb +172 -0
  772. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/socket.rb +871 -0
  773. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/sync.rb +328 -0
  774. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/syslog/logger.rb +208 -0
  775. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/tempfile.rb +367 -0
  776. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/thwait.rb +140 -0
  777. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/time.rb +676 -0
  778. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/timeout.rb +130 -0
  779. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/tmpdir.rb +139 -0
  780. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/tracer.rb +286 -0
  781. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/tsort.rb +450 -0
  782. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ubygems.rb +10 -0
  783. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/un.rb +375 -0
  784. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/unicode_normalize.rb +78 -0
  785. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/unicode_normalize/normalize.rb +168 -0
  786. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/unicode_normalize/tables.rb +1163 -0
  787. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri.rb +111 -0
  788. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/common.rb +720 -0
  789. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/ftp.rb +266 -0
  790. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/generic.rb +1557 -0
  791. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/http.rb +106 -0
  792. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/https.rb +22 -0
  793. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/ldap.rb +260 -0
  794. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/ldaps.rb +20 -0
  795. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/mailto.rb +286 -0
  796. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/rfc2396_parser.rb +543 -0
  797. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/rfc3986_parser.rb +124 -0
  798. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/weakref.rb +106 -0
  799. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick.rb +226 -0
  800. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/accesslog.rb +158 -0
  801. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/cgi.rb +308 -0
  802. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/compat.rb +35 -0
  803. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/config.rb +151 -0
  804. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/cookie.rb +171 -0
  805. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/htmlutils.rb +29 -0
  806. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth.rb +95 -0
  807. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth/authenticator.rb +116 -0
  808. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth/basicauth.rb +108 -0
  809. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth/digestauth.rb +408 -0
  810. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth/htdigest.rb +131 -0
  811. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth/htgroup.rb +93 -0
  812. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth/htpasswd.rb +124 -0
  813. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth/userdb.rb +52 -0
  814. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpproxy.rb +337 -0
  815. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httprequest.rb +584 -0
  816. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpresponse.rb +466 -0
  817. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/https.rb +86 -0
  818. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb +278 -0
  819. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpservlet.rb +22 -0
  820. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpservlet/abstract.rb +153 -0
  821. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpservlet/cgi_runner.rb +46 -0
  822. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpservlet/cgihandler.rb +120 -0
  823. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpservlet/erbhandler.rb +87 -0
  824. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpservlet/filehandler.rb +521 -0
  825. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpservlet/prochandler.rb +46 -0
  826. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpstatus.rb +196 -0
  827. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httputils.rb +509 -0
  828. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpversion.rb +75 -0
  829. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/log.rb +155 -0
  830. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/server.rb +365 -0
  831. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/ssl.rb +196 -0
  832. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/utils.rb +230 -0
  833. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/version.rb +17 -0
  834. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc.rb +301 -0
  835. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/base64.rb +62 -0
  836. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/client.rb +614 -0
  837. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/config.rb +43 -0
  838. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/create.rb +286 -0
  839. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/datetime.rb +129 -0
  840. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/marshal.rb +66 -0
  841. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/parser.rb +870 -0
  842. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/server.rb +707 -0
  843. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/utils.rb +171 -0
  844. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/yaml.rb +59 -0
  845. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/yaml/dbm.rb +279 -0
  846. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/yaml/store.rb +81 -0
  847. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/build_info/charlock_holmes-0.7.3.info +1 -0
  848. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/build_info/eventmachine-1.0.4.info +1 -0
  849. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/build_info/eventmachine-1.0.6.info +1 -0
  850. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/build_info/puma-2.11.2.info +1 -0
  851. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/build_info/rugged-0.21.4.info +1 -0
  852. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/build_info/rugged-0.22.0b5.info +1 -0
  853. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/bin/bundle +21 -0
  854. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/bin/bundle_ruby +56 -0
  855. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/bin/bundler +21 -0
  856. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/bundler.gemspec +32 -0
  857. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler.rb +446 -0
  858. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/anonymizable_uri.rb +32 -0
  859. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/capistrano.rb +16 -0
  860. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli.rb +407 -0
  861. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/binstubs.rb +38 -0
  862. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/cache.rb +35 -0
  863. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/check.rb +35 -0
  864. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/clean.rb +26 -0
  865. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/common.rb +56 -0
  866. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/config.rb +84 -0
  867. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/console.rb +38 -0
  868. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/exec.rb +44 -0
  869. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/gem.rb +195 -0
  870. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/init.rb +33 -0
  871. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/inject.rb +33 -0
  872. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/install.rb +156 -0
  873. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/open.rb +23 -0
  874. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/outdated.rb +80 -0
  875. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/package.rb +45 -0
  876. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/platform.rb +43 -0
  877. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/show.rb +74 -0
  878. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/update.rb +73 -0
  879. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/viz.rb +27 -0
  880. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/constants.rb +5 -0
  881. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/current_ruby.rb +183 -0
  882. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/definition.rb +628 -0
  883. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/dep_proxy.rb +43 -0
  884. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/dependency.rb +110 -0
  885. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/deployment.rb +59 -0
  886. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/deprecate.rb +15 -0
  887. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/dsl.rb +331 -0
  888. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/endpoint_specification.rb +76 -0
  889. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/env.rb +75 -0
  890. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/environment.rb +42 -0
  891. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/fetcher.rb +423 -0
  892. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/friendly_errors.rb +85 -0
  893. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/gem_helper.rb +180 -0
  894. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/gem_helpers.rb +26 -0
  895. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/gem_installer.rb +9 -0
  896. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/gem_path_manipulation.rb +8 -0
  897. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/gem_tasks.rb +2 -0
  898. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/graph.rb +169 -0
  899. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/index.rb +197 -0
  900. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/injector.rb +64 -0
  901. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/installer.rb +339 -0
  902. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/lazy_specification.rb +83 -0
  903. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/lockfile_parser.rb +167 -0
  904. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/man/bundle +119 -0
  905. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/man/bundle-config +217 -0
  906. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/man/bundle-exec +159 -0
  907. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/man/bundle-install +345 -0
  908. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/man/bundle-package +52 -0
  909. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/man/bundle-platform +61 -0
  910. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/man/bundle-update +213 -0
  911. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/man/gemfile.5 +669 -0
  912. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/match_platform.rb +13 -0
  913. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/psyched_yaml.rb +26 -0
  914. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/remote_specification.rb +57 -0
  915. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/resolver.rb +334 -0
  916. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/retry.rb +60 -0
  917. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ruby_dsl.rb +11 -0
  918. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ruby_version.rb +117 -0
  919. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/rubygems_ext.rb +170 -0
  920. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/rubygems_integration.rb +619 -0
  921. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/runtime.rb +289 -0
  922. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/settings.rb +208 -0
  923. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/setup.rb +24 -0
  924. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/shared_helpers.rb +149 -0
  925. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/similarity_detector.rb +63 -0
  926. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source.rb +46 -0
  927. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/git.rb +294 -0
  928. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/git/git_proxy.rb +162 -0
  929. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path.rb +226 -0
  930. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path/installer.rb +43 -0
  931. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/rubygems.rb +381 -0
  932. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source_list.rb +101 -0
  933. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/spec_set.rb +154 -0
  934. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ssl_certs/.document +1 -0
  935. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ssl_certs/AddTrustExternalCARoot-2048.pem +25 -0
  936. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ssl_certs/AddTrustExternalCARoot.pem +32 -0
  937. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ssl_certs/Class3PublicPrimaryCertificationAuthority.pem +14 -0
  938. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ssl_certs/DigiCertHighAssuranceEVRootCA.pem +23 -0
  939. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ssl_certs/EntrustnetSecureServerCertificationAuthority.pem +28 -0
  940. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ssl_certs/GeoTrustGlobalCA.pem +20 -0
  941. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ssl_certs/certificate_manager.rb +65 -0
  942. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ui.rb +7 -0
  943. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ui/rg_proxy.rb +21 -0
  944. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ui/shell.rb +103 -0
  945. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ui/silent.rb +44 -0
  946. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/molinillo/lib/molinillo.rb +5 -0
  947. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +266 -0
  948. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +69 -0
  949. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +3 -0
  950. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +90 -0
  951. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +63 -0
  952. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +415 -0
  953. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +43 -0
  954. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +43 -0
  955. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/net/http/faster.rb +26 -0
  956. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/net/http/persistent.rb +1230 -0
  957. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/net/http/persistent/ssl_reuse.rb +128 -0
  958. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor.rb +484 -0
  959. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/actions.rb +319 -0
  960. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +103 -0
  961. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +59 -0
  962. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +118 -0
  963. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +135 -0
  964. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +316 -0
  965. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +107 -0
  966. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/base.rb +656 -0
  967. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/command.rb +133 -0
  968. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +77 -0
  969. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb +10 -0
  970. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/core_ext/ordered_hash.rb +98 -0
  971. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/error.rb +32 -0
  972. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/group.rb +281 -0
  973. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/invocation.rb +178 -0
  974. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/line_editor.rb +17 -0
  975. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb +35 -0
  976. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb +88 -0
  977. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/parser.rb +4 -0
  978. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +73 -0
  979. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +175 -0
  980. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/parser/option.rb +125 -0
  981. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/parser/options.rb +218 -0
  982. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +71 -0
  983. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/runner.rb +322 -0
  984. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/shell.rb +81 -0
  985. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +421 -0
  986. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/shell/color.rb +149 -0
  987. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/shell/html.rb +126 -0
  988. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/util.rb +267 -0
  989. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/version.rb +3 -0
  990. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendored_molinillo.rb +2 -0
  991. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendored_persistent.rb +11 -0
  992. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendored_thor.rb +3 -0
  993. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/version.rb +6 -0
  994. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vlad.rb +11 -0
  995. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/worker.rb +73 -0
  996. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/bundler-1.9.9.gemspec +47 -0
  997. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/default/bigdecimal-1.2.6.gemspec +20 -0
  998. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/default/io-console-0.4.3.gemspec +23 -0
  999. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/default/json-1.8.1.gemspec +7 -0
  1000. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/default/psych-2.0.8.gemspec +25 -0
  1001. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/default/rake-10.4.2.gemspec +7 -0
  1002. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/default/rdoc-4.2.0.gemspec +7 -0
  1003. data/bin/traveling-ruby-2.2.2/test +1 -0
  1004. data/bin/traveling-ruby-2.2.2/test-rake +1 -0
  1005. data/lib/rb2exe/version.rb +1 -1
  1006. data/rb2exe.gemspec +0 -1
  1007. metadata +1003 -16
  1008. data/.gitignore +0 -9
@@ -0,0 +1 @@
1
+ require_relative 'optparse'
@@ -0,0 +1,1997 @@
1
+ #
2
+ # optparse.rb - command-line option analysis with the OptionParser class.
3
+ #
4
+ # Author:: Nobu Nakada
5
+ # Documentation:: Nobu Nakada and Gavin Sinclair.
6
+ #
7
+ # See OptionParser for documentation.
8
+ #
9
+
10
+
11
+ #--
12
+ # == Developer Documentation (not for RDoc output)
13
+ #
14
+ # === Class tree
15
+ #
16
+ # - OptionParser:: front end
17
+ # - OptionParser::Switch:: each switches
18
+ # - OptionParser::List:: options list
19
+ # - OptionParser::ParseError:: errors on parsing
20
+ # - OptionParser::AmbiguousOption
21
+ # - OptionParser::NeedlessArgument
22
+ # - OptionParser::MissingArgument
23
+ # - OptionParser::InvalidOption
24
+ # - OptionParser::InvalidArgument
25
+ # - OptionParser::AmbiguousArgument
26
+ #
27
+ # === Object relationship diagram
28
+ #
29
+ # +--------------+
30
+ # | OptionParser |<>-----+
31
+ # +--------------+ | +--------+
32
+ # | ,-| Switch |
33
+ # on_head -------->+---------------+ / +--------+
34
+ # accept/reject -->| List |<|>-
35
+ # | |<|>- +----------+
36
+ # on ------------->+---------------+ `-| argument |
37
+ # : : | class |
38
+ # +---------------+ |==========|
39
+ # on_tail -------->| | |pattern |
40
+ # +---------------+ |----------|
41
+ # OptionParser.accept ->| DefaultList | |converter |
42
+ # reject |(shared between| +----------+
43
+ # | all instances)|
44
+ # +---------------+
45
+ #
46
+ #++
47
+ #
48
+ # == OptionParser
49
+ #
50
+ # === Introduction
51
+ #
52
+ # OptionParser is a class for command-line option analysis. It is much more
53
+ # advanced, yet also easier to use, than GetoptLong, and is a more Ruby-oriented
54
+ # solution.
55
+ #
56
+ # === Features
57
+ #
58
+ # 1. The argument specification and the code to handle it are written in the
59
+ # same place.
60
+ # 2. It can output an option summary; you don't need to maintain this string
61
+ # separately.
62
+ # 3. Optional and mandatory arguments are specified very gracefully.
63
+ # 4. Arguments can be automatically converted to a specified class.
64
+ # 5. Arguments can be restricted to a certain set.
65
+ #
66
+ # All of these features are demonstrated in the examples below. See
67
+ # #make_switch for full documentation.
68
+ #
69
+ # === Minimal example
70
+ #
71
+ # require 'optparse'
72
+ #
73
+ # options = {}
74
+ # OptionParser.new do |opts|
75
+ # opts.banner = "Usage: example.rb [options]"
76
+ #
77
+ # opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
78
+ # options[:verbose] = v
79
+ # end
80
+ # end.parse!
81
+ #
82
+ # p options
83
+ # p ARGV
84
+ #
85
+ # === Generating Help
86
+ #
87
+ # OptionParser can be used to automatically generate help for the commands you
88
+ # write:
89
+ #
90
+ # require 'optparse'
91
+ #
92
+ # Options = Struct.new(:name)
93
+ #
94
+ # class Parser
95
+ # def self.parse(options)
96
+ # args = Options.new("world")
97
+ #
98
+ # opt_parser = OptionParser.new do |opts|
99
+ # opts.banner = "Usage: example.rb [options]"
100
+ #
101
+ # opts.on("-nNAME", "--name=NAME", "Name to say hello to") do |n|
102
+ # args.name = n
103
+ # end
104
+ #
105
+ # opts.on("-h", "--help", "Prints this help") do
106
+ # puts opts
107
+ # exit
108
+ # end
109
+ # end
110
+ #
111
+ # opt_parser.parse!(options)
112
+ # return args
113
+ # end
114
+ # end
115
+ # options = Parser.parse %w[--help]
116
+ #
117
+ # #=>
118
+ # # Usage: example.rb [options]
119
+ # # -n, --name=NAME Name to say hello to
120
+ # # -h, --help Prints this help#
121
+ #
122
+ # === Complete example
123
+ #
124
+ # The following example is a complete Ruby program. You can run it and see the
125
+ # effect of specifying various options. This is probably the best way to learn
126
+ # the features of +optparse+.
127
+ #
128
+ # require 'optparse'
129
+ # require 'optparse/time'
130
+ # require 'ostruct'
131
+ # require 'pp'
132
+ #
133
+ # class OptparseExample
134
+ #
135
+ # CODES = %w[iso-2022-jp shift_jis euc-jp utf8 binary]
136
+ # CODE_ALIASES = { "jis" => "iso-2022-jp", "sjis" => "shift_jis" }
137
+ #
138
+ # #
139
+ # # Return a structure describing the options.
140
+ # #
141
+ # def self.parse(args)
142
+ # # The options specified on the command line will be collected in *options*.
143
+ # # We set default values here.
144
+ # options = OpenStruct.new
145
+ # options.library = []
146
+ # options.inplace = false
147
+ # options.encoding = "utf8"
148
+ # options.transfer_type = :auto
149
+ # options.verbose = false
150
+ #
151
+ # opt_parser = OptionParser.new do |opts|
152
+ # opts.banner = "Usage: example.rb [options]"
153
+ #
154
+ # opts.separator ""
155
+ # opts.separator "Specific options:"
156
+ #
157
+ # # Mandatory argument.
158
+ # opts.on("-r", "--require LIBRARY",
159
+ # "Require the LIBRARY before executing your script") do |lib|
160
+ # options.library << lib
161
+ # end
162
+ #
163
+ # # Optional argument; multi-line description.
164
+ # opts.on("-i", "--inplace [EXTENSION]",
165
+ # "Edit ARGV files in place",
166
+ # " (make backup if EXTENSION supplied)") do |ext|
167
+ # options.inplace = true
168
+ # options.extension = ext || ''
169
+ # options.extension.sub!(/\A\.?(?=.)/, ".") # Ensure extension begins with dot.
170
+ # end
171
+ #
172
+ # # Cast 'delay' argument to a Float.
173
+ # opts.on("--delay N", Float, "Delay N seconds before executing") do |n|
174
+ # options.delay = n
175
+ # end
176
+ #
177
+ # # Cast 'time' argument to a Time object.
178
+ # opts.on("-t", "--time [TIME]", Time, "Begin execution at given time") do |time|
179
+ # options.time = time
180
+ # end
181
+ #
182
+ # # Cast to octal integer.
183
+ # opts.on("-F", "--irs [OCTAL]", OptionParser::OctalInteger,
184
+ # "Specify record separator (default \\0)") do |rs|
185
+ # options.record_separator = rs
186
+ # end
187
+ #
188
+ # # List of arguments.
189
+ # opts.on("--list x,y,z", Array, "Example 'list' of arguments") do |list|
190
+ # options.list = list
191
+ # end
192
+ #
193
+ # # Keyword completion. We are specifying a specific set of arguments (CODES
194
+ # # and CODE_ALIASES - notice the latter is a Hash), and the user may provide
195
+ # # the shortest unambiguous text.
196
+ # code_list = (CODE_ALIASES.keys + CODES).join(',')
197
+ # opts.on("--code CODE", CODES, CODE_ALIASES, "Select encoding",
198
+ # " (#{code_list})") do |encoding|
199
+ # options.encoding = encoding
200
+ # end
201
+ #
202
+ # # Optional argument with keyword completion.
203
+ # opts.on("--type [TYPE]", [:text, :binary, :auto],
204
+ # "Select transfer type (text, binary, auto)") do |t|
205
+ # options.transfer_type = t
206
+ # end
207
+ #
208
+ # # Boolean switch.
209
+ # opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
210
+ # options.verbose = v
211
+ # end
212
+ #
213
+ # opts.separator ""
214
+ # opts.separator "Common options:"
215
+ #
216
+ # # No argument, shows at tail. This will print an options summary.
217
+ # # Try it and see!
218
+ # opts.on_tail("-h", "--help", "Show this message") do
219
+ # puts opts
220
+ # exit
221
+ # end
222
+ #
223
+ # # Another typical switch to print the version.
224
+ # opts.on_tail("--version", "Show version") do
225
+ # puts ::Version.join('.')
226
+ # exit
227
+ # end
228
+ # end
229
+ #
230
+ # opt_parser.parse!(args)
231
+ # options
232
+ # end # parse()
233
+ #
234
+ # end # class OptparseExample
235
+ #
236
+ # options = OptparseExample.parse(ARGV)
237
+ # pp options
238
+ # pp ARGV
239
+ #
240
+ # === Shell Completion
241
+ #
242
+ # For modern shells (e.g. bash, zsh, etc.), you can use shell
243
+ # completion for command line options.
244
+ #
245
+ # === Further documentation
246
+ #
247
+ # The above examples should be enough to learn how to use this class. If you
248
+ # have any questions, file a ticket at http://bugs.ruby-lang.org.
249
+ #
250
+ class OptionParser
251
+ # :stopdoc:
252
+ NoArgument = [NO_ARGUMENT = :NONE, nil].freeze
253
+ RequiredArgument = [REQUIRED_ARGUMENT = :REQUIRED, true].freeze
254
+ OptionalArgument = [OPTIONAL_ARGUMENT = :OPTIONAL, false].freeze
255
+ # :startdoc:
256
+
257
+ #
258
+ # Keyword completion module. This allows partial arguments to be specified
259
+ # and resolved against a list of acceptable values.
260
+ #
261
+ module Completion
262
+ def self.regexp(key, icase)
263
+ Regexp.new('\A' + Regexp.quote(key).gsub(/\w+\b/, '\&\w*'), icase)
264
+ end
265
+
266
+ def self.candidate(key, icase = false, pat = nil, &block)
267
+ pat ||= Completion.regexp(key, icase)
268
+ candidates = []
269
+ block.call do |k, *v|
270
+ (if Regexp === k
271
+ kn = nil
272
+ k === key
273
+ else
274
+ kn = defined?(k.id2name) ? k.id2name : k
275
+ pat === kn
276
+ end) or next
277
+ v << k if v.empty?
278
+ candidates << [k, v, kn]
279
+ end
280
+ candidates
281
+ end
282
+
283
+ def candidate(key, icase = false, pat = nil)
284
+ Completion.candidate(key, icase, pat, &method(:each))
285
+ end
286
+
287
+ public
288
+ def complete(key, icase = false, pat = nil)
289
+ candidates = candidate(key, icase, pat, &method(:each)).sort_by {|k, v, kn| kn.size}
290
+ if candidates.size == 1
291
+ canon, sw, * = candidates[0]
292
+ elsif candidates.size > 1
293
+ canon, sw, cn = candidates.shift
294
+ candidates.each do |k, v, kn|
295
+ next if sw == v
296
+ if String === cn and String === kn
297
+ if cn.rindex(kn, 0)
298
+ canon, sw, cn = k, v, kn
299
+ next
300
+ elsif kn.rindex(cn, 0)
301
+ next
302
+ end
303
+ end
304
+ throw :ambiguous, key
305
+ end
306
+ end
307
+ if canon
308
+ block_given? or return key, *sw
309
+ yield(key, *sw)
310
+ end
311
+ end
312
+
313
+ def convert(opt = nil, val = nil, *)
314
+ val
315
+ end
316
+ end
317
+
318
+
319
+ #
320
+ # Map from option/keyword string to object with completion.
321
+ #
322
+ class OptionMap < Hash
323
+ include Completion
324
+ end
325
+
326
+
327
+ #
328
+ # Individual switch class. Not important to the user.
329
+ #
330
+ # Defined within Switch are several Switch-derived classes: NoArgument,
331
+ # RequiredArgument, etc.
332
+ #
333
+ class Switch
334
+ attr_reader :pattern, :conv, :short, :long, :arg, :desc, :block
335
+
336
+ #
337
+ # Guesses argument style from +arg+. Returns corresponding
338
+ # OptionParser::Switch class (OptionalArgument, etc.).
339
+ #
340
+ def self.guess(arg)
341
+ case arg
342
+ when ""
343
+ t = self
344
+ when /\A=?\[/
345
+ t = Switch::OptionalArgument
346
+ when /\A\s+\[/
347
+ t = Switch::PlacedArgument
348
+ else
349
+ t = Switch::RequiredArgument
350
+ end
351
+ self >= t or incompatible_argument_styles(arg, t)
352
+ t
353
+ end
354
+
355
+ def self.incompatible_argument_styles(arg, t)
356
+ raise(ArgumentError, "#{arg}: incompatible argument styles\n #{self}, #{t}",
357
+ ParseError.filter_backtrace(caller(2)))
358
+ end
359
+
360
+ def self.pattern
361
+ NilClass
362
+ end
363
+
364
+ def initialize(pattern = nil, conv = nil,
365
+ short = nil, long = nil, arg = nil,
366
+ desc = ([] if short or long), block = Proc.new)
367
+ raise if Array === pattern
368
+ @pattern, @conv, @short, @long, @arg, @desc, @block =
369
+ pattern, conv, short, long, arg, desc, block
370
+ end
371
+
372
+ #
373
+ # Parses +arg+ and returns rest of +arg+ and matched portion to the
374
+ # argument pattern. Yields when the pattern doesn't match substring.
375
+ #
376
+ def parse_arg(arg)
377
+ pattern or return nil, [arg]
378
+ unless m = pattern.match(arg)
379
+ yield(InvalidArgument, arg)
380
+ return arg, []
381
+ end
382
+ if String === m
383
+ m = [s = m]
384
+ else
385
+ m = m.to_a
386
+ s = m[0]
387
+ return nil, m unless String === s
388
+ end
389
+ raise InvalidArgument, arg unless arg.rindex(s, 0)
390
+ return nil, m if s.length == arg.length
391
+ yield(InvalidArgument, arg) # didn't match whole arg
392
+ return arg[s.length..-1], m
393
+ end
394
+ private :parse_arg
395
+
396
+ #
397
+ # Parses argument, converts and returns +arg+, +block+ and result of
398
+ # conversion. Yields at semi-error condition instead of raising an
399
+ # exception.
400
+ #
401
+ def conv_arg(arg, val = [])
402
+ if conv
403
+ val = conv.call(*val)
404
+ else
405
+ val = proc {|v| v}.call(*val)
406
+ end
407
+ return arg, block, val
408
+ end
409
+ private :conv_arg
410
+
411
+ #
412
+ # Produces the summary text. Each line of the summary is yielded to the
413
+ # block (without newline).
414
+ #
415
+ # +sdone+:: Already summarized short style options keyed hash.
416
+ # +ldone+:: Already summarized long style options keyed hash.
417
+ # +width+:: Width of left side (option part). In other words, the right
418
+ # side (description part) starts after +width+ columns.
419
+ # +max+:: Maximum width of left side -> the options are filled within
420
+ # +max+ columns.
421
+ # +indent+:: Prefix string indents all summarized lines.
422
+ #
423
+ def summarize(sdone = [], ldone = [], width = 1, max = width - 1, indent = "")
424
+ sopts, lopts = [], [], nil
425
+ @short.each {|s| sdone.fetch(s) {sopts << s}; sdone[s] = true} if @short
426
+ @long.each {|s| ldone.fetch(s) {lopts << s}; ldone[s] = true} if @long
427
+ return if sopts.empty? and lopts.empty? # completely hidden
428
+
429
+ left = [sopts.join(', ')]
430
+ right = desc.dup
431
+
432
+ while s = lopts.shift
433
+ l = left[-1].length + s.length
434
+ l += arg.length if left.size == 1 && arg
435
+ l < max or sopts.empty? or left << ''
436
+ left[-1] << if left[-1].empty? then ' ' * 4 else ', ' end << s
437
+ end
438
+
439
+ if arg
440
+ left[0] << (left[1] ? arg.sub(/\A(\[?)=/, '\1') + ',' : arg)
441
+ end
442
+ mlen = left.collect {|ss| ss.length}.max.to_i
443
+ while mlen > width and l = left.shift
444
+ mlen = left.collect {|ss| ss.length}.max.to_i if l.length == mlen
445
+ if l.length < width and (r = right[0]) and !r.empty?
446
+ l = l.to_s.ljust(width) + ' ' + r
447
+ right.shift
448
+ end
449
+ yield(indent + l)
450
+ end
451
+
452
+ while begin l = left.shift; r = right.shift; l or r end
453
+ l = l.to_s.ljust(width) + ' ' + r if r and !r.empty?
454
+ yield(indent + l)
455
+ end
456
+
457
+ self
458
+ end
459
+
460
+ def add_banner(to) # :nodoc:
461
+ unless @short or @long
462
+ s = desc.join
463
+ to << " [" + s + "]..." unless s.empty?
464
+ end
465
+ to
466
+ end
467
+
468
+ def match_nonswitch?(str) # :nodoc:
469
+ @pattern =~ str unless @short or @long
470
+ end
471
+
472
+ #
473
+ # Main name of the switch.
474
+ #
475
+ def switch_name
476
+ (long.first || short.first).sub(/\A-+(?:\[no-\])?/, '')
477
+ end
478
+
479
+ def compsys(sdone, ldone) # :nodoc:
480
+ sopts, lopts = [], []
481
+ @short.each {|s| sdone.fetch(s) {sopts << s}; sdone[s] = true} if @short
482
+ @long.each {|s| ldone.fetch(s) {lopts << s}; ldone[s] = true} if @long
483
+ return if sopts.empty? and lopts.empty? # completely hidden
484
+
485
+ (sopts+lopts).each do |opt|
486
+ # "(-x -c -r)-l[left justify]" \
487
+ if /^--\[no-\](.+)$/ =~ opt
488
+ o = $1
489
+ yield("--#{o}", desc.join(""))
490
+ yield("--no-#{o}", desc.join(""))
491
+ else
492
+ yield("#{opt}", desc.join(""))
493
+ end
494
+ end
495
+ end
496
+
497
+ #
498
+ # Switch that takes no arguments.
499
+ #
500
+ class NoArgument < self
501
+
502
+ #
503
+ # Raises an exception if any arguments given.
504
+ #
505
+ def parse(arg, argv)
506
+ yield(NeedlessArgument, arg) if arg
507
+ conv_arg(arg)
508
+ end
509
+
510
+ def self.incompatible_argument_styles(*)
511
+ end
512
+
513
+ def self.pattern
514
+ Object
515
+ end
516
+ end
517
+
518
+ #
519
+ # Switch that takes an argument.
520
+ #
521
+ class RequiredArgument < self
522
+
523
+ #
524
+ # Raises an exception if argument is not present.
525
+ #
526
+ def parse(arg, argv)
527
+ unless arg
528
+ raise MissingArgument if argv.empty?
529
+ arg = argv.shift
530
+ end
531
+ conv_arg(*parse_arg(arg, &method(:raise)))
532
+ end
533
+ end
534
+
535
+ #
536
+ # Switch that can omit argument.
537
+ #
538
+ class OptionalArgument < self
539
+
540
+ #
541
+ # Parses argument if given, or uses default value.
542
+ #
543
+ def parse(arg, argv, &error)
544
+ if arg
545
+ conv_arg(*parse_arg(arg, &error))
546
+ else
547
+ conv_arg(arg)
548
+ end
549
+ end
550
+ end
551
+
552
+ #
553
+ # Switch that takes an argument, which does not begin with '-'.
554
+ #
555
+ class PlacedArgument < self
556
+
557
+ #
558
+ # Returns nil if argument is not present or begins with '-'.
559
+ #
560
+ def parse(arg, argv, &error)
561
+ if !(val = arg) and (argv.empty? or /\A-/ =~ (val = argv[0]))
562
+ return nil, block, nil
563
+ end
564
+ opt = (val = parse_arg(val, &error))[1]
565
+ val = conv_arg(*val)
566
+ if opt and !arg
567
+ argv.shift
568
+ else
569
+ val[0] = nil
570
+ end
571
+ val
572
+ end
573
+ end
574
+ end
575
+
576
+ #
577
+ # Simple option list providing mapping from short and/or long option
578
+ # string to OptionParser::Switch and mapping from acceptable argument to
579
+ # matching pattern and converter pair. Also provides summary feature.
580
+ #
581
+ class List
582
+ # Map from acceptable argument types to pattern and converter pairs.
583
+ attr_reader :atype
584
+
585
+ # Map from short style option switches to actual switch objects.
586
+ attr_reader :short
587
+
588
+ # Map from long style option switches to actual switch objects.
589
+ attr_reader :long
590
+
591
+ # List of all switches and summary string.
592
+ attr_reader :list
593
+
594
+ #
595
+ # Just initializes all instance variables.
596
+ #
597
+ def initialize
598
+ @atype = {}
599
+ @short = OptionMap.new
600
+ @long = OptionMap.new
601
+ @list = []
602
+ end
603
+
604
+ #
605
+ # See OptionParser.accept.
606
+ #
607
+ def accept(t, pat = /.*/m, &block)
608
+ if pat
609
+ pat.respond_to?(:match) or
610
+ raise TypeError, "has no `match'", ParseError.filter_backtrace(caller(2))
611
+ else
612
+ pat = t if t.respond_to?(:match)
613
+ end
614
+ unless block
615
+ block = pat.method(:convert).to_proc if pat.respond_to?(:convert)
616
+ end
617
+ @atype[t] = [pat, block]
618
+ end
619
+
620
+ #
621
+ # See OptionParser.reject.
622
+ #
623
+ def reject(t)
624
+ @atype.delete(t)
625
+ end
626
+
627
+ #
628
+ # Adds +sw+ according to +sopts+, +lopts+ and +nlopts+.
629
+ #
630
+ # +sw+:: OptionParser::Switch instance to be added.
631
+ # +sopts+:: Short style option list.
632
+ # +lopts+:: Long style option list.
633
+ # +nlopts+:: Negated long style options list.
634
+ #
635
+ def update(sw, sopts, lopts, nsw = nil, nlopts = nil)
636
+ sopts.each {|o| @short[o] = sw} if sopts
637
+ lopts.each {|o| @long[o] = sw} if lopts
638
+ nlopts.each {|o| @long[o] = nsw} if nsw and nlopts
639
+ used = @short.invert.update(@long.invert)
640
+ @list.delete_if {|o| Switch === o and !used[o]}
641
+ end
642
+ private :update
643
+
644
+ #
645
+ # Inserts +switch+ at the head of the list, and associates short, long
646
+ # and negated long options. Arguments are:
647
+ #
648
+ # +switch+:: OptionParser::Switch instance to be inserted.
649
+ # +short_opts+:: List of short style options.
650
+ # +long_opts+:: List of long style options.
651
+ # +nolong_opts+:: List of long style options with "no-" prefix.
652
+ #
653
+ # prepend(switch, short_opts, long_opts, nolong_opts)
654
+ #
655
+ def prepend(*args)
656
+ update(*args)
657
+ @list.unshift(args[0])
658
+ end
659
+
660
+ #
661
+ # Appends +switch+ at the tail of the list, and associates short, long
662
+ # and negated long options. Arguments are:
663
+ #
664
+ # +switch+:: OptionParser::Switch instance to be inserted.
665
+ # +short_opts+:: List of short style options.
666
+ # +long_opts+:: List of long style options.
667
+ # +nolong_opts+:: List of long style options with "no-" prefix.
668
+ #
669
+ # append(switch, short_opts, long_opts, nolong_opts)
670
+ #
671
+ def append(*args)
672
+ update(*args)
673
+ @list.push(args[0])
674
+ end
675
+
676
+ #
677
+ # Searches +key+ in +id+ list. The result is returned or yielded if a
678
+ # block is given. If it isn't found, nil is returned.
679
+ #
680
+ def search(id, key)
681
+ if list = __send__(id)
682
+ val = list.fetch(key) {return nil}
683
+ block_given? ? yield(val) : val
684
+ end
685
+ end
686
+
687
+ #
688
+ # Searches list +id+ for +opt+ and the optional patterns for completion
689
+ # +pat+. If +icase+ is true, the search is case insensitive. The result
690
+ # is returned or yielded if a block is given. If it isn't found, nil is
691
+ # returned.
692
+ #
693
+ def complete(id, opt, icase = false, *pat, &block)
694
+ __send__(id).complete(opt, icase, *pat, &block)
695
+ end
696
+
697
+ #
698
+ # Iterates over each option, passing the option to the +block+.
699
+ #
700
+ def each_option(&block)
701
+ list.each(&block)
702
+ end
703
+
704
+ #
705
+ # Creates the summary table, passing each line to the +block+ (without
706
+ # newline). The arguments +args+ are passed along to the summarize
707
+ # method which is called on every option.
708
+ #
709
+ def summarize(*args, &block)
710
+ sum = []
711
+ list.reverse_each do |opt|
712
+ if opt.respond_to?(:summarize) # perhaps OptionParser::Switch
713
+ s = []
714
+ opt.summarize(*args) {|l| s << l}
715
+ sum.concat(s.reverse)
716
+ elsif !opt or opt.empty?
717
+ sum << ""
718
+ elsif opt.respond_to?(:each_line)
719
+ sum.concat([*opt.each_line].reverse)
720
+ else
721
+ sum.concat([*opt.each].reverse)
722
+ end
723
+ end
724
+ sum.reverse_each(&block)
725
+ end
726
+
727
+ def add_banner(to) # :nodoc:
728
+ list.each do |opt|
729
+ if opt.respond_to?(:add_banner)
730
+ opt.add_banner(to)
731
+ end
732
+ end
733
+ to
734
+ end
735
+
736
+ def compsys(*args, &block) # :nodoc:
737
+ list.each do |opt|
738
+ if opt.respond_to?(:compsys)
739
+ opt.compsys(*args, &block)
740
+ end
741
+ end
742
+ end
743
+ end
744
+
745
+ #
746
+ # Hash with completion search feature. See OptionParser::Completion.
747
+ #
748
+ class CompletingHash < Hash
749
+ include Completion
750
+
751
+ #
752
+ # Completion for hash key.
753
+ #
754
+ def match(key)
755
+ *values = fetch(key) {
756
+ raise AmbiguousArgument, catch(:ambiguous) {return complete(key)}
757
+ }
758
+ return key, *values
759
+ end
760
+ end
761
+
762
+ # :stopdoc:
763
+
764
+ #
765
+ # Enumeration of acceptable argument styles. Possible values are:
766
+ #
767
+ # NO_ARGUMENT:: The switch takes no arguments. (:NONE)
768
+ # REQUIRED_ARGUMENT:: The switch requires an argument. (:REQUIRED)
769
+ # OPTIONAL_ARGUMENT:: The switch requires an optional argument. (:OPTIONAL)
770
+ #
771
+ # Use like --switch=argument (long style) or -Xargument (short style). For
772
+ # short style, only portion matched to argument pattern is treated as
773
+ # argument.
774
+ #
775
+ ArgumentStyle = {}
776
+ NoArgument.each {|el| ArgumentStyle[el] = Switch::NoArgument}
777
+ RequiredArgument.each {|el| ArgumentStyle[el] = Switch::RequiredArgument}
778
+ OptionalArgument.each {|el| ArgumentStyle[el] = Switch::OptionalArgument}
779
+ ArgumentStyle.freeze
780
+
781
+ #
782
+ # Switches common used such as '--', and also provides default
783
+ # argument classes
784
+ #
785
+ DefaultList = List.new
786
+ DefaultList.short['-'] = Switch::NoArgument.new {}
787
+ DefaultList.long[''] = Switch::NoArgument.new {throw :terminate}
788
+
789
+
790
+ COMPSYS_HEADER = <<'XXX' # :nodoc:
791
+
792
+ typeset -A opt_args
793
+ local context state line
794
+
795
+ _arguments -s -S \
796
+ XXX
797
+
798
+ def compsys(to, name = File.basename($0)) # :nodoc:
799
+ to << "#compdef #{name}\n"
800
+ to << COMPSYS_HEADER
801
+ visit(:compsys, {}, {}) {|o, d|
802
+ to << %Q[ "#{o}[#{d.gsub(/[\"\[\]]/, '\\\\\&')}]" \\\n]
803
+ }
804
+ to << " '*:file:_files' && return 0\n"
805
+ end
806
+
807
+ #
808
+ # Default options for ARGV, which never appear in option summary.
809
+ #
810
+ Officious = {}
811
+
812
+ #
813
+ # --help
814
+ # Shows option summary.
815
+ #
816
+ Officious['help'] = proc do |parser|
817
+ Switch::NoArgument.new do |arg|
818
+ puts parser.help
819
+ exit
820
+ end
821
+ end
822
+
823
+ #
824
+ # --*-completion-bash=WORD
825
+ # Shows candidates for command line completion.
826
+ #
827
+ Officious['*-completion-bash'] = proc do |parser|
828
+ Switch::RequiredArgument.new do |arg|
829
+ puts parser.candidate(arg)
830
+ exit
831
+ end
832
+ end
833
+
834
+ #
835
+ # --*-completion-zsh[=NAME:FILE]
836
+ # Creates zsh completion file.
837
+ #
838
+ Officious['*-completion-zsh'] = proc do |parser|
839
+ Switch::OptionalArgument.new do |arg|
840
+ parser.compsys(STDOUT, arg)
841
+ exit
842
+ end
843
+ end
844
+
845
+ #
846
+ # --version
847
+ # Shows version string if Version is defined.
848
+ #
849
+ Officious['version'] = proc do |parser|
850
+ Switch::OptionalArgument.new do |pkg|
851
+ if pkg
852
+ begin
853
+ require 'optparse/version'
854
+ rescue LoadError
855
+ else
856
+ show_version(*pkg.split(/,/)) or
857
+ abort("#{parser.program_name}: no version found in package #{pkg}")
858
+ exit
859
+ end
860
+ end
861
+ v = parser.ver or abort("#{parser.program_name}: version unknown")
862
+ puts v
863
+ exit
864
+ end
865
+ end
866
+
867
+ # :startdoc:
868
+
869
+ #
870
+ # Class methods
871
+ #
872
+
873
+ #
874
+ # Initializes a new instance and evaluates the optional block in context
875
+ # of the instance. Arguments +args+ are passed to #new, see there for
876
+ # description of parameters.
877
+ #
878
+ # This method is *deprecated*, its behavior corresponds to the older #new
879
+ # method.
880
+ #
881
+ def self.with(*args, &block)
882
+ opts = new(*args)
883
+ opts.instance_eval(&block)
884
+ opts
885
+ end
886
+
887
+ #
888
+ # Returns an incremented value of +default+ according to +arg+.
889
+ #
890
+ def self.inc(arg, default = nil)
891
+ case arg
892
+ when Integer
893
+ arg.nonzero?
894
+ when nil
895
+ default.to_i + 1
896
+ end
897
+ end
898
+ def inc(*args)
899
+ self.class.inc(*args)
900
+ end
901
+
902
+ #
903
+ # Initializes the instance and yields itself if called with a block.
904
+ #
905
+ # +banner+:: Banner message.
906
+ # +width+:: Summary width.
907
+ # +indent+:: Summary indent.
908
+ #
909
+ def initialize(banner = nil, width = 32, indent = ' ' * 4)
910
+ @stack = [DefaultList, List.new, List.new]
911
+ @program_name = nil
912
+ @banner = banner
913
+ @summary_width = width
914
+ @summary_indent = indent
915
+ @default_argv = ARGV
916
+ add_officious
917
+ yield self if block_given?
918
+ end
919
+
920
+ def add_officious # :nodoc:
921
+ list = base()
922
+ Officious.each do |opt, block|
923
+ list.long[opt] ||= block.call(self)
924
+ end
925
+ end
926
+
927
+ #
928
+ # Terminates option parsing. Optional parameter +arg+ is a string pushed
929
+ # back to be the first non-option argument.
930
+ #
931
+ def terminate(arg = nil)
932
+ self.class.terminate(arg)
933
+ end
934
+ def self.terminate(arg = nil)
935
+ throw :terminate, arg
936
+ end
937
+
938
+ @stack = [DefaultList]
939
+ def self.top() DefaultList end
940
+
941
+ #
942
+ # Directs to accept specified class +t+. The argument string is passed to
943
+ # the block in which it should be converted to the desired class.
944
+ #
945
+ # +t+:: Argument class specifier, any object including Class.
946
+ # +pat+:: Pattern for argument, defaults to +t+ if it responds to match.
947
+ #
948
+ # accept(t, pat, &block)
949
+ #
950
+ def accept(*args, &blk) top.accept(*args, &blk) end
951
+ #
952
+ # See #accept.
953
+ #
954
+ def self.accept(*args, &blk) top.accept(*args, &blk) end
955
+
956
+ #
957
+ # Directs to reject specified class argument.
958
+ #
959
+ # +t+:: Argument class specifier, any object including Class.
960
+ #
961
+ # reject(t)
962
+ #
963
+ def reject(*args, &blk) top.reject(*args, &blk) end
964
+ #
965
+ # See #reject.
966
+ #
967
+ def self.reject(*args, &blk) top.reject(*args, &blk) end
968
+
969
+ #
970
+ # Instance methods
971
+ #
972
+
973
+ # Heading banner preceding summary.
974
+ attr_writer :banner
975
+
976
+ # Program name to be emitted in error message and default banner,
977
+ # defaults to $0.
978
+ attr_writer :program_name
979
+
980
+ # Width for option list portion of summary. Must be Numeric.
981
+ attr_accessor :summary_width
982
+
983
+ # Indentation for summary. Must be String (or have + String method).
984
+ attr_accessor :summary_indent
985
+
986
+ # Strings to be parsed in default.
987
+ attr_accessor :default_argv
988
+
989
+ #
990
+ # Heading banner preceding summary.
991
+ #
992
+ def banner
993
+ unless @banner
994
+ @banner = "Usage: #{program_name} [options]"
995
+ visit(:add_banner, @banner)
996
+ end
997
+ @banner
998
+ end
999
+
1000
+ #
1001
+ # Program name to be emitted in error message and default banner, defaults
1002
+ # to $0.
1003
+ #
1004
+ def program_name
1005
+ @program_name || File.basename($0, '.*')
1006
+ end
1007
+
1008
+ # for experimental cascading :-)
1009
+ alias set_banner banner=
1010
+ alias set_program_name program_name=
1011
+ alias set_summary_width summary_width=
1012
+ alias set_summary_indent summary_indent=
1013
+
1014
+ # Version
1015
+ attr_writer :version
1016
+ # Release code
1017
+ attr_writer :release
1018
+
1019
+ #
1020
+ # Version
1021
+ #
1022
+ def version
1023
+ @version || (defined?(::Version) && ::Version)
1024
+ end
1025
+
1026
+ #
1027
+ # Release code
1028
+ #
1029
+ def release
1030
+ @release || (defined?(::Release) && ::Release) || (defined?(::RELEASE) && ::RELEASE)
1031
+ end
1032
+
1033
+ #
1034
+ # Returns version string from program_name, version and release.
1035
+ #
1036
+ def ver
1037
+ if v = version
1038
+ str = "#{program_name} #{[v].join('.')}"
1039
+ str << " (#{v})" if v = release
1040
+ str
1041
+ end
1042
+ end
1043
+
1044
+ def warn(mesg = $!)
1045
+ super("#{program_name}: #{mesg}")
1046
+ end
1047
+
1048
+ def abort(mesg = $!)
1049
+ super("#{program_name}: #{mesg}")
1050
+ end
1051
+
1052
+ #
1053
+ # Subject of #on / #on_head, #accept / #reject
1054
+ #
1055
+ def top
1056
+ @stack[-1]
1057
+ end
1058
+
1059
+ #
1060
+ # Subject of #on_tail.
1061
+ #
1062
+ def base
1063
+ @stack[1]
1064
+ end
1065
+
1066
+ #
1067
+ # Pushes a new List.
1068
+ #
1069
+ def new
1070
+ @stack.push(List.new)
1071
+ if block_given?
1072
+ yield self
1073
+ else
1074
+ self
1075
+ end
1076
+ end
1077
+
1078
+ #
1079
+ # Removes the last List.
1080
+ #
1081
+ def remove
1082
+ @stack.pop
1083
+ end
1084
+
1085
+ #
1086
+ # Puts option summary into +to+ and returns +to+. Yields each line if
1087
+ # a block is given.
1088
+ #
1089
+ # +to+:: Output destination, which must have method <<. Defaults to [].
1090
+ # +width+:: Width of left side, defaults to @summary_width.
1091
+ # +max+:: Maximum length allowed for left side, defaults to +width+ - 1.
1092
+ # +indent+:: Indentation, defaults to @summary_indent.
1093
+ #
1094
+ def summarize(to = [], width = @summary_width, max = width - 1, indent = @summary_indent, &blk)
1095
+ blk ||= proc {|l| to << (l.index($/, -1) ? l : l + $/)}
1096
+ visit(:summarize, {}, {}, width, max, indent, &blk)
1097
+ to
1098
+ end
1099
+
1100
+ #
1101
+ # Returns option summary string.
1102
+ #
1103
+ def help; summarize("#{banner}".sub(/\n?\z/, "\n")) end
1104
+ alias to_s help
1105
+
1106
+ #
1107
+ # Returns option summary list.
1108
+ #
1109
+ def to_a; summarize("#{banner}".split(/^/)) end
1110
+
1111
+ #
1112
+ # Checks if an argument is given twice, in which case an ArgumentError is
1113
+ # raised. Called from OptionParser#switch only.
1114
+ #
1115
+ # +obj+:: New argument.
1116
+ # +prv+:: Previously specified argument.
1117
+ # +msg+:: Exception message.
1118
+ #
1119
+ def notwice(obj, prv, msg)
1120
+ unless !prv or prv == obj
1121
+ raise(ArgumentError, "argument #{msg} given twice: #{obj}",
1122
+ ParseError.filter_backtrace(caller(2)))
1123
+ end
1124
+ obj
1125
+ end
1126
+ private :notwice
1127
+
1128
+ SPLAT_PROC = proc {|*a| a.length <= 1 ? a.first : a} # :nodoc:
1129
+ #
1130
+ # Creates an OptionParser::Switch from the parameters. The parsed argument
1131
+ # value is passed to the given block, where it can be processed.
1132
+ #
1133
+ # See at the beginning of OptionParser for some full examples.
1134
+ #
1135
+ # +opts+ can include the following elements:
1136
+ #
1137
+ # [Argument style:]
1138
+ # One of the following:
1139
+ # :NONE, :REQUIRED, :OPTIONAL
1140
+ #
1141
+ # [Argument pattern:]
1142
+ # Acceptable option argument format, must be pre-defined with
1143
+ # OptionParser.accept or OptionParser#accept, or Regexp. This can appear
1144
+ # once or assigned as String if not present, otherwise causes an
1145
+ # ArgumentError. Examples:
1146
+ # Float, Time, Array
1147
+ #
1148
+ # [Possible argument values:]
1149
+ # Hash or Array.
1150
+ # [:text, :binary, :auto]
1151
+ # %w[iso-2022-jp shift_jis euc-jp utf8 binary]
1152
+ # { "jis" => "iso-2022-jp", "sjis" => "shift_jis" }
1153
+ #
1154
+ # [Long style switch:]
1155
+ # Specifies a long style switch which takes a mandatory, optional or no
1156
+ # argument. It's a string of the following form:
1157
+ # "--switch=MANDATORY" or "--switch MANDATORY"
1158
+ # "--switch[=OPTIONAL]"
1159
+ # "--switch"
1160
+ #
1161
+ # [Short style switch:]
1162
+ # Specifies short style switch which takes a mandatory, optional or no
1163
+ # argument. It's a string of the following form:
1164
+ # "-xMANDATORY"
1165
+ # "-x[OPTIONAL]"
1166
+ # "-x"
1167
+ # There is also a special form which matches character range (not full
1168
+ # set of regular expression):
1169
+ # "-[a-z]MANDATORY"
1170
+ # "-[a-z][OPTIONAL]"
1171
+ # "-[a-z]"
1172
+ #
1173
+ # [Argument style and description:]
1174
+ # Instead of specifying mandatory or optional arguments directly in the
1175
+ # switch parameter, this separate parameter can be used.
1176
+ # "=MANDATORY"
1177
+ # "=[OPTIONAL]"
1178
+ #
1179
+ # [Description:]
1180
+ # Description string for the option.
1181
+ # "Run verbosely"
1182
+ #
1183
+ # [Handler:]
1184
+ # Handler for the parsed argument value. Either give a block or pass a
1185
+ # Proc or Method as an argument.
1186
+ #
1187
+ def make_switch(opts, block = nil)
1188
+ short, long, nolong, style, pattern, conv, not_pattern, not_conv, not_style = [], [], []
1189
+ ldesc, sdesc, desc, arg = [], [], []
1190
+ default_style = Switch::NoArgument
1191
+ default_pattern = nil
1192
+ klass = nil
1193
+ q, a = nil
1194
+
1195
+ opts.each do |o|
1196
+ # argument class
1197
+ next if search(:atype, o) do |pat, c|
1198
+ klass = notwice(o, klass, 'type')
1199
+ if not_style and not_style != Switch::NoArgument
1200
+ not_pattern, not_conv = pat, c
1201
+ else
1202
+ default_pattern, conv = pat, c
1203
+ end
1204
+ end
1205
+
1206
+ # directly specified pattern(any object possible to match)
1207
+ if (!(String === o || Symbol === o)) and o.respond_to?(:match)
1208
+ pattern = notwice(o, pattern, 'pattern')
1209
+ if pattern.respond_to?(:convert)
1210
+ conv = pattern.method(:convert).to_proc
1211
+ else
1212
+ conv = SPLAT_PROC
1213
+ end
1214
+ next
1215
+ end
1216
+
1217
+ # anything others
1218
+ case o
1219
+ when Proc, Method
1220
+ block = notwice(o, block, 'block')
1221
+ when Array, Hash
1222
+ case pattern
1223
+ when CompletingHash
1224
+ when nil
1225
+ pattern = CompletingHash.new
1226
+ conv = pattern.method(:convert).to_proc if pattern.respond_to?(:convert)
1227
+ else
1228
+ raise ArgumentError, "argument pattern given twice"
1229
+ end
1230
+ o.each {|pat, *v| pattern[pat] = v.fetch(0) {pat}}
1231
+ when Module
1232
+ raise ArgumentError, "unsupported argument type: #{o}", ParseError.filter_backtrace(caller(4))
1233
+ when *ArgumentStyle.keys
1234
+ style = notwice(ArgumentStyle[o], style, 'style')
1235
+ when /^--no-([^\[\]=\s]*)(.+)?/
1236
+ q, a = $1, $2
1237
+ o = notwice(a ? Object : TrueClass, klass, 'type')
1238
+ not_pattern, not_conv = search(:atype, o) unless not_style
1239
+ not_style = (not_style || default_style).guess(arg = a) if a
1240
+ default_style = Switch::NoArgument
1241
+ default_pattern, conv = search(:atype, FalseClass) unless default_pattern
1242
+ ldesc << "--no-#{q}"
1243
+ long << 'no-' + (q = q.downcase)
1244
+ nolong << q
1245
+ when /^--\[no-\]([^\[\]=\s]*)(.+)?/
1246
+ q, a = $1, $2
1247
+ o = notwice(a ? Object : TrueClass, klass, 'type')
1248
+ if a
1249
+ default_style = default_style.guess(arg = a)
1250
+ default_pattern, conv = search(:atype, o) unless default_pattern
1251
+ end
1252
+ ldesc << "--[no-]#{q}"
1253
+ long << (o = q.downcase)
1254
+ not_pattern, not_conv = search(:atype, FalseClass) unless not_style
1255
+ not_style = Switch::NoArgument
1256
+ nolong << 'no-' + o
1257
+ when /^--([^\[\]=\s]*)(.+)?/
1258
+ q, a = $1, $2
1259
+ if a
1260
+ o = notwice(NilClass, klass, 'type')
1261
+ default_style = default_style.guess(arg = a)
1262
+ default_pattern, conv = search(:atype, o) unless default_pattern
1263
+ end
1264
+ ldesc << "--#{q}"
1265
+ long << (o = q.downcase)
1266
+ when /^-(\[\^?\]?(?:[^\\\]]|\\.)*\])(.+)?/
1267
+ q, a = $1, $2
1268
+ o = notwice(Object, klass, 'type')
1269
+ if a
1270
+ default_style = default_style.guess(arg = a)
1271
+ default_pattern, conv = search(:atype, o) unless default_pattern
1272
+ end
1273
+ sdesc << "-#{q}"
1274
+ short << Regexp.new(q)
1275
+ when /^-(.)(.+)?/
1276
+ q, a = $1, $2
1277
+ if a
1278
+ o = notwice(NilClass, klass, 'type')
1279
+ default_style = default_style.guess(arg = a)
1280
+ default_pattern, conv = search(:atype, o) unless default_pattern
1281
+ end
1282
+ sdesc << "-#{q}"
1283
+ short << q
1284
+ when /^=/
1285
+ style = notwice(default_style.guess(arg = o), style, 'style')
1286
+ default_pattern, conv = search(:atype, Object) unless default_pattern
1287
+ else
1288
+ desc.push(o)
1289
+ end
1290
+ end
1291
+
1292
+ default_pattern, conv = search(:atype, default_style.pattern) unless default_pattern
1293
+ if !(short.empty? and long.empty?)
1294
+ s = (style || default_style).new(pattern || default_pattern,
1295
+ conv, sdesc, ldesc, arg, desc, block)
1296
+ elsif !block
1297
+ if style or pattern
1298
+ raise ArgumentError, "no switch given", ParseError.filter_backtrace(caller)
1299
+ end
1300
+ s = desc
1301
+ else
1302
+ short << pattern
1303
+ s = (style || default_style).new(pattern,
1304
+ conv, nil, nil, arg, desc, block)
1305
+ end
1306
+ return s, short, long,
1307
+ (not_style.new(not_pattern, not_conv, sdesc, ldesc, nil, desc, block) if not_style),
1308
+ nolong
1309
+ end
1310
+
1311
+ def define(*opts, &block)
1312
+ top.append(*(sw = make_switch(opts, block)))
1313
+ sw[0]
1314
+ end
1315
+
1316
+ #
1317
+ # Add option switch and handler. See #make_switch for an explanation of
1318
+ # parameters.
1319
+ #
1320
+ def on(*opts, &block)
1321
+ define(*opts, &block)
1322
+ self
1323
+ end
1324
+ alias def_option define
1325
+
1326
+ def define_head(*opts, &block)
1327
+ top.prepend(*(sw = make_switch(opts, block)))
1328
+ sw[0]
1329
+ end
1330
+
1331
+ #
1332
+ # Add option switch like with #on, but at head of summary.
1333
+ #
1334
+ def on_head(*opts, &block)
1335
+ define_head(*opts, &block)
1336
+ self
1337
+ end
1338
+ alias def_head_option define_head
1339
+
1340
+ def define_tail(*opts, &block)
1341
+ base.append(*(sw = make_switch(opts, block)))
1342
+ sw[0]
1343
+ end
1344
+
1345
+ #
1346
+ # Add option switch like with #on, but at tail of summary.
1347
+ #
1348
+ def on_tail(*opts, &block)
1349
+ define_tail(*opts, &block)
1350
+ self
1351
+ end
1352
+ alias def_tail_option define_tail
1353
+
1354
+ #
1355
+ # Add separator in summary.
1356
+ #
1357
+ def separator(string)
1358
+ top.append(string, nil, nil)
1359
+ end
1360
+
1361
+ #
1362
+ # Parses command line arguments +argv+ in order. When a block is given,
1363
+ # each non-option argument is yielded.
1364
+ #
1365
+ # Returns the rest of +argv+ left unparsed.
1366
+ #
1367
+ def order(*argv, &block)
1368
+ argv = argv[0].dup if argv.size == 1 and Array === argv[0]
1369
+ order!(argv, &block)
1370
+ end
1371
+
1372
+ #
1373
+ # Same as #order, but removes switches destructively.
1374
+ # Non-option arguments remain in +argv+.
1375
+ #
1376
+ def order!(argv = default_argv, &nonopt)
1377
+ parse_in_order(argv, &nonopt)
1378
+ end
1379
+
1380
+ def parse_in_order(argv = default_argv, setter = nil, &nonopt) # :nodoc:
1381
+ opt, arg, val, rest = nil
1382
+ nonopt ||= proc {|a| throw :terminate, a}
1383
+ argv.unshift(arg) if arg = catch(:terminate) {
1384
+ while arg = argv.shift
1385
+ case arg
1386
+ # long option
1387
+ when /\A--([^=]*)(?:=(.*))?/m
1388
+ opt, rest = $1, $2
1389
+ begin
1390
+ sw, = complete(:long, opt, true)
1391
+ rescue ParseError
1392
+ raise $!.set_option(arg, true)
1393
+ end
1394
+ begin
1395
+ opt, cb, val = sw.parse(rest, argv) {|*exc| raise(*exc)}
1396
+ val = cb.call(val) if cb
1397
+ setter.call(sw.switch_name, val) if setter
1398
+ rescue ParseError
1399
+ raise $!.set_option(arg, rest)
1400
+ end
1401
+
1402
+ # short option
1403
+ when /\A-(.)((=).*|.+)?/m
1404
+ opt, has_arg, eq, val, rest = $1, $3, $3, $2, $2
1405
+ begin
1406
+ sw, = search(:short, opt)
1407
+ unless sw
1408
+ begin
1409
+ sw, = complete(:short, opt)
1410
+ # short option matched.
1411
+ val = arg.sub(/\A-/, '')
1412
+ has_arg = true
1413
+ rescue InvalidOption
1414
+ # if no short options match, try completion with long
1415
+ # options.
1416
+ sw, = complete(:long, opt)
1417
+ eq ||= !rest
1418
+ end
1419
+ end
1420
+ rescue ParseError
1421
+ raise $!.set_option(arg, true)
1422
+ end
1423
+ begin
1424
+ opt, cb, val = sw.parse(val, argv) {|*exc| raise(*exc) if eq}
1425
+ raise InvalidOption, arg if has_arg and !eq and arg == "-#{opt}"
1426
+ argv.unshift(opt) if opt and (!rest or (opt = opt.sub(/\A-*/, '-')) != '-')
1427
+ val = cb.call(val) if cb
1428
+ setter.call(sw.switch_name, val) if setter
1429
+ rescue ParseError
1430
+ raise $!.set_option(arg, arg.length > 2)
1431
+ end
1432
+
1433
+ # non-option argument
1434
+ else
1435
+ catch(:prune) do
1436
+ visit(:each_option) do |sw0|
1437
+ sw = sw0
1438
+ sw.block.call(arg) if Switch === sw and sw.match_nonswitch?(arg)
1439
+ end
1440
+ nonopt.call(arg)
1441
+ end
1442
+ end
1443
+ end
1444
+
1445
+ nil
1446
+ }
1447
+
1448
+ visit(:search, :short, nil) {|sw| sw.block.call(*argv) if !sw.pattern}
1449
+
1450
+ argv
1451
+ end
1452
+ private :parse_in_order
1453
+
1454
+ #
1455
+ # Parses command line arguments +argv+ in permutation mode and returns
1456
+ # list of non-option arguments.
1457
+ #
1458
+ def permute(*argv)
1459
+ argv = argv[0].dup if argv.size == 1 and Array === argv[0]
1460
+ permute!(argv)
1461
+ end
1462
+
1463
+ #
1464
+ # Same as #permute, but removes switches destructively.
1465
+ # Non-option arguments remain in +argv+.
1466
+ #
1467
+ def permute!(argv = default_argv)
1468
+ nonopts = []
1469
+ order!(argv, &nonopts.method(:<<))
1470
+ argv[0, 0] = nonopts
1471
+ argv
1472
+ end
1473
+
1474
+ #
1475
+ # Parses command line arguments +argv+ in order when environment variable
1476
+ # POSIXLY_CORRECT is set, and in permutation mode otherwise.
1477
+ #
1478
+ def parse(*argv)
1479
+ argv = argv[0].dup if argv.size == 1 and Array === argv[0]
1480
+ parse!(argv)
1481
+ end
1482
+
1483
+ #
1484
+ # Same as #parse, but removes switches destructively.
1485
+ # Non-option arguments remain in +argv+.
1486
+ #
1487
+ def parse!(argv = default_argv)
1488
+ if ENV.include?('POSIXLY_CORRECT')
1489
+ order!(argv)
1490
+ else
1491
+ permute!(argv)
1492
+ end
1493
+ end
1494
+
1495
+ #
1496
+ # Wrapper method for getopts.rb.
1497
+ #
1498
+ # params = ARGV.getopts("ab:", "foo", "bar:", "zot:Z;zot option)
1499
+ # # params[:a] = true # -a
1500
+ # # params[:b] = "1" # -b1
1501
+ # # params[:foo] = "1" # --foo
1502
+ # # params[:bar] = "x" # --bar x
1503
+ # # params[:zot] = "z" # --zot Z
1504
+ #
1505
+ def getopts(*args)
1506
+ argv = Array === args.first ? args.shift : default_argv
1507
+ single_options, *long_options = *args
1508
+
1509
+ result = {}
1510
+
1511
+ single_options.scan(/(.)(:)?/) do |opt, val|
1512
+ if val
1513
+ result[opt] = nil
1514
+ define("-#{opt} VAL")
1515
+ else
1516
+ result[opt] = false
1517
+ define("-#{opt}")
1518
+ end
1519
+ end if single_options
1520
+
1521
+ long_options.each do |arg|
1522
+ arg, desc = arg.split(';', 2)
1523
+ opt, val = arg.split(':', 2)
1524
+ if val
1525
+ result[opt] = val.empty? ? nil : val
1526
+ define("--#{opt}=#{result[opt] || "VAL"}", *[desc].compact)
1527
+ else
1528
+ result[opt] = false
1529
+ define("--#{opt}", *[desc].compact)
1530
+ end
1531
+ end
1532
+
1533
+ parse_in_order(argv, result.method(:[]=))
1534
+ result
1535
+ end
1536
+
1537
+ #
1538
+ # See #getopts.
1539
+ #
1540
+ def self.getopts(*args)
1541
+ new.getopts(*args)
1542
+ end
1543
+
1544
+ #
1545
+ # Traverses @stack, sending each element method +id+ with +args+ and
1546
+ # +block+.
1547
+ #
1548
+ def visit(id, *args, &block)
1549
+ @stack.reverse_each do |el|
1550
+ el.send(id, *args, &block)
1551
+ end
1552
+ nil
1553
+ end
1554
+ private :visit
1555
+
1556
+ #
1557
+ # Searches +key+ in @stack for +id+ hash and returns or yields the result.
1558
+ #
1559
+ def search(id, key)
1560
+ block_given = block_given?
1561
+ visit(:search, id, key) do |k|
1562
+ return block_given ? yield(k) : k
1563
+ end
1564
+ end
1565
+ private :search
1566
+
1567
+ #
1568
+ # Completes shortened long style option switch and returns pair of
1569
+ # canonical switch and switch descriptor OptionParser::Switch.
1570
+ #
1571
+ # +id+:: Searching table.
1572
+ # +opt+:: Searching key.
1573
+ # +icase+:: Search case insensitive if true.
1574
+ # +pat+:: Optional pattern for completion.
1575
+ #
1576
+ def complete(typ, opt, icase = false, *pat)
1577
+ if pat.empty?
1578
+ search(typ, opt) {|sw| return [sw, opt]} # exact match or...
1579
+ end
1580
+ raise AmbiguousOption, catch(:ambiguous) {
1581
+ visit(:complete, typ, opt, icase, *pat) {|o, *sw| return sw}
1582
+ raise InvalidOption, opt
1583
+ }
1584
+ end
1585
+ private :complete
1586
+
1587
+ def candidate(word)
1588
+ list = []
1589
+ case word
1590
+ when /\A--/
1591
+ word, arg = word.split(/=/, 2)
1592
+ argpat = Completion.regexp(arg, false) if arg and !arg.empty?
1593
+ long = true
1594
+ when /\A-(!-)/
1595
+ short = true
1596
+ when /\A-/
1597
+ long = short = true
1598
+ end
1599
+ pat = Completion.regexp(word, true)
1600
+ visit(:each_option) do |opt|
1601
+ next unless Switch === opt
1602
+ opts = (long ? opt.long : []) + (short ? opt.short : [])
1603
+ opts = Completion.candidate(word, true, pat, &opts.method(:each)).map(&:first) if pat
1604
+ if /\A=/ =~ opt.arg
1605
+ opts.map! {|sw| sw + "="}
1606
+ if arg and CompletingHash === opt.pattern
1607
+ if opts = opt.pattern.candidate(arg, false, argpat)
1608
+ opts.map!(&:last)
1609
+ end
1610
+ end
1611
+ end
1612
+ list.concat(opts)
1613
+ end
1614
+ list
1615
+ end
1616
+
1617
+ #
1618
+ # Loads options from file names as +filename+. Does nothing when the file
1619
+ # is not present. Returns whether successfully loaded.
1620
+ #
1621
+ # +filename+ defaults to basename of the program without suffix in a
1622
+ # directory ~/.options.
1623
+ #
1624
+ def load(filename = nil)
1625
+ begin
1626
+ filename ||= File.expand_path(File.basename($0, '.*'), '~/.options')
1627
+ rescue
1628
+ return false
1629
+ end
1630
+ begin
1631
+ parse(*IO.readlines(filename).each {|s| s.chomp!})
1632
+ true
1633
+ rescue Errno::ENOENT, Errno::ENOTDIR
1634
+ false
1635
+ end
1636
+ end
1637
+
1638
+ #
1639
+ # Parses environment variable +env+ or its uppercase with splitting like a
1640
+ # shell.
1641
+ #
1642
+ # +env+ defaults to the basename of the program.
1643
+ #
1644
+ def environment(env = File.basename($0, '.*'))
1645
+ env = ENV[env] || ENV[env.upcase] or return
1646
+ require 'shellwords'
1647
+ parse(*Shellwords.shellwords(env))
1648
+ end
1649
+
1650
+ #
1651
+ # Acceptable argument classes
1652
+ #
1653
+
1654
+ #
1655
+ # Any string and no conversion. This is fall-back.
1656
+ #
1657
+ accept(Object) {|s,|s or s.nil?}
1658
+
1659
+ accept(NilClass) {|s,|s}
1660
+
1661
+ #
1662
+ # Any non-empty string, and no conversion.
1663
+ #
1664
+ accept(String, /.+/m) {|s,*|s}
1665
+
1666
+ #
1667
+ # Ruby/C-like integer, octal for 0-7 sequence, binary for 0b, hexadecimal
1668
+ # for 0x, and decimal for others; with optional sign prefix. Converts to
1669
+ # Integer.
1670
+ #
1671
+ decimal = '\d+(?:_\d+)*'
1672
+ binary = 'b[01]+(?:_[01]+)*'
1673
+ hex = 'x[\da-f]+(?:_[\da-f]+)*'
1674
+ octal = "0(?:[0-7]+(?:_[0-7]+)*|#{binary}|#{hex})?"
1675
+ integer = "#{octal}|#{decimal}"
1676
+
1677
+ accept(Integer, %r"\A[-+]?(?:#{integer})\z"io) {|s,|
1678
+ begin
1679
+ Integer(s)
1680
+ rescue ArgumentError
1681
+ raise OptionParser::InvalidArgument, s
1682
+ end if s
1683
+ }
1684
+
1685
+ #
1686
+ # Float number format, and converts to Float.
1687
+ #
1688
+ float = "(?:#{decimal}(?:\\.(?:#{decimal})?)?|\\.#{decimal})(?:E[-+]?#{decimal})?"
1689
+ floatpat = %r"\A[-+]?#{float}\z"io
1690
+ accept(Float, floatpat) {|s,| s.to_f if s}
1691
+
1692
+ #
1693
+ # Generic numeric format, converts to Integer for integer format, Float
1694
+ # for float format, and Rational for rational format.
1695
+ #
1696
+ real = "[-+]?(?:#{octal}|#{float})"
1697
+ accept(Numeric, /\A(#{real})(?:\/(#{real}))?\z/io) {|s, d, n|
1698
+ if n
1699
+ Rational(d, n)
1700
+ elsif s
1701
+ eval(s)
1702
+ end
1703
+ }
1704
+
1705
+ #
1706
+ # Decimal integer format, to be converted to Integer.
1707
+ #
1708
+ DecimalInteger = /\A[-+]?#{decimal}\z/io
1709
+ accept(DecimalInteger, DecimalInteger) {|s,|
1710
+ begin
1711
+ Integer(s)
1712
+ rescue ArgumentError
1713
+ raise OptionParser::InvalidArgument, s
1714
+ end if s
1715
+ }
1716
+
1717
+ #
1718
+ # Ruby/C like octal/hexadecimal/binary integer format, to be converted to
1719
+ # Integer.
1720
+ #
1721
+ OctalInteger = /\A[-+]?(?:[0-7]+(?:_[0-7]+)*|0(?:#{binary}|#{hex}))\z/io
1722
+ accept(OctalInteger, OctalInteger) {|s,|
1723
+ begin
1724
+ Integer(s, 8)
1725
+ rescue ArgumentError
1726
+ raise OptionParser::InvalidArgument, s
1727
+ end if s
1728
+ }
1729
+
1730
+ #
1731
+ # Decimal integer/float number format, to be converted to Integer for
1732
+ # integer format, Float for float format.
1733
+ #
1734
+ DecimalNumeric = floatpat # decimal integer is allowed as float also.
1735
+ accept(DecimalNumeric, floatpat) {|s,|
1736
+ begin
1737
+ eval(s)
1738
+ rescue SyntaxError
1739
+ raise OptionParser::InvalidArgument, s
1740
+ end if s
1741
+ }
1742
+
1743
+ #
1744
+ # Boolean switch, which means whether it is present or not, whether it is
1745
+ # absent or not with prefix no-, or it takes an argument
1746
+ # yes/no/true/false/+/-.
1747
+ #
1748
+ yesno = CompletingHash.new
1749
+ %w[- no false].each {|el| yesno[el] = false}
1750
+ %w[+ yes true].each {|el| yesno[el] = true}
1751
+ yesno['nil'] = false # should be nil?
1752
+ accept(TrueClass, yesno) {|arg, val| val == nil or val}
1753
+ #
1754
+ # Similar to TrueClass, but defaults to false.
1755
+ #
1756
+ accept(FalseClass, yesno) {|arg, val| val != nil and val}
1757
+
1758
+ #
1759
+ # List of strings separated by ",".
1760
+ #
1761
+ accept(Array) do |s,|
1762
+ if s
1763
+ s = s.split(',').collect {|ss| ss unless ss.empty?}
1764
+ end
1765
+ s
1766
+ end
1767
+
1768
+ #
1769
+ # Regular expression with options.
1770
+ #
1771
+ accept(Regexp, %r"\A/((?:\\.|[^\\])*)/([[:alpha:]]+)?\z|.*") do |all, s, o|
1772
+ f = 0
1773
+ if o
1774
+ f |= Regexp::IGNORECASE if /i/ =~ o
1775
+ f |= Regexp::MULTILINE if /m/ =~ o
1776
+ f |= Regexp::EXTENDED if /x/ =~ o
1777
+ k = o.delete("imx")
1778
+ k = nil if k.empty?
1779
+ end
1780
+ Regexp.new(s || all, f, k)
1781
+ end
1782
+
1783
+ #
1784
+ # Exceptions
1785
+ #
1786
+
1787
+ #
1788
+ # Base class of exceptions from OptionParser.
1789
+ #
1790
+ class ParseError < RuntimeError
1791
+ # Reason which caused the error.
1792
+ Reason = 'parse error'.freeze
1793
+
1794
+ def initialize(*args)
1795
+ @args = args
1796
+ @reason = nil
1797
+ end
1798
+
1799
+ attr_reader :args
1800
+ attr_writer :reason
1801
+
1802
+ #
1803
+ # Pushes back erred argument(s) to +argv+.
1804
+ #
1805
+ def recover(argv)
1806
+ argv[0, 0] = @args
1807
+ argv
1808
+ end
1809
+
1810
+ def self.filter_backtrace(array)
1811
+ unless $DEBUG
1812
+ array.delete_if(&%r"\A#{Regexp.quote(__FILE__)}:"o.method(:=~))
1813
+ end
1814
+ array
1815
+ end
1816
+
1817
+ def set_backtrace(array)
1818
+ super(self.class.filter_backtrace(array))
1819
+ end
1820
+
1821
+ def set_option(opt, eq)
1822
+ if eq
1823
+ @args[0] = opt
1824
+ else
1825
+ @args.unshift(opt)
1826
+ end
1827
+ self
1828
+ end
1829
+
1830
+ #
1831
+ # Returns error reason. Override this for I18N.
1832
+ #
1833
+ def reason
1834
+ @reason || self.class::Reason
1835
+ end
1836
+
1837
+ def inspect
1838
+ "#<#{self.class}: #{args.join(' ')}>"
1839
+ end
1840
+
1841
+ #
1842
+ # Default stringizing method to emit standard error message.
1843
+ #
1844
+ def message
1845
+ reason + ': ' + args.join(' ')
1846
+ end
1847
+
1848
+ alias to_s message
1849
+ end
1850
+
1851
+ #
1852
+ # Raises when ambiguously completable string is encountered.
1853
+ #
1854
+ class AmbiguousOption < ParseError
1855
+ const_set(:Reason, 'ambiguous option'.freeze)
1856
+ end
1857
+
1858
+ #
1859
+ # Raises when there is an argument for a switch which takes no argument.
1860
+ #
1861
+ class NeedlessArgument < ParseError
1862
+ const_set(:Reason, 'needless argument'.freeze)
1863
+ end
1864
+
1865
+ #
1866
+ # Raises when a switch with mandatory argument has no argument.
1867
+ #
1868
+ class MissingArgument < ParseError
1869
+ const_set(:Reason, 'missing argument'.freeze)
1870
+ end
1871
+
1872
+ #
1873
+ # Raises when switch is undefined.
1874
+ #
1875
+ class InvalidOption < ParseError
1876
+ const_set(:Reason, 'invalid option'.freeze)
1877
+ end
1878
+
1879
+ #
1880
+ # Raises when the given argument does not match required format.
1881
+ #
1882
+ class InvalidArgument < ParseError
1883
+ const_set(:Reason, 'invalid argument'.freeze)
1884
+ end
1885
+
1886
+ #
1887
+ # Raises when the given argument word can't be completed uniquely.
1888
+ #
1889
+ class AmbiguousArgument < InvalidArgument
1890
+ const_set(:Reason, 'ambiguous argument'.freeze)
1891
+ end
1892
+
1893
+ #
1894
+ # Miscellaneous
1895
+ #
1896
+
1897
+ #
1898
+ # Extends command line arguments array (ARGV) to parse itself.
1899
+ #
1900
+ module Arguable
1901
+
1902
+ #
1903
+ # Sets OptionParser object, when +opt+ is +false+ or +nil+, methods
1904
+ # OptionParser::Arguable#options and OptionParser::Arguable#options= are
1905
+ # undefined. Thus, there is no ways to access the OptionParser object
1906
+ # via the receiver object.
1907
+ #
1908
+ def options=(opt)
1909
+ unless @optparse = opt
1910
+ class << self
1911
+ undef_method(:options)
1912
+ undef_method(:options=)
1913
+ end
1914
+ end
1915
+ end
1916
+
1917
+ #
1918
+ # Actual OptionParser object, automatically created if nonexistent.
1919
+ #
1920
+ # If called with a block, yields the OptionParser object and returns the
1921
+ # result of the block. If an OptionParser::ParseError exception occurs
1922
+ # in the block, it is rescued, a error message printed to STDERR and
1923
+ # +nil+ returned.
1924
+ #
1925
+ def options
1926
+ @optparse ||= OptionParser.new
1927
+ @optparse.default_argv = self
1928
+ block_given? or return @optparse
1929
+ begin
1930
+ yield @optparse
1931
+ rescue ParseError
1932
+ @optparse.warn $!
1933
+ nil
1934
+ end
1935
+ end
1936
+
1937
+ #
1938
+ # Parses +self+ destructively in order and returns +self+ containing the
1939
+ # rest arguments left unparsed.
1940
+ #
1941
+ def order!(&blk) options.order!(self, &blk) end
1942
+
1943
+ #
1944
+ # Parses +self+ destructively in permutation mode and returns +self+
1945
+ # containing the rest arguments left unparsed.
1946
+ #
1947
+ def permute!() options.permute!(self) end
1948
+
1949
+ #
1950
+ # Parses +self+ destructively and returns +self+ containing the
1951
+ # rest arguments left unparsed.
1952
+ #
1953
+ def parse!() options.parse!(self) end
1954
+
1955
+ #
1956
+ # Substitution of getopts is possible as follows. Also see
1957
+ # OptionParser#getopts.
1958
+ #
1959
+ # def getopts(*args)
1960
+ # ($OPT = ARGV.getopts(*args)).each do |opt, val|
1961
+ # eval "$OPT_#{opt.gsub(/[^A-Za-z0-9_]/, '_')} = val"
1962
+ # end
1963
+ # rescue OptionParser::ParseError
1964
+ # end
1965
+ #
1966
+ def getopts(*args)
1967
+ options.getopts(self, *args)
1968
+ end
1969
+
1970
+ #
1971
+ # Initializes instance variable.
1972
+ #
1973
+ def self.extend_object(obj)
1974
+ super
1975
+ obj.instance_eval {@optparse = nil}
1976
+ end
1977
+ def initialize(*args)
1978
+ super
1979
+ @optparse = nil
1980
+ end
1981
+ end
1982
+
1983
+ #
1984
+ # Acceptable argument classes. Now contains DecimalInteger, OctalInteger
1985
+ # and DecimalNumeric. See Acceptable argument classes (in source code).
1986
+ #
1987
+ module Acceptables
1988
+ const_set(:DecimalInteger, OptionParser::DecimalInteger)
1989
+ const_set(:OctalInteger, OptionParser::OctalInteger)
1990
+ const_set(:DecimalNumeric, OptionParser::DecimalNumeric)
1991
+ end
1992
+ end
1993
+
1994
+ # ARGV is arguable by OptionParser
1995
+ ARGV.extend(OptionParser::Arguable)
1996
+
1997
+ OptParse = OptionParser