shoesgem 0.1424.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/LICENSE +30 -0
- data/README.rdoc +31 -0
- data/lib/shoes.rb +4 -0
- data/shoes/CHANGELOG.txt +21 -0
- data/shoes/COPYING.txt +30 -0
- data/shoes/README.txt +117 -0
- data/shoes/VERSION.txt +1 -0
- data/shoes/fonts/Coolvetica.ttf +0 -0
- data/shoes/fonts/Lacuna.ttf +0 -0
- data/shoes/freetype6.dll +0 -0
- data/shoes/lib/shoes/cache.rb +54 -0
- data/shoes/lib/shoes/data.rb +39 -0
- data/shoes/lib/shoes/help.rb +421 -0
- data/shoes/lib/shoes/image.rb +25 -0
- data/shoes/lib/shoes/inspect.rb +128 -0
- data/shoes/lib/shoes/log.rb +48 -0
- data/shoes/lib/shoes/minitar.rb +986 -0
- data/shoes/lib/shoes/override.rb +38 -0
- data/shoes/lib/shoes/pack.rb +503 -0
- data/shoes/lib/shoes/search.rb +46 -0
- data/shoes/lib/shoes/setup.rb +329 -0
- data/shoes/lib/shoes/shy.rb +131 -0
- data/shoes/lib/shoes/shybuilder.rb +44 -0
- data/shoes/lib/shoes.rb +522 -0
- data/shoes/libcairo-2.dll +0 -0
- data/shoes/libeay32.dll +0 -0
- data/shoes/libexpat-1.dll +0 -0
- data/shoes/libfontconfig-1.dll +0 -0
- data/shoes/libgio-2.0-0.dll +0 -0
- data/shoes/libglib-2.0-0.dll +0 -0
- data/shoes/libgmodule-2.0-0.dll +0 -0
- data/shoes/libgobject-2.0-0.dll +0 -0
- data/shoes/libgthread-2.0-0.dll +0 -0
- data/shoes/libiconv2.dll +0 -0
- data/shoes/libjpeg-8.dll +0 -0
- data/shoes/libpango-1.0-0.dll +0 -0
- data/shoes/libpangocairo-1.0-0.dll +0 -0
- data/shoes/libpangoft2-1.0-0.dll +0 -0
- data/shoes/libpangowin32-1.0-0.dll +0 -0
- data/shoes/libpng14-14.dll +0 -0
- data/shoes/libportaudio-2.dll +0 -0
- data/shoes/libshoes.dll +0 -0
- data/shoes/libssl32.dll +0 -0
- data/shoes/libungif4.dll +0 -0
- data/shoes/msvcrt-ruby191.dll +0 -0
- data/shoes/readline5.dll +0 -0
- data/shoes/ruby/gems/1.9.1/gems/hpricot-0.8.1/lib/fast_xs.so +0 -0
- data/shoes/ruby/gems/1.9.1/gems/hpricot-0.8.1/lib/hpricot/blankslate.rb +63 -0
- data/shoes/ruby/gems/1.9.1/gems/hpricot-0.8.1/lib/hpricot/builder.rb +216 -0
- data/shoes/ruby/gems/1.9.1/gems/hpricot-0.8.1/lib/hpricot/elements.rb +510 -0
- data/shoes/ruby/gems/1.9.1/gems/hpricot-0.8.1/lib/hpricot/htmlinfo.rb +691 -0
- data/shoes/ruby/gems/1.9.1/gems/hpricot-0.8.1/lib/hpricot/inspect.rb +103 -0
- data/shoes/ruby/gems/1.9.1/gems/hpricot-0.8.1/lib/hpricot/modules.rb +40 -0
- data/shoes/ruby/gems/1.9.1/gems/hpricot-0.8.1/lib/hpricot/parse.rb +38 -0
- data/shoes/ruby/gems/1.9.1/gems/hpricot-0.8.1/lib/hpricot/tag.rb +202 -0
- data/shoes/ruby/gems/1.9.1/gems/hpricot-0.8.1/lib/hpricot/tags.rb +164 -0
- data/shoes/ruby/gems/1.9.1/gems/hpricot-0.8.1/lib/hpricot/traverse.rb +838 -0
- data/shoes/ruby/gems/1.9.1/gems/hpricot-0.8.1/lib/hpricot/xchar.rb +94 -0
- data/shoes/ruby/gems/1.9.1/gems/hpricot-0.8.1/lib/hpricot.rb +26 -0
- data/shoes/ruby/gems/1.9.1/gems/hpricot-0.8.1/lib/hpricot_scan.so +0 -0
- data/shoes/ruby/gems/1.9.1/gems/json-shoes-1.1.3/lib/json/add/core.rb +135 -0
- data/shoes/ruby/gems/1.9.1/gems/json-shoes-1.1.3/lib/json/add/rails.rb +58 -0
- data/shoes/ruby/gems/1.9.1/gems/json-shoes-1.1.3/lib/json/common.rb +354 -0
- data/shoes/ruby/gems/1.9.1/gems/json-shoes-1.1.3/lib/json/ext/generator.so +0 -0
- data/shoes/ruby/gems/1.9.1/gems/json-shoes-1.1.3/lib/json/ext/parser.so +0 -0
- data/shoes/ruby/gems/1.9.1/gems/json-shoes-1.1.3/lib/json/ext.rb +13 -0
- data/shoes/ruby/gems/1.9.1/gems/json-shoes-1.1.3/lib/json/version.rb +9 -0
- data/shoes/ruby/gems/1.9.1/gems/json-shoes-1.1.3/lib/json.rb +8 -0
- data/shoes/ruby/gems/1.9.1/gems/sqlite3-ruby-1.2.5-x86-mswin32/lib/sqlite3/constants.rb +49 -0
- data/shoes/ruby/gems/1.9.1/gems/sqlite3-ruby-1.2.5-x86-mswin32/lib/sqlite3/database.rb +721 -0
- data/shoes/ruby/gems/1.9.1/gems/sqlite3-ruby-1.2.5-x86-mswin32/lib/sqlite3/driver/dl/api.rb +152 -0
- data/shoes/ruby/gems/1.9.1/gems/sqlite3-ruby-1.2.5-x86-mswin32/lib/sqlite3/driver/dl/driver.rb +307 -0
- data/shoes/ruby/gems/1.9.1/gems/sqlite3-ruby-1.2.5-x86-mswin32/lib/sqlite3/driver/native/driver.rb +219 -0
- data/shoes/ruby/gems/1.9.1/gems/sqlite3-ruby-1.2.5-x86-mswin32/lib/sqlite3/errors.rb +68 -0
- data/shoes/ruby/gems/1.9.1/gems/sqlite3-ruby-1.2.5-x86-mswin32/lib/sqlite3/pragmas.rb +271 -0
- data/shoes/ruby/gems/1.9.1/gems/sqlite3-ruby-1.2.5-x86-mswin32/lib/sqlite3/resultset.rb +180 -0
- data/shoes/ruby/gems/1.9.1/gems/sqlite3-ruby-1.2.5-x86-mswin32/lib/sqlite3/statement.rb +231 -0
- data/shoes/ruby/gems/1.9.1/gems/sqlite3-ruby-1.2.5-x86-mswin32/lib/sqlite3/translator.rb +109 -0
- data/shoes/ruby/gems/1.9.1/gems/sqlite3-ruby-1.2.5-x86-mswin32/lib/sqlite3/value.rb +57 -0
- data/shoes/ruby/gems/1.9.1/gems/sqlite3-ruby-1.2.5-x86-mswin32/lib/sqlite3/version.rb +16 -0
- data/shoes/ruby/gems/1.9.1/gems/sqlite3-ruby-1.2.5-x86-mswin32/lib/sqlite3.rb +1 -0
- data/shoes/ruby/gems/1.9.1/gems/sqlite3-ruby-1.2.5-x86-mswin32/lib/sqlite3_api.so +0 -0
- data/shoes/ruby/gems/1.9.1/specifications/hpricot-0.8.1.gemspec +32 -0
- data/shoes/ruby/gems/1.9.1/specifications/json-shoes-1.1.3.gemspec +34 -0
- data/shoes/ruby/gems/1.9.1/specifications/sqlite3-ruby-1.2.5-x86-mswin32.gemspec +46 -0
- data/shoes/ruby/lib/English.rb +155 -0
- data/shoes/ruby/lib/Win32API.rb +28 -0
- data/shoes/ruby/lib/abbrev.rb +103 -0
- data/shoes/ruby/lib/base64.rb +91 -0
- data/shoes/ruby/lib/benchmark.rb +573 -0
- data/shoes/ruby/lib/bigdecimal/jacobian.rb +85 -0
- data/shoes/ruby/lib/bigdecimal/ludcmp.rb +86 -0
- data/shoes/ruby/lib/bigdecimal/math.rb +237 -0
- data/shoes/ruby/lib/bigdecimal/newton.rb +77 -0
- data/shoes/ruby/lib/bigdecimal/util.rb +53 -0
- data/shoes/ruby/lib/cgi/cookie.rb +144 -0
- data/shoes/ruby/lib/cgi/core.rb +786 -0
- data/shoes/ruby/lib/cgi/html.rb +1021 -0
- data/shoes/ruby/lib/cgi/session/pstore.rb +111 -0
- data/shoes/ruby/lib/cgi/session.rb +537 -0
- data/shoes/ruby/lib/cgi/util.rb +181 -0
- data/shoes/ruby/lib/cgi.rb +274 -0
- data/shoes/ruby/lib/cmath.rb +233 -0
- data/shoes/ruby/lib/complex.rb +24 -0
- data/shoes/ruby/lib/csv.rb +2320 -0
- data/shoes/ruby/lib/date/format.rb +1313 -0
- data/shoes/ruby/lib/date.rb +1834 -0
- data/shoes/ruby/lib/debug.rb +907 -0
- data/shoes/ruby/lib/delegate.rb +311 -0
- data/shoes/ruby/lib/digest/hmac.rb +274 -0
- data/shoes/ruby/lib/digest/sha2.rb +74 -0
- data/shoes/ruby/lib/digest.rb +50 -0
- data/shoes/ruby/lib/dl/callback.rb +69 -0
- data/shoes/ruby/lib/dl/cparser.rb +109 -0
- data/shoes/ruby/lib/dl/func.rb +153 -0
- data/shoes/ruby/lib/dl/import.rb +215 -0
- data/shoes/ruby/lib/dl/pack.rb +173 -0
- data/shoes/ruby/lib/dl/stack.rb +146 -0
- data/shoes/ruby/lib/dl/struct.rb +213 -0
- data/shoes/ruby/lib/dl/types.rb +40 -0
- data/shoes/ruby/lib/dl/value.rb +112 -0
- data/shoes/ruby/lib/drb/acl.rb +146 -0
- data/shoes/ruby/lib/drb/drb.rb +1778 -0
- data/shoes/ruby/lib/drb/eq.rb +16 -0
- data/shoes/ruby/lib/drb/extserv.rb +71 -0
- data/shoes/ruby/lib/drb/extservm.rb +85 -0
- data/shoes/ruby/lib/drb/gw.rb +122 -0
- data/shoes/ruby/lib/drb/invokemethod.rb +34 -0
- data/shoes/ruby/lib/drb/observer.rb +22 -0
- data/shoes/ruby/lib/drb/ssl.rb +190 -0
- data/shoes/ruby/lib/drb/timeridconv.rb +91 -0
- data/shoes/ruby/lib/drb/unix.rb +108 -0
- data/shoes/ruby/lib/drb.rb +2 -0
- data/shoes/ruby/lib/e2mmap.rb +172 -0
- data/shoes/ruby/lib/erb.rb +902 -0
- data/shoes/ruby/lib/fileutils.rb +1592 -0
- data/shoes/ruby/lib/find.rb +81 -0
- data/shoes/ruby/lib/forwardable.rb +270 -0
- data/shoes/ruby/lib/ftsearch/analysis/analyzer.rb +16 -0
- data/shoes/ruby/lib/ftsearch/analysis/simple_identifier_analyzer.rb +23 -0
- data/shoes/ruby/lib/ftsearch/analysis/whitespace_analyzer.rb +22 -0
- data/shoes/ruby/lib/ftsearch/document_map_reader.rb +106 -0
- data/shoes/ruby/lib/ftsearch/document_map_writer.rb +46 -0
- data/shoes/ruby/lib/ftsearch/field_infos.rb +46 -0
- data/shoes/ruby/lib/ftsearch/fragment_writer.rb +114 -0
- data/shoes/ruby/lib/ftsearch/fulltext_reader.rb +52 -0
- data/shoes/ruby/lib/ftsearch/fulltext_writer.rb +75 -0
- data/shoes/ruby/lib/ftsearch/suffix_array_reader.rb +275 -0
- data/shoes/ruby/lib/ftsearch/suffix_array_writer.rb +99 -0
- data/shoes/ruby/lib/ftsearch/util.rb +21 -0
- data/shoes/ruby/lib/getoptlong.rb +610 -0
- data/shoes/ruby/lib/gserver.rb +253 -0
- data/shoes/ruby/lib/i386-mingw32/bigdecimal.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/binject.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/bloops.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/continuation.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/coverage.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/curses.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/digest/bubblebabble.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/digest/md5.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/digest/rmd160.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/digest/sha1.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/digest/sha2.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/digest.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/dl.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/big5.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/cp949.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/emacs_mule.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/encdb.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/euc_jp.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/euc_kr.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/euc_tw.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/gb18030.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/gb2312.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/gbk.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/iso_8859_1.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/iso_8859_10.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/iso_8859_11.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/iso_8859_13.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/iso_8859_14.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/iso_8859_15.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/iso_8859_16.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/iso_8859_2.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/iso_8859_3.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/iso_8859_4.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/iso_8859_5.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/iso_8859_6.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/iso_8859_7.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/iso_8859_8.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/iso_8859_9.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/koi8_r.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/koi8_u.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/shift_jis.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/trans/big5.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/trans/chinese.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/trans/escape.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/trans/gb18030.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/trans/gbk.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/trans/iso2022.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/trans/japanese.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/trans/japanese_euc.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/trans/japanese_sjis.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/trans/korean.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/trans/single_byte.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/trans/transdb.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/trans/utf_16_32.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/utf_16be.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/utf_16le.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/utf_32be.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/utf_32le.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/enc/windows_1251.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/etc.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/fcntl.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/fiber.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/ftsearchrt.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/gdbm.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/iconv.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/io/wait.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/json/ext/generator.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/json/ext/parser.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/mathn/complex.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/mathn/rational.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/nkf.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/openssl.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/racc/cparse.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/rbconfig.rb +196 -0
- data/shoes/ruby/lib/i386-mingw32/readline.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/ripper.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/sdbm.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/socket.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/stringio.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/strscan.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/syck.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/win32ole.so +0 -0
- data/shoes/ruby/lib/i386-mingw32/zlib.so +0 -0
- data/shoes/ruby/lib/io/nonblock.rb +23 -0
- data/shoes/ruby/lib/ipaddr.rb +813 -0
- data/shoes/ruby/lib/irb/cmd/chws.rb +32 -0
- data/shoes/ruby/lib/irb/cmd/fork.rb +38 -0
- data/shoes/ruby/lib/irb/cmd/help.rb +36 -0
- data/shoes/ruby/lib/irb/cmd/load.rb +66 -0
- data/shoes/ruby/lib/irb/cmd/nop.rb +38 -0
- data/shoes/ruby/lib/irb/cmd/pushws.rb +38 -0
- data/shoes/ruby/lib/irb/cmd/subirb.rb +42 -0
- data/shoes/ruby/lib/irb/completion.rb +207 -0
- data/shoes/ruby/lib/irb/context.rb +255 -0
- data/shoes/ruby/lib/irb/ext/change-ws.rb +61 -0
- data/shoes/ruby/lib/irb/ext/history.rb +109 -0
- data/shoes/ruby/lib/irb/ext/loader.rb +119 -0
- data/shoes/ruby/lib/irb/ext/math-mode.rb +36 -0
- data/shoes/ruby/lib/irb/ext/multi-irb.rb +240 -0
- data/shoes/ruby/lib/irb/ext/save-history.rb +100 -0
- data/shoes/ruby/lib/irb/ext/tracer.rb +60 -0
- data/shoes/ruby/lib/irb/ext/use-loader.rb +64 -0
- data/shoes/ruby/lib/irb/ext/workspaces.rb +55 -0
- data/shoes/ruby/lib/irb/extend-command.rb +272 -0
- data/shoes/ruby/lib/irb/frame.rb +66 -0
- data/shoes/ruby/lib/irb/help.rb +35 -0
- data/shoes/ruby/lib/irb/init.rb +288 -0
- data/shoes/ruby/lib/irb/input-method.rb +142 -0
- data/shoes/ruby/lib/irb/lc/error.rb +29 -0
- data/shoes/ruby/lib/irb/lc/help-message +38 -0
- data/shoes/ruby/lib/irb/lc/ja/encoding_aliases.rb +8 -0
- data/shoes/ruby/lib/irb/lc/ja/error.rb +27 -0
- data/shoes/ruby/lib/irb/lc/ja/help-message +39 -0
- data/shoes/ruby/lib/irb/locale.rb +195 -0
- data/shoes/ruby/lib/irb/magic-file.rb +36 -0
- data/shoes/ruby/lib/irb/notifier.rb +144 -0
- data/shoes/ruby/lib/irb/output-method.rb +69 -0
- data/shoes/ruby/lib/irb/ruby-lex.rb +1188 -0
- data/shoes/ruby/lib/irb/ruby-token.rb +270 -0
- data/shoes/ruby/lib/irb/slex.rb +282 -0
- data/shoes/ruby/lib/irb/src_encoding.rb +4 -0
- data/shoes/ruby/lib/irb/version.rb +15 -0
- data/shoes/ruby/lib/irb/workspace.rb +108 -0
- data/shoes/ruby/lib/irb/ws-for-case-2.rb +14 -0
- data/shoes/ruby/lib/irb/xmp.rb +97 -0
- data/shoes/ruby/lib/irb.rb +354 -0
- data/shoes/ruby/lib/json/add/core.rb +135 -0
- data/shoes/ruby/lib/json/add/rails.rb +58 -0
- data/shoes/ruby/lib/json/common.rb +354 -0
- data/shoes/ruby/lib/json/editor.rb +1371 -0
- data/shoes/ruby/lib/json/ext.rb +15 -0
- data/shoes/ruby/lib/json/version.rb +9 -0
- data/shoes/ruby/lib/json.rb +297 -0
- data/shoes/ruby/lib/kconv.rb +282 -0
- data/shoes/ruby/lib/logger.rb +732 -0
- data/shoes/ruby/lib/mathn.rb +206 -0
- data/shoes/ruby/lib/matrix.rb +1381 -0
- data/shoes/ruby/lib/minitest/autorun.rb +9 -0
- data/shoes/ruby/lib/minitest/mock.rb +37 -0
- data/shoes/ruby/lib/minitest/spec.rb +89 -0
- data/shoes/ruby/lib/minitest/unit.rb +497 -0
- data/shoes/ruby/lib/mkmf.rb +1958 -0
- data/shoes/ruby/lib/monitor.rb +265 -0
- data/shoes/ruby/lib/mutex_m.rb +91 -0
- data/shoes/ruby/lib/net/ftp.rb +981 -0
- data/shoes/ruby/lib/net/http.rb +2399 -0
- data/shoes/ruby/lib/net/https.rb +136 -0
- data/shoes/ruby/lib/net/imap.rb +3500 -0
- data/shoes/ruby/lib/net/pop.rb +1000 -0
- data/shoes/ruby/lib/net/protocol.rb +382 -0
- data/shoes/ruby/lib/net/smtp.rb +1014 -0
- data/shoes/ruby/lib/net/telnet.rb +759 -0
- data/shoes/ruby/lib/observer.rb +193 -0
- data/shoes/ruby/lib/open-uri.rb +832 -0
- data/shoes/ruby/lib/open3.rb +98 -0
- data/shoes/ruby/lib/openssl/bn.rb +35 -0
- data/shoes/ruby/lib/openssl/buffering.rb +242 -0
- data/shoes/ruby/lib/openssl/cipher.rb +65 -0
- data/shoes/ruby/lib/openssl/digest.rb +61 -0
- data/shoes/ruby/lib/openssl/ssl.rb +178 -0
- data/shoes/ruby/lib/openssl/x509.rb +155 -0
- data/shoes/ruby/lib/openssl.rb +24 -0
- data/shoes/ruby/lib/optparse/date.rb +17 -0
- data/shoes/ruby/lib/optparse/shellwords.rb +6 -0
- data/shoes/ruby/lib/optparse/time.rb +10 -0
- data/shoes/ruby/lib/optparse/uri.rb +6 -0
- data/shoes/ruby/lib/optparse/version.rb +70 -0
- data/shoes/ruby/lib/optparse.rb +1810 -0
- data/shoes/ruby/lib/ostruct.rb +145 -0
- data/shoes/ruby/lib/pathname.rb +1099 -0
- data/shoes/ruby/lib/pp.rb +532 -0
- data/shoes/ruby/lib/prettyprint.rb +896 -0
- data/shoes/ruby/lib/prime.rb +471 -0
- data/shoes/ruby/lib/profile.rb +10 -0
- data/shoes/ruby/lib/profiler.rb +59 -0
- data/shoes/ruby/lib/pstore.rb +543 -0
- data/shoes/ruby/lib/racc/parser.rb +441 -0
- data/shoes/ruby/lib/rake/classic_namespace.rb +8 -0
- data/shoes/ruby/lib/rake/clean.rb +33 -0
- data/shoes/ruby/lib/rake/gempackagetask.rb +97 -0
- data/shoes/ruby/lib/rake/loaders/makefile.rb +35 -0
- data/shoes/ruby/lib/rake/packagetask.rb +185 -0
- data/shoes/ruby/lib/rake/rake_test_loader.rb +5 -0
- data/shoes/ruby/lib/rake/rdoctask.rb +147 -0
- data/shoes/ruby/lib/rake/runtest.rb +23 -0
- data/shoes/ruby/lib/rake/tasklib.rb +23 -0
- data/shoes/ruby/lib/rake/testtask.rb +161 -0
- data/shoes/ruby/lib/rake/win32.rb +34 -0
- data/shoes/ruby/lib/rake.rb +2465 -0
- data/shoes/ruby/lib/rational.rb +19 -0
- data/shoes/ruby/lib/rbconfig/datadir.rb +24 -0
- data/shoes/ruby/lib/rdoc/code_objects.rb +1061 -0
- data/shoes/ruby/lib/rdoc/diagram.rb +340 -0
- data/shoes/ruby/lib/rdoc/dot.rb +249 -0
- data/shoes/ruby/lib/rdoc/generator/chm/chm.rb +100 -0
- data/shoes/ruby/lib/rdoc/generator/chm.rb +113 -0
- data/shoes/ruby/lib/rdoc/generator/html/common.rb +24 -0
- data/shoes/ruby/lib/rdoc/generator/html/frameless.rb +92 -0
- data/shoes/ruby/lib/rdoc/generator/html/hefss.rb +150 -0
- data/shoes/ruby/lib/rdoc/generator/html/html.rb +769 -0
- data/shoes/ruby/lib/rdoc/generator/html/kilmer.rb +151 -0
- data/shoes/ruby/lib/rdoc/generator/html/kilmerfactory.rb +427 -0
- data/shoes/ruby/lib/rdoc/generator/html/one_page_html.rb +122 -0
- data/shoes/ruby/lib/rdoc/generator/html.rb +445 -0
- data/shoes/ruby/lib/rdoc/generator/ri.rb +226 -0
- data/shoes/ruby/lib/rdoc/generator/texinfo/class.texinfo.erb +44 -0
- data/shoes/ruby/lib/rdoc/generator/texinfo/file.texinfo.erb +6 -0
- data/shoes/ruby/lib/rdoc/generator/texinfo/method.texinfo.erb +6 -0
- data/shoes/ruby/lib/rdoc/generator/texinfo/texinfo.erb +28 -0
- data/shoes/ruby/lib/rdoc/generator/texinfo.rb +81 -0
- data/shoes/ruby/lib/rdoc/generator/xml/rdf.rb +113 -0
- data/shoes/ruby/lib/rdoc/generator/xml/xml.rb +123 -0
- data/shoes/ruby/lib/rdoc/generator/xml.rb +117 -0
- data/shoes/ruby/lib/rdoc/generator.rb +1082 -0
- data/shoes/ruby/lib/rdoc/known_classes.rb +68 -0
- data/shoes/ruby/lib/rdoc/markup/attribute_manager.rb +265 -0
- data/shoes/ruby/lib/rdoc/markup/formatter.rb +14 -0
- data/shoes/ruby/lib/rdoc/markup/fragments.rb +337 -0
- data/shoes/ruby/lib/rdoc/markup/inline.rb +101 -0
- data/shoes/ruby/lib/rdoc/markup/lines.rb +152 -0
- data/shoes/ruby/lib/rdoc/markup/preprocess.rb +75 -0
- data/shoes/ruby/lib/rdoc/markup/to_flow.rb +185 -0
- data/shoes/ruby/lib/rdoc/markup/to_html.rb +403 -0
- data/shoes/ruby/lib/rdoc/markup/to_html_crossref.rb +148 -0
- data/shoes/ruby/lib/rdoc/markup/to_latex.rb +328 -0
- data/shoes/ruby/lib/rdoc/markup/to_test.rb +50 -0
- data/shoes/ruby/lib/rdoc/markup/to_texinfo.rb +69 -0
- data/shoes/ruby/lib/rdoc/markup.rb +378 -0
- data/shoes/ruby/lib/rdoc/options.rb +638 -0
- data/shoes/ruby/lib/rdoc/parser/c.rb +661 -0
- data/shoes/ruby/lib/rdoc/parser/f95.rb +1835 -0
- data/shoes/ruby/lib/rdoc/parser/perl.rb +165 -0
- data/shoes/ruby/lib/rdoc/parser/ruby.rb +2829 -0
- data/shoes/ruby/lib/rdoc/parser/simple.rb +38 -0
- data/shoes/ruby/lib/rdoc/parser.rb +142 -0
- data/shoes/ruby/lib/rdoc/rdoc.rb +293 -0
- data/shoes/ruby/lib/rdoc/ri/cache.rb +187 -0
- data/shoes/ruby/lib/rdoc/ri/descriptions.rb +156 -0
- data/shoes/ruby/lib/rdoc/ri/display.rb +392 -0
- data/shoes/ruby/lib/rdoc/ri/driver.rb +669 -0
- data/shoes/ruby/lib/rdoc/ri/formatter.rb +616 -0
- data/shoes/ruby/lib/rdoc/ri/paths.rb +99 -0
- data/shoes/ruby/lib/rdoc/ri/reader.rb +106 -0
- data/shoes/ruby/lib/rdoc/ri/util.rb +79 -0
- data/shoes/ruby/lib/rdoc/ri/writer.rb +68 -0
- data/shoes/ruby/lib/rdoc/ri.rb +8 -0
- data/shoes/ruby/lib/rdoc/stats.rb +115 -0
- data/shoes/ruby/lib/rdoc/template.rb +64 -0
- data/shoes/ruby/lib/rdoc/tokenstream.rb +33 -0
- data/shoes/ruby/lib/rdoc.rb +395 -0
- data/shoes/ruby/lib/resolv-replace.rb +63 -0
- data/shoes/ruby/lib/resolv.rb +2262 -0
- data/shoes/ruby/lib/rexml/attlistdecl.rb +62 -0
- data/shoes/ruby/lib/rexml/attribute.rb +188 -0
- data/shoes/ruby/lib/rexml/cdata.rb +67 -0
- data/shoes/ruby/lib/rexml/child.rb +96 -0
- data/shoes/ruby/lib/rexml/comment.rb +80 -0
- data/shoes/ruby/lib/rexml/doctype.rb +270 -0
- data/shoes/ruby/lib/rexml/document.rb +231 -0
- data/shoes/ruby/lib/rexml/dtd/attlistdecl.rb +10 -0
- data/shoes/ruby/lib/rexml/dtd/dtd.rb +51 -0
- data/shoes/ruby/lib/rexml/dtd/elementdecl.rb +17 -0
- data/shoes/ruby/lib/rexml/dtd/entitydecl.rb +56 -0
- data/shoes/ruby/lib/rexml/dtd/notationdecl.rb +39 -0
- data/shoes/ruby/lib/rexml/element.rb +1246 -0
- data/shoes/ruby/lib/rexml/encoding.rb +71 -0
- data/shoes/ruby/lib/rexml/encodings/CP-1252.rb +103 -0
- data/shoes/ruby/lib/rexml/encodings/EUC-JP.rb +35 -0
- data/shoes/ruby/lib/rexml/encodings/ICONV.rb +22 -0
- data/shoes/ruby/lib/rexml/encodings/ISO-8859-1.rb +7 -0
- data/shoes/ruby/lib/rexml/encodings/ISO-8859-15.rb +72 -0
- data/shoes/ruby/lib/rexml/encodings/SHIFT-JIS.rb +37 -0
- data/shoes/ruby/lib/rexml/encodings/SHIFT_JIS.rb +1 -0
- data/shoes/ruby/lib/rexml/encodings/UNILE.rb +34 -0
- data/shoes/ruby/lib/rexml/encodings/US-ASCII.rb +30 -0
- data/shoes/ruby/lib/rexml/encodings/UTF-16.rb +35 -0
- data/shoes/ruby/lib/rexml/encodings/UTF-8.rb +18 -0
- data/shoes/ruby/lib/rexml/entity.rb +166 -0
- data/shoes/ruby/lib/rexml/formatters/default.rb +109 -0
- data/shoes/ruby/lib/rexml/formatters/pretty.rb +139 -0
- data/shoes/ruby/lib/rexml/formatters/transitive.rb +58 -0
- data/shoes/ruby/lib/rexml/functions.rb +388 -0
- data/shoes/ruby/lib/rexml/instruction.rb +70 -0
- data/shoes/ruby/lib/rexml/light/node.rb +196 -0
- data/shoes/ruby/lib/rexml/namespace.rb +47 -0
- data/shoes/ruby/lib/rexml/node.rb +75 -0
- data/shoes/ruby/lib/rexml/output.rb +24 -0
- data/shoes/ruby/lib/rexml/parent.rb +166 -0
- data/shoes/ruby/lib/rexml/parseexception.rb +51 -0
- data/shoes/ruby/lib/rexml/parsers/baseparser.rb +530 -0
- data/shoes/ruby/lib/rexml/parsers/lightparser.rb +58 -0
- data/shoes/ruby/lib/rexml/parsers/pullparser.rb +196 -0
- data/shoes/ruby/lib/rexml/parsers/sax2parser.rb +247 -0
- data/shoes/ruby/lib/rexml/parsers/streamparser.rb +46 -0
- data/shoes/ruby/lib/rexml/parsers/treeparser.rb +100 -0
- data/shoes/ruby/lib/rexml/parsers/ultralightparser.rb +56 -0
- data/shoes/ruby/lib/rexml/parsers/xpathparser.rb +698 -0
- data/shoes/ruby/lib/rexml/quickpath.rb +263 -0
- data/shoes/ruby/lib/rexml/rexml.rb +31 -0
- data/shoes/ruby/lib/rexml/sax2listener.rb +97 -0
- data/shoes/ruby/lib/rexml/source.rb +258 -0
- data/shoes/ruby/lib/rexml/streamlistener.rb +92 -0
- data/shoes/ruby/lib/rexml/syncenumerator.rb +32 -0
- data/shoes/ruby/lib/rexml/text.rb +404 -0
- data/shoes/ruby/lib/rexml/undefinednamespaceexception.rb +8 -0
- data/shoes/ruby/lib/rexml/validation/relaxng.rb +559 -0
- data/shoes/ruby/lib/rexml/validation/validation.rb +155 -0
- data/shoes/ruby/lib/rexml/validation/validationexception.rb +9 -0
- data/shoes/ruby/lib/rexml/xmldecl.rb +119 -0
- data/shoes/ruby/lib/rexml/xmltokens.rb +18 -0
- data/shoes/ruby/lib/rexml/xpath.rb +77 -0
- data/shoes/ruby/lib/rexml/xpath_parser.rb +792 -0
- data/shoes/ruby/lib/rinda/rinda.rb +283 -0
- data/shoes/ruby/lib/rinda/ring.rb +271 -0
- data/shoes/ruby/lib/rinda/tuplespace.rb +642 -0
- data/shoes/ruby/lib/ripper/core.rb +70 -0
- data/shoes/ruby/lib/ripper/filter.rb +70 -0
- data/shoes/ruby/lib/ripper/lexer.rb +179 -0
- data/shoes/ruby/lib/ripper/sexp.rb +99 -0
- data/shoes/ruby/lib/ripper.rb +4 -0
- data/shoes/ruby/lib/rss/0.9.rb +427 -0
- data/shoes/ruby/lib/rss/1.0.rb +452 -0
- data/shoes/ruby/lib/rss/2.0.rb +111 -0
- data/shoes/ruby/lib/rss/atom.rb +748 -0
- data/shoes/ruby/lib/rss/content/1.0.rb +10 -0
- data/shoes/ruby/lib/rss/content/2.0.rb +12 -0
- data/shoes/ruby/lib/rss/content.rb +31 -0
- data/shoes/ruby/lib/rss/converter.rb +170 -0
- data/shoes/ruby/lib/rss/dublincore/1.0.rb +13 -0
- data/shoes/ruby/lib/rss/dublincore/2.0.rb +13 -0
- data/shoes/ruby/lib/rss/dublincore/atom.rb +17 -0
- data/shoes/ruby/lib/rss/dublincore.rb +161 -0
- data/shoes/ruby/lib/rss/image.rb +193 -0
- data/shoes/ruby/lib/rss/itunes.rb +410 -0
- data/shoes/ruby/lib/rss/maker/0.9.rb +467 -0
- data/shoes/ruby/lib/rss/maker/1.0.rb +434 -0
- data/shoes/ruby/lib/rss/maker/2.0.rb +223 -0
- data/shoes/ruby/lib/rss/maker/atom.rb +172 -0
- data/shoes/ruby/lib/rss/maker/base.rb +880 -0
- data/shoes/ruby/lib/rss/maker/content.rb +21 -0
- data/shoes/ruby/lib/rss/maker/dublincore.rb +124 -0
- data/shoes/ruby/lib/rss/maker/entry.rb +163 -0
- data/shoes/ruby/lib/rss/maker/feed.rb +430 -0
- data/shoes/ruby/lib/rss/maker/image.rb +111 -0
- data/shoes/ruby/lib/rss/maker/itunes.rb +242 -0
- data/shoes/ruby/lib/rss/maker/slash.rb +33 -0
- data/shoes/ruby/lib/rss/maker/syndication.rb +18 -0
- data/shoes/ruby/lib/rss/maker/taxonomy.rb +118 -0
- data/shoes/ruby/lib/rss/maker/trackback.rb +61 -0
- data/shoes/ruby/lib/rss/maker.rb +44 -0
- data/shoes/ruby/lib/rss/parser.rb +568 -0
- data/shoes/ruby/lib/rss/rexmlparser.rb +54 -0
- data/shoes/ruby/lib/rss/rss.rb +1313 -0
- data/shoes/ruby/lib/rss/slash.rb +49 -0
- data/shoes/ruby/lib/rss/syndication.rb +67 -0
- data/shoes/ruby/lib/rss/taxonomy.rb +145 -0
- data/shoes/ruby/lib/rss/trackback.rb +288 -0
- data/shoes/ruby/lib/rss/utils.rb +111 -0
- data/shoes/ruby/lib/rss/xml-stylesheet.rb +105 -0
- data/shoes/ruby/lib/rss/xml.rb +71 -0
- data/shoes/ruby/lib/rss/xmlparser.rb +93 -0
- data/shoes/ruby/lib/rss/xmlscanner.rb +121 -0
- data/shoes/ruby/lib/rss.rb +19 -0
- data/shoes/ruby/lib/rubygems/builder.rb +88 -0
- data/shoes/ruby/lib/rubygems/command.rb +406 -0
- data/shoes/ruby/lib/rubygems/command_manager.rb +146 -0
- data/shoes/ruby/lib/rubygems/commands/build_command.rb +53 -0
- data/shoes/ruby/lib/rubygems/commands/cert_command.rb +86 -0
- data/shoes/ruby/lib/rubygems/commands/check_command.rb +75 -0
- data/shoes/ruby/lib/rubygems/commands/cleanup_command.rb +91 -0
- data/shoes/ruby/lib/rubygems/commands/contents_command.rb +74 -0
- data/shoes/ruby/lib/rubygems/commands/dependency_command.rb +188 -0
- data/shoes/ruby/lib/rubygems/commands/environment_command.rb +128 -0
- data/shoes/ruby/lib/rubygems/commands/fetch_command.rb +62 -0
- data/shoes/ruby/lib/rubygems/commands/generate_index_command.rb +57 -0
- data/shoes/ruby/lib/rubygems/commands/help_command.rb +172 -0
- data/shoes/ruby/lib/rubygems/commands/install_command.rb +148 -0
- data/shoes/ruby/lib/rubygems/commands/list_command.rb +35 -0
- data/shoes/ruby/lib/rubygems/commands/lock_command.rb +110 -0
- data/shoes/ruby/lib/rubygems/commands/mirror_command.rb +111 -0
- data/shoes/ruby/lib/rubygems/commands/outdated_command.rb +33 -0
- data/shoes/ruby/lib/rubygems/commands/pristine_command.rb +93 -0
- data/shoes/ruby/lib/rubygems/commands/query_command.rb +233 -0
- data/shoes/ruby/lib/rubygems/commands/rdoc_command.rb +82 -0
- data/shoes/ruby/lib/rubygems/commands/search_command.rb +37 -0
- data/shoes/ruby/lib/rubygems/commands/server_command.rb +48 -0
- data/shoes/ruby/lib/rubygems/commands/sources_command.rb +152 -0
- data/shoes/ruby/lib/rubygems/commands/specification_command.rb +77 -0
- data/shoes/ruby/lib/rubygems/commands/stale_command.rb +27 -0
- data/shoes/ruby/lib/rubygems/commands/uninstall_command.rb +73 -0
- data/shoes/ruby/lib/rubygems/commands/unpack_command.rb +95 -0
- data/shoes/ruby/lib/rubygems/commands/update_command.rb +181 -0
- data/shoes/ruby/lib/rubygems/commands/which_command.rb +87 -0
- data/shoes/ruby/lib/rubygems/config_file.rb +266 -0
- data/shoes/ruby/lib/rubygems/custom_require.rb +46 -0
- data/shoes/ruby/lib/rubygems/defaults.rb +89 -0
- data/shoes/ruby/lib/rubygems/dependency.rb +119 -0
- data/shoes/ruby/lib/rubygems/dependency_installer.rb +258 -0
- data/shoes/ruby/lib/rubygems/dependency_list.rb +165 -0
- data/shoes/ruby/lib/rubygems/digest/digest_adapter.rb +40 -0
- data/shoes/ruby/lib/rubygems/digest/md5.rb +23 -0
- data/shoes/ruby/lib/rubygems/digest/sha1.rb +17 -0
- data/shoes/ruby/lib/rubygems/digest/sha2.rb +17 -0
- data/shoes/ruby/lib/rubygems/doc_manager.rb +214 -0
- data/shoes/ruby/lib/rubygems/exceptions.rb +84 -0
- data/shoes/ruby/lib/rubygems/ext/builder.rb +56 -0
- data/shoes/ruby/lib/rubygems/ext/configure_builder.rb +24 -0
- data/shoes/ruby/lib/rubygems/ext/ext_conf_builder.rb +23 -0
- data/shoes/ruby/lib/rubygems/ext/rake_builder.rb +27 -0
- data/shoes/ruby/lib/rubygems/ext.rb +18 -0
- data/shoes/ruby/lib/rubygems/format.rb +87 -0
- data/shoes/ruby/lib/rubygems/gem_openssl.rb +83 -0
- data/shoes/ruby/lib/rubygems/gem_path_searcher.rb +100 -0
- data/shoes/ruby/lib/rubygems/gem_runner.rb +58 -0
- data/shoes/ruby/lib/rubygems/indexer/abstract_index_builder.rb +88 -0
- data/shoes/ruby/lib/rubygems/indexer/latest_index_builder.rb +35 -0
- data/shoes/ruby/lib/rubygems/indexer/marshal_index_builder.rb +17 -0
- data/shoes/ruby/lib/rubygems/indexer/master_index_builder.rb +54 -0
- data/shoes/ruby/lib/rubygems/indexer/quick_index_builder.rb +50 -0
- data/shoes/ruby/lib/rubygems/indexer.rb +370 -0
- data/shoes/ruby/lib/rubygems/install_update_options.rb +113 -0
- data/shoes/ruby/lib/rubygems/installer.rb +578 -0
- data/shoes/ruby/lib/rubygems/local_remote_options.rb +134 -0
- data/shoes/ruby/lib/rubygems/old_format.rb +148 -0
- data/shoes/ruby/lib/rubygems/package/f_sync_dir.rb +24 -0
- data/shoes/ruby/lib/rubygems/package/tar_header.rb +245 -0
- data/shoes/ruby/lib/rubygems/package/tar_input.rb +219 -0
- data/shoes/ruby/lib/rubygems/package/tar_output.rb +143 -0
- data/shoes/ruby/lib/rubygems/package/tar_reader/entry.rb +99 -0
- data/shoes/ruby/lib/rubygems/package/tar_reader.rb +86 -0
- data/shoes/ruby/lib/rubygems/package/tar_writer.rb +180 -0
- data/shoes/ruby/lib/rubygems/package.rb +95 -0
- data/shoes/ruby/lib/rubygems/platform.rb +178 -0
- data/shoes/ruby/lib/rubygems/remote_fetcher.rb +344 -0
- data/shoes/ruby/lib/rubygems/require_paths_builder.rb +15 -0
- data/shoes/ruby/lib/rubygems/requirement.rb +163 -0
- data/shoes/ruby/lib/rubygems/rubygems_version.rb +6 -0
- data/shoes/ruby/lib/rubygems/security.rb +786 -0
- data/shoes/ruby/lib/rubygems/server.rb +629 -0
- data/shoes/ruby/lib/rubygems/source_index.rb +559 -0
- data/shoes/ruby/lib/rubygems/source_info_cache.rb +393 -0
- data/shoes/ruby/lib/rubygems/source_info_cache_entry.rb +56 -0
- data/shoes/ruby/lib/rubygems/spec_fetcher.rb +249 -0
- data/shoes/ruby/lib/rubygems/specification.rb +1262 -0
- data/shoes/ruby/lib/rubygems/test_utilities.rb +131 -0
- data/shoes/ruby/lib/rubygems/timer.rb +25 -0
- data/shoes/ruby/lib/rubygems/uninstaller.rb +242 -0
- data/shoes/ruby/lib/rubygems/user_interaction.rb +360 -0
- data/shoes/ruby/lib/rubygems/validator.rb +208 -0
- data/shoes/ruby/lib/rubygems/version.rb +167 -0
- data/shoes/ruby/lib/rubygems/version_option.rb +48 -0
- data/shoes/ruby/lib/rubygems.rb +888 -0
- data/shoes/ruby/lib/scanf.rb +703 -0
- data/shoes/ruby/lib/securerandom.rb +182 -0
- data/shoes/ruby/lib/set.rb +1274 -0
- data/shoes/ruby/lib/shell/builtin-command.rb +160 -0
- data/shoes/ruby/lib/shell/command-processor.rb +593 -0
- data/shoes/ruby/lib/shell/error.rb +25 -0
- data/shoes/ruby/lib/shell/filter.rb +109 -0
- data/shoes/ruby/lib/shell/process-controller.rb +319 -0
- data/shoes/ruby/lib/shell/system-command.rb +159 -0
- data/shoes/ruby/lib/shell/version.rb +15 -0
- data/shoes/ruby/lib/shell.rb +300 -0
- data/shoes/ruby/lib/shellwords.rb +156 -0
- data/shoes/ruby/lib/singleton.rb +313 -0
- data/shoes/ruby/lib/sync.rb +307 -0
- data/shoes/ruby/lib/tempfile.rb +218 -0
- data/shoes/ruby/lib/test/unit/assertions.rb +122 -0
- data/shoes/ruby/lib/test/unit/testcase.rb +12 -0
- data/shoes/ruby/lib/test/unit.rb +66 -0
- data/shoes/ruby/lib/thread.rb +367 -0
- data/shoes/ruby/lib/thwait.rb +168 -0
- data/shoes/ruby/lib/time.rb +869 -0
- data/shoes/ruby/lib/timeout.rb +108 -0
- data/shoes/ruby/lib/tmpdir.rb +138 -0
- data/shoes/ruby/lib/tracer.rb +166 -0
- data/shoes/ruby/lib/tsort.rb +290 -0
- data/shoes/ruby/lib/ubygems.rb +10 -0
- data/shoes/ruby/lib/un.rb +304 -0
- data/shoes/ruby/lib/uri/common.rb +727 -0
- data/shoes/ruby/lib/uri/ftp.rb +198 -0
- data/shoes/ruby/lib/uri/generic.rb +1128 -0
- data/shoes/ruby/lib/uri/http.rb +100 -0
- data/shoes/ruby/lib/uri/https.rb +20 -0
- data/shoes/ruby/lib/uri/ldap.rb +190 -0
- data/shoes/ruby/lib/uri/ldaps.rb +12 -0
- data/shoes/ruby/lib/uri/mailto.rb +266 -0
- data/shoes/ruby/lib/uri.rb +29 -0
- data/shoes/ruby/lib/weakref.rb +80 -0
- data/shoes/ruby/lib/webrick/accesslog.rb +75 -0
- data/shoes/ruby/lib/webrick/cgi.rb +260 -0
- data/shoes/ruby/lib/webrick/compat.rb +15 -0
- data/shoes/ruby/lib/webrick/config.rb +100 -0
- data/shoes/ruby/lib/webrick/cookie.rb +110 -0
- data/shoes/ruby/lib/webrick/htmlutils.rb +25 -0
- data/shoes/ruby/lib/webrick/httpauth/authenticator.rb +79 -0
- data/shoes/ruby/lib/webrick/httpauth/basicauth.rb +65 -0
- data/shoes/ruby/lib/webrick/httpauth/digestauth.rb +344 -0
- data/shoes/ruby/lib/webrick/httpauth/htdigest.rb +91 -0
- data/shoes/ruby/lib/webrick/httpauth/htgroup.rb +61 -0
- data/shoes/ruby/lib/webrick/httpauth/htpasswd.rb +83 -0
- data/shoes/ruby/lib/webrick/httpauth/userdb.rb +29 -0
- data/shoes/ruby/lib/webrick/httpauth.rb +45 -0
- data/shoes/ruby/lib/webrick/httpproxy.rb +288 -0
- data/shoes/ruby/lib/webrick/httprequest.rb +402 -0
- data/shoes/ruby/lib/webrick/httpresponse.rb +326 -0
- data/shoes/ruby/lib/webrick/https.rb +63 -0
- data/shoes/ruby/lib/webrick/httpserver.rb +217 -0
- data/shoes/ruby/lib/webrick/httpservlet/abstract.rb +70 -0
- data/shoes/ruby/lib/webrick/httpservlet/cgi_runner.rb +47 -0
- data/shoes/ruby/lib/webrick/httpservlet/cgihandler.rb +110 -0
- data/shoes/ruby/lib/webrick/httpservlet/erbhandler.rb +54 -0
- data/shoes/ruby/lib/webrick/httpservlet/filehandler.rb +435 -0
- data/shoes/ruby/lib/webrick/httpservlet/prochandler.rb +33 -0
- data/shoes/ruby/lib/webrick/httpservlet.rb +22 -0
- data/shoes/ruby/lib/webrick/httpstatus.rb +132 -0
- data/shoes/ruby/lib/webrick/httputils.rb +392 -0
- data/shoes/ruby/lib/webrick/httpversion.rb +49 -0
- data/shoes/ruby/lib/webrick/log.rb +88 -0
- data/shoes/ruby/lib/webrick/server.rb +210 -0
- data/shoes/ruby/lib/webrick/ssl.rb +126 -0
- data/shoes/ruby/lib/webrick/utils.rb +175 -0
- data/shoes/ruby/lib/webrick/version.rb +13 -0
- data/shoes/ruby/lib/webrick.rb +29 -0
- data/shoes/ruby/lib/win32/registry.rb +832 -0
- data/shoes/ruby/lib/win32/resolv.rb +370 -0
- data/shoes/ruby/lib/win32/sspi.rb +330 -0
- data/shoes/ruby/lib/win32ole/property.rb +16 -0
- data/shoes/ruby/lib/xmlrpc/base64.rb +81 -0
- data/shoes/ruby/lib/xmlrpc/client.rb +625 -0
- data/shoes/ruby/lib/xmlrpc/config.rb +40 -0
- data/shoes/ruby/lib/xmlrpc/create.rb +290 -0
- data/shoes/ruby/lib/xmlrpc/datetime.rb +142 -0
- data/shoes/ruby/lib/xmlrpc/httpserver.rb +178 -0
- data/shoes/ruby/lib/xmlrpc/marshal.rb +76 -0
- data/shoes/ruby/lib/xmlrpc/parser.rb +813 -0
- data/shoes/ruby/lib/xmlrpc/server.rb +778 -0
- data/shoes/ruby/lib/xmlrpc/utils.rb +165 -0
- data/shoes/ruby/lib/yaml/baseemitter.rb +242 -0
- data/shoes/ruby/lib/yaml/basenode.rb +216 -0
- data/shoes/ruby/lib/yaml/constants.rb +45 -0
- data/shoes/ruby/lib/yaml/dbm.rb +111 -0
- data/shoes/ruby/lib/yaml/encoding.rb +33 -0
- data/shoes/ruby/lib/yaml/error.rb +34 -0
- data/shoes/ruby/lib/yaml/loader.rb +14 -0
- data/shoes/ruby/lib/yaml/rubytypes.rb +446 -0
- data/shoes/ruby/lib/yaml/store.rb +43 -0
- data/shoes/ruby/lib/yaml/stream.rb +40 -0
- data/shoes/ruby/lib/yaml/stringio.rb +83 -0
- data/shoes/ruby/lib/yaml/syck.rb +19 -0
- data/shoes/ruby/lib/yaml/tag.rb +91 -0
- data/shoes/ruby/lib/yaml/types.rb +192 -0
- data/shoes/ruby/lib/yaml/yamlnode.rb +54 -0
- data/shoes/ruby/lib/yaml/ypath.rb +52 -0
- data/shoes/ruby/lib/yaml.rb +440 -0
- data/shoes/samples/class-book.rb +43 -0
- data/shoes/samples/class-book.yaml +387 -0
- data/shoes/samples/expert-definr.rb +23 -0
- data/shoes/samples/expert-funnies.rb +51 -0
- data/shoes/samples/expert-irb.rb +112 -0
- data/shoes/samples/expert-minesweeper.rb +267 -0
- data/shoes/samples/expert-othello.rb +319 -0
- data/shoes/samples/expert-pong.rb +62 -0
- data/shoes/samples/expert-tankspank.rb +385 -0
- data/shoes/samples/good-arc.rb +37 -0
- data/shoes/samples/good-clock.rb +51 -0
- data/shoes/samples/good-follow.rb +26 -0
- data/shoes/samples/good-reminder.rb +174 -0
- data/shoes/samples/good-vjot.rb +56 -0
- data/shoes/samples/simple-accordion.rb +75 -0
- data/shoes/samples/simple-anim-shapes.rb +17 -0
- data/shoes/samples/simple-anim-text.rb +13 -0
- data/shoes/samples/simple-arc.rb +23 -0
- data/shoes/samples/simple-bounce.rb +24 -0
- data/shoes/samples/simple-calc.rb +70 -0
- data/shoes/samples/simple-control-sizes.rb +24 -0
- data/shoes/samples/simple-curve.rb +26 -0
- data/shoes/samples/simple-dialogs.rb +29 -0
- data/shoes/samples/simple-downloader.rb +27 -0
- data/shoes/samples/simple-draw.rb +13 -0
- data/shoes/samples/simple-editor.rb +28 -0
- data/shoes/samples/simple-form.rb +28 -0
- data/shoes/samples/simple-form.shy +0 -0
- data/shoes/samples/simple-mask.rb +21 -0
- data/shoes/samples/simple-menu.rb +31 -0
- data/shoes/samples/simple-menu1.rb +35 -0
- data/shoes/samples/simple-rubygems.rb +29 -0
- data/shoes/samples/simple-slide.rb +45 -0
- data/shoes/samples/simple-sphere.rb +28 -0
- data/shoes/samples/simple-timer.rb +13 -0
- data/shoes/samples/simple-video.rb +13 -0
- data/shoes/shoes +21 -0
- data/shoes/shoes.exe +0 -0
- data/shoes/shoes.exe.manifest +17 -0
- data/shoes/sqlite3.dll +0 -0
- data/shoes/static/Shoes.icns +0 -0
- data/shoes/static/Thumbs.db +0 -0
- data/shoes/static/app-icon.png +0 -0
- data/shoes/static/avatar.png +0 -0
- data/shoes/static/code_highlighter.js +188 -0
- data/shoes/static/code_highlighter_ruby.js +26 -0
- data/shoes/static/icon-debug.png +0 -0
- data/shoes/static/icon-error.png +0 -0
- data/shoes/static/icon-info.png +0 -0
- data/shoes/static/icon-warn.png +0 -0
- data/shoes/static/listbox_button1.png +0 -0
- data/shoes/static/listbox_button2.png +0 -0
- data/shoes/static/man-app.png +0 -0
- data/shoes/static/man-builds.png +0 -0
- data/shoes/static/man-editor-notepad.png +0 -0
- data/shoes/static/man-editor-osx.png +0 -0
- data/shoes/static/man-ele-background.png +0 -0
- data/shoes/static/man-ele-border.png +0 -0
- data/shoes/static/man-ele-button.png +0 -0
- data/shoes/static/man-ele-check.png +0 -0
- data/shoes/static/man-ele-editbox.png +0 -0
- data/shoes/static/man-ele-editline.png +0 -0
- data/shoes/static/man-ele-image.png +0 -0
- data/shoes/static/man-ele-listbox.png +0 -0
- data/shoes/static/man-ele-progress.png +0 -0
- data/shoes/static/man-ele-radio.png +0 -0
- data/shoes/static/man-ele-shape.png +0 -0
- data/shoes/static/man-ele-textblock.png +0 -0
- data/shoes/static/man-ele-video.png +0 -0
- data/shoes/static/man-intro-dmg.png +0 -0
- data/shoes/static/man-intro-exe.png +0 -0
- data/shoes/static/man-look-tiger.png +0 -0
- data/shoes/static/man-look-ubuntu.png +0 -0
- data/shoes/static/man-look-vista.png +0 -0
- data/shoes/static/man-run-osx.png +0 -0
- data/shoes/static/man-run-vista.png +0 -0
- data/shoes/static/man-run-xp.png +0 -0
- data/shoes/static/man-shot1.png +0 -0
- data/shoes/static/manual-en.txt +2783 -0
- data/shoes/static/manual-ja.txt +2780 -0
- data/shoes/static/manual.css +167 -0
- data/shoes/static/menu-corner1.png +0 -0
- data/shoes/static/menu-corner2.png +0 -0
- data/shoes/static/menu-gray.png +0 -0
- data/shoes/static/menu-left.png +0 -0
- data/shoes/static/menu-right.png +0 -0
- data/shoes/static/menu-top.png +0 -0
- data/shoes/static/shoes-dmg.jpg +0 -0
- data/shoes/static/shoes-icon-blue.png +0 -0
- data/shoes/static/shoes-icon.png +0 -0
- data/shoes/static/shoes-manual-apps.gif +0 -0
- data/shoes/static/stripe.png +0 -0
- data/shoes/static/stubs/blank.exe +0 -0
- data/shoes/static/stubs/blank.hfz +0 -0
- data/shoes/static/stubs/blank.run +375 -0
- data/shoes/static/stubs/cocoa-install +0 -0
- data/shoes/static/stubs/sh-install +48 -0
- data/shoes/static/tutor-back.png +0 -0
- data/shoes/zlib.dll +0 -0
- data/shoes/zlib1.dll +0 -0
- metadata +887 -0
|
@@ -0,0 +1,1262 @@
|
|
|
1
|
+
#--
|
|
2
|
+
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
|
|
3
|
+
# All rights reserved.
|
|
4
|
+
# See LICENSE.txt for permissions.
|
|
5
|
+
#++
|
|
6
|
+
|
|
7
|
+
require 'rubygems'
|
|
8
|
+
require 'rubygems/version'
|
|
9
|
+
require 'rubygems/requirement'
|
|
10
|
+
require 'rubygems/platform'
|
|
11
|
+
|
|
12
|
+
# :stopdoc:
|
|
13
|
+
# Time::today has been deprecated in 0.9.5 and will be removed.
|
|
14
|
+
if RUBY_VERSION < '1.9' then
|
|
15
|
+
def Time.today
|
|
16
|
+
t = Time.now
|
|
17
|
+
t - ((t.to_f + t.gmt_offset) % 86400)
|
|
18
|
+
end unless defined? Time.today
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
class Date; end # for ruby_code if date.rb wasn't required
|
|
22
|
+
|
|
23
|
+
# :startdoc:
|
|
24
|
+
|
|
25
|
+
module Gem
|
|
26
|
+
|
|
27
|
+
##
|
|
28
|
+
# == Gem::Specification
|
|
29
|
+
#
|
|
30
|
+
# The Specification class contains the metadata for a Gem. Typically
|
|
31
|
+
# defined in a .gemspec file or a Rakefile, and looks like this:
|
|
32
|
+
#
|
|
33
|
+
# spec = Gem::Specification.new do |s|
|
|
34
|
+
# s.name = 'rfoo'
|
|
35
|
+
# s.version = '1.0'
|
|
36
|
+
# s.summary = 'Example gem specification'
|
|
37
|
+
# ...
|
|
38
|
+
# end
|
|
39
|
+
#
|
|
40
|
+
# There are many <em>gemspec attributes</em>, and the best place to learn
|
|
41
|
+
# about them in the "Gemspec Reference" linked from the RubyGems wiki.
|
|
42
|
+
|
|
43
|
+
class Specification
|
|
44
|
+
|
|
45
|
+
##
|
|
46
|
+
# Allows deinstallation of gems with legacy platforms.
|
|
47
|
+
|
|
48
|
+
attr_accessor :original_platform # :nodoc:
|
|
49
|
+
|
|
50
|
+
##
|
|
51
|
+
# The the version number of a specification that does not specify one
|
|
52
|
+
# (i.e. RubyGems 0.7 or earlier).
|
|
53
|
+
|
|
54
|
+
NONEXISTENT_SPECIFICATION_VERSION = -1
|
|
55
|
+
|
|
56
|
+
##
|
|
57
|
+
# The specification version applied to any new Specification instances
|
|
58
|
+
# created. This should be bumped whenever something in the spec format
|
|
59
|
+
# changes.
|
|
60
|
+
#--
|
|
61
|
+
# When updating this number, be sure to also update #to_ruby.
|
|
62
|
+
#
|
|
63
|
+
# NOTE RubyGems < 1.2 cannot load specification versions > 2.
|
|
64
|
+
|
|
65
|
+
CURRENT_SPECIFICATION_VERSION = 2
|
|
66
|
+
|
|
67
|
+
##
|
|
68
|
+
# An informal list of changes to the specification. The highest-valued
|
|
69
|
+
# key should be equal to the CURRENT_SPECIFICATION_VERSION.
|
|
70
|
+
|
|
71
|
+
SPECIFICATION_VERSION_HISTORY = {
|
|
72
|
+
-1 => ['(RubyGems versions up to and including 0.7 did not have versioned specifications)'],
|
|
73
|
+
1 => [
|
|
74
|
+
'Deprecated "test_suite_file" in favor of the new, but equivalent, "test_files"',
|
|
75
|
+
'"test_file=x" is a shortcut for "test_files=[x]"'
|
|
76
|
+
],
|
|
77
|
+
2 => [
|
|
78
|
+
'Added "required_rubygems_version"',
|
|
79
|
+
'Now forward-compatible with future versions',
|
|
80
|
+
],
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
# :stopdoc:
|
|
84
|
+
MARSHAL_FIELDS = { -1 => 16, 1 => 16, 2 => 16 }
|
|
85
|
+
|
|
86
|
+
now = Time.at(Time.now.to_i)
|
|
87
|
+
TODAY = now - ((now.to_i + now.gmt_offset) % 86400)
|
|
88
|
+
# :startdoc:
|
|
89
|
+
|
|
90
|
+
##
|
|
91
|
+
# List of Specification instances.
|
|
92
|
+
|
|
93
|
+
@@list = []
|
|
94
|
+
|
|
95
|
+
##
|
|
96
|
+
# Optional block used to gather newly defined instances.
|
|
97
|
+
|
|
98
|
+
@@gather = nil
|
|
99
|
+
|
|
100
|
+
##
|
|
101
|
+
# List of attribute names: [:name, :version, ...]
|
|
102
|
+
@@required_attributes = []
|
|
103
|
+
|
|
104
|
+
##
|
|
105
|
+
# List of _all_ attributes and default values:
|
|
106
|
+
#
|
|
107
|
+
# [[:name, nil],
|
|
108
|
+
# [:bindir, 'bin'],
|
|
109
|
+
# ...]
|
|
110
|
+
|
|
111
|
+
@@attributes = []
|
|
112
|
+
|
|
113
|
+
@@nil_attributes = []
|
|
114
|
+
@@non_nil_attributes = [:@original_platform]
|
|
115
|
+
|
|
116
|
+
##
|
|
117
|
+
# List of array attributes
|
|
118
|
+
|
|
119
|
+
@@array_attributes = []
|
|
120
|
+
|
|
121
|
+
##
|
|
122
|
+
# Map of attribute names to default values.
|
|
123
|
+
|
|
124
|
+
@@default_value = {}
|
|
125
|
+
|
|
126
|
+
##
|
|
127
|
+
# Names of all specification attributes
|
|
128
|
+
|
|
129
|
+
def self.attribute_names
|
|
130
|
+
@@attributes.map { |name, default| name }
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
##
|
|
134
|
+
# Default values for specification attributes
|
|
135
|
+
|
|
136
|
+
def self.attribute_defaults
|
|
137
|
+
@@attributes.dup
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
##
|
|
141
|
+
# The default value for specification attribute +name+
|
|
142
|
+
|
|
143
|
+
def self.default_value(name)
|
|
144
|
+
@@default_value[name]
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
##
|
|
148
|
+
# Required specification attributes
|
|
149
|
+
|
|
150
|
+
def self.required_attributes
|
|
151
|
+
@@required_attributes.dup
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
##
|
|
155
|
+
# Is +name+ a required attribute?
|
|
156
|
+
|
|
157
|
+
def self.required_attribute?(name)
|
|
158
|
+
@@required_attributes.include? name.to_sym
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
##
|
|
162
|
+
# Specification attributes that are arrays (appendable and so-forth)
|
|
163
|
+
|
|
164
|
+
def self.array_attributes
|
|
165
|
+
@@array_attributes.dup
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
##
|
|
169
|
+
# A list of Specification instances that have been defined in this Ruby
|
|
170
|
+
# instance.
|
|
171
|
+
|
|
172
|
+
def self.list
|
|
173
|
+
@@list
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
##
|
|
177
|
+
# Specifies the +name+ and +default+ for a specification attribute, and
|
|
178
|
+
# creates a reader and writer method like Module#attr_accessor.
|
|
179
|
+
#
|
|
180
|
+
# The reader method returns the default if the value hasn't been set.
|
|
181
|
+
|
|
182
|
+
def self.attribute(name, default=nil)
|
|
183
|
+
ivar_name = "@#{name}".intern
|
|
184
|
+
if default.nil? then
|
|
185
|
+
@@nil_attributes << ivar_name
|
|
186
|
+
else
|
|
187
|
+
@@non_nil_attributes << [ivar_name, default]
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
@@attributes << [name, default]
|
|
191
|
+
@@default_value[name] = default
|
|
192
|
+
attr_accessor(name)
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
##
|
|
196
|
+
# Same as :attribute, but ensures that values assigned to the attribute
|
|
197
|
+
# are array values by applying :to_a to the value.
|
|
198
|
+
|
|
199
|
+
def self.array_attribute(name)
|
|
200
|
+
@@non_nil_attributes << ["@#{name}".intern, []]
|
|
201
|
+
|
|
202
|
+
@@array_attributes << name
|
|
203
|
+
@@attributes << [name, []]
|
|
204
|
+
@@default_value[name] = []
|
|
205
|
+
code = %{
|
|
206
|
+
def #{name}
|
|
207
|
+
@#{name} ||= []
|
|
208
|
+
end
|
|
209
|
+
def #{name}=(value)
|
|
210
|
+
@#{name} = Array(value)
|
|
211
|
+
end
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
module_eval code, __FILE__, __LINE__ - 9
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
##
|
|
218
|
+
# Same as attribute above, but also records this attribute as mandatory.
|
|
219
|
+
|
|
220
|
+
def self.required_attribute(*args)
|
|
221
|
+
@@required_attributes << args.first
|
|
222
|
+
attribute(*args)
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
##
|
|
226
|
+
# Sometimes we don't want the world to use a setter method for a
|
|
227
|
+
# particular attribute.
|
|
228
|
+
#
|
|
229
|
+
# +read_only+ makes it private so we can still use it internally.
|
|
230
|
+
|
|
231
|
+
def self.read_only(*names)
|
|
232
|
+
names.each do |name|
|
|
233
|
+
private "#{name}="
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Shortcut for creating several attributes at once (each with a default
|
|
238
|
+
# value of +nil+).
|
|
239
|
+
|
|
240
|
+
def self.attributes(*args)
|
|
241
|
+
args.each do |arg|
|
|
242
|
+
attribute(arg, nil)
|
|
243
|
+
end
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
##
|
|
247
|
+
# Some attributes require special behaviour when they are accessed. This
|
|
248
|
+
# allows for that.
|
|
249
|
+
|
|
250
|
+
def self.overwrite_accessor(name, &block)
|
|
251
|
+
remove_method name
|
|
252
|
+
define_method(name, &block)
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
##
|
|
256
|
+
# Defines a _singular_ version of an existing _plural_ attribute (i.e. one
|
|
257
|
+
# whose value is expected to be an array). This means just creating a
|
|
258
|
+
# helper method that takes a single value and appends it to the array.
|
|
259
|
+
# These are created for convenience, so that in a spec, one can write
|
|
260
|
+
#
|
|
261
|
+
# s.require_path = 'mylib'
|
|
262
|
+
#
|
|
263
|
+
# instead of:
|
|
264
|
+
#
|
|
265
|
+
# s.require_paths = ['mylib']
|
|
266
|
+
#
|
|
267
|
+
# That above convenience is available courtesy of:
|
|
268
|
+
#
|
|
269
|
+
# attribute_alias_singular :require_path, :require_paths
|
|
270
|
+
|
|
271
|
+
def self.attribute_alias_singular(singular, plural)
|
|
272
|
+
define_method("#{singular}=") { |val|
|
|
273
|
+
send("#{plural}=", [val])
|
|
274
|
+
}
|
|
275
|
+
define_method("#{singular}") {
|
|
276
|
+
val = send("#{plural}")
|
|
277
|
+
val.nil? ? nil : val.first
|
|
278
|
+
}
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
##
|
|
282
|
+
# Dump only crucial instance variables.
|
|
283
|
+
#--
|
|
284
|
+
# MAINTAIN ORDER!
|
|
285
|
+
|
|
286
|
+
def _dump(limit)
|
|
287
|
+
Marshal.dump [
|
|
288
|
+
@rubygems_version,
|
|
289
|
+
@specification_version,
|
|
290
|
+
@name,
|
|
291
|
+
@version,
|
|
292
|
+
(Time === @date ? @date : (require 'time'; Time.parse(@date.to_s))),
|
|
293
|
+
@summary,
|
|
294
|
+
@required_ruby_version,
|
|
295
|
+
@required_rubygems_version,
|
|
296
|
+
@original_platform,
|
|
297
|
+
@dependencies,
|
|
298
|
+
@rubyforge_project,
|
|
299
|
+
@email,
|
|
300
|
+
@authors,
|
|
301
|
+
@description,
|
|
302
|
+
@homepage,
|
|
303
|
+
@has_rdoc,
|
|
304
|
+
@new_platform,
|
|
305
|
+
]
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
##
|
|
309
|
+
# Load custom marshal format, re-initializing defaults as needed
|
|
310
|
+
|
|
311
|
+
def self._load(str)
|
|
312
|
+
array = Marshal.load str
|
|
313
|
+
|
|
314
|
+
spec = Gem::Specification.new
|
|
315
|
+
spec.instance_variable_set :@specification_version, array[1]
|
|
316
|
+
|
|
317
|
+
current_version = CURRENT_SPECIFICATION_VERSION
|
|
318
|
+
|
|
319
|
+
field_count = if spec.specification_version > current_version then
|
|
320
|
+
spec.instance_variable_set :@specification_version,
|
|
321
|
+
current_version
|
|
322
|
+
MARSHAL_FIELDS[current_version]
|
|
323
|
+
else
|
|
324
|
+
MARSHAL_FIELDS[spec.specification_version]
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
if array.size < field_count then
|
|
328
|
+
raise TypeError, "invalid Gem::Specification format #{array.inspect}"
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
spec.instance_variable_set :@rubygems_version, array[0]
|
|
332
|
+
# spec version
|
|
333
|
+
spec.instance_variable_set :@name, array[2]
|
|
334
|
+
spec.instance_variable_set :@version, array[3]
|
|
335
|
+
spec.instance_variable_set :@date, array[4]
|
|
336
|
+
spec.instance_variable_set :@summary, array[5]
|
|
337
|
+
spec.instance_variable_set :@required_ruby_version, array[6]
|
|
338
|
+
spec.instance_variable_set :@required_rubygems_version, array[7]
|
|
339
|
+
spec.instance_variable_set :@original_platform, array[8]
|
|
340
|
+
spec.instance_variable_set :@dependencies, array[9]
|
|
341
|
+
spec.instance_variable_set :@rubyforge_project, array[10]
|
|
342
|
+
spec.instance_variable_set :@email, array[11]
|
|
343
|
+
spec.instance_variable_set :@authors, array[12]
|
|
344
|
+
spec.instance_variable_set :@description, array[13]
|
|
345
|
+
spec.instance_variable_set :@homepage, array[14]
|
|
346
|
+
spec.instance_variable_set :@has_rdoc, array[15]
|
|
347
|
+
spec.instance_variable_set :@new_platform, array[16]
|
|
348
|
+
spec.instance_variable_set :@platform, array[16].to_s
|
|
349
|
+
spec.instance_variable_set :@loaded, false
|
|
350
|
+
|
|
351
|
+
spec
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
##
|
|
355
|
+
# List of depedencies that will automatically be activated at runtime.
|
|
356
|
+
|
|
357
|
+
def runtime_dependencies
|
|
358
|
+
dependencies.select { |d| d.type == :runtime || d.type == nil }
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
##
|
|
362
|
+
# List of dependencies that are used for development
|
|
363
|
+
|
|
364
|
+
def development_dependencies
|
|
365
|
+
dependencies.select { |d| d.type == :development }
|
|
366
|
+
end
|
|
367
|
+
|
|
368
|
+
def test_suite_file # :nodoc:
|
|
369
|
+
warn 'test_suite_file deprecated, use test_files'
|
|
370
|
+
test_files.first
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
def test_suite_file=(val) # :nodoc:
|
|
374
|
+
warn 'test_suite_file= deprecated, use test_files='
|
|
375
|
+
@test_files = [] unless defined? @test_files
|
|
376
|
+
@test_files << val
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
##
|
|
380
|
+
# true when this gemspec has been loaded from a specifications directory.
|
|
381
|
+
# This attribute is not persisted.
|
|
382
|
+
|
|
383
|
+
attr_accessor :loaded
|
|
384
|
+
|
|
385
|
+
##
|
|
386
|
+
# Path this gemspec was loaded from. This attribute is not persisted.
|
|
387
|
+
|
|
388
|
+
attr_accessor :loaded_from
|
|
389
|
+
|
|
390
|
+
##
|
|
391
|
+
# Returns an array with bindir attached to each executable in the
|
|
392
|
+
# executables list
|
|
393
|
+
|
|
394
|
+
def add_bindir(executables)
|
|
395
|
+
return nil if executables.nil?
|
|
396
|
+
|
|
397
|
+
if @bindir then
|
|
398
|
+
Array(executables).map { |e| File.join(@bindir, e) }
|
|
399
|
+
else
|
|
400
|
+
executables
|
|
401
|
+
end
|
|
402
|
+
rescue
|
|
403
|
+
return nil
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
##
|
|
407
|
+
# Files in the Gem under one of the require_paths
|
|
408
|
+
|
|
409
|
+
def lib_files
|
|
410
|
+
@files.select do |file|
|
|
411
|
+
require_paths.any? do |path|
|
|
412
|
+
file.index(path) == 0
|
|
413
|
+
end
|
|
414
|
+
end
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
##
|
|
418
|
+
# True if this gem was loaded from disk
|
|
419
|
+
|
|
420
|
+
alias :loaded? :loaded
|
|
421
|
+
|
|
422
|
+
##
|
|
423
|
+
# True if this gem has files in test_files
|
|
424
|
+
|
|
425
|
+
def has_unit_tests?
|
|
426
|
+
not test_files.empty?
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
alias has_test_suite? has_unit_tests? # :nodoc: deprecated
|
|
430
|
+
|
|
431
|
+
##
|
|
432
|
+
# Specification constructor. Assigns the default values to the
|
|
433
|
+
# attributes, adds this spec to the list of loaded specs (see
|
|
434
|
+
# Specification.list), and yields itself for further initialization.
|
|
435
|
+
|
|
436
|
+
def initialize
|
|
437
|
+
@new_platform = nil
|
|
438
|
+
assign_defaults
|
|
439
|
+
@loaded = false
|
|
440
|
+
@loaded_from = nil
|
|
441
|
+
@@list << self
|
|
442
|
+
|
|
443
|
+
yield self if block_given?
|
|
444
|
+
|
|
445
|
+
@@gather.call(self) if @@gather
|
|
446
|
+
end
|
|
447
|
+
|
|
448
|
+
##
|
|
449
|
+
# Each attribute has a default value (possibly nil). Here, we initialize
|
|
450
|
+
# all attributes to their default value. This is done through the
|
|
451
|
+
# accessor methods, so special behaviours will be honored. Furthermore,
|
|
452
|
+
# we take a _copy_ of the default so each specification instance has its
|
|
453
|
+
# own empty arrays, etc.
|
|
454
|
+
|
|
455
|
+
def assign_defaults
|
|
456
|
+
@@nil_attributes.each do |name|
|
|
457
|
+
instance_variable_set name, nil
|
|
458
|
+
end
|
|
459
|
+
|
|
460
|
+
@@non_nil_attributes.each do |name, default|
|
|
461
|
+
value = case default
|
|
462
|
+
when Time, Numeric, Symbol, true, false, nil then default
|
|
463
|
+
else default.dup
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
instance_variable_set name, value
|
|
467
|
+
end
|
|
468
|
+
|
|
469
|
+
# HACK
|
|
470
|
+
instance_variable_set :@new_platform, Gem::Platform::RUBY
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
##
|
|
474
|
+
# Special loader for YAML files. When a Specification object is loaded
|
|
475
|
+
# from a YAML file, it bypasses the normal Ruby object initialization
|
|
476
|
+
# routine (#initialize). This method makes up for that and deals with
|
|
477
|
+
# gems of different ages.
|
|
478
|
+
#
|
|
479
|
+
# 'input' can be anything that YAML.load() accepts: String or IO.
|
|
480
|
+
|
|
481
|
+
def self.from_yaml(input)
|
|
482
|
+
input = normalize_yaml_input input
|
|
483
|
+
spec = YAML.load input
|
|
484
|
+
|
|
485
|
+
if spec && spec.class == FalseClass then
|
|
486
|
+
raise Gem::EndOfYAMLException
|
|
487
|
+
end
|
|
488
|
+
|
|
489
|
+
unless Gem::Specification === spec then
|
|
490
|
+
raise Gem::Exception, "YAML data doesn't evaluate to gem specification"
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
unless (spec.instance_variables.include? '@specification_version' or
|
|
494
|
+
spec.instance_variables.include? :@specification_version) and
|
|
495
|
+
spec.instance_variable_get :@specification_version
|
|
496
|
+
spec.instance_variable_set :@specification_version,
|
|
497
|
+
NONEXISTENT_SPECIFICATION_VERSION
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
spec
|
|
501
|
+
end
|
|
502
|
+
|
|
503
|
+
##
|
|
504
|
+
# Loads ruby format gemspec from +filename+
|
|
505
|
+
|
|
506
|
+
def self.load(filename)
|
|
507
|
+
gemspec = nil
|
|
508
|
+
fail "NESTED Specification.load calls not allowed!" if @@gather
|
|
509
|
+
@@gather = proc { |gs| gemspec = gs }
|
|
510
|
+
data = File.read(filename)
|
|
511
|
+
eval(data)
|
|
512
|
+
gemspec
|
|
513
|
+
ensure
|
|
514
|
+
@@gather = nil
|
|
515
|
+
end
|
|
516
|
+
|
|
517
|
+
##
|
|
518
|
+
# Make sure the YAML specification is properly formatted with dashes
|
|
519
|
+
|
|
520
|
+
def self.normalize_yaml_input(input)
|
|
521
|
+
result = input.respond_to?(:read) ? input.read : input
|
|
522
|
+
result = "--- " + result unless result =~ /^--- /
|
|
523
|
+
result
|
|
524
|
+
end
|
|
525
|
+
|
|
526
|
+
##
|
|
527
|
+
# Sets the rubygems_version to the current RubyGems version
|
|
528
|
+
|
|
529
|
+
def mark_version
|
|
530
|
+
@rubygems_version = RubyGemsVersion
|
|
531
|
+
end
|
|
532
|
+
|
|
533
|
+
##
|
|
534
|
+
# Ignore unknown attributes while loading
|
|
535
|
+
|
|
536
|
+
def method_missing(sym, *a, &b) # :nodoc:
|
|
537
|
+
if @specification_version > CURRENT_SPECIFICATION_VERSION and
|
|
538
|
+
sym.to_s =~ /=$/ then
|
|
539
|
+
warn "ignoring #{sym} loading #{full_name}" if $DEBUG
|
|
540
|
+
else
|
|
541
|
+
super
|
|
542
|
+
end
|
|
543
|
+
end
|
|
544
|
+
|
|
545
|
+
##
|
|
546
|
+
# Adds a development dependency named +gem+ with +requirements+ to this
|
|
547
|
+
# Gem. For example:
|
|
548
|
+
#
|
|
549
|
+
# spec.add_development_dependency 'jabber4r', '> 0.1', '<= 0.5'
|
|
550
|
+
#
|
|
551
|
+
# Development dependencies aren't installed by default and aren't
|
|
552
|
+
# activated when a gem is required.
|
|
553
|
+
|
|
554
|
+
def add_development_dependency(gem, *requirements)
|
|
555
|
+
add_dependency_with_type(gem, :development, *requirements)
|
|
556
|
+
end
|
|
557
|
+
|
|
558
|
+
##
|
|
559
|
+
# Adds a runtime dependency named +gem+ with +requirements+ to this Gem.
|
|
560
|
+
# For example:
|
|
561
|
+
#
|
|
562
|
+
# spec.add_runtime_dependency 'jabber4r', '> 0.1', '<= 0.5'
|
|
563
|
+
|
|
564
|
+
def add_runtime_dependency(gem, *requirements)
|
|
565
|
+
add_dependency_with_type(gem, :runtime, *requirements)
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
##
|
|
569
|
+
# Adds a runtime dependency
|
|
570
|
+
|
|
571
|
+
alias add_dependency add_runtime_dependency
|
|
572
|
+
|
|
573
|
+
##
|
|
574
|
+
# Returns the full name (name-version) of this Gem. Platform information
|
|
575
|
+
# is included (name-version-platform) if it is specified and not the
|
|
576
|
+
# default Ruby platform.
|
|
577
|
+
|
|
578
|
+
def full_name
|
|
579
|
+
if platform == Gem::Platform::RUBY or platform.nil? then
|
|
580
|
+
"#{@name}-#{@version}"
|
|
581
|
+
else
|
|
582
|
+
"#{@name}-#{@version}-#{platform}"
|
|
583
|
+
end
|
|
584
|
+
end
|
|
585
|
+
|
|
586
|
+
##
|
|
587
|
+
# Returns the full name (name-version) of this gemspec using the original
|
|
588
|
+
# platform. For use with legacy gems.
|
|
589
|
+
|
|
590
|
+
def original_name # :nodoc:
|
|
591
|
+
if platform == Gem::Platform::RUBY or platform.nil? then
|
|
592
|
+
"#{@name}-#{@version}"
|
|
593
|
+
else
|
|
594
|
+
"#{@name}-#{@version}-#{@original_platform}"
|
|
595
|
+
end
|
|
596
|
+
end
|
|
597
|
+
|
|
598
|
+
##
|
|
599
|
+
# The full path to the gem (install path + full name).
|
|
600
|
+
|
|
601
|
+
def full_gem_path
|
|
602
|
+
path = File.join installation_path, 'gems', full_name
|
|
603
|
+
return path if File.directory? path
|
|
604
|
+
File.join installation_path, 'gems', original_name
|
|
605
|
+
end
|
|
606
|
+
|
|
607
|
+
##
|
|
608
|
+
# The default (generated) file name of the gem.
|
|
609
|
+
|
|
610
|
+
def file_name
|
|
611
|
+
full_name + ".gem"
|
|
612
|
+
end
|
|
613
|
+
|
|
614
|
+
##
|
|
615
|
+
# The directory that this gem was installed into.
|
|
616
|
+
|
|
617
|
+
def installation_path
|
|
618
|
+
path = File.dirname(@loaded_from).split(File::SEPARATOR)[0..-2]
|
|
619
|
+
path = path.join File::SEPARATOR
|
|
620
|
+
File.expand_path path
|
|
621
|
+
end
|
|
622
|
+
|
|
623
|
+
##
|
|
624
|
+
# Checks if this specification meets the requirement of +dependency+.
|
|
625
|
+
|
|
626
|
+
def satisfies_requirement?(dependency)
|
|
627
|
+
return @name == dependency.name &&
|
|
628
|
+
dependency.version_requirements.satisfied_by?(@version)
|
|
629
|
+
end
|
|
630
|
+
|
|
631
|
+
##
|
|
632
|
+
# Returns an object you can use to sort specifications in #sort_by.
|
|
633
|
+
|
|
634
|
+
def sort_obj
|
|
635
|
+
[@name, @version.to_ints, @new_platform == Gem::Platform::RUBY ? -1 : 1]
|
|
636
|
+
end
|
|
637
|
+
|
|
638
|
+
def <=>(other) # :nodoc:
|
|
639
|
+
sort_obj <=> other.sort_obj
|
|
640
|
+
end
|
|
641
|
+
|
|
642
|
+
##
|
|
643
|
+
# Tests specs for equality (across all attributes).
|
|
644
|
+
|
|
645
|
+
def ==(other) # :nodoc:
|
|
646
|
+
self.class === other && same_attributes?(other)
|
|
647
|
+
end
|
|
648
|
+
|
|
649
|
+
alias eql? == # :nodoc:
|
|
650
|
+
|
|
651
|
+
##
|
|
652
|
+
# True if this gem has the same attributes as +other+.
|
|
653
|
+
|
|
654
|
+
def same_attributes?(other)
|
|
655
|
+
@@attributes.each do |name, default|
|
|
656
|
+
return false unless self.send(name) == other.send(name)
|
|
657
|
+
end
|
|
658
|
+
true
|
|
659
|
+
end
|
|
660
|
+
|
|
661
|
+
private :same_attributes?
|
|
662
|
+
|
|
663
|
+
def hash # :nodoc:
|
|
664
|
+
@@attributes.inject(0) { |hash_code, (name, default_value)|
|
|
665
|
+
n = self.send(name).hash
|
|
666
|
+
hash_code + n
|
|
667
|
+
}
|
|
668
|
+
end
|
|
669
|
+
|
|
670
|
+
def to_yaml(opts = {}) # :nodoc:
|
|
671
|
+
mark_version
|
|
672
|
+
|
|
673
|
+
attributes = @@attributes.map { |name,| name.to_s }.sort
|
|
674
|
+
attributes = attributes - %w[name version platform]
|
|
675
|
+
|
|
676
|
+
yaml = YAML.quick_emit object_id, opts do |out|
|
|
677
|
+
out.map taguri, to_yaml_style do |map|
|
|
678
|
+
map.add 'name', @name
|
|
679
|
+
map.add 'version', @version
|
|
680
|
+
platform = case @original_platform
|
|
681
|
+
when nil, '' then
|
|
682
|
+
'ruby'
|
|
683
|
+
when String then
|
|
684
|
+
@original_platform
|
|
685
|
+
else
|
|
686
|
+
@original_platform.to_s
|
|
687
|
+
end
|
|
688
|
+
map.add 'platform', platform
|
|
689
|
+
|
|
690
|
+
attributes.each do |name|
|
|
691
|
+
map.add name, instance_variable_get("@#{name}")
|
|
692
|
+
end
|
|
693
|
+
end
|
|
694
|
+
end
|
|
695
|
+
end
|
|
696
|
+
|
|
697
|
+
def yaml_initialize(tag, vals) # :nodoc:
|
|
698
|
+
vals.each do |ivar, val|
|
|
699
|
+
instance_variable_set "@#{ivar}", val
|
|
700
|
+
end
|
|
701
|
+
|
|
702
|
+
@original_platform = @platform # for backwards compatibility
|
|
703
|
+
self.platform = Gem::Platform.new @platform
|
|
704
|
+
end
|
|
705
|
+
|
|
706
|
+
##
|
|
707
|
+
# Returns a Ruby code representation of this specification, such that it
|
|
708
|
+
# can be eval'ed and reconstruct the same specification later. Attributes
|
|
709
|
+
# that still have their default values are omitted.
|
|
710
|
+
|
|
711
|
+
def to_ruby
|
|
712
|
+
mark_version
|
|
713
|
+
result = []
|
|
714
|
+
result << "# -*- encoding: utf-8 -*-"
|
|
715
|
+
result << nil
|
|
716
|
+
result << "Gem::Specification.new do |s|"
|
|
717
|
+
|
|
718
|
+
result << " s.name = #{ruby_code name}"
|
|
719
|
+
result << " s.version = #{ruby_code version}"
|
|
720
|
+
unless platform.nil? or platform == Gem::Platform::RUBY then
|
|
721
|
+
result << " s.platform = #{ruby_code original_platform}"
|
|
722
|
+
end
|
|
723
|
+
result << ""
|
|
724
|
+
result << " s.required_rubygems_version = #{ruby_code required_rubygems_version} if s.respond_to? :required_rubygems_version="
|
|
725
|
+
|
|
726
|
+
handled = [
|
|
727
|
+
:dependencies,
|
|
728
|
+
:name,
|
|
729
|
+
:platform,
|
|
730
|
+
:required_rubygems_version,
|
|
731
|
+
:specification_version,
|
|
732
|
+
:version,
|
|
733
|
+
]
|
|
734
|
+
|
|
735
|
+
attributes = @@attributes.sort_by { |attr_name,| attr_name.to_s }
|
|
736
|
+
|
|
737
|
+
attributes.each do |attr_name, default|
|
|
738
|
+
next if handled.include? attr_name
|
|
739
|
+
current_value = self.send(attr_name)
|
|
740
|
+
if current_value != default or
|
|
741
|
+
self.class.required_attribute? attr_name then
|
|
742
|
+
result << " s.#{attr_name} = #{ruby_code current_value}"
|
|
743
|
+
end
|
|
744
|
+
end
|
|
745
|
+
|
|
746
|
+
result << nil
|
|
747
|
+
result << " if s.respond_to? :specification_version then"
|
|
748
|
+
result << " current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION"
|
|
749
|
+
result << " s.specification_version = #{specification_version}"
|
|
750
|
+
result << nil
|
|
751
|
+
|
|
752
|
+
result << " if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then"
|
|
753
|
+
|
|
754
|
+
unless dependencies.empty? then
|
|
755
|
+
dependencies.each do |dep|
|
|
756
|
+
version_reqs_param = dep.requirements_list.inspect
|
|
757
|
+
dep.instance_variable_set :@type, :runtime if dep.type.nil? # HACK
|
|
758
|
+
result << " s.add_#{dep.type}_dependency(%q<#{dep.name}>, #{version_reqs_param})"
|
|
759
|
+
end
|
|
760
|
+
end
|
|
761
|
+
|
|
762
|
+
result << " else"
|
|
763
|
+
|
|
764
|
+
unless dependencies.empty? then
|
|
765
|
+
dependencies.each do |dep|
|
|
766
|
+
version_reqs_param = dep.requirements_list.inspect
|
|
767
|
+
result << " s.add_dependency(%q<#{dep.name}>, #{version_reqs_param})"
|
|
768
|
+
end
|
|
769
|
+
end
|
|
770
|
+
|
|
771
|
+
result << ' end'
|
|
772
|
+
|
|
773
|
+
result << " else"
|
|
774
|
+
dependencies.each do |dep|
|
|
775
|
+
version_reqs_param = dep.requirements_list.inspect
|
|
776
|
+
result << " s.add_dependency(%q<#{dep.name}>, #{version_reqs_param})"
|
|
777
|
+
end
|
|
778
|
+
result << " end"
|
|
779
|
+
|
|
780
|
+
result << "end"
|
|
781
|
+
result << nil
|
|
782
|
+
|
|
783
|
+
result.join "\n"
|
|
784
|
+
end
|
|
785
|
+
|
|
786
|
+
##
|
|
787
|
+
# Checks that the specification contains all required fields, and does a
|
|
788
|
+
# very basic sanity check.
|
|
789
|
+
#
|
|
790
|
+
# Raises InvalidSpecificationException if the spec does not pass the
|
|
791
|
+
# checks..
|
|
792
|
+
|
|
793
|
+
def validate
|
|
794
|
+
extend Gem::UserInteraction
|
|
795
|
+
normalize
|
|
796
|
+
|
|
797
|
+
if rubygems_version != RubyGemsVersion then
|
|
798
|
+
raise Gem::InvalidSpecificationException,
|
|
799
|
+
"expected RubyGems version #{RubyGemsVersion}, was #{rubygems_version}"
|
|
800
|
+
end
|
|
801
|
+
|
|
802
|
+
@@required_attributes.each do |symbol|
|
|
803
|
+
unless self.send symbol then
|
|
804
|
+
raise Gem::InvalidSpecificationException,
|
|
805
|
+
"missing value for attribute #{symbol}"
|
|
806
|
+
end
|
|
807
|
+
end
|
|
808
|
+
|
|
809
|
+
if require_paths.empty? then
|
|
810
|
+
raise Gem::InvalidSpecificationException,
|
|
811
|
+
"specification must have at least one require_path"
|
|
812
|
+
end
|
|
813
|
+
|
|
814
|
+
case platform
|
|
815
|
+
when Gem::Platform, Platform::RUBY then # ok
|
|
816
|
+
else
|
|
817
|
+
raise Gem::InvalidSpecificationException,
|
|
818
|
+
"invalid platform #{platform.inspect}, see Gem::Platform"
|
|
819
|
+
end
|
|
820
|
+
|
|
821
|
+
unless Array === authors and
|
|
822
|
+
authors.all? { |author| String === author } then
|
|
823
|
+
raise Gem::InvalidSpecificationException,
|
|
824
|
+
'authors must be Array of Strings'
|
|
825
|
+
end
|
|
826
|
+
|
|
827
|
+
# Warnings
|
|
828
|
+
|
|
829
|
+
%w[author email homepage rubyforge_project summary].each do |attribute|
|
|
830
|
+
value = self.send attribute
|
|
831
|
+
alert_warning "no #{attribute} specified" if value.nil? or value.empty?
|
|
832
|
+
end
|
|
833
|
+
|
|
834
|
+
alert_warning "RDoc will not be generated (has_rdoc == false)" unless
|
|
835
|
+
has_rdoc
|
|
836
|
+
|
|
837
|
+
alert_warning "deprecated autorequire specified" if autorequire
|
|
838
|
+
|
|
839
|
+
executables.each do |executable|
|
|
840
|
+
executable_path = File.join bindir, executable
|
|
841
|
+
shebang = File.read(executable_path, 2) == '#!'
|
|
842
|
+
|
|
843
|
+
alert_warning "#{executable_path} is missing #! line" unless shebang
|
|
844
|
+
end
|
|
845
|
+
|
|
846
|
+
true
|
|
847
|
+
end
|
|
848
|
+
|
|
849
|
+
##
|
|
850
|
+
# Normalize the list of files so that:
|
|
851
|
+
# * All file lists have redundancies removed.
|
|
852
|
+
# * Files referenced in the extra_rdoc_files are included in the package
|
|
853
|
+
# file list.
|
|
854
|
+
#
|
|
855
|
+
# Also, the summary and description are converted to a normal format.
|
|
856
|
+
|
|
857
|
+
def normalize
|
|
858
|
+
if defined?(@extra_rdoc_files) and @extra_rdoc_files then
|
|
859
|
+
@extra_rdoc_files.uniq!
|
|
860
|
+
@files ||= []
|
|
861
|
+
@files.concat(@extra_rdoc_files)
|
|
862
|
+
end
|
|
863
|
+
@files.uniq! if @files
|
|
864
|
+
end
|
|
865
|
+
|
|
866
|
+
##
|
|
867
|
+
# Return a list of all gems that have a dependency on this gemspec. The
|
|
868
|
+
# list is structured with entries that conform to:
|
|
869
|
+
#
|
|
870
|
+
# [depending_gem, dependency, [list_of_gems_that_satisfy_dependency]]
|
|
871
|
+
|
|
872
|
+
def dependent_gems
|
|
873
|
+
out = []
|
|
874
|
+
Gem.source_index.each do |name,gem|
|
|
875
|
+
gem.dependencies.each do |dep|
|
|
876
|
+
if self.satisfies_requirement?(dep) then
|
|
877
|
+
sats = []
|
|
878
|
+
find_all_satisfiers(dep) do |sat|
|
|
879
|
+
sats << sat
|
|
880
|
+
end
|
|
881
|
+
out << [gem, dep, sats]
|
|
882
|
+
end
|
|
883
|
+
end
|
|
884
|
+
end
|
|
885
|
+
out
|
|
886
|
+
end
|
|
887
|
+
|
|
888
|
+
def to_s
|
|
889
|
+
"#<Gem::Specification name=#{@name} version=#{@version}>"
|
|
890
|
+
end
|
|
891
|
+
|
|
892
|
+
def add_dependency_with_type(dependency, type, *requirements)
|
|
893
|
+
requirements = if requirements.empty? then
|
|
894
|
+
Gem::Requirement.default
|
|
895
|
+
else
|
|
896
|
+
requirements.flatten
|
|
897
|
+
end
|
|
898
|
+
|
|
899
|
+
unless dependency.respond_to?(:name) &&
|
|
900
|
+
dependency.respond_to?(:version_requirements)
|
|
901
|
+
|
|
902
|
+
dependency = Dependency.new(dependency, requirements, type)
|
|
903
|
+
end
|
|
904
|
+
|
|
905
|
+
dependencies << dependency
|
|
906
|
+
end
|
|
907
|
+
|
|
908
|
+
private :add_dependency_with_type
|
|
909
|
+
|
|
910
|
+
def find_all_satisfiers(dep)
|
|
911
|
+
Gem.source_index.each do |name,gem|
|
|
912
|
+
if(gem.satisfies_requirement?(dep)) then
|
|
913
|
+
yield gem
|
|
914
|
+
end
|
|
915
|
+
end
|
|
916
|
+
end
|
|
917
|
+
|
|
918
|
+
private :find_all_satisfiers
|
|
919
|
+
|
|
920
|
+
##
|
|
921
|
+
# Return a string containing a Ruby code representation of the given
|
|
922
|
+
# object.
|
|
923
|
+
|
|
924
|
+
def ruby_code(obj)
|
|
925
|
+
case obj
|
|
926
|
+
when String then '%q{' + obj + '}'
|
|
927
|
+
when Array then obj.inspect
|
|
928
|
+
when Gem::Version then obj.to_s.inspect
|
|
929
|
+
when Date then '%q{' + obj.strftime('%Y-%m-%d') + '}'
|
|
930
|
+
when Time then '%q{' + obj.strftime('%Y-%m-%d') + '}'
|
|
931
|
+
when Numeric then obj.inspect
|
|
932
|
+
when true, false, nil then obj.inspect
|
|
933
|
+
when Gem::Platform then "Gem::Platform.new(#{obj.to_a.inspect})"
|
|
934
|
+
when Gem::Requirement then "Gem::Requirement.new(#{obj.to_s.inspect})"
|
|
935
|
+
else raise Exception, "ruby_code case not handled: #{obj.class}"
|
|
936
|
+
end
|
|
937
|
+
end
|
|
938
|
+
|
|
939
|
+
private :ruby_code
|
|
940
|
+
|
|
941
|
+
# :section: Required gemspec attributes
|
|
942
|
+
|
|
943
|
+
##
|
|
944
|
+
# The version of RubyGems used to create this gem
|
|
945
|
+
|
|
946
|
+
required_attribute :rubygems_version, Gem::RubyGemsVersion
|
|
947
|
+
|
|
948
|
+
##
|
|
949
|
+
# The Gem::Specification version of this gemspec
|
|
950
|
+
|
|
951
|
+
required_attribute :specification_version, CURRENT_SPECIFICATION_VERSION
|
|
952
|
+
|
|
953
|
+
##
|
|
954
|
+
# This gem's name
|
|
955
|
+
|
|
956
|
+
required_attribute :name
|
|
957
|
+
|
|
958
|
+
##
|
|
959
|
+
# This gem's version
|
|
960
|
+
|
|
961
|
+
required_attribute :version
|
|
962
|
+
|
|
963
|
+
##
|
|
964
|
+
# The date this gem was created
|
|
965
|
+
|
|
966
|
+
required_attribute :date, TODAY
|
|
967
|
+
|
|
968
|
+
##
|
|
969
|
+
# A short summary of this gem's description. Displayed in `gem list -d`.
|
|
970
|
+
|
|
971
|
+
required_attribute :summary
|
|
972
|
+
|
|
973
|
+
##
|
|
974
|
+
# Paths in the gem to add to $LOAD_PATH when this gem is activated
|
|
975
|
+
|
|
976
|
+
required_attribute :require_paths, ['lib']
|
|
977
|
+
|
|
978
|
+
# :section: Optional gemspec attributes
|
|
979
|
+
|
|
980
|
+
##
|
|
981
|
+
# A contact email for this gem
|
|
982
|
+
|
|
983
|
+
attribute :email
|
|
984
|
+
|
|
985
|
+
##
|
|
986
|
+
# The URL of this gem's home page
|
|
987
|
+
|
|
988
|
+
attribute :homepage
|
|
989
|
+
|
|
990
|
+
##
|
|
991
|
+
# The rubyforge project this gem lives under. i.e. RubyGems'
|
|
992
|
+
# rubyforge_project is "rubygems".
|
|
993
|
+
|
|
994
|
+
attribute :rubyforge_project
|
|
995
|
+
|
|
996
|
+
##
|
|
997
|
+
# A long description of this gem
|
|
998
|
+
|
|
999
|
+
attribute :description
|
|
1000
|
+
|
|
1001
|
+
##
|
|
1002
|
+
# Autorequire was used by old RubyGems to automatically require a file.
|
|
1003
|
+
# It no longer is supported.
|
|
1004
|
+
|
|
1005
|
+
attribute :autorequire
|
|
1006
|
+
|
|
1007
|
+
##
|
|
1008
|
+
# The default executable for this gem.
|
|
1009
|
+
|
|
1010
|
+
attribute :default_executable
|
|
1011
|
+
|
|
1012
|
+
##
|
|
1013
|
+
# The path in the gem for executable scripts
|
|
1014
|
+
|
|
1015
|
+
attribute :bindir, 'bin'
|
|
1016
|
+
|
|
1017
|
+
##
|
|
1018
|
+
# True if this gem is RDoc-compliant
|
|
1019
|
+
|
|
1020
|
+
attribute :has_rdoc, false
|
|
1021
|
+
|
|
1022
|
+
##
|
|
1023
|
+
# True if this gem supports RDoc
|
|
1024
|
+
|
|
1025
|
+
alias :has_rdoc? :has_rdoc
|
|
1026
|
+
|
|
1027
|
+
##
|
|
1028
|
+
# The ruby of version required by this gem
|
|
1029
|
+
|
|
1030
|
+
attribute :required_ruby_version, Gem::Requirement.default
|
|
1031
|
+
|
|
1032
|
+
##
|
|
1033
|
+
# The RubyGems version required by this gem
|
|
1034
|
+
|
|
1035
|
+
attribute :required_rubygems_version, Gem::Requirement.default
|
|
1036
|
+
|
|
1037
|
+
##
|
|
1038
|
+
# The platform this gem runs on. See Gem::Platform for details.
|
|
1039
|
+
|
|
1040
|
+
attribute :platform, Gem::Platform::RUBY
|
|
1041
|
+
|
|
1042
|
+
##
|
|
1043
|
+
# The key used to sign this gem. See Gem::Security for details.
|
|
1044
|
+
|
|
1045
|
+
attribute :signing_key, nil
|
|
1046
|
+
|
|
1047
|
+
##
|
|
1048
|
+
# The certificate chain used to sign this gem. See Gem::Security for
|
|
1049
|
+
# details.
|
|
1050
|
+
|
|
1051
|
+
attribute :cert_chain, []
|
|
1052
|
+
|
|
1053
|
+
##
|
|
1054
|
+
# A message that gets displayed after the gem is installed
|
|
1055
|
+
|
|
1056
|
+
attribute :post_install_message, nil
|
|
1057
|
+
|
|
1058
|
+
##
|
|
1059
|
+
# The list of authors who wrote this gem
|
|
1060
|
+
|
|
1061
|
+
array_attribute :authors
|
|
1062
|
+
|
|
1063
|
+
##
|
|
1064
|
+
# Files included in this gem
|
|
1065
|
+
|
|
1066
|
+
array_attribute :files
|
|
1067
|
+
|
|
1068
|
+
##
|
|
1069
|
+
# Test files included in this gem
|
|
1070
|
+
|
|
1071
|
+
array_attribute :test_files
|
|
1072
|
+
|
|
1073
|
+
##
|
|
1074
|
+
# An ARGV-style array of options to RDoc
|
|
1075
|
+
|
|
1076
|
+
array_attribute :rdoc_options
|
|
1077
|
+
|
|
1078
|
+
##
|
|
1079
|
+
# Extra files to add to RDoc
|
|
1080
|
+
|
|
1081
|
+
array_attribute :extra_rdoc_files
|
|
1082
|
+
|
|
1083
|
+
##
|
|
1084
|
+
# Executables included in the gem
|
|
1085
|
+
|
|
1086
|
+
array_attribute :executables
|
|
1087
|
+
|
|
1088
|
+
##
|
|
1089
|
+
# Extensions to build when installing the gem. See
|
|
1090
|
+
# Gem::Installer#build_extensions for valid values.
|
|
1091
|
+
|
|
1092
|
+
array_attribute :extensions
|
|
1093
|
+
|
|
1094
|
+
##
|
|
1095
|
+
# An array or things required by this gem. Not used by anything
|
|
1096
|
+
# presently.
|
|
1097
|
+
|
|
1098
|
+
array_attribute :requirements
|
|
1099
|
+
|
|
1100
|
+
##
|
|
1101
|
+
# A list of Gem::Dependency objects this gem depends on. Only appendable.
|
|
1102
|
+
|
|
1103
|
+
array_attribute :dependencies
|
|
1104
|
+
|
|
1105
|
+
read_only :dependencies
|
|
1106
|
+
|
|
1107
|
+
# :section: Aliased gemspec attributes
|
|
1108
|
+
|
|
1109
|
+
##
|
|
1110
|
+
# Singular accessor for executables
|
|
1111
|
+
|
|
1112
|
+
attribute_alias_singular :executable, :executables
|
|
1113
|
+
|
|
1114
|
+
##
|
|
1115
|
+
# Singular accessor for authors
|
|
1116
|
+
|
|
1117
|
+
attribute_alias_singular :author, :authors
|
|
1118
|
+
|
|
1119
|
+
##
|
|
1120
|
+
# Singular accessor for require_paths
|
|
1121
|
+
|
|
1122
|
+
attribute_alias_singular :require_path, :require_paths
|
|
1123
|
+
|
|
1124
|
+
##
|
|
1125
|
+
# Singular accessor for test_files
|
|
1126
|
+
|
|
1127
|
+
attribute_alias_singular :test_file, :test_files
|
|
1128
|
+
|
|
1129
|
+
overwrite_accessor :version= do |version|
|
|
1130
|
+
@version = Version.create(version)
|
|
1131
|
+
end
|
|
1132
|
+
|
|
1133
|
+
overwrite_accessor :platform do
|
|
1134
|
+
@new_platform
|
|
1135
|
+
end
|
|
1136
|
+
|
|
1137
|
+
overwrite_accessor :platform= do |platform|
|
|
1138
|
+
if @original_platform.nil? or
|
|
1139
|
+
@original_platform == Gem::Platform::RUBY then
|
|
1140
|
+
@original_platform = platform
|
|
1141
|
+
end
|
|
1142
|
+
|
|
1143
|
+
case platform
|
|
1144
|
+
when Gem::Platform::CURRENT then
|
|
1145
|
+
@new_platform = Gem::Platform.local
|
|
1146
|
+
@original_platform = @new_platform.to_s
|
|
1147
|
+
|
|
1148
|
+
when Gem::Platform then
|
|
1149
|
+
@new_platform = platform
|
|
1150
|
+
|
|
1151
|
+
# legacy constants
|
|
1152
|
+
when nil, Gem::Platform::RUBY then
|
|
1153
|
+
@new_platform = Gem::Platform::RUBY
|
|
1154
|
+
when 'mswin32' then # was Gem::Platform::WIN32
|
|
1155
|
+
@new_platform = Gem::Platform.new 'x86-mswin32'
|
|
1156
|
+
when 'i586-linux' then # was Gem::Platform::LINUX_586
|
|
1157
|
+
@new_platform = Gem::Platform.new 'x86-linux'
|
|
1158
|
+
when 'powerpc-darwin' then # was Gem::Platform::DARWIN
|
|
1159
|
+
@new_platform = Gem::Platform.new 'ppc-darwin'
|
|
1160
|
+
else
|
|
1161
|
+
@new_platform = Gem::Platform.new platform
|
|
1162
|
+
end
|
|
1163
|
+
|
|
1164
|
+
@platform = @new_platform.to_s
|
|
1165
|
+
|
|
1166
|
+
@new_platform
|
|
1167
|
+
end
|
|
1168
|
+
|
|
1169
|
+
overwrite_accessor :required_ruby_version= do |value|
|
|
1170
|
+
@required_ruby_version = Gem::Requirement.create(value)
|
|
1171
|
+
end
|
|
1172
|
+
|
|
1173
|
+
overwrite_accessor :required_rubygems_version= do |value|
|
|
1174
|
+
@required_rubygems_version = Gem::Requirement.create(value)
|
|
1175
|
+
end
|
|
1176
|
+
|
|
1177
|
+
overwrite_accessor :date= do |date|
|
|
1178
|
+
# We want to end up with a Time object with one-day resolution.
|
|
1179
|
+
# This is the cleanest, most-readable, faster-than-using-Date
|
|
1180
|
+
# way to do it.
|
|
1181
|
+
case date
|
|
1182
|
+
when String then
|
|
1183
|
+
@date = if /\A(\d{4})-(\d{2})-(\d{2})\Z/ =~ date then
|
|
1184
|
+
Time.local($1.to_i, $2.to_i, $3.to_i)
|
|
1185
|
+
else
|
|
1186
|
+
require 'time'
|
|
1187
|
+
Time.parse date
|
|
1188
|
+
end
|
|
1189
|
+
when Time then
|
|
1190
|
+
@date = Time.local(date.year, date.month, date.day)
|
|
1191
|
+
when Date then
|
|
1192
|
+
@date = Time.local(date.year, date.month, date.day)
|
|
1193
|
+
else
|
|
1194
|
+
@date = TODAY
|
|
1195
|
+
end
|
|
1196
|
+
end
|
|
1197
|
+
|
|
1198
|
+
overwrite_accessor :date do
|
|
1199
|
+
self.date = nil if @date.nil? # HACK Sets the default value for date
|
|
1200
|
+
@date
|
|
1201
|
+
end
|
|
1202
|
+
|
|
1203
|
+
overwrite_accessor :summary= do |str|
|
|
1204
|
+
@summary = if str then
|
|
1205
|
+
str.strip.
|
|
1206
|
+
gsub(/(\w-)\n[ \t]*(\w)/, '\1\2').
|
|
1207
|
+
gsub(/\n[ \t]*/, " ")
|
|
1208
|
+
end
|
|
1209
|
+
end
|
|
1210
|
+
|
|
1211
|
+
overwrite_accessor :description= do |str|
|
|
1212
|
+
@description = if str then
|
|
1213
|
+
str.strip.
|
|
1214
|
+
gsub(/(\w-)\n[ \t]*(\w)/, '\1\2').
|
|
1215
|
+
gsub(/\n[ \t]*/, " ")
|
|
1216
|
+
end
|
|
1217
|
+
end
|
|
1218
|
+
|
|
1219
|
+
overwrite_accessor :default_executable do
|
|
1220
|
+
begin
|
|
1221
|
+
if defined?(@default_executable) and @default_executable
|
|
1222
|
+
result = @default_executable
|
|
1223
|
+
elsif @executables and @executables.size == 1
|
|
1224
|
+
result = Array(@executables).first
|
|
1225
|
+
else
|
|
1226
|
+
result = nil
|
|
1227
|
+
end
|
|
1228
|
+
result
|
|
1229
|
+
rescue
|
|
1230
|
+
nil
|
|
1231
|
+
end
|
|
1232
|
+
end
|
|
1233
|
+
|
|
1234
|
+
overwrite_accessor :test_files do
|
|
1235
|
+
# Handle the possibility that we have @test_suite_file but not
|
|
1236
|
+
# @test_files. This will happen when an old gem is loaded via
|
|
1237
|
+
# YAML.
|
|
1238
|
+
if defined? @test_suite_file then
|
|
1239
|
+
@test_files = [@test_suite_file].flatten
|
|
1240
|
+
@test_suite_file = nil
|
|
1241
|
+
end
|
|
1242
|
+
if defined?(@test_files) and @test_files then
|
|
1243
|
+
@test_files
|
|
1244
|
+
else
|
|
1245
|
+
@test_files = []
|
|
1246
|
+
end
|
|
1247
|
+
end
|
|
1248
|
+
|
|
1249
|
+
overwrite_accessor :files do
|
|
1250
|
+
result = []
|
|
1251
|
+
result.push(*@files) if defined?(@files)
|
|
1252
|
+
result.push(*@test_files) if defined?(@test_files)
|
|
1253
|
+
result.push(*(add_bindir(@executables)))
|
|
1254
|
+
result.push(*@extra_rdoc_files) if defined?(@extra_rdoc_files)
|
|
1255
|
+
result.push(*@extensions) if defined?(@extensions)
|
|
1256
|
+
result.uniq.compact
|
|
1257
|
+
end
|
|
1258
|
+
|
|
1259
|
+
end
|
|
1260
|
+
|
|
1261
|
+
end
|
|
1262
|
+
|