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,107 @@
|
|
1
|
+
#--
|
2
|
+
# sha2.rb - defines Digest::SHA2 class which wraps up the SHA256,
|
3
|
+
# SHA384, and SHA512 classes.
|
4
|
+
#++
|
5
|
+
# Copyright (c) 2006 Akinori MUSHA <knu@iDaemons.org>
|
6
|
+
#
|
7
|
+
# All rights reserved. You can redistribute and/or modify it under the same
|
8
|
+
# terms as Ruby.
|
9
|
+
#
|
10
|
+
# $Id: sha2.rb 35293 2012-04-10 22:41:04Z drbrain $
|
11
|
+
|
12
|
+
require 'digest'
|
13
|
+
require 'digest/sha2.so'
|
14
|
+
|
15
|
+
module Digest
|
16
|
+
#
|
17
|
+
# A meta digest provider class for SHA256, SHA384 and SHA512.
|
18
|
+
#
|
19
|
+
class SHA2 < Digest::Class
|
20
|
+
# call-seq:
|
21
|
+
# Digest::SHA2.new(bitlen = 256) -> digest_obj
|
22
|
+
#
|
23
|
+
# Creates a new SHA2 hash object with a given bit length.
|
24
|
+
#
|
25
|
+
# Valid bit lengths are 256, 384 and 512.
|
26
|
+
def initialize(bitlen = 256)
|
27
|
+
case bitlen
|
28
|
+
when 256
|
29
|
+
@sha2 = Digest::SHA256.new
|
30
|
+
when 384
|
31
|
+
@sha2 = Digest::SHA384.new
|
32
|
+
when 512
|
33
|
+
@sha2 = Digest::SHA512.new
|
34
|
+
else
|
35
|
+
raise ArgumentError, "unsupported bit length: %s" % bitlen.inspect
|
36
|
+
end
|
37
|
+
@bitlen = bitlen
|
38
|
+
end
|
39
|
+
|
40
|
+
# call-seq:
|
41
|
+
# digest_obj.reset -> digest_obj
|
42
|
+
#
|
43
|
+
# Resets the digest to the initial state and returns self.
|
44
|
+
def reset
|
45
|
+
@sha2.reset
|
46
|
+
self
|
47
|
+
end
|
48
|
+
|
49
|
+
# call-seq:
|
50
|
+
# digest_obj.update(string) -> digest_obj
|
51
|
+
# digest_obj << string -> digest_obj
|
52
|
+
#
|
53
|
+
# Updates the digest using a given _string_ and returns self.
|
54
|
+
def update(str)
|
55
|
+
@sha2.update(str)
|
56
|
+
self
|
57
|
+
end
|
58
|
+
alias << update
|
59
|
+
|
60
|
+
def finish # :nodoc:
|
61
|
+
@sha2.digest!
|
62
|
+
end
|
63
|
+
private :finish
|
64
|
+
|
65
|
+
|
66
|
+
# call-seq:
|
67
|
+
# digest_obj.block_length -> Integer
|
68
|
+
#
|
69
|
+
# Returns the block length of the digest in bytes.
|
70
|
+
#
|
71
|
+
# Digest::SHA256.new.block_length * 8
|
72
|
+
# # => 512
|
73
|
+
# Digest::SHA384.new.block_length * 8
|
74
|
+
# # => 1024
|
75
|
+
# Digest::SHA512.new.block_length * 8
|
76
|
+
# # => 1024
|
77
|
+
def block_length
|
78
|
+
@sha2.block_length
|
79
|
+
end
|
80
|
+
|
81
|
+
# call-seq:
|
82
|
+
# digest_obj.digest_length -> Integer
|
83
|
+
#
|
84
|
+
# Returns the length of the hash value of the digest in bytes.
|
85
|
+
#
|
86
|
+
# Digest::SHA256.new.digest_length * 8
|
87
|
+
# # => 256
|
88
|
+
# Digest::SHA384.new.digest_length * 8
|
89
|
+
# # => 384
|
90
|
+
# Digest::SHA512.new.digest_length * 8
|
91
|
+
# # => 512
|
92
|
+
#
|
93
|
+
# For example, digests produced by Digest::SHA256 will always be 32 bytes
|
94
|
+
# (256 bits) in size.
|
95
|
+
def digest_length
|
96
|
+
@sha2.digest_length
|
97
|
+
end
|
98
|
+
|
99
|
+
def initialize_copy(other) # :nodoc:
|
100
|
+
@sha2 = other.instance_eval { @sha2.clone }
|
101
|
+
end
|
102
|
+
|
103
|
+
def inspect # :nodoc:
|
104
|
+
"#<%s:%d %s>" % [self.class.name, @bitlen, hexdigest]
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
@@ -0,0 +1,232 @@
|
|
1
|
+
# Copyright (c) 2000,2002,2003 Masatoshi SEKI
|
2
|
+
#
|
3
|
+
# acl.rb is copyrighted free software by Masatoshi SEKI.
|
4
|
+
# You can redistribute it and/or modify it under the same terms as Ruby.
|
5
|
+
|
6
|
+
require 'ipaddr'
|
7
|
+
|
8
|
+
##
|
9
|
+
# Simple Access Control Lists.
|
10
|
+
#
|
11
|
+
# Access control lists are composed of "allow" and "deny" halves to control
|
12
|
+
# access. Use "all" or "*" to match any address. To match a specific address
|
13
|
+
# use any address or address mask that IPAddr can understand.
|
14
|
+
#
|
15
|
+
# Example:
|
16
|
+
#
|
17
|
+
# list = %w[
|
18
|
+
# deny all
|
19
|
+
# allow 192.168.1.1
|
20
|
+
# allow ::ffff:192.168.1.2
|
21
|
+
# allow 192.168.1.3
|
22
|
+
# ]
|
23
|
+
#
|
24
|
+
# # From Socket#peeraddr, see also ACL#allow_socket?
|
25
|
+
# addr = ["AF_INET", 10, "lc630", "192.168.1.3"]
|
26
|
+
#
|
27
|
+
# acl = ACL.new
|
28
|
+
# p acl.allow_addr?(addr) # => true
|
29
|
+
#
|
30
|
+
# acl = ACL.new(list, ACL::DENY_ALLOW)
|
31
|
+
# p acl.allow_addr?(addr) # => true
|
32
|
+
|
33
|
+
class ACL
|
34
|
+
|
35
|
+
##
|
36
|
+
# The current version of ACL
|
37
|
+
|
38
|
+
VERSION=["2.0.0"]
|
39
|
+
|
40
|
+
##
|
41
|
+
# An entry in an ACL
|
42
|
+
|
43
|
+
class ACLEntry
|
44
|
+
|
45
|
+
##
|
46
|
+
# Creates a new entry using +str+.
|
47
|
+
#
|
48
|
+
# +str+ may be "*" or "all" to match any address, an IP address string
|
49
|
+
# to match a specific address, an IP address mask per IPAddr, or one
|
50
|
+
# containing "*" to match part of an IPv4 address.
|
51
|
+
|
52
|
+
def initialize(str)
|
53
|
+
if str == '*' or str == 'all'
|
54
|
+
@pat = [:all]
|
55
|
+
elsif str.include?('*')
|
56
|
+
@pat = [:name, dot_pat(str)]
|
57
|
+
else
|
58
|
+
begin
|
59
|
+
@pat = [:ip, IPAddr.new(str)]
|
60
|
+
rescue ArgumentError
|
61
|
+
@pat = [:name, dot_pat(str)]
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
private
|
67
|
+
|
68
|
+
##
|
69
|
+
# Creates a regular expression to match IPv4 addresses
|
70
|
+
|
71
|
+
def dot_pat_str(str)
|
72
|
+
list = str.split('.').collect { |s|
|
73
|
+
(s == '*') ? '.+' : s
|
74
|
+
}
|
75
|
+
list.join("\\.")
|
76
|
+
end
|
77
|
+
|
78
|
+
private
|
79
|
+
|
80
|
+
##
|
81
|
+
# Creates a Regexp to match an address.
|
82
|
+
|
83
|
+
def dot_pat(str)
|
84
|
+
exp = "^" + dot_pat_str(str) + "$"
|
85
|
+
Regexp.new(exp)
|
86
|
+
end
|
87
|
+
|
88
|
+
public
|
89
|
+
|
90
|
+
##
|
91
|
+
# Matches +addr+ against this entry.
|
92
|
+
|
93
|
+
def match(addr)
|
94
|
+
case @pat[0]
|
95
|
+
when :all
|
96
|
+
true
|
97
|
+
when :ip
|
98
|
+
begin
|
99
|
+
ipaddr = IPAddr.new(addr[3])
|
100
|
+
ipaddr = ipaddr.ipv4_mapped if @pat[1].ipv6? && ipaddr.ipv4?
|
101
|
+
rescue ArgumentError
|
102
|
+
return false
|
103
|
+
end
|
104
|
+
(@pat[1].include?(ipaddr)) ? true : false
|
105
|
+
when :name
|
106
|
+
(@pat[1] =~ addr[2]) ? true : false
|
107
|
+
else
|
108
|
+
false
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
##
|
114
|
+
# A list of ACLEntry objects. Used to implement the allow and deny halves
|
115
|
+
# of an ACL
|
116
|
+
|
117
|
+
class ACLList
|
118
|
+
|
119
|
+
##
|
120
|
+
# Creates an empty ACLList
|
121
|
+
|
122
|
+
def initialize
|
123
|
+
@list = []
|
124
|
+
end
|
125
|
+
|
126
|
+
public
|
127
|
+
|
128
|
+
##
|
129
|
+
# Matches +addr+ against each ACLEntry in this list.
|
130
|
+
|
131
|
+
def match(addr)
|
132
|
+
@list.each do |e|
|
133
|
+
return true if e.match(addr)
|
134
|
+
end
|
135
|
+
false
|
136
|
+
end
|
137
|
+
|
138
|
+
public
|
139
|
+
|
140
|
+
##
|
141
|
+
# Adds +str+ as an ACLEntry in this list
|
142
|
+
|
143
|
+
def add(str)
|
144
|
+
@list.push(ACLEntry.new(str))
|
145
|
+
end
|
146
|
+
|
147
|
+
end
|
148
|
+
|
149
|
+
##
|
150
|
+
# Default to deny
|
151
|
+
|
152
|
+
DENY_ALLOW = 0
|
153
|
+
|
154
|
+
##
|
155
|
+
# Default to allow
|
156
|
+
|
157
|
+
ALLOW_DENY = 1
|
158
|
+
|
159
|
+
##
|
160
|
+
# Creates a new ACL from +list+ with an evaluation +order+ of DENY_ALLOW or
|
161
|
+
# ALLOW_DENY.
|
162
|
+
#
|
163
|
+
# An ACL +list+ is an Array of "allow" or "deny" and an address or address
|
164
|
+
# mask or "all" or "*" to match any address:
|
165
|
+
#
|
166
|
+
# %w[
|
167
|
+
# deny all
|
168
|
+
# allow 192.0.2.2
|
169
|
+
# allow 192.0.2.128/26
|
170
|
+
# ]
|
171
|
+
|
172
|
+
def initialize(list=nil, order = DENY_ALLOW)
|
173
|
+
@order = order
|
174
|
+
@deny = ACLList.new
|
175
|
+
@allow = ACLList.new
|
176
|
+
install_list(list) if list
|
177
|
+
end
|
178
|
+
|
179
|
+
public
|
180
|
+
|
181
|
+
##
|
182
|
+
# Allow connections from Socket +soc+?
|
183
|
+
|
184
|
+
def allow_socket?(soc)
|
185
|
+
allow_addr?(soc.peeraddr)
|
186
|
+
end
|
187
|
+
|
188
|
+
public
|
189
|
+
|
190
|
+
##
|
191
|
+
# Allow connections from addrinfo +addr+? It must be formatted like
|
192
|
+
# Socket#peeraddr:
|
193
|
+
#
|
194
|
+
# ["AF_INET", 10, "lc630", "192.0.2.1"]
|
195
|
+
|
196
|
+
def allow_addr?(addr)
|
197
|
+
case @order
|
198
|
+
when DENY_ALLOW
|
199
|
+
return true if @allow.match(addr)
|
200
|
+
return false if @deny.match(addr)
|
201
|
+
return true
|
202
|
+
when ALLOW_DENY
|
203
|
+
return false if @deny.match(addr)
|
204
|
+
return true if @allow.match(addr)
|
205
|
+
return false
|
206
|
+
else
|
207
|
+
false
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
public
|
212
|
+
|
213
|
+
##
|
214
|
+
# Adds +list+ of ACL entries to this ACL.
|
215
|
+
|
216
|
+
def install_list(list)
|
217
|
+
i = 0
|
218
|
+
while i < list.size
|
219
|
+
permission, domain = list.slice(i,2)
|
220
|
+
case permission.downcase
|
221
|
+
when 'allow'
|
222
|
+
@allow.add(domain)
|
223
|
+
when 'deny'
|
224
|
+
@deny.add(domain)
|
225
|
+
else
|
226
|
+
raise "Invalid ACL entry #{list}"
|
227
|
+
end
|
228
|
+
i += 2
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
end
|
@@ -0,0 +1,1864 @@
|
|
1
|
+
#
|
2
|
+
# = drb/drb.rb
|
3
|
+
#
|
4
|
+
# Distributed Ruby: _dRuby_ version 2.0.4
|
5
|
+
#
|
6
|
+
# Copyright (c) 1999-2003 Masatoshi SEKI. You can redistribute it and/or
|
7
|
+
# modify it under the same terms as Ruby.
|
8
|
+
#
|
9
|
+
# Author:: Masatoshi SEKI
|
10
|
+
#
|
11
|
+
# Documentation:: William Webber (william@williamwebber.com)
|
12
|
+
#
|
13
|
+
# == Overview
|
14
|
+
#
|
15
|
+
# dRuby is a distributed object system for Ruby. It allows an object in one
|
16
|
+
# Ruby process to invoke methods on an object in another Ruby process on the
|
17
|
+
# same or a different machine.
|
18
|
+
#
|
19
|
+
# The Ruby standard library contains the core classes of the dRuby package.
|
20
|
+
# However, the full package also includes access control lists and the
|
21
|
+
# Rinda tuple-space distributed task management system, as well as a
|
22
|
+
# large number of samples. The full dRuby package can be downloaded from
|
23
|
+
# the dRuby home page (see *References*).
|
24
|
+
#
|
25
|
+
# For an introduction and examples of usage see the documentation to the
|
26
|
+
# DRb module.
|
27
|
+
#
|
28
|
+
# == References
|
29
|
+
#
|
30
|
+
# [http://www2a.biglobe.ne.jp/~seki/ruby/druby.html]
|
31
|
+
# The dRuby home page, in Japanese. Contains the full dRuby package
|
32
|
+
# and links to other Japanese-language sources.
|
33
|
+
#
|
34
|
+
# [http://www2a.biglobe.ne.jp/~seki/ruby/druby.en.html]
|
35
|
+
# The English version of the dRuby home page.
|
36
|
+
#
|
37
|
+
# [http://pragprog.com/book/sidruby/the-druby-book]
|
38
|
+
# The dRuby Book: Distributed and Parallel Computing with Ruby
|
39
|
+
# by Masatoshi Seki and Makoto Inoue
|
40
|
+
#
|
41
|
+
# [http://www.ruby-doc.org/docs/ProgrammingRuby/html/ospace.html]
|
42
|
+
# The chapter from *Programming* *Ruby* by Dave Thomas and Andy Hunt
|
43
|
+
# which discusses dRuby.
|
44
|
+
#
|
45
|
+
# [http://www.clio.ne.jp/home/web-i31s/Flotuard/Ruby/PRC2K_seki/dRuby.en.html]
|
46
|
+
# Translation of presentation on Ruby by Masatoshi Seki.
|
47
|
+
|
48
|
+
require 'socket'
|
49
|
+
require 'thread'
|
50
|
+
require 'fcntl'
|
51
|
+
require 'drb/eq'
|
52
|
+
|
53
|
+
#
|
54
|
+
# == Overview
|
55
|
+
#
|
56
|
+
# dRuby is a distributed object system for Ruby. It is written in
|
57
|
+
# pure Ruby and uses its own protocol. No add-in services are needed
|
58
|
+
# beyond those provided by the Ruby runtime, such as TCP sockets. It
|
59
|
+
# does not rely on or interoperate with other distributed object
|
60
|
+
# systems such as CORBA, RMI, or .NET.
|
61
|
+
#
|
62
|
+
# dRuby allows methods to be called in one Ruby process upon a Ruby
|
63
|
+
# object located in another Ruby process, even on another machine.
|
64
|
+
# References to objects can be passed between processes. Method
|
65
|
+
# arguments and return values are dumped and loaded in marshalled
|
66
|
+
# format. All of this is done transparently to both the caller of the
|
67
|
+
# remote method and the object that it is called upon.
|
68
|
+
#
|
69
|
+
# An object in a remote process is locally represented by a
|
70
|
+
# DRb::DRbObject instance. This acts as a sort of proxy for the
|
71
|
+
# remote object. Methods called upon this DRbObject instance are
|
72
|
+
# forwarded to its remote object. This is arranged dynamically at run
|
73
|
+
# time. There are no statically declared interfaces for remote
|
74
|
+
# objects, such as CORBA's IDL.
|
75
|
+
#
|
76
|
+
# dRuby calls made into a process are handled by a DRb::DRbServer
|
77
|
+
# instance within that process. This reconstitutes the method call,
|
78
|
+
# invokes it upon the specified local object, and returns the value to
|
79
|
+
# the remote caller. Any object can receive calls over dRuby. There
|
80
|
+
# is no need to implement a special interface, or mixin special
|
81
|
+
# functionality. Nor, in the general case, does an object need to
|
82
|
+
# explicitly register itself with a DRbServer in order to receive
|
83
|
+
# dRuby calls.
|
84
|
+
#
|
85
|
+
# One process wishing to make dRuby calls upon another process must
|
86
|
+
# somehow obtain an initial reference to an object in the remote
|
87
|
+
# process by some means other than as the return value of a remote
|
88
|
+
# method call, as there is initially no remote object reference it can
|
89
|
+
# invoke a method upon. This is done by attaching to the server by
|
90
|
+
# URI. Each DRbServer binds itself to a URI such as
|
91
|
+
# 'druby://example.com:8787'. A DRbServer can have an object attached
|
92
|
+
# to it that acts as the server's *front* *object*. A DRbObject can
|
93
|
+
# be explicitly created from the server's URI. This DRbObject's
|
94
|
+
# remote object will be the server's front object. This front object
|
95
|
+
# can then return references to other Ruby objects in the DRbServer's
|
96
|
+
# process.
|
97
|
+
#
|
98
|
+
# Method calls made over dRuby behave largely the same as normal Ruby
|
99
|
+
# method calls made within a process. Method calls with blocks are
|
100
|
+
# supported, as are raising exceptions. In addition to a method's
|
101
|
+
# standard errors, a dRuby call may also raise one of the
|
102
|
+
# dRuby-specific errors, all of which are subclasses of DRb::DRbError.
|
103
|
+
#
|
104
|
+
# Any type of object can be passed as an argument to a dRuby call or
|
105
|
+
# returned as its return value. By default, such objects are dumped
|
106
|
+
# or marshalled at the local end, then loaded or unmarshalled at the
|
107
|
+
# remote end. The remote end therefore receives a copy of the local
|
108
|
+
# object, not a distributed reference to it; methods invoked upon this
|
109
|
+
# copy are executed entirely in the remote process, not passed on to
|
110
|
+
# the local original. This has semantics similar to pass-by-value.
|
111
|
+
#
|
112
|
+
# However, if an object cannot be marshalled, a dRuby reference to it
|
113
|
+
# is passed or returned instead. This will turn up at the remote end
|
114
|
+
# as a DRbObject instance. All methods invoked upon this remote proxy
|
115
|
+
# are forwarded to the local object, as described in the discussion of
|
116
|
+
# DRbObjects. This has semantics similar to the normal Ruby
|
117
|
+
# pass-by-reference.
|
118
|
+
#
|
119
|
+
# The easiest way to signal that we want an otherwise marshallable
|
120
|
+
# object to be passed or returned as a DRbObject reference, rather
|
121
|
+
# than marshalled and sent as a copy, is to include the
|
122
|
+
# DRb::DRbUndumped mixin module.
|
123
|
+
#
|
124
|
+
# dRuby supports calling remote methods with blocks. As blocks (or
|
125
|
+
# rather the Proc objects that represent them) are not marshallable,
|
126
|
+
# the block executes in the local, not the remote, context. Each
|
127
|
+
# value yielded to the block is passed from the remote object to the
|
128
|
+
# local block, then the value returned by each block invocation is
|
129
|
+
# passed back to the remote execution context to be collected, before
|
130
|
+
# the collected values are finally returned to the local context as
|
131
|
+
# the return value of the method invocation.
|
132
|
+
#
|
133
|
+
# == Examples of usage
|
134
|
+
#
|
135
|
+
# For more dRuby samples, see the +samples+ directory in the full
|
136
|
+
# dRuby distribution.
|
137
|
+
#
|
138
|
+
# === dRuby in client/server mode
|
139
|
+
#
|
140
|
+
# This illustrates setting up a simple client-server drb
|
141
|
+
# system. Run the server and client code in different terminals,
|
142
|
+
# starting the server code first.
|
143
|
+
#
|
144
|
+
# ==== Server code
|
145
|
+
#
|
146
|
+
# require 'drb/drb'
|
147
|
+
#
|
148
|
+
# # The URI for the server to connect to
|
149
|
+
# URI="druby://localhost:8787"
|
150
|
+
#
|
151
|
+
# class TimeServer
|
152
|
+
#
|
153
|
+
# def get_current_time
|
154
|
+
# return Time.now
|
155
|
+
# end
|
156
|
+
#
|
157
|
+
# end
|
158
|
+
#
|
159
|
+
# # The object that handles requests on the server
|
160
|
+
# FRONT_OBJECT=TimeServer.new
|
161
|
+
#
|
162
|
+
# $SAFE = 1 # disable eval() and friends
|
163
|
+
#
|
164
|
+
# DRb.start_service(URI, FRONT_OBJECT)
|
165
|
+
# # Wait for the drb server thread to finish before exiting.
|
166
|
+
# DRb.thread.join
|
167
|
+
#
|
168
|
+
# ==== Client code
|
169
|
+
#
|
170
|
+
# require 'drb/drb'
|
171
|
+
#
|
172
|
+
# # The URI to connect to
|
173
|
+
# SERVER_URI="druby://localhost:8787"
|
174
|
+
#
|
175
|
+
# # Start a local DRbServer to handle callbacks.
|
176
|
+
# #
|
177
|
+
# # Not necessary for this small example, but will be required
|
178
|
+
# # as soon as we pass a non-marshallable object as an argument
|
179
|
+
# # to a dRuby call.
|
180
|
+
# #
|
181
|
+
# # Note: this must be called at least once per process to take any effect.
|
182
|
+
# # This is particularly important if your application forks.
|
183
|
+
# DRb.start_service
|
184
|
+
#
|
185
|
+
# timeserver = DRbObject.new_with_uri(SERVER_URI)
|
186
|
+
# puts timeserver.get_current_time
|
187
|
+
#
|
188
|
+
# === Remote objects under dRuby
|
189
|
+
#
|
190
|
+
# This example illustrates returning a reference to an object
|
191
|
+
# from a dRuby call. The Logger instances live in the server
|
192
|
+
# process. References to them are returned to the client process,
|
193
|
+
# where methods can be invoked upon them. These methods are
|
194
|
+
# executed in the server process.
|
195
|
+
#
|
196
|
+
# ==== Server code
|
197
|
+
#
|
198
|
+
# require 'drb/drb'
|
199
|
+
#
|
200
|
+
# URI="druby://localhost:8787"
|
201
|
+
#
|
202
|
+
# class Logger
|
203
|
+
#
|
204
|
+
# # Make dRuby send Logger instances as dRuby references,
|
205
|
+
# # not copies.
|
206
|
+
# include DRb::DRbUndumped
|
207
|
+
#
|
208
|
+
# def initialize(n, fname)
|
209
|
+
# @name = n
|
210
|
+
# @filename = fname
|
211
|
+
# end
|
212
|
+
#
|
213
|
+
# def log(message)
|
214
|
+
# File.open(@filename, "a") do |f|
|
215
|
+
# f.puts("#{Time.now}: #{@name}: #{message}")
|
216
|
+
# end
|
217
|
+
# end
|
218
|
+
#
|
219
|
+
# end
|
220
|
+
#
|
221
|
+
# # We have a central object for creating and retrieving loggers.
|
222
|
+
# # This retains a local reference to all loggers created. This
|
223
|
+
# # is so an existing logger can be looked up by name, but also
|
224
|
+
# # to prevent loggers from being garbage collected. A dRuby
|
225
|
+
# # reference to an object is not sufficient to prevent it being
|
226
|
+
# # garbage collected!
|
227
|
+
# class LoggerFactory
|
228
|
+
#
|
229
|
+
# def initialize(bdir)
|
230
|
+
# @basedir = bdir
|
231
|
+
# @loggers = {}
|
232
|
+
# end
|
233
|
+
#
|
234
|
+
# def get_logger(name)
|
235
|
+
# if !@loggers.has_key? name
|
236
|
+
# # make the filename safe, then declare it to be so
|
237
|
+
# fname = name.gsub(/[.\/\\\:]/, "_").untaint
|
238
|
+
# @loggers[name] = Logger.new(name, @basedir + "/" + fname)
|
239
|
+
# end
|
240
|
+
# return @loggers[name]
|
241
|
+
# end
|
242
|
+
#
|
243
|
+
# end
|
244
|
+
#
|
245
|
+
# FRONT_OBJECT=LoggerFactory.new("/tmp/dlog")
|
246
|
+
#
|
247
|
+
# $SAFE = 1 # disable eval() and friends
|
248
|
+
#
|
249
|
+
# DRb.start_service(URI, FRONT_OBJECT)
|
250
|
+
# DRb.thread.join
|
251
|
+
#
|
252
|
+
# ==== Client code
|
253
|
+
#
|
254
|
+
# require 'drb/drb'
|
255
|
+
#
|
256
|
+
# SERVER_URI="druby://localhost:8787"
|
257
|
+
#
|
258
|
+
# DRb.start_service
|
259
|
+
#
|
260
|
+
# log_service=DRbObject.new_with_uri(SERVER_URI)
|
261
|
+
#
|
262
|
+
# ["loga", "logb", "logc"].each do |logname|
|
263
|
+
#
|
264
|
+
# logger=log_service.get_logger(logname)
|
265
|
+
#
|
266
|
+
# logger.log("Hello, world!")
|
267
|
+
# logger.log("Goodbye, world!")
|
268
|
+
# logger.log("=== EOT ===")
|
269
|
+
#
|
270
|
+
# end
|
271
|
+
#
|
272
|
+
# == Security
|
273
|
+
#
|
274
|
+
# As with all network services, security needs to be considered when
|
275
|
+
# using dRuby. By allowing external access to a Ruby object, you are
|
276
|
+
# not only allowing outside clients to call the methods you have
|
277
|
+
# defined for that object, but by default to execute arbitrary Ruby
|
278
|
+
# code on your server. Consider the following:
|
279
|
+
#
|
280
|
+
# # !!! UNSAFE CODE !!!
|
281
|
+
# ro = DRbObject::new_with_uri("druby://your.server.com:8989")
|
282
|
+
# class << ro
|
283
|
+
# undef :instance_eval # force call to be passed to remote object
|
284
|
+
# end
|
285
|
+
# ro.instance_eval("`rm -rf *`")
|
286
|
+
#
|
287
|
+
# The dangers posed by instance_eval and friends are such that a
|
288
|
+
# DRbServer should generally be run with $SAFE set to at least
|
289
|
+
# level 1. This will disable eval() and related calls on strings
|
290
|
+
# passed across the wire. The sample usage code given above follows
|
291
|
+
# this practice.
|
292
|
+
#
|
293
|
+
# A DRbServer can be configured with an access control list to
|
294
|
+
# selectively allow or deny access from specified IP addresses. The
|
295
|
+
# main druby distribution provides the ACL class for this purpose. In
|
296
|
+
# general, this mechanism should only be used alongside, rather than
|
297
|
+
# as a replacement for, a good firewall.
|
298
|
+
#
|
299
|
+
# == dRuby internals
|
300
|
+
#
|
301
|
+
# dRuby is implemented using three main components: a remote method
|
302
|
+
# call marshaller/unmarshaller; a transport protocol; and an
|
303
|
+
# ID-to-object mapper. The latter two can be directly, and the first
|
304
|
+
# indirectly, replaced, in order to provide different behaviour and
|
305
|
+
# capabilities.
|
306
|
+
#
|
307
|
+
# Marshalling and unmarshalling of remote method calls is performed by
|
308
|
+
# a DRb::DRbMessage instance. This uses the Marshal module to dump
|
309
|
+
# the method call before sending it over the transport layer, then
|
310
|
+
# reconstitute it at the other end. There is normally no need to
|
311
|
+
# replace this component, and no direct way is provided to do so.
|
312
|
+
# However, it is possible to implement an alternative marshalling
|
313
|
+
# scheme as part of an implementation of the transport layer.
|
314
|
+
#
|
315
|
+
# The transport layer is responsible for opening client and server
|
316
|
+
# network connections and forwarding dRuby request across them.
|
317
|
+
# Normally, it uses DRb::DRbMessage internally to manage marshalling
|
318
|
+
# and unmarshalling. The transport layer is managed by
|
319
|
+
# DRb::DRbProtocol. Multiple protocols can be installed in
|
320
|
+
# DRbProtocol at the one time; selection between them is determined by
|
321
|
+
# the scheme of a dRuby URI. The default transport protocol is
|
322
|
+
# selected by the scheme 'druby:', and implemented by
|
323
|
+
# DRb::DRbTCPSocket. This uses plain TCP/IP sockets for
|
324
|
+
# communication. An alternative protocol, using UNIX domain sockets,
|
325
|
+
# is implemented by DRb::DRbUNIXSocket in the file drb/unix.rb, and
|
326
|
+
# selected by the scheme 'drbunix:'. A sample implementation over
|
327
|
+
# HTTP can be found in the samples accompanying the main dRuby
|
328
|
+
# distribution.
|
329
|
+
#
|
330
|
+
# The ID-to-object mapping component maps dRuby object ids to the
|
331
|
+
# objects they refer to, and vice versa. The implementation to use
|
332
|
+
# can be specified as part of a DRb::DRbServer's configuration. The
|
333
|
+
# default implementation is provided by DRb::DRbIdConv. It uses an
|
334
|
+
# object's ObjectSpace id as its dRuby id. This means that the dRuby
|
335
|
+
# reference to that object only remains meaningful for the lifetime of
|
336
|
+
# the object's process and the lifetime of the object within that
|
337
|
+
# process. A modified implementation is provided by DRb::TimerIdConv
|
338
|
+
# in the file drb/timeridconv.rb. This implementation retains a local
|
339
|
+
# reference to all objects exported over dRuby for a configurable
|
340
|
+
# period of time (defaulting to ten minutes), to prevent them being
|
341
|
+
# garbage-collected within this time. Another sample implementation
|
342
|
+
# is provided in sample/name.rb in the main dRuby distribution. This
|
343
|
+
# allows objects to specify their own id or "name". A dRuby reference
|
344
|
+
# can be made persistent across processes by having each process
|
345
|
+
# register an object using the same dRuby name.
|
346
|
+
#
|
347
|
+
module DRb
|
348
|
+
|
349
|
+
# Superclass of all errors raised in the DRb module.
|
350
|
+
class DRbError < RuntimeError; end
|
351
|
+
|
352
|
+
# Error raised when an error occurs on the underlying communication
|
353
|
+
# protocol.
|
354
|
+
class DRbConnError < DRbError; end
|
355
|
+
|
356
|
+
# Class responsible for converting between an object and its id.
|
357
|
+
#
|
358
|
+
# This, the default implementation, uses an object's local ObjectSpace
|
359
|
+
# __id__ as its id. This means that an object's identification over
|
360
|
+
# drb remains valid only while that object instance remains alive
|
361
|
+
# within the server runtime.
|
362
|
+
#
|
363
|
+
# For alternative mechanisms, see DRb::TimerIdConv in rdb/timeridconv.rb
|
364
|
+
# and DRbNameIdConv in sample/name.rb in the full drb distribution.
|
365
|
+
class DRbIdConv
|
366
|
+
|
367
|
+
# Convert an object reference id to an object.
|
368
|
+
#
|
369
|
+
# This implementation looks up the reference id in the local object
|
370
|
+
# space and returns the object it refers to.
|
371
|
+
def to_obj(ref)
|
372
|
+
ObjectSpace._id2ref(ref)
|
373
|
+
end
|
374
|
+
|
375
|
+
# Convert an object into a reference id.
|
376
|
+
#
|
377
|
+
# This implementation returns the object's __id__ in the local
|
378
|
+
# object space.
|
379
|
+
def to_id(obj)
|
380
|
+
obj.nil? ? nil : obj.__id__
|
381
|
+
end
|
382
|
+
end
|
383
|
+
|
384
|
+
# Mixin module making an object undumpable or unmarshallable.
|
385
|
+
#
|
386
|
+
# If an object which includes this module is returned by method
|
387
|
+
# called over drb, then the object remains in the server space
|
388
|
+
# and a reference to the object is returned, rather than the
|
389
|
+
# object being marshalled and moved into the client space.
|
390
|
+
module DRbUndumped
|
391
|
+
def _dump(dummy) # :nodoc:
|
392
|
+
raise TypeError, 'can\'t dump'
|
393
|
+
end
|
394
|
+
end
|
395
|
+
|
396
|
+
# Error raised by the DRb module when an attempt is made to refer to
|
397
|
+
# the context's current drb server but the context does not have one.
|
398
|
+
# See #current_server.
|
399
|
+
class DRbServerNotFound < DRbError; end
|
400
|
+
|
401
|
+
# Error raised by the DRbProtocol module when it cannot find any
|
402
|
+
# protocol implementation support the scheme specified in a URI.
|
403
|
+
class DRbBadURI < DRbError; end
|
404
|
+
|
405
|
+
# Error raised by a dRuby protocol when it doesn't support the
|
406
|
+
# scheme specified in a URI. See DRb::DRbProtocol.
|
407
|
+
class DRbBadScheme < DRbError; end
|
408
|
+
|
409
|
+
# An exception wrapping a DRb::DRbUnknown object
|
410
|
+
class DRbUnknownError < DRbError
|
411
|
+
|
412
|
+
# Create a new DRbUnknownError for the DRb::DRbUnknown object +unknown+
|
413
|
+
def initialize(unknown)
|
414
|
+
@unknown = unknown
|
415
|
+
super(unknown.name)
|
416
|
+
end
|
417
|
+
|
418
|
+
# Get the wrapped DRb::DRbUnknown object.
|
419
|
+
attr_reader :unknown
|
420
|
+
|
421
|
+
def self._load(s) # :nodoc:
|
422
|
+
Marshal::load(s)
|
423
|
+
end
|
424
|
+
|
425
|
+
def _dump(lv) # :nodoc:
|
426
|
+
Marshal::dump(@unknown)
|
427
|
+
end
|
428
|
+
end
|
429
|
+
|
430
|
+
# An exception wrapping an error object
|
431
|
+
class DRbRemoteError < DRbError
|
432
|
+
|
433
|
+
# Creates a new remote error that wraps the Exception +error+
|
434
|
+
def initialize(error)
|
435
|
+
@reason = error.class.to_s
|
436
|
+
super("#{error.message} (#{error.class})")
|
437
|
+
set_backtrace(error.backtrace)
|
438
|
+
end
|
439
|
+
|
440
|
+
# the class of the error, as a string.
|
441
|
+
attr_reader :reason
|
442
|
+
end
|
443
|
+
|
444
|
+
# Class wrapping a marshalled object whose type is unknown locally.
|
445
|
+
#
|
446
|
+
# If an object is returned by a method invoked over drb, but the
|
447
|
+
# class of the object is unknown in the client namespace, or
|
448
|
+
# the object is a constant unknown in the client namespace, then
|
449
|
+
# the still-marshalled object is returned wrapped in a DRbUnknown instance.
|
450
|
+
#
|
451
|
+
# If this object is passed as an argument to a method invoked over
|
452
|
+
# drb, then the wrapped object is passed instead.
|
453
|
+
#
|
454
|
+
# The class or constant name of the object can be read from the
|
455
|
+
# +name+ attribute. The marshalled object is held in the +buf+
|
456
|
+
# attribute.
|
457
|
+
class DRbUnknown
|
458
|
+
|
459
|
+
# Create a new DRbUnknown object.
|
460
|
+
#
|
461
|
+
# +buf+ is a string containing a marshalled object that could not
|
462
|
+
# be unmarshalled. +err+ is the error message that was raised
|
463
|
+
# when the unmarshalling failed. It is used to determine the
|
464
|
+
# name of the unmarshalled object.
|
465
|
+
def initialize(err, buf)
|
466
|
+
case err.to_s
|
467
|
+
when /uninitialized constant (\S+)/
|
468
|
+
@name = $1
|
469
|
+
when /undefined class\/module (\S+)/
|
470
|
+
@name = $1
|
471
|
+
else
|
472
|
+
@name = nil
|
473
|
+
end
|
474
|
+
@buf = buf
|
475
|
+
end
|
476
|
+
|
477
|
+
# The name of the unknown thing.
|
478
|
+
#
|
479
|
+
# Class name for unknown objects; variable name for unknown
|
480
|
+
# constants.
|
481
|
+
attr_reader :name
|
482
|
+
|
483
|
+
# Buffer contained the marshalled, unknown object.
|
484
|
+
attr_reader :buf
|
485
|
+
|
486
|
+
def self._load(s) # :nodoc:
|
487
|
+
begin
|
488
|
+
Marshal::load(s)
|
489
|
+
rescue NameError, ArgumentError
|
490
|
+
DRbUnknown.new($!, s)
|
491
|
+
end
|
492
|
+
end
|
493
|
+
|
494
|
+
def _dump(lv) # :nodoc:
|
495
|
+
@buf
|
496
|
+
end
|
497
|
+
|
498
|
+
# Attempt to load the wrapped marshalled object again.
|
499
|
+
#
|
500
|
+
# If the class of the object is now known locally, the object
|
501
|
+
# will be unmarshalled and returned. Otherwise, a new
|
502
|
+
# but identical DRbUnknown object will be returned.
|
503
|
+
def reload
|
504
|
+
self.class._load(@buf)
|
505
|
+
end
|
506
|
+
|
507
|
+
# Create a DRbUnknownError exception containing this object.
|
508
|
+
def exception
|
509
|
+
DRbUnknownError.new(self)
|
510
|
+
end
|
511
|
+
end
|
512
|
+
|
513
|
+
# An Array wrapper that can be sent to another server via DRb.
|
514
|
+
#
|
515
|
+
# All entries in the array will be dumped or be references that point to
|
516
|
+
# the local server.
|
517
|
+
|
518
|
+
class DRbArray
|
519
|
+
|
520
|
+
# Creates a new DRbArray that either dumps or wraps all the items in the
|
521
|
+
# Array +ary+ so they can be loaded by a remote DRb server.
|
522
|
+
|
523
|
+
def initialize(ary)
|
524
|
+
@ary = ary.collect { |obj|
|
525
|
+
if obj.kind_of? DRbUndumped
|
526
|
+
DRbObject.new(obj)
|
527
|
+
else
|
528
|
+
begin
|
529
|
+
Marshal.dump(obj)
|
530
|
+
obj
|
531
|
+
rescue
|
532
|
+
DRbObject.new(obj)
|
533
|
+
end
|
534
|
+
end
|
535
|
+
}
|
536
|
+
end
|
537
|
+
|
538
|
+
def self._load(s) # :nodoc:
|
539
|
+
Marshal::load(s)
|
540
|
+
end
|
541
|
+
|
542
|
+
def _dump(lv) # :nodoc:
|
543
|
+
Marshal.dump(@ary)
|
544
|
+
end
|
545
|
+
end
|
546
|
+
|
547
|
+
# Handler for sending and receiving drb messages.
|
548
|
+
#
|
549
|
+
# This takes care of the low-level marshalling and unmarshalling
|
550
|
+
# of drb requests and responses sent over the wire between server
|
551
|
+
# and client. This relieves the implementor of a new drb
|
552
|
+
# protocol layer with having to deal with these details.
|
553
|
+
#
|
554
|
+
# The user does not have to directly deal with this object in
|
555
|
+
# normal use.
|
556
|
+
class DRbMessage
|
557
|
+
def initialize(config) # :nodoc:
|
558
|
+
@load_limit = config[:load_limit]
|
559
|
+
@argc_limit = config[:argc_limit]
|
560
|
+
end
|
561
|
+
|
562
|
+
def dump(obj, error=false) # :nodoc:
|
563
|
+
obj = make_proxy(obj, error) if obj.kind_of? DRbUndumped
|
564
|
+
begin
|
565
|
+
str = Marshal::dump(obj)
|
566
|
+
rescue
|
567
|
+
str = Marshal::dump(make_proxy(obj, error))
|
568
|
+
end
|
569
|
+
[str.size].pack('N') + str
|
570
|
+
end
|
571
|
+
|
572
|
+
def load(soc) # :nodoc:
|
573
|
+
begin
|
574
|
+
sz = soc.read(4) # sizeof (N)
|
575
|
+
rescue
|
576
|
+
raise(DRbConnError, $!.message, $!.backtrace)
|
577
|
+
end
|
578
|
+
raise(DRbConnError, 'connection closed') if sz.nil?
|
579
|
+
raise(DRbConnError, 'premature header') if sz.size < 4
|
580
|
+
sz = sz.unpack('N')[0]
|
581
|
+
raise(DRbConnError, "too large packet #{sz}") if @load_limit < sz
|
582
|
+
begin
|
583
|
+
str = soc.read(sz)
|
584
|
+
rescue
|
585
|
+
raise(DRbConnError, $!.message, $!.backtrace)
|
586
|
+
end
|
587
|
+
raise(DRbConnError, 'connection closed') if str.nil?
|
588
|
+
raise(DRbConnError, 'premature marshal format(can\'t read)') if str.size < sz
|
589
|
+
DRb.mutex.synchronize do
|
590
|
+
begin
|
591
|
+
save = Thread.current[:drb_untaint]
|
592
|
+
Thread.current[:drb_untaint] = []
|
593
|
+
Marshal::load(str)
|
594
|
+
rescue NameError, ArgumentError
|
595
|
+
DRbUnknown.new($!, str)
|
596
|
+
ensure
|
597
|
+
Thread.current[:drb_untaint].each do |x|
|
598
|
+
x.untaint
|
599
|
+
end
|
600
|
+
Thread.current[:drb_untaint] = save
|
601
|
+
end
|
602
|
+
end
|
603
|
+
end
|
604
|
+
|
605
|
+
def send_request(stream, ref, msg_id, arg, b) # :nodoc:
|
606
|
+
ary = []
|
607
|
+
ary.push(dump(ref.__drbref))
|
608
|
+
ary.push(dump(msg_id.id2name))
|
609
|
+
ary.push(dump(arg.length))
|
610
|
+
arg.each do |e|
|
611
|
+
ary.push(dump(e))
|
612
|
+
end
|
613
|
+
ary.push(dump(b))
|
614
|
+
stream.write(ary.join(''))
|
615
|
+
rescue
|
616
|
+
raise(DRbConnError, $!.message, $!.backtrace)
|
617
|
+
end
|
618
|
+
|
619
|
+
def recv_request(stream) # :nodoc:
|
620
|
+
ref = load(stream)
|
621
|
+
ro = DRb.to_obj(ref)
|
622
|
+
msg = load(stream)
|
623
|
+
argc = load(stream)
|
624
|
+
raise(DRbConnError, "too many arguments") if @argc_limit < argc
|
625
|
+
argv = Array.new(argc, nil)
|
626
|
+
argc.times do |n|
|
627
|
+
argv[n] = load(stream)
|
628
|
+
end
|
629
|
+
block = load(stream)
|
630
|
+
return ro, msg, argv, block
|
631
|
+
end
|
632
|
+
|
633
|
+
def send_reply(stream, succ, result) # :nodoc:
|
634
|
+
stream.write(dump(succ) + dump(result, !succ))
|
635
|
+
rescue
|
636
|
+
raise(DRbConnError, $!.message, $!.backtrace)
|
637
|
+
end
|
638
|
+
|
639
|
+
def recv_reply(stream) # :nodoc:
|
640
|
+
succ = load(stream)
|
641
|
+
result = load(stream)
|
642
|
+
[succ, result]
|
643
|
+
end
|
644
|
+
|
645
|
+
private
|
646
|
+
def make_proxy(obj, error=false) # :nodoc:
|
647
|
+
if error
|
648
|
+
DRbRemoteError.new(obj)
|
649
|
+
else
|
650
|
+
DRbObject.new(obj)
|
651
|
+
end
|
652
|
+
end
|
653
|
+
end
|
654
|
+
|
655
|
+
# Module managing the underlying network protocol(s) used by drb.
|
656
|
+
#
|
657
|
+
# By default, drb uses the DRbTCPSocket protocol. Other protocols
|
658
|
+
# can be defined. A protocol must define the following class methods:
|
659
|
+
#
|
660
|
+
# [open(uri, config)] Open a client connection to the server at +uri+,
|
661
|
+
# using configuration +config+. Return a protocol
|
662
|
+
# instance for this connection.
|
663
|
+
# [open_server(uri, config)] Open a server listening at +uri+,
|
664
|
+
# using configuration +config+. Return a
|
665
|
+
# protocol instance for this listener.
|
666
|
+
# [uri_option(uri, config)] Take a URI, possibly containing an option
|
667
|
+
# component (e.g. a trailing '?param=val'),
|
668
|
+
# and return a [uri, option] tuple.
|
669
|
+
#
|
670
|
+
# All of these methods should raise a DRbBadScheme error if the URI
|
671
|
+
# does not identify the protocol they support (e.g. "druby:" for
|
672
|
+
# the standard Ruby protocol). This is how the DRbProtocol module,
|
673
|
+
# given a URI, determines which protocol implementation serves that
|
674
|
+
# protocol.
|
675
|
+
#
|
676
|
+
# The protocol instance returned by #open_server must have the
|
677
|
+
# following methods:
|
678
|
+
#
|
679
|
+
# [accept] Accept a new connection to the server. Returns a protocol
|
680
|
+
# instance capable of communicating with the client.
|
681
|
+
# [close] Close the server connection.
|
682
|
+
# [uri] Get the URI for this server.
|
683
|
+
#
|
684
|
+
# The protocol instance returned by #open must have the following methods:
|
685
|
+
#
|
686
|
+
# [send_request (ref, msg_id, arg, b)]
|
687
|
+
# Send a request to +ref+ with the given message id and arguments.
|
688
|
+
# This is most easily implemented by calling DRbMessage.send_request,
|
689
|
+
# providing a stream that sits on top of the current protocol.
|
690
|
+
# [recv_reply]
|
691
|
+
# Receive a reply from the server and return it as a [success-boolean,
|
692
|
+
# reply-value] pair. This is most easily implemented by calling
|
693
|
+
# DRb.recv_reply, providing a stream that sits on top of the
|
694
|
+
# current protocol.
|
695
|
+
# [alive?]
|
696
|
+
# Is this connection still alive?
|
697
|
+
# [close]
|
698
|
+
# Close this connection.
|
699
|
+
#
|
700
|
+
# The protocol instance returned by #open_server().accept() must have
|
701
|
+
# the following methods:
|
702
|
+
#
|
703
|
+
# [recv_request]
|
704
|
+
# Receive a request from the client and return a [object, message,
|
705
|
+
# args, block] tuple. This is most easily implemented by calling
|
706
|
+
# DRbMessage.recv_request, providing a stream that sits on top of
|
707
|
+
# the current protocol.
|
708
|
+
# [send_reply(succ, result)]
|
709
|
+
# Send a reply to the client. This is most easily implemented
|
710
|
+
# by calling DRbMessage.send_reply, providing a stream that sits
|
711
|
+
# on top of the current protocol.
|
712
|
+
# [close]
|
713
|
+
# Close this connection.
|
714
|
+
#
|
715
|
+
# A new protocol is registered with the DRbProtocol module using
|
716
|
+
# the add_protocol method.
|
717
|
+
#
|
718
|
+
# For examples of other protocols, see DRbUNIXSocket in drb/unix.rb,
|
719
|
+
# and HTTP0 in sample/http0.rb and sample/http0serv.rb in the full
|
720
|
+
# drb distribution.
|
721
|
+
module DRbProtocol
|
722
|
+
|
723
|
+
# Add a new protocol to the DRbProtocol module.
|
724
|
+
def add_protocol(prot)
|
725
|
+
@protocol.push(prot)
|
726
|
+
end
|
727
|
+
module_function :add_protocol
|
728
|
+
|
729
|
+
# Open a client connection to +uri+ with the configuration +config+.
|
730
|
+
#
|
731
|
+
# The DRbProtocol module asks each registered protocol in turn to
|
732
|
+
# try to open the URI. Each protocol signals that it does not handle that
|
733
|
+
# URI by raising a DRbBadScheme error. If no protocol recognises the
|
734
|
+
# URI, then a DRbBadURI error is raised. If a protocol accepts the
|
735
|
+
# URI, but an error occurs in opening it, a DRbConnError is raised.
|
736
|
+
def open(uri, config, first=true)
|
737
|
+
@protocol.each do |prot|
|
738
|
+
begin
|
739
|
+
return prot.open(uri, config)
|
740
|
+
rescue DRbBadScheme
|
741
|
+
rescue DRbConnError
|
742
|
+
raise($!)
|
743
|
+
rescue
|
744
|
+
raise(DRbConnError, "#{uri} - #{$!.inspect}")
|
745
|
+
end
|
746
|
+
end
|
747
|
+
if first && (config[:auto_load] != false)
|
748
|
+
auto_load(uri, config)
|
749
|
+
return open(uri, config, false)
|
750
|
+
end
|
751
|
+
raise DRbBadURI, 'can\'t parse uri:' + uri
|
752
|
+
end
|
753
|
+
module_function :open
|
754
|
+
|
755
|
+
# Open a server listening for connections at +uri+ with
|
756
|
+
# configuration +config+.
|
757
|
+
#
|
758
|
+
# The DRbProtocol module asks each registered protocol in turn to
|
759
|
+
# try to open a server at the URI. Each protocol signals that it does
|
760
|
+
# not handle that URI by raising a DRbBadScheme error. If no protocol
|
761
|
+
# recognises the URI, then a DRbBadURI error is raised. If a protocol
|
762
|
+
# accepts the URI, but an error occurs in opening it, the underlying
|
763
|
+
# error is passed on to the caller.
|
764
|
+
def open_server(uri, config, first=true)
|
765
|
+
@protocol.each do |prot|
|
766
|
+
begin
|
767
|
+
return prot.open_server(uri, config)
|
768
|
+
rescue DRbBadScheme
|
769
|
+
end
|
770
|
+
end
|
771
|
+
if first && (config[:auto_load] != false)
|
772
|
+
auto_load(uri, config)
|
773
|
+
return open_server(uri, config, false)
|
774
|
+
end
|
775
|
+
raise DRbBadURI, 'can\'t parse uri:' + uri
|
776
|
+
end
|
777
|
+
module_function :open_server
|
778
|
+
|
779
|
+
# Parse +uri+ into a [uri, option] pair.
|
780
|
+
#
|
781
|
+
# The DRbProtocol module asks each registered protocol in turn to
|
782
|
+
# try to parse the URI. Each protocol signals that it does not handle that
|
783
|
+
# URI by raising a DRbBadScheme error. If no protocol recognises the
|
784
|
+
# URI, then a DRbBadURI error is raised.
|
785
|
+
def uri_option(uri, config, first=true)
|
786
|
+
@protocol.each do |prot|
|
787
|
+
begin
|
788
|
+
uri, opt = prot.uri_option(uri, config)
|
789
|
+
# opt = nil if opt == ''
|
790
|
+
return uri, opt
|
791
|
+
rescue DRbBadScheme
|
792
|
+
end
|
793
|
+
end
|
794
|
+
if first && (config[:auto_load] != false)
|
795
|
+
auto_load(uri, config)
|
796
|
+
return uri_option(uri, config, false)
|
797
|
+
end
|
798
|
+
raise DRbBadURI, 'can\'t parse uri:' + uri
|
799
|
+
end
|
800
|
+
module_function :uri_option
|
801
|
+
|
802
|
+
def auto_load(uri, config) # :nodoc:
|
803
|
+
if uri =~ /^drb([a-z0-9]+):/
|
804
|
+
require("drb/#{$1}") rescue nil
|
805
|
+
end
|
806
|
+
end
|
807
|
+
module_function :auto_load
|
808
|
+
end
|
809
|
+
|
810
|
+
# The default drb protocol which communicates over a TCP socket.
|
811
|
+
#
|
812
|
+
# The DRb TCP protocol URI looks like:
|
813
|
+
# <code>druby://<host>:<port>?<option></code>. The option is optional.
|
814
|
+
|
815
|
+
class DRbTCPSocket
|
816
|
+
# :stopdoc:
|
817
|
+
private
|
818
|
+
def self.parse_uri(uri)
|
819
|
+
if uri =~ /^druby:\/\/(.*?):(\d+)(\?(.*))?$/
|
820
|
+
host = $1
|
821
|
+
port = $2.to_i
|
822
|
+
option = $4
|
823
|
+
[host, port, option]
|
824
|
+
else
|
825
|
+
raise(DRbBadScheme, uri) unless uri =~ /^druby:/
|
826
|
+
raise(DRbBadURI, 'can\'t parse uri:' + uri)
|
827
|
+
end
|
828
|
+
end
|
829
|
+
|
830
|
+
public
|
831
|
+
|
832
|
+
# Open a client connection to +uri+ (DRb URI string) using configuration
|
833
|
+
# +config+.
|
834
|
+
#
|
835
|
+
# This can raise DRb::DRbBadScheme or DRb::DRbBadURI if +uri+ is not for a
|
836
|
+
# recognized protocol. See DRb::DRbServer.new for information on built-in
|
837
|
+
# URI protocols.
|
838
|
+
def self.open(uri, config)
|
839
|
+
host, port, = parse_uri(uri)
|
840
|
+
host.untaint
|
841
|
+
port.untaint
|
842
|
+
soc = TCPSocket.open(host, port)
|
843
|
+
self.new(uri, soc, config)
|
844
|
+
end
|
845
|
+
|
846
|
+
# Returns the hostname of this server
|
847
|
+
def self.getservername
|
848
|
+
host = Socket::gethostname
|
849
|
+
begin
|
850
|
+
Socket::gethostbyname(host)[0]
|
851
|
+
rescue
|
852
|
+
'localhost'
|
853
|
+
end
|
854
|
+
end
|
855
|
+
|
856
|
+
# For the families available for +host+, returns a TCPServer on +port+.
|
857
|
+
# If +port+ is 0 the first available port is used. IPv4 servers are
|
858
|
+
# preferred over IPv6 servers.
|
859
|
+
def self.open_server_inaddr_any(host, port)
|
860
|
+
infos = Socket::getaddrinfo(host, nil,
|
861
|
+
Socket::AF_UNSPEC,
|
862
|
+
Socket::SOCK_STREAM,
|
863
|
+
0,
|
864
|
+
Socket::AI_PASSIVE)
|
865
|
+
families = Hash[*infos.collect { |af, *_| af }.uniq.zip([]).flatten]
|
866
|
+
return TCPServer.open('0.0.0.0', port) if families.has_key?('AF_INET')
|
867
|
+
return TCPServer.open('::', port) if families.has_key?('AF_INET6')
|
868
|
+
return TCPServer.open(port)
|
869
|
+
# :stopdoc:
|
870
|
+
end
|
871
|
+
|
872
|
+
# Open a server listening for connections at +uri+ using
|
873
|
+
# configuration +config+.
|
874
|
+
def self.open_server(uri, config)
|
875
|
+
uri = 'druby://:0' unless uri
|
876
|
+
host, port, _ = parse_uri(uri)
|
877
|
+
config = {:tcp_original_host => host}.update(config)
|
878
|
+
if host.size == 0
|
879
|
+
host = getservername
|
880
|
+
soc = open_server_inaddr_any(host, port)
|
881
|
+
else
|
882
|
+
soc = TCPServer.open(host, port)
|
883
|
+
end
|
884
|
+
port = soc.addr[1] if port == 0
|
885
|
+
config[:tcp_port] = port
|
886
|
+
uri = "druby://#{host}:#{port}"
|
887
|
+
self.new(uri, soc, config)
|
888
|
+
end
|
889
|
+
|
890
|
+
# Parse +uri+ into a [uri, option] pair.
|
891
|
+
def self.uri_option(uri, config)
|
892
|
+
host, port, option = parse_uri(uri)
|
893
|
+
return "druby://#{host}:#{port}", option
|
894
|
+
end
|
895
|
+
|
896
|
+
# Create a new DRbTCPSocket instance.
|
897
|
+
#
|
898
|
+
# +uri+ is the URI we are connected to.
|
899
|
+
# +soc+ is the tcp socket we are bound to. +config+ is our
|
900
|
+
# configuration.
|
901
|
+
def initialize(uri, soc, config={})
|
902
|
+
@uri = uri
|
903
|
+
@socket = soc
|
904
|
+
@config = config
|
905
|
+
@acl = config[:tcp_acl]
|
906
|
+
@msg = DRbMessage.new(config)
|
907
|
+
set_sockopt(@socket)
|
908
|
+
@shutdown_pipe_r, @shutdown_pipe_w = IO.pipe
|
909
|
+
end
|
910
|
+
|
911
|
+
# Get the URI that we are connected to.
|
912
|
+
attr_reader :uri
|
913
|
+
|
914
|
+
# Get the address of our TCP peer (the other end of the socket
|
915
|
+
# we are bound to.
|
916
|
+
def peeraddr
|
917
|
+
@socket.peeraddr
|
918
|
+
end
|
919
|
+
|
920
|
+
# Get the socket.
|
921
|
+
def stream; @socket; end
|
922
|
+
|
923
|
+
# On the client side, send a request to the server.
|
924
|
+
def send_request(ref, msg_id, arg, b)
|
925
|
+
@msg.send_request(stream, ref, msg_id, arg, b)
|
926
|
+
end
|
927
|
+
|
928
|
+
# On the server side, receive a request from the client.
|
929
|
+
def recv_request
|
930
|
+
@msg.recv_request(stream)
|
931
|
+
end
|
932
|
+
|
933
|
+
# On the server side, send a reply to the client.
|
934
|
+
def send_reply(succ, result)
|
935
|
+
@msg.send_reply(stream, succ, result)
|
936
|
+
end
|
937
|
+
|
938
|
+
# On the client side, receive a reply from the server.
|
939
|
+
def recv_reply
|
940
|
+
@msg.recv_reply(stream)
|
941
|
+
end
|
942
|
+
|
943
|
+
public
|
944
|
+
|
945
|
+
# Close the connection.
|
946
|
+
#
|
947
|
+
# If this is an instance returned by #open_server, then this stops
|
948
|
+
# listening for new connections altogether. If this is an instance
|
949
|
+
# returned by #open or by #accept, then it closes this particular
|
950
|
+
# client-server session.
|
951
|
+
def close
|
952
|
+
if @socket
|
953
|
+
@socket.close
|
954
|
+
@socket = nil
|
955
|
+
end
|
956
|
+
close_shutdown_pipe
|
957
|
+
end
|
958
|
+
|
959
|
+
def close_shutdown_pipe
|
960
|
+
if @shutdown_pipe_r && !@shutdown_pipe_r.closed?
|
961
|
+
@shutdown_pipe_r.close
|
962
|
+
@shutdown_pipe_r = nil
|
963
|
+
end
|
964
|
+
if @shutdown_pipe_w && !@shutdown_pipe_w.closed?
|
965
|
+
@shutdown_pipe_w.close
|
966
|
+
@shutdown_pipe_w = nil
|
967
|
+
end
|
968
|
+
end
|
969
|
+
private :close_shutdown_pipe
|
970
|
+
|
971
|
+
# On the server side, for an instance returned by #open_server,
|
972
|
+
# accept a client connection and return a new instance to handle
|
973
|
+
# the server's side of this client-server session.
|
974
|
+
def accept
|
975
|
+
while true
|
976
|
+
s = accept_or_shutdown
|
977
|
+
return nil unless s
|
978
|
+
break if (@acl ? @acl.allow_socket?(s) : true)
|
979
|
+
s.close
|
980
|
+
end
|
981
|
+
if @config[:tcp_original_host].to_s.size == 0
|
982
|
+
uri = "druby://#{s.addr[3]}:#{@config[:tcp_port]}"
|
983
|
+
else
|
984
|
+
uri = @uri
|
985
|
+
end
|
986
|
+
self.class.new(uri, s, @config)
|
987
|
+
end
|
988
|
+
|
989
|
+
def accept_or_shutdown
|
990
|
+
readables, = IO.select([@socket, @shutdown_pipe_r])
|
991
|
+
if readables.include? @shutdown_pipe_r
|
992
|
+
return nil
|
993
|
+
end
|
994
|
+
@socket.accept
|
995
|
+
end
|
996
|
+
private :accept_or_shutdown
|
997
|
+
|
998
|
+
# Graceful shutdown
|
999
|
+
def shutdown
|
1000
|
+
@shutdown_pipe_w.close if @shutdown_pipe_w && !@shutdown_pipe_w.closed?
|
1001
|
+
end
|
1002
|
+
|
1003
|
+
# Check to see if this connection is alive.
|
1004
|
+
def alive?
|
1005
|
+
return false unless @socket
|
1006
|
+
if IO.select([@socket], nil, nil, 0)
|
1007
|
+
close
|
1008
|
+
return false
|
1009
|
+
end
|
1010
|
+
true
|
1011
|
+
end
|
1012
|
+
|
1013
|
+
def set_sockopt(soc) # :nodoc:
|
1014
|
+
soc.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)
|
1015
|
+
soc.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::FD_CLOEXEC
|
1016
|
+
end
|
1017
|
+
end
|
1018
|
+
|
1019
|
+
module DRbProtocol
|
1020
|
+
@protocol = [DRbTCPSocket] # default
|
1021
|
+
end
|
1022
|
+
|
1023
|
+
class DRbURIOption # :nodoc: I don't understand the purpose of this class...
|
1024
|
+
def initialize(option)
|
1025
|
+
@option = option.to_s
|
1026
|
+
end
|
1027
|
+
attr_reader :option
|
1028
|
+
def to_s; @option; end
|
1029
|
+
|
1030
|
+
def ==(other)
|
1031
|
+
return false unless DRbURIOption === other
|
1032
|
+
@option == other.option
|
1033
|
+
end
|
1034
|
+
|
1035
|
+
def hash
|
1036
|
+
@option.hash
|
1037
|
+
end
|
1038
|
+
|
1039
|
+
alias eql? ==
|
1040
|
+
end
|
1041
|
+
|
1042
|
+
# Object wrapping a reference to a remote drb object.
|
1043
|
+
#
|
1044
|
+
# Method calls on this object are relayed to the remote
|
1045
|
+
# object that this object is a stub for.
|
1046
|
+
class DRbObject
|
1047
|
+
|
1048
|
+
# Unmarshall a marshalled DRbObject.
|
1049
|
+
#
|
1050
|
+
# If the referenced object is located within the local server, then
|
1051
|
+
# the object itself is returned. Otherwise, a new DRbObject is
|
1052
|
+
# created to act as a stub for the remote referenced object.
|
1053
|
+
def self._load(s)
|
1054
|
+
uri, ref = Marshal.load(s)
|
1055
|
+
|
1056
|
+
if DRb.here?(uri)
|
1057
|
+
obj = DRb.to_obj(ref)
|
1058
|
+
if ((! obj.tainted?) && Thread.current[:drb_untaint])
|
1059
|
+
Thread.current[:drb_untaint].push(obj)
|
1060
|
+
end
|
1061
|
+
return obj
|
1062
|
+
end
|
1063
|
+
|
1064
|
+
self.new_with(uri, ref)
|
1065
|
+
end
|
1066
|
+
|
1067
|
+
# Creates a DRb::DRbObject given the reference information to the remote
|
1068
|
+
# host +uri+ and object +ref+.
|
1069
|
+
|
1070
|
+
def self.new_with(uri, ref)
|
1071
|
+
it = self.allocate
|
1072
|
+
it.instance_variable_set(:@uri, uri)
|
1073
|
+
it.instance_variable_set(:@ref, ref)
|
1074
|
+
it
|
1075
|
+
end
|
1076
|
+
|
1077
|
+
# Create a new DRbObject from a URI alone.
|
1078
|
+
def self.new_with_uri(uri)
|
1079
|
+
self.new(nil, uri)
|
1080
|
+
end
|
1081
|
+
|
1082
|
+
# Marshall this object.
|
1083
|
+
#
|
1084
|
+
# The URI and ref of the object are marshalled.
|
1085
|
+
def _dump(lv)
|
1086
|
+
Marshal.dump([@uri, @ref])
|
1087
|
+
end
|
1088
|
+
|
1089
|
+
# Create a new remote object stub.
|
1090
|
+
#
|
1091
|
+
# +obj+ is the (local) object we want to create a stub for. Normally
|
1092
|
+
# this is +nil+. +uri+ is the URI of the remote object that this
|
1093
|
+
# will be a stub for.
|
1094
|
+
def initialize(obj, uri=nil)
|
1095
|
+
@uri = nil
|
1096
|
+
@ref = nil
|
1097
|
+
if obj.nil?
|
1098
|
+
return if uri.nil?
|
1099
|
+
@uri, option = DRbProtocol.uri_option(uri, DRb.config)
|
1100
|
+
@ref = DRbURIOption.new(option) unless option.nil?
|
1101
|
+
else
|
1102
|
+
@uri = uri ? uri : (DRb.uri rescue nil)
|
1103
|
+
@ref = obj ? DRb.to_id(obj) : nil
|
1104
|
+
end
|
1105
|
+
end
|
1106
|
+
|
1107
|
+
# Get the URI of the remote object.
|
1108
|
+
def __drburi
|
1109
|
+
@uri
|
1110
|
+
end
|
1111
|
+
|
1112
|
+
# Get the reference of the object, if local.
|
1113
|
+
def __drbref
|
1114
|
+
@ref
|
1115
|
+
end
|
1116
|
+
|
1117
|
+
undef :to_s
|
1118
|
+
undef :to_a if respond_to?(:to_a)
|
1119
|
+
|
1120
|
+
# Routes respond_to? to the referenced remote object.
|
1121
|
+
def respond_to?(msg_id, priv=false)
|
1122
|
+
case msg_id
|
1123
|
+
when :_dump
|
1124
|
+
true
|
1125
|
+
when :marshal_dump
|
1126
|
+
false
|
1127
|
+
else
|
1128
|
+
method_missing(:respond_to?, msg_id, priv)
|
1129
|
+
end
|
1130
|
+
end
|
1131
|
+
|
1132
|
+
# Routes method calls to the referenced remote object.
|
1133
|
+
def method_missing(msg_id, *a, &b)
|
1134
|
+
if DRb.here?(@uri)
|
1135
|
+
obj = DRb.to_obj(@ref)
|
1136
|
+
DRb.current_server.check_insecure_method(obj, msg_id)
|
1137
|
+
return obj.__send__(msg_id, *a, &b)
|
1138
|
+
end
|
1139
|
+
|
1140
|
+
succ, result = self.class.with_friend(@uri) do
|
1141
|
+
DRbConn.open(@uri) do |conn|
|
1142
|
+
conn.send_message(self, msg_id, a, b)
|
1143
|
+
end
|
1144
|
+
end
|
1145
|
+
|
1146
|
+
if succ
|
1147
|
+
return result
|
1148
|
+
elsif DRbUnknown === result
|
1149
|
+
raise result
|
1150
|
+
else
|
1151
|
+
bt = self.class.prepare_backtrace(@uri, result)
|
1152
|
+
result.set_backtrace(bt + caller)
|
1153
|
+
raise result
|
1154
|
+
end
|
1155
|
+
end
|
1156
|
+
|
1157
|
+
# Given the +uri+ of another host executes the block provided.
|
1158
|
+
def self.with_friend(uri) # :nodoc:
|
1159
|
+
friend = DRb.fetch_server(uri)
|
1160
|
+
return yield() unless friend
|
1161
|
+
|
1162
|
+
save = Thread.current['DRb']
|
1163
|
+
Thread.current['DRb'] = { 'server' => friend }
|
1164
|
+
return yield
|
1165
|
+
ensure
|
1166
|
+
Thread.current['DRb'] = save if friend
|
1167
|
+
end
|
1168
|
+
|
1169
|
+
# Returns a modified backtrace from +result+ with the +uri+ where each call
|
1170
|
+
# in the backtrace came from.
|
1171
|
+
def self.prepare_backtrace(uri, result) # :nodoc:
|
1172
|
+
prefix = "(#{uri}) "
|
1173
|
+
bt = []
|
1174
|
+
result.backtrace.each do |x|
|
1175
|
+
break if /`__send__'$/ =~ x
|
1176
|
+
if /^\(druby:\/\// =~ x
|
1177
|
+
bt.push(x)
|
1178
|
+
else
|
1179
|
+
bt.push(prefix + x)
|
1180
|
+
end
|
1181
|
+
end
|
1182
|
+
bt
|
1183
|
+
end
|
1184
|
+
|
1185
|
+
def pretty_print(q) # :nodoc:
|
1186
|
+
q.pp_object(self)
|
1187
|
+
end
|
1188
|
+
|
1189
|
+
def pretty_print_cycle(q) # :nodoc:
|
1190
|
+
q.object_address_group(self) {
|
1191
|
+
q.breakable
|
1192
|
+
q.text '...'
|
1193
|
+
}
|
1194
|
+
end
|
1195
|
+
end
|
1196
|
+
|
1197
|
+
# Class handling the connection between a DRbObject and the
|
1198
|
+
# server the real object lives on.
|
1199
|
+
#
|
1200
|
+
# This class maintains a pool of connections, to reduce the
|
1201
|
+
# overhead of starting and closing down connections for each
|
1202
|
+
# method call.
|
1203
|
+
#
|
1204
|
+
# This class is used internally by DRbObject. The user does
|
1205
|
+
# not normally need to deal with it directly.
|
1206
|
+
class DRbConn
|
1207
|
+
POOL_SIZE = 16 # :nodoc:
|
1208
|
+
@mutex = Mutex.new
|
1209
|
+
@pool = []
|
1210
|
+
|
1211
|
+
def self.open(remote_uri) # :nodoc:
|
1212
|
+
begin
|
1213
|
+
conn = nil
|
1214
|
+
|
1215
|
+
@mutex.synchronize do
|
1216
|
+
#FIXME
|
1217
|
+
new_pool = []
|
1218
|
+
@pool.each do |c|
|
1219
|
+
if conn.nil? and c.uri == remote_uri
|
1220
|
+
conn = c if c.alive?
|
1221
|
+
else
|
1222
|
+
new_pool.push c
|
1223
|
+
end
|
1224
|
+
end
|
1225
|
+
@pool = new_pool
|
1226
|
+
end
|
1227
|
+
|
1228
|
+
conn = self.new(remote_uri) unless conn
|
1229
|
+
succ, result = yield(conn)
|
1230
|
+
return succ, result
|
1231
|
+
|
1232
|
+
ensure
|
1233
|
+
if conn
|
1234
|
+
if succ
|
1235
|
+
@mutex.synchronize do
|
1236
|
+
@pool.unshift(conn)
|
1237
|
+
@pool.pop.close while @pool.size > POOL_SIZE
|
1238
|
+
end
|
1239
|
+
else
|
1240
|
+
conn.close
|
1241
|
+
end
|
1242
|
+
end
|
1243
|
+
end
|
1244
|
+
end
|
1245
|
+
|
1246
|
+
def initialize(remote_uri) # :nodoc:
|
1247
|
+
@uri = remote_uri
|
1248
|
+
@protocol = DRbProtocol.open(remote_uri, DRb.config)
|
1249
|
+
end
|
1250
|
+
attr_reader :uri # :nodoc:
|
1251
|
+
|
1252
|
+
def send_message(ref, msg_id, arg, block) # :nodoc:
|
1253
|
+
@protocol.send_request(ref, msg_id, arg, block)
|
1254
|
+
@protocol.recv_reply
|
1255
|
+
end
|
1256
|
+
|
1257
|
+
def close # :nodoc:
|
1258
|
+
@protocol.close
|
1259
|
+
@protocol = nil
|
1260
|
+
end
|
1261
|
+
|
1262
|
+
def alive? # :nodoc:
|
1263
|
+
return false unless @protocol
|
1264
|
+
@protocol.alive?
|
1265
|
+
end
|
1266
|
+
end
|
1267
|
+
|
1268
|
+
# Class representing a drb server instance.
|
1269
|
+
#
|
1270
|
+
# A DRbServer must be running in the local process before any incoming
|
1271
|
+
# dRuby calls can be accepted, or any local objects can be passed as
|
1272
|
+
# dRuby references to remote processes, even if those local objects are
|
1273
|
+
# never actually called remotely. You do not need to start a DRbServer
|
1274
|
+
# in the local process if you are only making outgoing dRuby calls
|
1275
|
+
# passing marshalled parameters.
|
1276
|
+
#
|
1277
|
+
# Unless multiple servers are being used, the local DRbServer is normally
|
1278
|
+
# started by calling DRb.start_service.
|
1279
|
+
class DRbServer
|
1280
|
+
@@acl = nil
|
1281
|
+
@@idconv = DRbIdConv.new
|
1282
|
+
@@secondary_server = nil
|
1283
|
+
@@argc_limit = 256
|
1284
|
+
@@load_limit = 256 * 102400
|
1285
|
+
@@verbose = false
|
1286
|
+
@@safe_level = 0
|
1287
|
+
|
1288
|
+
# Set the default value for the :argc_limit option.
|
1289
|
+
#
|
1290
|
+
# See #new(). The initial default value is 256.
|
1291
|
+
def self.default_argc_limit(argc)
|
1292
|
+
@@argc_limit = argc
|
1293
|
+
end
|
1294
|
+
|
1295
|
+
# Set the default value for the :load_limit option.
|
1296
|
+
#
|
1297
|
+
# See #new(). The initial default value is 25 MB.
|
1298
|
+
def self.default_load_limit(sz)
|
1299
|
+
@@load_limit = sz
|
1300
|
+
end
|
1301
|
+
|
1302
|
+
# Set the default access control list to +acl+. The default ACL is +nil+.
|
1303
|
+
#
|
1304
|
+
# See also DRb::ACL and #new()
|
1305
|
+
def self.default_acl(acl)
|
1306
|
+
@@acl = acl
|
1307
|
+
end
|
1308
|
+
|
1309
|
+
# Set the default value for the :id_conv option.
|
1310
|
+
#
|
1311
|
+
# See #new(). The initial default value is a DRbIdConv instance.
|
1312
|
+
def self.default_id_conv(idconv)
|
1313
|
+
@@idconv = idconv
|
1314
|
+
end
|
1315
|
+
|
1316
|
+
# Set the default safe level to +level+. The default safe level is 0
|
1317
|
+
#
|
1318
|
+
# See #new for more information.
|
1319
|
+
def self.default_safe_level(level)
|
1320
|
+
@@safe_level = level
|
1321
|
+
end
|
1322
|
+
|
1323
|
+
# Set the default value of the :verbose option.
|
1324
|
+
#
|
1325
|
+
# See #new(). The initial default value is false.
|
1326
|
+
def self.verbose=(on)
|
1327
|
+
@@verbose = on
|
1328
|
+
end
|
1329
|
+
|
1330
|
+
# Get the default value of the :verbose option.
|
1331
|
+
def self.verbose
|
1332
|
+
@@verbose
|
1333
|
+
end
|
1334
|
+
|
1335
|
+
def self.make_config(hash={}) # :nodoc:
|
1336
|
+
default_config = {
|
1337
|
+
:idconv => @@idconv,
|
1338
|
+
:verbose => @@verbose,
|
1339
|
+
:tcp_acl => @@acl,
|
1340
|
+
:load_limit => @@load_limit,
|
1341
|
+
:argc_limit => @@argc_limit,
|
1342
|
+
:safe_level => @@safe_level
|
1343
|
+
}
|
1344
|
+
default_config.update(hash)
|
1345
|
+
end
|
1346
|
+
|
1347
|
+
# Create a new DRbServer instance.
|
1348
|
+
#
|
1349
|
+
# +uri+ is the URI to bind to. This is normally of the form
|
1350
|
+
# 'druby://<hostname>:<port>' where <hostname> is a hostname of
|
1351
|
+
# the local machine. If nil, then the system's default hostname
|
1352
|
+
# will be bound to, on a port selected by the system; these value
|
1353
|
+
# can be retrieved from the +uri+ attribute. 'druby:' specifies
|
1354
|
+
# the default dRuby transport protocol: another protocol, such
|
1355
|
+
# as 'drbunix:', can be specified instead.
|
1356
|
+
#
|
1357
|
+
# +front+ is the front object for the server, that is, the object
|
1358
|
+
# to which remote method calls on the server will be passed. If
|
1359
|
+
# nil, then the server will not accept remote method calls.
|
1360
|
+
#
|
1361
|
+
# If +config_or_acl+ is a hash, it is the configuration to
|
1362
|
+
# use for this server. The following options are recognised:
|
1363
|
+
#
|
1364
|
+
# :idconv :: an id-to-object conversion object. This defaults
|
1365
|
+
# to an instance of the class DRb::DRbIdConv.
|
1366
|
+
# :verbose :: if true, all unsuccessful remote calls on objects
|
1367
|
+
# in the server will be logged to $stdout. false
|
1368
|
+
# by default.
|
1369
|
+
# :tcp_acl :: the access control list for this server. See
|
1370
|
+
# the ACL class from the main dRuby distribution.
|
1371
|
+
# :load_limit :: the maximum message size in bytes accepted by
|
1372
|
+
# the server. Defaults to 25 MB (26214400).
|
1373
|
+
# :argc_limit :: the maximum number of arguments to a remote
|
1374
|
+
# method accepted by the server. Defaults to
|
1375
|
+
# 256.
|
1376
|
+
# :safe_level :: The safe level of the DRbServer. The attribute
|
1377
|
+
# sets $SAFE for methods performed in the main_loop.
|
1378
|
+
# Defaults to 0.
|
1379
|
+
#
|
1380
|
+
# The default values of these options can be modified on
|
1381
|
+
# a class-wide basis by the class methods #default_argc_limit,
|
1382
|
+
# #default_load_limit, #default_acl, #default_id_conv,
|
1383
|
+
# and #verbose=
|
1384
|
+
#
|
1385
|
+
# If +config_or_acl+ is not a hash, but is not nil, it is
|
1386
|
+
# assumed to be the access control list for this server.
|
1387
|
+
# See the :tcp_acl option for more details.
|
1388
|
+
#
|
1389
|
+
# If no other server is currently set as the primary server,
|
1390
|
+
# this will become the primary server.
|
1391
|
+
#
|
1392
|
+
# The server will immediately start running in its own thread.
|
1393
|
+
def initialize(uri=nil, front=nil, config_or_acl=nil)
|
1394
|
+
if Hash === config_or_acl
|
1395
|
+
config = config_or_acl.dup
|
1396
|
+
else
|
1397
|
+
acl = config_or_acl || @@acl
|
1398
|
+
config = {
|
1399
|
+
:tcp_acl => acl
|
1400
|
+
}
|
1401
|
+
end
|
1402
|
+
|
1403
|
+
@config = self.class.make_config(config)
|
1404
|
+
|
1405
|
+
@protocol = DRbProtocol.open_server(uri, @config)
|
1406
|
+
@uri = @protocol.uri
|
1407
|
+
@exported_uri = [@uri]
|
1408
|
+
|
1409
|
+
@front = front
|
1410
|
+
@idconv = @config[:idconv]
|
1411
|
+
@safe_level = @config[:safe_level]
|
1412
|
+
|
1413
|
+
@grp = ThreadGroup.new
|
1414
|
+
@thread = run
|
1415
|
+
|
1416
|
+
DRb.regist_server(self)
|
1417
|
+
end
|
1418
|
+
|
1419
|
+
# The URI of this DRbServer.
|
1420
|
+
attr_reader :uri
|
1421
|
+
|
1422
|
+
# The main thread of this DRbServer.
|
1423
|
+
#
|
1424
|
+
# This is the thread that listens for and accepts connections
|
1425
|
+
# from clients, not that handles each client's request-response
|
1426
|
+
# session.
|
1427
|
+
attr_reader :thread
|
1428
|
+
|
1429
|
+
# The front object of the DRbServer.
|
1430
|
+
#
|
1431
|
+
# This object receives remote method calls made on the server's
|
1432
|
+
# URI alone, with an object id.
|
1433
|
+
attr_reader :front
|
1434
|
+
|
1435
|
+
# The configuration of this DRbServer
|
1436
|
+
attr_reader :config
|
1437
|
+
|
1438
|
+
# The safe level for this server. This is a number corresponding to
|
1439
|
+
# $SAFE.
|
1440
|
+
#
|
1441
|
+
# The default safe_level is 0
|
1442
|
+
attr_reader :safe_level
|
1443
|
+
|
1444
|
+
# Set whether to operate in verbose mode.
|
1445
|
+
#
|
1446
|
+
# In verbose mode, failed calls are logged to stdout.
|
1447
|
+
def verbose=(v); @config[:verbose]=v; end
|
1448
|
+
|
1449
|
+
# Get whether the server is in verbose mode.
|
1450
|
+
#
|
1451
|
+
# In verbose mode, failed calls are logged to stdout.
|
1452
|
+
def verbose; @config[:verbose]; end
|
1453
|
+
|
1454
|
+
# Is this server alive?
|
1455
|
+
def alive?
|
1456
|
+
@thread.alive?
|
1457
|
+
end
|
1458
|
+
|
1459
|
+
# Is +uri+ the URI for this server?
|
1460
|
+
def here?(uri)
|
1461
|
+
@exported_uri.include?(uri)
|
1462
|
+
end
|
1463
|
+
|
1464
|
+
# Stop this server.
|
1465
|
+
def stop_service
|
1466
|
+
DRb.remove_server(self)
|
1467
|
+
if Thread.current['DRb'] && Thread.current['DRb']['server'] == self
|
1468
|
+
Thread.current['DRb']['stop_service'] = true
|
1469
|
+
else
|
1470
|
+
if @protocol.respond_to? :shutdown
|
1471
|
+
@protocol.shutdown
|
1472
|
+
else
|
1473
|
+
@thread.kill # xxx: Thread#kill
|
1474
|
+
end
|
1475
|
+
@thread.join
|
1476
|
+
end
|
1477
|
+
end
|
1478
|
+
|
1479
|
+
# Convert a dRuby reference to the local object it refers to.
|
1480
|
+
def to_obj(ref)
|
1481
|
+
return front if ref.nil?
|
1482
|
+
return front[ref.to_s] if DRbURIOption === ref
|
1483
|
+
@idconv.to_obj(ref)
|
1484
|
+
end
|
1485
|
+
|
1486
|
+
# Convert a local object to a dRuby reference.
|
1487
|
+
def to_id(obj)
|
1488
|
+
return nil if obj.__id__ == front.__id__
|
1489
|
+
@idconv.to_id(obj)
|
1490
|
+
end
|
1491
|
+
|
1492
|
+
private
|
1493
|
+
|
1494
|
+
##
|
1495
|
+
# Starts the DRb main loop in a new thread.
|
1496
|
+
|
1497
|
+
def run
|
1498
|
+
Thread.start do
|
1499
|
+
begin
|
1500
|
+
while main_loop
|
1501
|
+
end
|
1502
|
+
ensure
|
1503
|
+
@protocol.close if @protocol
|
1504
|
+
end
|
1505
|
+
end
|
1506
|
+
end
|
1507
|
+
|
1508
|
+
# List of insecure methods.
|
1509
|
+
#
|
1510
|
+
# These methods are not callable via dRuby.
|
1511
|
+
INSECURE_METHOD = [
|
1512
|
+
:__send__
|
1513
|
+
]
|
1514
|
+
|
1515
|
+
# Has a method been included in the list of insecure methods?
|
1516
|
+
def insecure_method?(msg_id)
|
1517
|
+
INSECURE_METHOD.include?(msg_id)
|
1518
|
+
end
|
1519
|
+
|
1520
|
+
# Coerce an object to a string, providing our own representation if
|
1521
|
+
# to_s is not defined for the object.
|
1522
|
+
def any_to_s(obj)
|
1523
|
+
obj.to_s + ":#{obj.class}"
|
1524
|
+
rescue
|
1525
|
+
sprintf("#<%s:0x%lx>", obj.class, obj.__id__)
|
1526
|
+
end
|
1527
|
+
|
1528
|
+
# Check that a method is callable via dRuby.
|
1529
|
+
#
|
1530
|
+
# +obj+ is the object we want to invoke the method on. +msg_id+ is the
|
1531
|
+
# method name, as a Symbol.
|
1532
|
+
#
|
1533
|
+
# If the method is an insecure method (see #insecure_method?) a
|
1534
|
+
# SecurityError is thrown. If the method is private or undefined,
|
1535
|
+
# a NameError is thrown.
|
1536
|
+
def check_insecure_method(obj, msg_id)
|
1537
|
+
return true if Proc === obj && msg_id == :__drb_yield
|
1538
|
+
raise(ArgumentError, "#{any_to_s(msg_id)} is not a symbol") unless Symbol == msg_id.class
|
1539
|
+
raise(SecurityError, "insecure method `#{msg_id}'") if insecure_method?(msg_id)
|
1540
|
+
|
1541
|
+
if obj.private_methods.include?(msg_id)
|
1542
|
+
desc = any_to_s(obj)
|
1543
|
+
raise NoMethodError, "private method `#{msg_id}' called for #{desc}"
|
1544
|
+
elsif obj.protected_methods.include?(msg_id)
|
1545
|
+
desc = any_to_s(obj)
|
1546
|
+
raise NoMethodError, "protected method `#{msg_id}' called for #{desc}"
|
1547
|
+
else
|
1548
|
+
true
|
1549
|
+
end
|
1550
|
+
end
|
1551
|
+
public :check_insecure_method
|
1552
|
+
|
1553
|
+
class InvokeMethod # :nodoc:
|
1554
|
+
def initialize(drb_server, client)
|
1555
|
+
@drb_server = drb_server
|
1556
|
+
@safe_level = drb_server.safe_level
|
1557
|
+
@client = client
|
1558
|
+
end
|
1559
|
+
|
1560
|
+
def perform
|
1561
|
+
@result = nil
|
1562
|
+
@succ = false
|
1563
|
+
setup_message
|
1564
|
+
|
1565
|
+
if $SAFE < @safe_level
|
1566
|
+
info = Thread.current['DRb']
|
1567
|
+
if @block
|
1568
|
+
@result = Thread.new {
|
1569
|
+
Thread.current['DRb'] = info
|
1570
|
+
$SAFE = @safe_level
|
1571
|
+
perform_with_block
|
1572
|
+
}.value
|
1573
|
+
else
|
1574
|
+
@result = Thread.new {
|
1575
|
+
Thread.current['DRb'] = info
|
1576
|
+
$SAFE = @safe_level
|
1577
|
+
perform_without_block
|
1578
|
+
}.value
|
1579
|
+
end
|
1580
|
+
else
|
1581
|
+
if @block
|
1582
|
+
@result = perform_with_block
|
1583
|
+
else
|
1584
|
+
@result = perform_without_block
|
1585
|
+
end
|
1586
|
+
end
|
1587
|
+
@succ = true
|
1588
|
+
if @msg_id == :to_ary && @result.class == Array
|
1589
|
+
@result = DRbArray.new(@result)
|
1590
|
+
end
|
1591
|
+
return @succ, @result
|
1592
|
+
rescue StandardError, ScriptError, Interrupt
|
1593
|
+
@result = $!
|
1594
|
+
return @succ, @result
|
1595
|
+
end
|
1596
|
+
|
1597
|
+
private
|
1598
|
+
def init_with_client
|
1599
|
+
obj, msg, argv, block = @client.recv_request
|
1600
|
+
@obj = obj
|
1601
|
+
@msg_id = msg.intern
|
1602
|
+
@argv = argv
|
1603
|
+
@block = block
|
1604
|
+
end
|
1605
|
+
|
1606
|
+
def check_insecure_method
|
1607
|
+
@drb_server.check_insecure_method(@obj, @msg_id)
|
1608
|
+
end
|
1609
|
+
|
1610
|
+
def setup_message
|
1611
|
+
init_with_client
|
1612
|
+
check_insecure_method
|
1613
|
+
end
|
1614
|
+
|
1615
|
+
def perform_without_block
|
1616
|
+
if Proc === @obj && @msg_id == :__drb_yield
|
1617
|
+
if @argv.size == 1
|
1618
|
+
ary = @argv
|
1619
|
+
else
|
1620
|
+
ary = [@argv]
|
1621
|
+
end
|
1622
|
+
ary.collect(&@obj)[0]
|
1623
|
+
else
|
1624
|
+
@obj.__send__(@msg_id, *@argv)
|
1625
|
+
end
|
1626
|
+
end
|
1627
|
+
|
1628
|
+
end
|
1629
|
+
|
1630
|
+
require 'drb/invokemethod'
|
1631
|
+
class InvokeMethod
|
1632
|
+
include InvokeMethod18Mixin
|
1633
|
+
end
|
1634
|
+
|
1635
|
+
# The main loop performed by a DRbServer's internal thread.
|
1636
|
+
#
|
1637
|
+
# Accepts a connection from a client, and starts up its own
|
1638
|
+
# thread to handle it. This thread loops, receiving requests
|
1639
|
+
# from the client, invoking them on a local object, and
|
1640
|
+
# returning responses, until the client closes the connection
|
1641
|
+
# or a local method call fails.
|
1642
|
+
def main_loop
|
1643
|
+
client0 = @protocol.accept
|
1644
|
+
return nil if !client0
|
1645
|
+
Thread.start(client0) do |client|
|
1646
|
+
@grp.add Thread.current
|
1647
|
+
Thread.current['DRb'] = { 'client' => client ,
|
1648
|
+
'server' => self }
|
1649
|
+
DRb.mutex.synchronize do
|
1650
|
+
client_uri = client.uri
|
1651
|
+
@exported_uri << client_uri unless @exported_uri.include?(client_uri)
|
1652
|
+
end
|
1653
|
+
loop do
|
1654
|
+
begin
|
1655
|
+
succ = false
|
1656
|
+
invoke_method = InvokeMethod.new(self, client)
|
1657
|
+
succ, result = invoke_method.perform
|
1658
|
+
if !succ && verbose
|
1659
|
+
p result
|
1660
|
+
result.backtrace.each do |x|
|
1661
|
+
puts x
|
1662
|
+
end
|
1663
|
+
end
|
1664
|
+
client.send_reply(succ, result) rescue nil
|
1665
|
+
ensure
|
1666
|
+
client.close unless succ
|
1667
|
+
if Thread.current['DRb']['stop_service']
|
1668
|
+
Thread.new { stop_service }
|
1669
|
+
end
|
1670
|
+
break unless succ
|
1671
|
+
end
|
1672
|
+
end
|
1673
|
+
end
|
1674
|
+
end
|
1675
|
+
end
|
1676
|
+
|
1677
|
+
@primary_server = nil
|
1678
|
+
|
1679
|
+
# Start a dRuby server locally.
|
1680
|
+
#
|
1681
|
+
# The new dRuby server will become the primary server, even
|
1682
|
+
# if another server is currently the primary server.
|
1683
|
+
#
|
1684
|
+
# +uri+ is the URI for the server to bind to. If nil,
|
1685
|
+
# the server will bind to random port on the default local host
|
1686
|
+
# name and use the default dRuby protocol.
|
1687
|
+
#
|
1688
|
+
# +front+ is the server's front object. This may be nil.
|
1689
|
+
#
|
1690
|
+
# +config+ is the configuration for the new server. This may
|
1691
|
+
# be nil.
|
1692
|
+
#
|
1693
|
+
# See DRbServer::new.
|
1694
|
+
def start_service(uri=nil, front=nil, config=nil)
|
1695
|
+
@primary_server = DRbServer.new(uri, front, config)
|
1696
|
+
end
|
1697
|
+
module_function :start_service
|
1698
|
+
|
1699
|
+
# The primary local dRuby server.
|
1700
|
+
#
|
1701
|
+
# This is the server created by the #start_service call.
|
1702
|
+
attr_accessor :primary_server
|
1703
|
+
module_function :primary_server=, :primary_server
|
1704
|
+
|
1705
|
+
# Get the 'current' server.
|
1706
|
+
#
|
1707
|
+
# In the context of execution taking place within the main
|
1708
|
+
# thread of a dRuby server (typically, as a result of a remote
|
1709
|
+
# call on the server or one of its objects), the current
|
1710
|
+
# server is that server. Otherwise, the current server is
|
1711
|
+
# the primary server.
|
1712
|
+
#
|
1713
|
+
# If the above rule fails to find a server, a DRbServerNotFound
|
1714
|
+
# error is raised.
|
1715
|
+
def current_server
|
1716
|
+
drb = Thread.current['DRb']
|
1717
|
+
server = (drb && drb['server']) ? drb['server'] : @primary_server
|
1718
|
+
raise DRbServerNotFound unless server
|
1719
|
+
return server
|
1720
|
+
end
|
1721
|
+
module_function :current_server
|
1722
|
+
|
1723
|
+
# Stop the local dRuby server.
|
1724
|
+
#
|
1725
|
+
# This operates on the primary server. If there is no primary
|
1726
|
+
# server currently running, it is a noop.
|
1727
|
+
def stop_service
|
1728
|
+
@primary_server.stop_service if @primary_server
|
1729
|
+
@primary_server = nil
|
1730
|
+
end
|
1731
|
+
module_function :stop_service
|
1732
|
+
|
1733
|
+
# Get the URI defining the local dRuby space.
|
1734
|
+
#
|
1735
|
+
# This is the URI of the current server. See #current_server.
|
1736
|
+
def uri
|
1737
|
+
drb = Thread.current['DRb']
|
1738
|
+
client = (drb && drb['client'])
|
1739
|
+
if client
|
1740
|
+
uri = client.uri
|
1741
|
+
return uri if uri
|
1742
|
+
end
|
1743
|
+
current_server.uri
|
1744
|
+
end
|
1745
|
+
module_function :uri
|
1746
|
+
|
1747
|
+
# Is +uri+ the URI for the current local server?
|
1748
|
+
def here?(uri)
|
1749
|
+
current_server.here?(uri) rescue false
|
1750
|
+
# (current_server.uri rescue nil) == uri
|
1751
|
+
end
|
1752
|
+
module_function :here?
|
1753
|
+
|
1754
|
+
# Get the configuration of the current server.
|
1755
|
+
#
|
1756
|
+
# If there is no current server, this returns the default configuration.
|
1757
|
+
# See #current_server and DRbServer::make_config.
|
1758
|
+
def config
|
1759
|
+
current_server.config
|
1760
|
+
rescue
|
1761
|
+
DRbServer.make_config
|
1762
|
+
end
|
1763
|
+
module_function :config
|
1764
|
+
|
1765
|
+
# Get the front object of the current server.
|
1766
|
+
#
|
1767
|
+
# This raises a DRbServerNotFound error if there is no current server.
|
1768
|
+
# See #current_server.
|
1769
|
+
def front
|
1770
|
+
current_server.front
|
1771
|
+
end
|
1772
|
+
module_function :front
|
1773
|
+
|
1774
|
+
# Convert a reference into an object using the current server.
|
1775
|
+
#
|
1776
|
+
# This raises a DRbServerNotFound error if there is no current server.
|
1777
|
+
# See #current_server.
|
1778
|
+
def to_obj(ref)
|
1779
|
+
current_server.to_obj(ref)
|
1780
|
+
end
|
1781
|
+
|
1782
|
+
# Get a reference id for an object using the current server.
|
1783
|
+
#
|
1784
|
+
# This raises a DRbServerNotFound error if there is no current server.
|
1785
|
+
# See #current_server.
|
1786
|
+
def to_id(obj)
|
1787
|
+
current_server.to_id(obj)
|
1788
|
+
end
|
1789
|
+
module_function :to_id
|
1790
|
+
module_function :to_obj
|
1791
|
+
|
1792
|
+
# Get the thread of the primary server.
|
1793
|
+
#
|
1794
|
+
# This returns nil if there is no primary server. See #primary_server.
|
1795
|
+
def thread
|
1796
|
+
@primary_server ? @primary_server.thread : nil
|
1797
|
+
end
|
1798
|
+
module_function :thread
|
1799
|
+
|
1800
|
+
# Set the default id conversion object.
|
1801
|
+
#
|
1802
|
+
# This is expected to be an instance such as DRb::DRbIdConv that responds to
|
1803
|
+
# #to_id and #to_obj that can convert objects to and from DRb references.
|
1804
|
+
#
|
1805
|
+
# See DRbServer#default_id_conv.
|
1806
|
+
def install_id_conv(idconv)
|
1807
|
+
DRbServer.default_id_conv(idconv)
|
1808
|
+
end
|
1809
|
+
module_function :install_id_conv
|
1810
|
+
|
1811
|
+
# Set the default ACL to +acl+.
|
1812
|
+
#
|
1813
|
+
# See DRb::DRbServer.default_acl.
|
1814
|
+
def install_acl(acl)
|
1815
|
+
DRbServer.default_acl(acl)
|
1816
|
+
end
|
1817
|
+
module_function :install_acl
|
1818
|
+
|
1819
|
+
@mutex = Mutex.new
|
1820
|
+
def mutex # :nodoc:
|
1821
|
+
@mutex
|
1822
|
+
end
|
1823
|
+
module_function :mutex
|
1824
|
+
|
1825
|
+
@server = {}
|
1826
|
+
# Registers +server+ with DRb.
|
1827
|
+
#
|
1828
|
+
# This is called when a new DRb::DRbServer is created.
|
1829
|
+
#
|
1830
|
+
# If there is no primary server then +server+ becomes the primary server.
|
1831
|
+
#
|
1832
|
+
# Example:
|
1833
|
+
#
|
1834
|
+
# require 'drb'
|
1835
|
+
#
|
1836
|
+
# s = DRb::DRbServer.new # automatically calls regist_server
|
1837
|
+
# DRb.fetch_server s.uri #=> #<DRb::DRbServer:0x...>
|
1838
|
+
def regist_server(server)
|
1839
|
+
@server[server.uri] = server
|
1840
|
+
mutex.synchronize do
|
1841
|
+
@primary_server = server unless @primary_server
|
1842
|
+
end
|
1843
|
+
end
|
1844
|
+
module_function :regist_server
|
1845
|
+
|
1846
|
+
# Removes +server+ from the list of registered servers.
|
1847
|
+
def remove_server(server)
|
1848
|
+
@server.delete(server.uri)
|
1849
|
+
end
|
1850
|
+
module_function :remove_server
|
1851
|
+
|
1852
|
+
# Retrieves the server with the given +uri+.
|
1853
|
+
#
|
1854
|
+
# See also regist_server and remove_server.
|
1855
|
+
def fetch_server(uri)
|
1856
|
+
@server[uri]
|
1857
|
+
end
|
1858
|
+
module_function :fetch_server
|
1859
|
+
end
|
1860
|
+
|
1861
|
+
# :stopdoc:
|
1862
|
+
DRbObject = DRb::DRbObject
|
1863
|
+
DRbUndumped = DRb::DRbUndumped
|
1864
|
+
DRbIdConv = DRb::DRbIdConv
|