rb2exe 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +22 -0
- data/README.md +18 -22
- data/bin/build +24 -0
- data/bin/decompress +17 -0
- data/bin/installer +19 -0
- data/bin/rb2exe +3 -0
- data/bin/rb2exe.rb +49 -0
- data/bin/traveling-ruby-2.2.2/bin.real/bundle +23 -0
- data/bin/traveling-ruby-2.2.2/bin.real/bundler +23 -0
- data/bin/traveling-ruby-2.2.2/bin.real/gem +25 -0
- data/bin/traveling-ruby-2.2.2/bin.real/irb +11 -0
- data/bin/traveling-ruby-2.2.2/bin.real/nokogiri +23 -0
- data/bin/traveling-ruby-2.2.2/bin.real/posix-spawn-benchmark +23 -0
- data/bin/traveling-ruby-2.2.2/bin.real/puma +23 -0
- data/bin/traveling-ruby-2.2.2/bin.real/pumactl +23 -0
- data/bin/traveling-ruby-2.2.2/bin.real/rackup +23 -0
- data/bin/traveling-ruby-2.2.2/bin.real/rake +33 -0
- data/bin/traveling-ruby-2.2.2/bin.real/redcarpet +23 -0
- data/bin/traveling-ruby-2.2.2/bin.real/redcloth +23 -0
- data/bin/traveling-ruby-2.2.2/bin.real/ruby +0 -0
- data/bin/traveling-ruby-2.2.2/bin.real/thin +23 -0
- data/bin/traveling-ruby-2.2.2/bin.real/unicorn +23 -0
- data/bin/traveling-ruby-2.2.2/bin.real/unicorn_rails +23 -0
- data/bin/traveling-ruby-2.2.2/bin/gem +6 -0
- data/bin/traveling-ruby-2.2.2/bin/irb +6 -0
- data/bin/traveling-ruby-2.2.2/bin/rake +6 -0
- data/bin/traveling-ruby-2.2.2/bin/ruby +6 -0
- data/bin/traveling-ruby-2.2.2/bin/ruby_environment +33 -0
- data/bin/traveling-ruby-2.2.2/info/GEM_EXTENSION_API_VERSION +1 -0
- data/bin/traveling-ruby-2.2.2/info/GEM_PLATFORM +1 -0
- data/bin/traveling-ruby-2.2.2/info/RUBY_ARCH +1 -0
- data/bin/traveling-ruby-2.2.2/info/RUBY_COMPAT_VERSION +1 -0
- data/bin/traveling-ruby-2.2.2/lib/ca-bundle.crt +13885 -0
- data/bin/traveling-ruby-2.2.2/lib/libffi.so.6 +0 -0
- data/bin/traveling-ruby-2.2.2/lib/libreadline.so.5 +0 -0
- data/bin/traveling-ruby-2.2.2/lib/libtermcap.so.2 +0 -0
- data/bin/traveling-ruby-2.2.2/lib/libz.so.1 +0 -0
- data/bin/traveling-ruby-2.2.2/lib/restore_environment.rb +17 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/English.rb +185 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/abbrev.rb +131 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/base64.rb +91 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/benchmark.rb +557 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/bigdecimal/jacobian.rb +87 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/bigdecimal/ludcmp.rb +88 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/bigdecimal/math.rb +231 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/bigdecimal/newton.rb +79 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/bigdecimal/util.rb +127 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cgi.rb +295 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cgi/cookie.rb +170 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cgi/core.rb +880 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cgi/html.rb +1034 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cgi/session.rb +531 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cgi/session/pstore.rb +100 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cgi/util.rb +194 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cmath.rb +400 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/csv.rb +2341 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/date.rb +60 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/debug.rb +1087 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/delegate.rb +417 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/digest.rb +108 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/digest/sha2.rb +107 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb.rb +2 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/acl.rb +232 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/drb.rb +1864 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/eq.rb +14 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/extserv.rb +43 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/extservm.rb +93 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/gw.rb +160 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/invokemethod.rb +34 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/observer.rb +25 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/ssl.rb +345 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/timeridconv.rb +101 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/unix.rb +117 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/e2mmap.rb +172 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/erb.rb +1022 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/expect.rb +71 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle.rb +55 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/closure.rb +48 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/cparser.rb +176 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/function.rb +17 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/import.rb +314 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/pack.rb +128 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/struct.rb +243 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/types.rb +71 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/value.rb +112 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fileutils.rb +1761 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/find.rb +88 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/forwardable.rb +289 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/getoptlong.rb +612 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/bigdecimal.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/continuation.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/date_core.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/digest.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/digest/bubblebabble.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/digest/md5.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/digest/rmd160.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/digest/sha1.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/digest/sha2.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/big5.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/cp949.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/emacs_mule.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/encdb.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/euc_jp.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/euc_kr.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/euc_tw.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/gb18030.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/gb2312.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/gbk.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_1.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_10.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_11.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_13.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_14.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_15.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_16.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_2.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_3.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_4.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_5.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_6.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_7.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_8.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_9.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/koi8_r.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/koi8_u.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/shift_jis.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/big5.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/chinese.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/emoji.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/emoji_iso2022_kddi.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/emoji_sjis_docomo.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/emoji_sjis_kddi.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/emoji_sjis_softbank.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/escape.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/gb18030.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/gbk.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/iso2022.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/japanese.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/japanese_euc.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/japanese_sjis.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/korean.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/single_byte.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/transdb.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/utf8_mac.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/utf_16_32.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/utf_16be.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/utf_16le.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/utf_32be.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/utf_32le.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/windows_1251.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/windows_31j.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/etc.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/fcntl.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/fiber.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/fiddle.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/io/console.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/io/nonblock.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/io/wait.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/json/ext/generator.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/json/ext/parser.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/mathn/complex.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/mathn/rational.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/nkf.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/objspace.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/openssl.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/pathname.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/psych.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/pty.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/racc/cparse.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/rbconfig.rb +279 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/rbconfig/sizeof.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/readline.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/ripper.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/socket.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/stringio.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/strscan.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/syslog.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/thread.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/zlib.so +0 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/io/console/size.rb +22 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ipaddr.rb +658 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb.rb +703 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/cmd/chws.rb +33 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/cmd/fork.rb +38 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/cmd/help.rb +41 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/cmd/load.rb +66 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/cmd/nop.rb +38 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/cmd/pushws.rb +40 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/cmd/subirb.rb +42 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/completion.rb +227 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/context.rb +419 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/change-ws.rb +45 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/history.rb +118 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/loader.rb +128 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/math-mode.rb +47 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/multi-irb.rb +265 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/save-history.rb +103 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/tracer.rb +71 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/use-loader.rb +73 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/workspaces.rb +66 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/extend-command.rb +308 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/frame.rb +80 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/help.rb +36 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/init.rb +304 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/input-method.rb +191 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/inspector.rb +131 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/lc/error.rb +31 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/lc/help-message +50 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/lc/ja/encoding_aliases.rb +10 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/lc/ja/error.rb +30 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/lc/ja/help-message +53 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/locale.rb +181 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/magic-file.rb +37 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/notifier.rb +231 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/output-method.rb +91 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ruby-lex.rb +1170 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ruby-token.rb +266 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/slex.rb +281 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/src_encoding.rb +4 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/version.rb +15 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/workspace.rb +114 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ws-for-case-2.rb +14 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/xmp.rb +169 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json.rb +62 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/bigdecimal.rb +28 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/complex.rb +22 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/core.rb +11 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/date.rb +34 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/date_time.rb +50 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/exception.rb +31 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/ostruct.rb +31 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/range.rb +29 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/rational.rb +22 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/regexp.rb +30 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/struct.rb +30 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/symbol.rb +25 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/time.rb +38 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/common.rb +484 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/ext.rb +21 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/generic_object.rb +70 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/version.rb +8 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/kconv.rb +282 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/logger.rb +737 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/mathn.rb +191 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/matrix.rb +2161 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/matrix/eigenvalue_decomposition.rb +882 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/matrix/lup_decomposition.rb +218 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb +2677 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/monitor.rb +300 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/mutex_m.rb +111 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/ftp.rb +1126 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http.rb +1559 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/backward.rb +25 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/exceptions.rb +25 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/generic_request.rb +332 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/header.rb +452 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/proxy_delta.rb +16 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/request.rb +20 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/requests.rb +122 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/response.rb +414 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/responses.rb +273 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/https.rb +22 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/imap.rb +3616 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/pop.rb +1021 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/protocol.rb +420 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/smtp.rb +1073 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/telnet.rb +763 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/observer.rb +203 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb +801 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/open3.rb +663 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl.rb +24 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl/bn.rb +45 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl/buffering.rb +457 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl/cipher.rb +65 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl/config.rb +472 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl/digest.rb +88 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl/ssl.rb +308 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl/x509.rb +182 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optionparser.rb +1 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optparse.rb +1997 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optparse/ac.rb +50 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optparse/date.rb +17 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optparse/shellwords.rb +6 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optparse/time.rb +10 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optparse/uri.rb +6 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optparse/version.rb +70 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ostruct.rb +286 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/pathname.rb +579 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/pp.rb +546 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/prettyprint.rb +554 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/prime.rb +487 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/profile.rb +10 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/profiler.rb +148 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/pstore.rb +484 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych.rb +498 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/class_loader.rb +101 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/coder.rb +94 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/core_ext.rb +35 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/deprecated.rb +85 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/exception.rb +13 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/handler.rb +249 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/handlers/document_stream.rb +22 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/handlers/recorder.rb +39 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/json/ruby_events.rb +19 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/json/stream.rb +16 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/json/tree_builder.rb +12 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/json/yaml_events.rb +29 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes.rb +77 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes/alias.rb +18 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes/document.rb +60 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes/mapping.rb +56 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes/node.rb +55 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes/scalar.rb +67 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes/sequence.rb +81 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes/stream.rb +37 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/omap.rb +4 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/parser.rb +51 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/scalar_scanner.rb +149 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/set.rb +4 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/stream.rb +37 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/streaming.rb +27 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/syntax_error.rb +21 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/tree_builder.rb +96 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/visitors.rb +6 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/visitors/depth_first.rb +26 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/visitors/emitter.rb +51 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/visitors/json_tree.rb +24 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/visitors/to_ruby.rb +389 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/visitors/visitor.rb +19 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/visitors/yaml_tree.rb +565 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/y.rb +9 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/racc/parser.rb +622 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake.rb +79 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/alt_system.rb +110 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb +790 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/backtrace.rb +23 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/clean.rb +76 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/cloneable.rb +16 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/contrib/compositepublisher.rb +21 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/contrib/ftptools.rb +137 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/contrib/publisher.rb +81 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/contrib/rubyforgepublisher.rb +18 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/contrib/sshpublisher.rb +61 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/contrib/sys.rb +4 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/cpu_counter.rb +125 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/default_loader.rb +14 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/dsl_definition.rb +201 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/early_time.rb +21 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/ext/core.rb +25 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/ext/module.rb +2 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/ext/pathname.rb +25 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/ext/string.rb +173 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/ext/time.rb +16 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/file_creation_task.rb +24 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/file_list.rb +428 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/file_task.rb +46 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/file_utils.rb +128 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/file_utils_ext.rb +144 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/gempackagetask.rb +4 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/invocation_chain.rb +56 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/invocation_exception_mixin.rb +16 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/late_time.rb +17 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/linked_list.rb +103 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/loaders/makefile.rb +40 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/multi_task.rb +13 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/name_space.rb +38 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/packagetask.rb +199 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/pathmap.rb +3 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/phony.rb +15 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/private_reader.rb +20 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/promise.rb +99 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/pseudo_status.rb +29 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/rake_module.rb +38 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/rake_test_loader.rb +22 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/rdoctask.rb +4 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/ruby182_test_unit_fix.rb +29 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/rule_recursion_overflow_error.rb +20 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/runtest.rb +27 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/scope.rb +42 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/task.rb +383 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/task_argument_error.rb +7 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/task_arguments.rb +98 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/task_manager.rb +310 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/tasklib.rb +24 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/testtask.rb +212 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/thread_history_display.rb +48 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/thread_pool.rb +164 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/trace_output.rb +22 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/version.rb +7 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/win32.rb +56 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rbconfig/datadir.rb +13 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc.rb +185 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/alias.rb +111 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/anon_class.rb +10 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/any_method.rb +316 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/attr.rb +175 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/class_module.rb +799 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/code_object.rb +429 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/code_objects.rb +5 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/comment.rb +229 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/constant.rb +186 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/context.rb +1211 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/context/section.rb +238 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/cross_reference.rb +183 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/encoding.rb +99 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/erb_partial.rb +18 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/erbio.rb +37 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/extend.rb +9 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/generator.rb +51 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ghost_method.rb +6 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/i18n.rb +9 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/i18n/locale.rb +101 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/i18n/text.rb +125 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/include.rb +9 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/known_classes.rb +72 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markdown.rb +16133 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markdown/entities.rb +2131 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markdown/literals_1_9.rb +420 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup.rb +869 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/attr_changer.rb +22 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/attr_span.rb +29 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/attribute_manager.rb +343 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/attributes.rb +70 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/blank_line.rb +27 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/block_quote.rb +14 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/document.rb +164 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/formatter.rb +264 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/formatter_test_case.rb +767 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/hard_break.rb +31 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/heading.rb +78 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/include.rb +42 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/indented_paragraph.rb +47 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/inline.rb +1 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/list.rb +101 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/list_item.rb +99 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/paragraph.rb +28 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/parser.rb +558 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/pre_process.rb +293 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/raw.rb +69 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/rule.rb +20 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/special.rb +40 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/text_formatter_test_case.rb +114 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_ansi.rb +93 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_bs.rb +78 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_html.rb +398 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_html_crossref.rb +160 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_html_snippet.rb +284 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_joined_paragraph.rb +71 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_label.rb +74 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_markdown.rb +191 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_rdoc.rb +333 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_table_of_contents.rb +87 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_test.rb +69 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_tt_only.rb +120 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/verbatim.rb +83 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/meta_method.rb +6 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/method_attr.rb +418 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/mixin.rb +120 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/normal_class.rb +92 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/normal_module.rb +73 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/options.rb +1251 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser.rb +310 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/c.rb +1229 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/changelog.rb +198 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/markdown.rb +23 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/rd.rb +22 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/ruby.rb +2160 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/ruby_tools.rb +167 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/simple.rb +61 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/text.rb +11 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/rd.rb +99 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/rd/block_parser.rb +1055 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/rd/inline.rb +71 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/rd/inline_parser.rb +1207 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/rdoc.rb +570 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/require.rb +51 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ri.rb +20 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ri/driver.rb +1497 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ri/formatter.rb +5 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ri/paths.rb +187 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ri/store.rb +6 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ri/task.rb +71 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ruby_lex.rb +1377 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ruby_token.rb +460 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/rubygems_hook.rb +253 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/servlet.rb +441 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/single_class.rb +25 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/stats.rb +461 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/stats/normal.rb +59 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/stats/quiet.rb +59 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/stats/verbose.rb +45 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/store.rb +979 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/task.rb +330 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/test_case.rb +217 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/text.rb +324 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/token_stream.rb +95 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/tom_doc.rb +257 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/top_level.rb +282 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/resolv-replace.rb +74 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/resolv.rb +2836 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/attlistdecl.rb +62 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/attribute.rb +191 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/cdata.rb +67 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/child.rb +96 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/comment.rb +79 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/doctype.rb +269 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/document.rb +290 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/dtd/attlistdecl.rb +10 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/dtd/dtd.rb +46 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/dtd/elementdecl.rb +17 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/dtd/entitydecl.rb +56 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/dtd/notationdecl.rb +39 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/element.rb +1240 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/encoding.rb +50 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/entity.rb +173 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/formatters/default.rb +111 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/formatters/pretty.rb +141 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/formatters/transitive.rb +57 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/functions.rb +394 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/instruction.rb +70 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/light/node.rb +195 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/namespace.rb +47 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/node.rb +75 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/output.rb +29 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parent.rb +165 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parseexception.rb +51 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/baseparser.rb +532 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/lightparser.rb +58 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/pullparser.rb +196 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/sax2parser.rb +272 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/streamparser.rb +52 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/treeparser.rb +100 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/ultralightparser.rb +56 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/xpathparser.rb +656 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/quickpath.rb +265 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/rexml.rb +31 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/sax2listener.rb +97 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/security.rb +27 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/source.rb +296 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/streamlistener.rb +92 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/syncenumerator.rb +32 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/text.rb +425 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/undefinednamespaceexception.rb +8 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/validation/relaxng.rb +538 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/validation/validation.rb +143 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/validation/validationexception.rb +9 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/xmldecl.rb +115 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/xmltokens.rb +84 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/xpath.rb +80 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/xpath_parser.rb +703 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rinda/rinda.rb +327 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rinda/ring.rb +480 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rinda/tuplespace.rb +642 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ripper.rb +73 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ripper/core.rb +70 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ripper/filter.rb +77 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ripper/lexer.rb +186 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ripper/sexp.rb +118 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss.rb +91 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/0.9.rb +461 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/1.0.rb +484 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/2.0.rb +142 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/atom.rb +839 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/content.rb +33 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/content/1.0.rb +9 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/content/2.0.rb +11 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/converter.rb +170 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/dublincore.rb +163 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/dublincore/1.0.rb +12 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/dublincore/2.0.rb +12 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/dublincore/atom.rb +16 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/image.rb +197 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/itunes.rb +412 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker.rb +78 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/0.9.rb +508 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/1.0.rb +435 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/2.0.rb +223 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/atom.rb +172 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/base.rb +944 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/content.rb +21 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/dublincore.rb +121 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/entry.rb +163 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/feed.rb +426 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/image.rb +111 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/itunes.rb +242 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/slash.rb +33 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/syndication.rb +18 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/taxonomy.rb +118 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/trackback.rb +61 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/parser.rb +570 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/rexmlparser.rb +49 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/rss.rb +1352 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/slash.rb +51 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/syndication.rb +68 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/taxonomy.rb +147 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/trackback.rb +290 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/utils.rb +199 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/xml-stylesheet.rb +105 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/xml.rb +71 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/xmlparser.rb +94 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/xmlscanner.rb +121 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems.rb +1245 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/available_set.rb +164 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/basic_specification.rb +290 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/command.rb +582 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/command_manager.rb +218 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/build_command.rb +60 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/cert_command.rb +276 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/check_command.rb +93 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/cleanup_command.rb +165 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/contents_command.rb +190 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/dependency_command.rb +207 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/environment_command.rb +158 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/fetch_command.rb +77 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/generate_index_command.rb +84 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/help_command.rb +384 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/install_command.rb +347 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/list_command.rb +40 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/lock_command.rb +110 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/mirror_command.rb +25 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/open_command.rb +74 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/outdated_command.rb +32 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/owner_command.rb +99 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/pristine_command.rb +165 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/push_command.rb +98 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/query_command.rb +343 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/rdoc_command.rb +96 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/search_command.rb +40 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/server_command.rb +86 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/setup_command.rb +483 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/sources_command.rb +210 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/specification_command.rb +145 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/stale_command.rb +38 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/uninstall_command.rb +164 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/unpack_command.rb +182 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/update_command.rb +277 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/which_command.rb +90 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/yank_command.rb +107 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/compatibility.rb +59 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/config_file.rb +483 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_gem.rb +73 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb +139 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/defaults.rb +177 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/dependency.rb +334 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/dependency_installer.rb +480 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/dependency_list.rb +240 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/deprecate.rb +70 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/doctor.rb +131 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/errors.rb +137 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/exceptions.rb +270 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ext.rb +18 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ext/build_error.rb +6 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ext/builder.rb +218 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ext/cmake_builder.rb +16 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ext/configure_builder.rb +23 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ext/ext_conf_builder.rb +78 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ext/rake_builder.rb +36 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/gem_runner.rb +81 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/gemcutter_utilities.rb +154 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/indexer.rb +498 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/install_default_message.rb +12 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/install_message.rb +12 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/install_update_options.rb +186 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/installer.rb +819 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/installer_test_case.rb +193 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/local_remote_options.rb +148 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/mock_gem_ui.rb +88 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/name_tuple.rb +123 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package.rb +613 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/digest_io.rb +64 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/file_source.rb +33 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/io_source.rb +45 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/old.rb +178 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/source.rb +3 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/tar_header.rb +229 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/tar_reader.rb +123 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/tar_reader/entry.rb +147 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/tar_test_case.rb +137 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/tar_writer.rb +326 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package_task.rb +128 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/path_support.rb +87 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/platform.rb +204 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/psych_additions.rb +9 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/psych_tree.rb +31 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/rdoc.rb +335 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/remote_fetcher.rb +398 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/request.rb +244 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/request/connection_pools.rb +83 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/request/http_pool.rb +47 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/request/https_pool.rb +10 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/request_set.rb +413 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/request_set/gem_dependency_api.rb +801 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/request_set/lockfile.rb +650 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/requirement.rb +273 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver.rb +485 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/activation_request.rb +172 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/api_set.rb +125 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/api_specification.rb +85 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/best_set.rb +78 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/composed_set.rb +66 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/conflict.rb +160 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/current_set.rb +13 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/dependency_request.rb +116 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/git_set.rb +122 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/git_specification.rb +59 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/index_set.rb +80 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/index_specification.rb +69 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/installed_specification.rb +58 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/installer_set.rb +224 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/local_specification.rb +41 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/lock_set.rb +84 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/lock_specification.rb +84 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/requirement_list.rb +81 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/set.rb +56 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/spec_specification.rb +56 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/specification.rb +110 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/stats.rb +44 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/vendor_set.rb +87 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/vendor_specification.rb +24 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/security.rb +595 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/security/policies.rb +115 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/security/policy.rb +295 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/security/signer.rb +154 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/security/trust_dir.rb +118 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/server.rb +868 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source.rb +234 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source/git.rb +240 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source/installed.rb +40 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source/local.rb +129 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source/lock.rb +48 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source/specific_file.rb +72 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source/vendor.rb +27 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source_list.rb +149 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source_local.rb +5 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source_specific_file.rb +4 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/spec_fetcher.rb +269 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/specification.rb +2800 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ssl_certs/AddTrustExternalCARoot-2048.pem +25 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ssl_certs/AddTrustExternalCARoot.pem +32 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ssl_certs/Class3PublicPrimaryCertificationAuthority.pem +14 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ssl_certs/DigiCertHighAssuranceEVRootCA.pem +23 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ssl_certs/EntrustnetSecureServerCertificationAuthority.pem +28 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ssl_certs/GeoTrustGlobalCA.pem +20 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/stub_specification.rb +196 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/syck_hack.rb +76 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/test_case.rb +1430 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/test_utilities.rb +383 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/text.rb +75 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/uninstaller.rb +345 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/uri_formatter.rb +49 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/user_interaction.rb +711 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util.rb +134 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util/list.rb +48 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util/stringio.rb +34 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/validator.rb +165 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/version.rb +356 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/version_option.rb +71 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/scanf.rb +776 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/securerandom.rb +293 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/set.rb +787 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell.rb +458 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell/builtin-command.rb +146 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell/command-processor.rb +667 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell/error.rb +25 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell/filter.rb +137 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell/process-controller.rb +310 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell/system-command.rb +158 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell/version.rb +15 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shellwords.rb +215 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/singleton.rb +172 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/socket.rb +871 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/sync.rb +328 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/syslog/logger.rb +208 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/tempfile.rb +367 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/thwait.rb +140 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/time.rb +676 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/timeout.rb +130 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/tmpdir.rb +139 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/tracer.rb +286 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/tsort.rb +450 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ubygems.rb +10 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/un.rb +375 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/unicode_normalize.rb +78 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/unicode_normalize/normalize.rb +168 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/unicode_normalize/tables.rb +1163 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri.rb +111 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/common.rb +720 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/ftp.rb +266 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/generic.rb +1557 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/http.rb +106 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/https.rb +22 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/ldap.rb +260 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/ldaps.rb +20 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/mailto.rb +286 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/rfc2396_parser.rb +543 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/rfc3986_parser.rb +124 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/weakref.rb +106 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick.rb +226 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/accesslog.rb +158 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/cgi.rb +308 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/compat.rb +35 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/config.rb +151 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/cookie.rb +171 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/htmlutils.rb +29 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth.rb +95 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth/authenticator.rb +116 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth/basicauth.rb +108 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth/digestauth.rb +408 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth/htdigest.rb +131 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth/htgroup.rb +93 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth/htpasswd.rb +124 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth/userdb.rb +52 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpproxy.rb +337 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httprequest.rb +584 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpresponse.rb +466 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/https.rb +86 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb +278 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpservlet.rb +22 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpservlet/abstract.rb +153 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpservlet/cgi_runner.rb +46 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpservlet/cgihandler.rb +120 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpservlet/erbhandler.rb +87 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpservlet/filehandler.rb +521 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpservlet/prochandler.rb +46 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpstatus.rb +196 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httputils.rb +509 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpversion.rb +75 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/log.rb +155 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/server.rb +365 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/ssl.rb +196 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/utils.rb +230 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/version.rb +17 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc.rb +301 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/base64.rb +62 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/client.rb +614 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/config.rb +43 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/create.rb +286 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/datetime.rb +129 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/marshal.rb +66 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/parser.rb +870 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/server.rb +707 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/utils.rb +171 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/yaml.rb +59 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/yaml/dbm.rb +279 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/yaml/store.rb +81 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/build_info/charlock_holmes-0.7.3.info +1 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/build_info/eventmachine-1.0.4.info +1 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/build_info/eventmachine-1.0.6.info +1 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/build_info/puma-2.11.2.info +1 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/build_info/rugged-0.21.4.info +1 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/build_info/rugged-0.22.0b5.info +1 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/bin/bundle +21 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/bin/bundle_ruby +56 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/bin/bundler +21 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/bundler.gemspec +32 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler.rb +446 -0
- 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
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/capistrano.rb +16 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli.rb +407 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/constants.rb +5 -0
- 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
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/definition.rb +628 -0
- 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
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/dependency.rb +110 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/deployment.rb +59 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/deprecate.rb +15 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/dsl.rb +331 -0
- 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
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/env.rb +75 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/environment.rb +42 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/fetcher.rb +423 -0
- 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
- 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
- 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
- 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
- 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
- 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
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/graph.rb +169 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/index.rb +197 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/injector.rb +64 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/installer.rb +339 -0
- 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
- 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
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/man/bundle +119 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/resolver.rb +334 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/retry.rb +60 -0
- 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
- 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
- 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
- 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
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/runtime.rb +289 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/settings.rb +208 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/setup.rb +24 -0
- 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
- 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
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source.rb +46 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ui.rb +7 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/version.rb +6 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vlad.rb +11 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/worker.rb +73 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/bundler-1.9.9.gemspec +47 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/default/bigdecimal-1.2.6.gemspec +20 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/default/io-console-0.4.3.gemspec +23 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/default/json-1.8.1.gemspec +7 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/default/psych-2.0.8.gemspec +25 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/default/rake-10.4.2.gemspec +7 -0
- data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/default/rdoc-4.2.0.gemspec +7 -0
- data/bin/traveling-ruby-2.2.2/test +1 -0
- data/bin/traveling-ruby-2.2.2/test-rake +1 -0
- data/lib/rb2exe/version.rb +1 -1
- data/rb2exe.gemspec +0 -1
- metadata +1003 -16
- 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
|