├── README.md ├── fetch-ruby.sh ├── handler.js ├── index.rb ├── package.json ├── ruby ├── bin.real │ ├── bundle │ ├── bundler │ ├── gem │ ├── irb │ ├── nokogiri │ ├── posix-spawn-benchmark │ ├── puma │ ├── pumactl │ ├── rackup │ ├── rake │ ├── redcarpet │ ├── redcloth │ ├── ruby │ ├── thin │ ├── unicorn │ └── unicorn_rails ├── bin │ ├── gem │ ├── irb │ ├── rake │ ├── ruby │ └── ruby_environment ├── info │ ├── GEM_EXTENSION_API_VERSION │ ├── GEM_PLATFORM │ ├── RUBY_ARCH │ └── RUBY_COMPAT_VERSION └── lib │ ├── ca-bundle.crt │ ├── libffi.so.6 │ ├── libreadline.so.5 │ ├── libtermcap.so.2 │ ├── libz.so.1 │ ├── restore_environment.rb │ └── ruby │ ├── 2.2.0 │ ├── English.rb │ ├── abbrev.rb │ ├── base64.rb │ ├── benchmark.rb │ ├── bigdecimal │ │ ├── jacobian.rb │ │ ├── ludcmp.rb │ │ ├── math.rb │ │ ├── newton.rb │ │ └── util.rb │ ├── cgi.rb │ ├── cgi │ │ ├── cookie.rb │ │ ├── core.rb │ │ ├── html.rb │ │ ├── session.rb │ │ ├── session │ │ │ └── pstore.rb │ │ └── util.rb │ ├── cmath.rb │ ├── csv.rb │ ├── date.rb │ ├── debug.rb │ ├── delegate.rb │ ├── digest.rb │ ├── digest │ │ └── sha2.rb │ ├── drb.rb │ ├── drb │ │ ├── acl.rb │ │ ├── drb.rb │ │ ├── eq.rb │ │ ├── extserv.rb │ │ ├── extservm.rb │ │ ├── gw.rb │ │ ├── invokemethod.rb │ │ ├── observer.rb │ │ ├── ssl.rb │ │ ├── timeridconv.rb │ │ └── unix.rb │ ├── e2mmap.rb │ ├── erb.rb │ ├── expect.rb │ ├── fiddle.rb │ ├── fiddle │ │ ├── closure.rb │ │ ├── cparser.rb │ │ ├── function.rb │ │ ├── import.rb │ │ ├── pack.rb │ │ ├── struct.rb │ │ ├── types.rb │ │ └── value.rb │ ├── fileutils.rb │ ├── find.rb │ ├── forwardable.rb │ ├── getoptlong.rb │ ├── io │ │ └── console │ │ │ └── size.rb │ ├── ipaddr.rb │ ├── irb.rb │ ├── irb │ │ ├── cmd │ │ │ ├── chws.rb │ │ │ ├── fork.rb │ │ │ ├── help.rb │ │ │ ├── load.rb │ │ │ ├── nop.rb │ │ │ ├── pushws.rb │ │ │ └── subirb.rb │ │ ├── completion.rb │ │ ├── context.rb │ │ ├── ext │ │ │ ├── change-ws.rb │ │ │ ├── history.rb │ │ │ ├── loader.rb │ │ │ ├── math-mode.rb │ │ │ ├── multi-irb.rb │ │ │ ├── save-history.rb │ │ │ ├── tracer.rb │ │ │ ├── use-loader.rb │ │ │ └── workspaces.rb │ │ ├── extend-command.rb │ │ ├── frame.rb │ │ ├── help.rb │ │ ├── init.rb │ │ ├── input-method.rb │ │ ├── inspector.rb │ │ ├── lc │ │ │ ├── error.rb │ │ │ ├── help-message │ │ │ └── ja │ │ │ │ ├── encoding_aliases.rb │ │ │ │ ├── error.rb │ │ │ │ └── help-message │ │ ├── locale.rb │ │ ├── magic-file.rb │ │ ├── notifier.rb │ │ ├── output-method.rb │ │ ├── ruby-lex.rb │ │ ├── ruby-token.rb │ │ ├── slex.rb │ │ ├── src_encoding.rb │ │ ├── version.rb │ │ ├── workspace.rb │ │ ├── ws-for-case-2.rb │ │ └── xmp.rb │ ├── json.rb │ ├── json │ │ ├── add │ │ │ ├── bigdecimal.rb │ │ │ ├── complex.rb │ │ │ ├── core.rb │ │ │ ├── date.rb │ │ │ ├── date_time.rb │ │ │ ├── exception.rb │ │ │ ├── ostruct.rb │ │ │ ├── range.rb │ │ │ ├── rational.rb │ │ │ ├── regexp.rb │ │ │ ├── struct.rb │ │ │ ├── symbol.rb │ │ │ └── time.rb │ │ ├── common.rb │ │ ├── ext.rb │ │ ├── generic_object.rb │ │ └── version.rb │ ├── kconv.rb │ ├── logger.rb │ ├── mathn.rb │ ├── matrix.rb │ ├── matrix │ │ ├── eigenvalue_decomposition.rb │ │ └── lup_decomposition.rb │ ├── mkmf.rb │ ├── monitor.rb │ ├── mutex_m.rb │ ├── net │ │ ├── ftp.rb │ │ ├── http.rb │ │ ├── http │ │ │ ├── backward.rb │ │ │ ├── exceptions.rb │ │ │ ├── generic_request.rb │ │ │ ├── header.rb │ │ │ ├── proxy_delta.rb │ │ │ ├── request.rb │ │ │ ├── requests.rb │ │ │ ├── response.rb │ │ │ └── responses.rb │ │ ├── https.rb │ │ ├── imap.rb │ │ ├── pop.rb │ │ ├── protocol.rb │ │ ├── smtp.rb │ │ └── telnet.rb │ ├── observer.rb │ ├── open-uri.rb │ ├── open3.rb │ ├── openssl.rb │ ├── openssl │ │ ├── bn.rb │ │ ├── buffering.rb │ │ ├── cipher.rb │ │ ├── config.rb │ │ ├── digest.rb │ │ ├── ssl.rb │ │ └── x509.rb │ ├── optionparser.rb │ ├── optparse.rb │ ├── optparse │ │ ├── ac.rb │ │ ├── date.rb │ │ ├── shellwords.rb │ │ ├── time.rb │ │ ├── uri.rb │ │ └── version.rb │ ├── ostruct.rb │ ├── pathname.rb │ ├── pp.rb │ ├── prettyprint.rb │ ├── prime.rb │ ├── profile.rb │ ├── profiler.rb │ ├── pstore.rb │ ├── psych.rb │ ├── psych │ │ ├── class_loader.rb │ │ ├── coder.rb │ │ ├── core_ext.rb │ │ ├── deprecated.rb │ │ ├── exception.rb │ │ ├── handler.rb │ │ ├── handlers │ │ │ ├── document_stream.rb │ │ │ └── recorder.rb │ │ ├── json │ │ │ ├── ruby_events.rb │ │ │ ├── stream.rb │ │ │ ├── tree_builder.rb │ │ │ └── yaml_events.rb │ │ ├── nodes.rb │ │ ├── nodes │ │ │ ├── alias.rb │ │ │ ├── document.rb │ │ │ ├── mapping.rb │ │ │ ├── node.rb │ │ │ ├── scalar.rb │ │ │ ├── sequence.rb │ │ │ └── stream.rb │ │ ├── omap.rb │ │ ├── parser.rb │ │ ├── scalar_scanner.rb │ │ ├── set.rb │ │ ├── stream.rb │ │ ├── streaming.rb │ │ ├── syntax_error.rb │ │ ├── tree_builder.rb │ │ ├── visitors.rb │ │ ├── visitors │ │ │ ├── depth_first.rb │ │ │ ├── emitter.rb │ │ │ ├── json_tree.rb │ │ │ ├── to_ruby.rb │ │ │ ├── visitor.rb │ │ │ └── yaml_tree.rb │ │ └── y.rb │ ├── racc │ │ └── parser.rb │ ├── rake.rb │ ├── rake │ │ ├── alt_system.rb │ │ ├── application.rb │ │ ├── backtrace.rb │ │ ├── clean.rb │ │ ├── cloneable.rb │ │ ├── contrib │ │ │ ├── compositepublisher.rb │ │ │ ├── ftptools.rb │ │ │ ├── publisher.rb │ │ │ ├── rubyforgepublisher.rb │ │ │ ├── sshpublisher.rb │ │ │ └── sys.rb │ │ ├── cpu_counter.rb │ │ ├── default_loader.rb │ │ ├── dsl_definition.rb │ │ ├── early_time.rb │ │ ├── ext │ │ │ ├── core.rb │ │ │ ├── module.rb │ │ │ ├── pathname.rb │ │ │ ├── string.rb │ │ │ └── time.rb │ │ ├── file_creation_task.rb │ │ ├── file_list.rb │ │ ├── file_task.rb │ │ ├── file_utils.rb │ │ ├── file_utils_ext.rb │ │ ├── gempackagetask.rb │ │ ├── invocation_chain.rb │ │ ├── invocation_exception_mixin.rb │ │ ├── late_time.rb │ │ ├── linked_list.rb │ │ ├── loaders │ │ │ └── makefile.rb │ │ ├── multi_task.rb │ │ ├── name_space.rb │ │ ├── packagetask.rb │ │ ├── pathmap.rb │ │ ├── phony.rb │ │ ├── private_reader.rb │ │ ├── promise.rb │ │ ├── pseudo_status.rb │ │ ├── rake_module.rb │ │ ├── rake_test_loader.rb │ │ ├── rdoctask.rb │ │ ├── ruby182_test_unit_fix.rb │ │ ├── rule_recursion_overflow_error.rb │ │ ├── runtest.rb │ │ ├── scope.rb │ │ ├── task.rb │ │ ├── task_argument_error.rb │ │ ├── task_arguments.rb │ │ ├── task_manager.rb │ │ ├── tasklib.rb │ │ ├── testtask.rb │ │ ├── thread_history_display.rb │ │ ├── thread_pool.rb │ │ ├── trace_output.rb │ │ ├── version.rb │ │ └── win32.rb │ ├── rbconfig │ │ └── datadir.rb │ ├── rdoc.rb │ ├── rdoc │ │ ├── alias.rb │ │ ├── anon_class.rb │ │ ├── any_method.rb │ │ ├── attr.rb │ │ ├── class_module.rb │ │ ├── code_object.rb │ │ ├── code_objects.rb │ │ ├── comment.rb │ │ ├── constant.rb │ │ ├── context.rb │ │ ├── context │ │ │ └── section.rb │ │ ├── cross_reference.rb │ │ ├── encoding.rb │ │ ├── erb_partial.rb │ │ ├── erbio.rb │ │ ├── extend.rb │ │ ├── generator.rb │ │ ├── ghost_method.rb │ │ ├── i18n.rb │ │ ├── i18n │ │ │ ├── locale.rb │ │ │ └── text.rb │ │ ├── include.rb │ │ ├── known_classes.rb │ │ ├── markdown.rb │ │ ├── markdown │ │ │ ├── entities.rb │ │ │ └── literals_1_9.rb │ │ ├── markup.rb │ │ ├── markup │ │ │ ├── attr_changer.rb │ │ │ ├── attr_span.rb │ │ │ ├── attribute_manager.rb │ │ │ ├── attributes.rb │ │ │ ├── blank_line.rb │ │ │ ├── block_quote.rb │ │ │ ├── document.rb │ │ │ ├── formatter.rb │ │ │ ├── formatter_test_case.rb │ │ │ ├── hard_break.rb │ │ │ ├── heading.rb │ │ │ ├── include.rb │ │ │ ├── indented_paragraph.rb │ │ │ ├── inline.rb │ │ │ ├── list.rb │ │ │ ├── list_item.rb │ │ │ ├── paragraph.rb │ │ │ ├── parser.rb │ │ │ ├── pre_process.rb │ │ │ ├── raw.rb │ │ │ ├── rule.rb │ │ │ ├── special.rb │ │ │ ├── text_formatter_test_case.rb │ │ │ ├── to_ansi.rb │ │ │ ├── to_bs.rb │ │ │ ├── to_html.rb │ │ │ ├── to_html_crossref.rb │ │ │ ├── to_html_snippet.rb │ │ │ ├── to_joined_paragraph.rb │ │ │ ├── to_label.rb │ │ │ ├── to_markdown.rb │ │ │ ├── to_rdoc.rb │ │ │ ├── to_table_of_contents.rb │ │ │ ├── to_test.rb │ │ │ ├── to_tt_only.rb │ │ │ └── verbatim.rb │ │ ├── meta_method.rb │ │ ├── method_attr.rb │ │ ├── mixin.rb │ │ ├── normal_class.rb │ │ ├── normal_module.rb │ │ ├── options.rb │ │ ├── parser.rb │ │ ├── parser │ │ │ ├── c.rb │ │ │ ├── changelog.rb │ │ │ ├── markdown.rb │ │ │ ├── rd.rb │ │ │ ├── ruby.rb │ │ │ ├── ruby_tools.rb │ │ │ ├── simple.rb │ │ │ └── text.rb │ │ ├── rd.rb │ │ ├── rd │ │ │ ├── block_parser.rb │ │ │ ├── inline.rb │ │ │ └── inline_parser.rb │ │ ├── rdoc.rb │ │ ├── require.rb │ │ ├── ri.rb │ │ ├── ri │ │ │ ├── driver.rb │ │ │ ├── formatter.rb │ │ │ ├── paths.rb │ │ │ ├── store.rb │ │ │ └── task.rb │ │ ├── ruby_lex.rb │ │ ├── ruby_token.rb │ │ ├── rubygems_hook.rb │ │ ├── servlet.rb │ │ ├── single_class.rb │ │ ├── stats.rb │ │ ├── stats │ │ │ ├── normal.rb │ │ │ ├── quiet.rb │ │ │ └── verbose.rb │ │ ├── store.rb │ │ ├── task.rb │ │ ├── test_case.rb │ │ ├── text.rb │ │ ├── token_stream.rb │ │ ├── tom_doc.rb │ │ └── top_level.rb │ ├── resolv-replace.rb │ ├── resolv.rb │ ├── rexml │ │ ├── attlistdecl.rb │ │ ├── attribute.rb │ │ ├── cdata.rb │ │ ├── child.rb │ │ ├── comment.rb │ │ ├── doctype.rb │ │ ├── document.rb │ │ ├── dtd │ │ │ ├── attlistdecl.rb │ │ │ ├── dtd.rb │ │ │ ├── elementdecl.rb │ │ │ ├── entitydecl.rb │ │ │ └── notationdecl.rb │ │ ├── element.rb │ │ ├── encoding.rb │ │ ├── entity.rb │ │ ├── formatters │ │ │ ├── default.rb │ │ │ ├── pretty.rb │ │ │ └── transitive.rb │ │ ├── functions.rb │ │ ├── instruction.rb │ │ ├── light │ │ │ └── node.rb │ │ ├── namespace.rb │ │ ├── node.rb │ │ ├── output.rb │ │ ├── parent.rb │ │ ├── parseexception.rb │ │ ├── parsers │ │ │ ├── baseparser.rb │ │ │ ├── lightparser.rb │ │ │ ├── pullparser.rb │ │ │ ├── sax2parser.rb │ │ │ ├── streamparser.rb │ │ │ ├── treeparser.rb │ │ │ ├── ultralightparser.rb │ │ │ └── xpathparser.rb │ │ ├── quickpath.rb │ │ ├── rexml.rb │ │ ├── sax2listener.rb │ │ ├── security.rb │ │ ├── source.rb │ │ ├── streamlistener.rb │ │ ├── syncenumerator.rb │ │ ├── text.rb │ │ ├── undefinednamespaceexception.rb │ │ ├── validation │ │ │ ├── relaxng.rb │ │ │ ├── validation.rb │ │ │ └── validationexception.rb │ │ ├── xmldecl.rb │ │ ├── xmltokens.rb │ │ ├── xpath.rb │ │ └── xpath_parser.rb │ ├── rinda │ │ ├── rinda.rb │ │ ├── ring.rb │ │ └── tuplespace.rb │ ├── ripper.rb │ ├── ripper │ │ ├── core.rb │ │ ├── filter.rb │ │ ├── lexer.rb │ │ └── sexp.rb │ ├── rss.rb │ ├── rss │ │ ├── 0.9.rb │ │ ├── 1.0.rb │ │ ├── 2.0.rb │ │ ├── atom.rb │ │ ├── content.rb │ │ ├── content │ │ │ ├── 1.0.rb │ │ │ └── 2.0.rb │ │ ├── converter.rb │ │ ├── dublincore.rb │ │ ├── dublincore │ │ │ ├── 1.0.rb │ │ │ ├── 2.0.rb │ │ │ └── atom.rb │ │ ├── image.rb │ │ ├── itunes.rb │ │ ├── maker.rb │ │ ├── maker │ │ │ ├── 0.9.rb │ │ │ ├── 1.0.rb │ │ │ ├── 2.0.rb │ │ │ ├── atom.rb │ │ │ ├── base.rb │ │ │ ├── content.rb │ │ │ ├── dublincore.rb │ │ │ ├── entry.rb │ │ │ ├── feed.rb │ │ │ ├── image.rb │ │ │ ├── itunes.rb │ │ │ ├── slash.rb │ │ │ ├── syndication.rb │ │ │ ├── taxonomy.rb │ │ │ └── trackback.rb │ │ ├── parser.rb │ │ ├── rexmlparser.rb │ │ ├── rss.rb │ │ ├── slash.rb │ │ ├── syndication.rb │ │ ├── taxonomy.rb │ │ ├── trackback.rb │ │ ├── utils.rb │ │ ├── xml-stylesheet.rb │ │ ├── xml.rb │ │ ├── xmlparser.rb │ │ └── xmlscanner.rb │ ├── rubygems.rb │ ├── rubygems │ │ ├── available_set.rb │ │ ├── basic_specification.rb │ │ ├── command.rb │ │ ├── command_manager.rb │ │ ├── commands │ │ │ ├── build_command.rb │ │ │ ├── cert_command.rb │ │ │ ├── check_command.rb │ │ │ ├── cleanup_command.rb │ │ │ ├── contents_command.rb │ │ │ ├── dependency_command.rb │ │ │ ├── environment_command.rb │ │ │ ├── fetch_command.rb │ │ │ ├── generate_index_command.rb │ │ │ ├── help_command.rb │ │ │ ├── install_command.rb │ │ │ ├── list_command.rb │ │ │ ├── lock_command.rb │ │ │ ├── mirror_command.rb │ │ │ ├── open_command.rb │ │ │ ├── outdated_command.rb │ │ │ ├── owner_command.rb │ │ │ ├── pristine_command.rb │ │ │ ├── push_command.rb │ │ │ ├── query_command.rb │ │ │ ├── rdoc_command.rb │ │ │ ├── search_command.rb │ │ │ ├── server_command.rb │ │ │ ├── setup_command.rb │ │ │ ├── sources_command.rb │ │ │ ├── specification_command.rb │ │ │ ├── stale_command.rb │ │ │ ├── uninstall_command.rb │ │ │ ├── unpack_command.rb │ │ │ ├── update_command.rb │ │ │ ├── which_command.rb │ │ │ └── yank_command.rb │ │ ├── compatibility.rb │ │ ├── config_file.rb │ │ ├── core_ext │ │ │ ├── kernel_gem.rb │ │ │ └── kernel_require.rb │ │ ├── defaults.rb │ │ ├── dependency.rb │ │ ├── dependency_installer.rb │ │ ├── dependency_list.rb │ │ ├── deprecate.rb │ │ ├── doctor.rb │ │ ├── errors.rb │ │ ├── exceptions.rb │ │ ├── ext.rb │ │ ├── ext │ │ │ ├── build_error.rb │ │ │ ├── builder.rb │ │ │ ├── cmake_builder.rb │ │ │ ├── configure_builder.rb │ │ │ ├── ext_conf_builder.rb │ │ │ └── rake_builder.rb │ │ ├── gem_runner.rb │ │ ├── gemcutter_utilities.rb │ │ ├── indexer.rb │ │ ├── install_default_message.rb │ │ ├── install_message.rb │ │ ├── install_update_options.rb │ │ ├── installer.rb │ │ ├── installer_test_case.rb │ │ ├── local_remote_options.rb │ │ ├── mock_gem_ui.rb │ │ ├── name_tuple.rb │ │ ├── package.rb │ │ ├── package │ │ │ ├── digest_io.rb │ │ │ ├── file_source.rb │ │ │ ├── io_source.rb │ │ │ ├── old.rb │ │ │ ├── source.rb │ │ │ ├── tar_header.rb │ │ │ ├── tar_reader.rb │ │ │ ├── tar_reader │ │ │ │ └── entry.rb │ │ │ ├── tar_test_case.rb │ │ │ └── tar_writer.rb │ │ ├── package_task.rb │ │ ├── path_support.rb │ │ ├── platform.rb │ │ ├── psych_additions.rb │ │ ├── psych_tree.rb │ │ ├── rdoc.rb │ │ ├── remote_fetcher.rb │ │ ├── request.rb │ │ ├── request │ │ │ ├── connection_pools.rb │ │ │ ├── http_pool.rb │ │ │ └── https_pool.rb │ │ ├── request_set.rb │ │ ├── request_set │ │ │ ├── gem_dependency_api.rb │ │ │ └── lockfile.rb │ │ ├── requirement.rb │ │ ├── resolver.rb │ │ ├── resolver │ │ │ ├── activation_request.rb │ │ │ ├── api_set.rb │ │ │ ├── api_specification.rb │ │ │ ├── best_set.rb │ │ │ ├── composed_set.rb │ │ │ ├── conflict.rb │ │ │ ├── current_set.rb │ │ │ ├── dependency_request.rb │ │ │ ├── git_set.rb │ │ │ ├── git_specification.rb │ │ │ ├── index_set.rb │ │ │ ├── index_specification.rb │ │ │ ├── installed_specification.rb │ │ │ ├── installer_set.rb │ │ │ ├── local_specification.rb │ │ │ ├── lock_set.rb │ │ │ ├── lock_specification.rb │ │ │ ├── requirement_list.rb │ │ │ ├── set.rb │ │ │ ├── spec_specification.rb │ │ │ ├── specification.rb │ │ │ ├── stats.rb │ │ │ ├── vendor_set.rb │ │ │ └── vendor_specification.rb │ │ ├── security.rb │ │ ├── security │ │ │ ├── policies.rb │ │ │ ├── policy.rb │ │ │ ├── signer.rb │ │ │ └── trust_dir.rb │ │ ├── server.rb │ │ ├── source.rb │ │ ├── source │ │ │ ├── git.rb │ │ │ ├── installed.rb │ │ │ ├── local.rb │ │ │ ├── lock.rb │ │ │ ├── specific_file.rb │ │ │ └── vendor.rb │ │ ├── source_list.rb │ │ ├── source_local.rb │ │ ├── source_specific_file.rb │ │ ├── spec_fetcher.rb │ │ ├── specification.rb │ │ ├── ssl_certs │ │ │ ├── AddTrustExternalCARoot-2048.pem │ │ │ ├── AddTrustExternalCARoot.pem │ │ │ ├── Class3PublicPrimaryCertificationAuthority.pem │ │ │ ├── DigiCertHighAssuranceEVRootCA.pem │ │ │ ├── EntrustnetSecureServerCertificationAuthority.pem │ │ │ └── GeoTrustGlobalCA.pem │ │ ├── stub_specification.rb │ │ ├── syck_hack.rb │ │ ├── test_case.rb │ │ ├── test_utilities.rb │ │ ├── text.rb │ │ ├── uninstaller.rb │ │ ├── uri_formatter.rb │ │ ├── user_interaction.rb │ │ ├── util.rb │ │ ├── util │ │ │ ├── list.rb │ │ │ └── stringio.rb │ │ ├── validator.rb │ │ ├── version.rb │ │ └── version_option.rb │ ├── scanf.rb │ ├── securerandom.rb │ ├── set.rb │ ├── shell.rb │ ├── shell │ │ ├── builtin-command.rb │ │ ├── command-processor.rb │ │ ├── error.rb │ │ ├── filter.rb │ │ ├── process-controller.rb │ │ ├── system-command.rb │ │ └── version.rb │ ├── shellwords.rb │ ├── singleton.rb │ ├── socket.rb │ ├── sync.rb │ ├── syslog │ │ └── logger.rb │ ├── tempfile.rb │ ├── thwait.rb │ ├── time.rb │ ├── timeout.rb │ ├── tmpdir.rb │ ├── tracer.rb │ ├── tsort.rb │ ├── ubygems.rb │ ├── un.rb │ ├── unicode_normalize.rb │ ├── unicode_normalize │ │ ├── normalize.rb │ │ └── tables.rb │ ├── uri.rb │ ├── uri │ │ ├── common.rb │ │ ├── ftp.rb │ │ ├── generic.rb │ │ ├── http.rb │ │ ├── https.rb │ │ ├── ldap.rb │ │ ├── ldaps.rb │ │ ├── mailto.rb │ │ ├── rfc2396_parser.rb │ │ └── rfc3986_parser.rb │ ├── weakref.rb │ ├── webrick.rb │ ├── webrick │ │ ├── accesslog.rb │ │ ├── cgi.rb │ │ ├── compat.rb │ │ ├── config.rb │ │ ├── cookie.rb │ │ ├── htmlutils.rb │ │ ├── httpauth.rb │ │ ├── httpauth │ │ │ ├── authenticator.rb │ │ │ ├── basicauth.rb │ │ │ ├── digestauth.rb │ │ │ ├── htdigest.rb │ │ │ ├── htgroup.rb │ │ │ ├── htpasswd.rb │ │ │ └── userdb.rb │ │ ├── httpproxy.rb │ │ ├── httprequest.rb │ │ ├── httpresponse.rb │ │ ├── https.rb │ │ ├── httpserver.rb │ │ ├── httpservlet.rb │ │ ├── httpservlet │ │ │ ├── abstract.rb │ │ │ ├── cgi_runner.rb │ │ │ ├── cgihandler.rb │ │ │ ├── erbhandler.rb │ │ │ ├── filehandler.rb │ │ │ └── prochandler.rb │ │ ├── httpstatus.rb │ │ ├── httputils.rb │ │ ├── httpversion.rb │ │ ├── log.rb │ │ ├── server.rb │ │ ├── ssl.rb │ │ ├── utils.rb │ │ └── version.rb │ ├── x86_64-linux │ │ ├── bigdecimal.so │ │ ├── continuation.so │ │ ├── date_core.so │ │ ├── digest.so │ │ ├── digest │ │ │ ├── bubblebabble.so │ │ │ ├── md5.so │ │ │ ├── rmd160.so │ │ │ ├── sha1.so │ │ │ └── sha2.so │ │ ├── enc │ │ │ ├── big5.so │ │ │ ├── cp949.so │ │ │ ├── emacs_mule.so │ │ │ ├── encdb.so │ │ │ ├── euc_jp.so │ │ │ ├── euc_kr.so │ │ │ ├── euc_tw.so │ │ │ ├── gb18030.so │ │ │ ├── gb2312.so │ │ │ ├── gbk.so │ │ │ ├── iso_8859_1.so │ │ │ ├── iso_8859_10.so │ │ │ ├── iso_8859_11.so │ │ │ ├── iso_8859_13.so │ │ │ ├── iso_8859_14.so │ │ │ ├── iso_8859_15.so │ │ │ ├── iso_8859_16.so │ │ │ ├── iso_8859_2.so │ │ │ ├── iso_8859_3.so │ │ │ ├── iso_8859_4.so │ │ │ ├── iso_8859_5.so │ │ │ ├── iso_8859_6.so │ │ │ ├── iso_8859_7.so │ │ │ ├── iso_8859_8.so │ │ │ ├── iso_8859_9.so │ │ │ ├── koi8_r.so │ │ │ ├── koi8_u.so │ │ │ ├── shift_jis.so │ │ │ ├── trans │ │ │ │ ├── big5.so │ │ │ │ ├── chinese.so │ │ │ │ ├── emoji.so │ │ │ │ ├── emoji_iso2022_kddi.so │ │ │ │ ├── emoji_sjis_docomo.so │ │ │ │ ├── emoji_sjis_kddi.so │ │ │ │ ├── emoji_sjis_softbank.so │ │ │ │ ├── escape.so │ │ │ │ ├── gb18030.so │ │ │ │ ├── gbk.so │ │ │ │ ├── iso2022.so │ │ │ │ ├── japanese.so │ │ │ │ ├── japanese_euc.so │ │ │ │ ├── japanese_sjis.so │ │ │ │ ├── korean.so │ │ │ │ ├── single_byte.so │ │ │ │ ├── transdb.so │ │ │ │ ├── utf8_mac.so │ │ │ │ └── utf_16_32.so │ │ │ ├── utf_16be.so │ │ │ ├── utf_16le.so │ │ │ ├── utf_32be.so │ │ │ ├── utf_32le.so │ │ │ ├── windows_1251.so │ │ │ └── windows_31j.so │ │ ├── etc.so │ │ ├── fcntl.so │ │ ├── fiber.so │ │ ├── fiddle.so │ │ ├── io │ │ │ ├── console.so │ │ │ ├── nonblock.so │ │ │ └── wait.so │ │ ├── json │ │ │ └── ext │ │ │ │ ├── generator.so │ │ │ │ └── parser.so │ │ ├── mathn │ │ │ ├── complex.so │ │ │ └── rational.so │ │ ├── nkf.so │ │ ├── objspace.so │ │ ├── openssl.so │ │ ├── pathname.so │ │ ├── psych.so │ │ ├── pty.so │ │ ├── racc │ │ │ └── cparse.so │ │ ├── rbconfig.rb │ │ ├── rbconfig │ │ │ └── sizeof.so │ │ ├── readline.so │ │ ├── ripper.so │ │ ├── socket.so │ │ ├── stringio.so │ │ ├── strscan.so │ │ ├── syslog.so │ │ ├── thread.so │ │ └── zlib.so │ ├── xmlrpc.rb │ ├── xmlrpc │ │ ├── base64.rb │ │ ├── client.rb │ │ ├── config.rb │ │ ├── create.rb │ │ ├── datetime.rb │ │ ├── marshal.rb │ │ ├── parser.rb │ │ ├── server.rb │ │ └── utils.rb │ ├── yaml.rb │ └── yaml │ │ ├── dbm.rb │ │ └── store.rb │ └── gems │ └── 2.2.0 │ ├── build_info │ ├── charlock_holmes-0.7.3.info │ ├── eventmachine-1.0.4.info │ ├── eventmachine-1.0.6.info │ ├── puma-2.11.2.info │ ├── rugged-0.21.4.info │ └── rugged-0.22.0b5.info │ ├── gems │ └── bundler-1.9.9 │ │ ├── bin │ │ ├── bundle │ │ ├── bundle_ruby │ │ └── bundler │ │ ├── bundler.gemspec │ │ └── lib │ │ ├── bundler.rb │ │ └── bundler │ │ ├── anonymizable_uri.rb │ │ ├── capistrano.rb │ │ ├── cli.rb │ │ ├── cli │ │ ├── binstubs.rb │ │ ├── cache.rb │ │ ├── check.rb │ │ ├── clean.rb │ │ ├── common.rb │ │ ├── config.rb │ │ ├── console.rb │ │ ├── exec.rb │ │ ├── gem.rb │ │ ├── init.rb │ │ ├── inject.rb │ │ ├── install.rb │ │ ├── open.rb │ │ ├── outdated.rb │ │ ├── package.rb │ │ ├── platform.rb │ │ ├── show.rb │ │ ├── update.rb │ │ └── viz.rb │ │ ├── constants.rb │ │ ├── current_ruby.rb │ │ ├── definition.rb │ │ ├── dep_proxy.rb │ │ ├── dependency.rb │ │ ├── deployment.rb │ │ ├── deprecate.rb │ │ ├── dsl.rb │ │ ├── endpoint_specification.rb │ │ ├── env.rb │ │ ├── environment.rb │ │ ├── fetcher.rb │ │ ├── friendly_errors.rb │ │ ├── gem_helper.rb │ │ ├── gem_helpers.rb │ │ ├── gem_installer.rb │ │ ├── gem_path_manipulation.rb │ │ ├── gem_tasks.rb │ │ ├── graph.rb │ │ ├── index.rb │ │ ├── injector.rb │ │ ├── installer.rb │ │ ├── lazy_specification.rb │ │ ├── lockfile_parser.rb │ │ ├── man │ │ ├── bundle │ │ ├── bundle-config │ │ ├── bundle-exec │ │ ├── bundle-install │ │ ├── bundle-package │ │ ├── bundle-platform │ │ ├── bundle-update │ │ └── gemfile.5 │ │ ├── match_platform.rb │ │ ├── psyched_yaml.rb │ │ ├── remote_specification.rb │ │ ├── resolver.rb │ │ ├── retry.rb │ │ ├── ruby_dsl.rb │ │ ├── ruby_version.rb │ │ ├── rubygems_ext.rb │ │ ├── rubygems_integration.rb │ │ ├── runtime.rb │ │ ├── settings.rb │ │ ├── setup.rb │ │ ├── shared_helpers.rb │ │ ├── similarity_detector.rb │ │ ├── source.rb │ │ ├── source │ │ ├── git.rb │ │ ├── git │ │ │ └── git_proxy.rb │ │ ├── path.rb │ │ ├── path │ │ │ └── installer.rb │ │ └── rubygems.rb │ │ ├── source_list.rb │ │ ├── spec_set.rb │ │ ├── ssl_certs │ │ ├── .document │ │ ├── AddTrustExternalCARoot-2048.pem │ │ ├── AddTrustExternalCARoot.pem │ │ ├── Class3PublicPrimaryCertificationAuthority.pem │ │ ├── DigiCertHighAssuranceEVRootCA.pem │ │ ├── EntrustnetSecureServerCertificationAuthority.pem │ │ ├── GeoTrustGlobalCA.pem │ │ └── certificate_manager.rb │ │ ├── ui.rb │ │ ├── ui │ │ ├── rg_proxy.rb │ │ ├── shell.rb │ │ └── silent.rb │ │ ├── vendor │ │ ├── molinillo │ │ │ └── lib │ │ │ │ ├── molinillo.rb │ │ │ │ └── molinillo │ │ │ │ ├── dependency_graph.rb │ │ │ │ ├── errors.rb │ │ │ │ ├── gem_metadata.rb │ │ │ │ ├── modules │ │ │ │ ├── specification_provider.rb │ │ │ │ └── ui.rb │ │ │ │ ├── resolution.rb │ │ │ │ ├── resolver.rb │ │ │ │ └── state.rb │ │ ├── net │ │ │ └── http │ │ │ │ ├── faster.rb │ │ │ │ ├── persistent.rb │ │ │ │ └── persistent │ │ │ │ └── ssl_reuse.rb │ │ └── thor │ │ │ └── lib │ │ │ ├── thor.rb │ │ │ └── thor │ │ │ ├── actions.rb │ │ │ ├── actions │ │ │ ├── create_file.rb │ │ │ ├── create_link.rb │ │ │ ├── directory.rb │ │ │ ├── empty_directory.rb │ │ │ ├── file_manipulation.rb │ │ │ └── inject_into_file.rb │ │ │ ├── base.rb │ │ │ ├── command.rb │ │ │ ├── core_ext │ │ │ ├── hash_with_indifferent_access.rb │ │ │ ├── io_binary_read.rb │ │ │ └── ordered_hash.rb │ │ │ ├── error.rb │ │ │ ├── group.rb │ │ │ ├── invocation.rb │ │ │ ├── line_editor.rb │ │ │ ├── line_editor │ │ │ ├── basic.rb │ │ │ └── readline.rb │ │ │ ├── parser.rb │ │ │ ├── parser │ │ │ ├── argument.rb │ │ │ ├── arguments.rb │ │ │ ├── option.rb │ │ │ └── options.rb │ │ │ ├── rake_compat.rb │ │ │ ├── runner.rb │ │ │ ├── shell.rb │ │ │ ├── shell │ │ │ ├── basic.rb │ │ │ ├── color.rb │ │ │ └── html.rb │ │ │ ├── util.rb │ │ │ └── version.rb │ │ ├── vendored_molinillo.rb │ │ ├── vendored_persistent.rb │ │ ├── vendored_thor.rb │ │ ├── version.rb │ │ ├── vlad.rb │ │ └── worker.rb │ └── specifications │ ├── bundler-1.9.9.gemspec │ └── default │ ├── bigdecimal-1.2.6.gemspec │ ├── io-console-0.4.3.gemspec │ ├── json-1.8.1.gemspec │ ├── psych-2.0.8.gemspec │ ├── rake-10.4.2.gemspec │ └── rdoc-4.2.0.gemspec └── serverless.yml /fetch-ruby.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | TRAVELING_RUBY_VERSION=20150715-2.2.2 4 | 5 | echo "Fetch Traveling Ruby $TRAVELING_RUBY_VERSION" 6 | curl -sL http://d6r77u77i8pq3.cloudfront.net/releases/traveling-ruby-$TRAVELING_RUBY_VERSION-linux-x86_64.tar.gz -o traveling-ruby.tar.gz 7 | mkdir ruby 8 | tar -xvf traveling-ruby.tar.gz -C ruby 9 | rm traveling-ruby.tar.gz -------------------------------------------------------------------------------- /handler.js: -------------------------------------------------------------------------------- 1 | const spawn = require('child_process').spawn; 2 | 3 | module.exports.hello = function(event, context, callback) { 4 | var child = spawn('./index.rb', [JSON.stringify(event)]); 5 | var stdout = ''; 6 | var stderr = ''; 7 | 8 | child.stdout.on('data', function (data) { 9 | stdout += data.toString(); 10 | }); 11 | child.stderr.on('data', function (data) { 12 | stderr += data.toString(); 13 | }); 14 | 15 | child.on('close', function(code) { 16 | if (code !== 0) { 17 | return callback(new Error(`Process exited with non-zero status code: ${code}`)); 18 | } 19 | if (stderr) { 20 | console.error(stderr); 21 | } 22 | 23 | // We expect the child process to output valid JSON with a body 24 | try { 25 | var response = JSON.parse(stdout); 26 | response.body = JSON.stringify(response.body); 27 | callback(null, response); 28 | } catch (error) { 29 | callback(error); 30 | } 31 | }); 32 | } -------------------------------------------------------------------------------- /index.rb: -------------------------------------------------------------------------------- 1 | #!./ruby/bin/ruby 2 | 3 | require 'json' 4 | 5 | puts JSON.generate( 6 | statusCode: 200, 7 | body: 'Hello from Ruby' 8 | ) 9 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aws-ruby-hello", 3 | "version": "1.0.0", 4 | "description": "This example demonstrates how to run a Ruby script in AWS Lambda.", 5 | "author": "Stewart Lord", 6 | "license": "MIT" 7 | } -------------------------------------------------------------------------------- /ruby/bin.real/bundle: -------------------------------------------------------------------------------- 1 | #!/tmp/ruby/bin/ruby 2 | # 3 | # This file was generated by RubyGems. 4 | # 5 | # The application 'bundler' is installed as part of a gem, and 6 | # this file is here to facilitate running it. 7 | # 8 | 9 | require 'rubygems' 10 | 11 | version = ">= 0" 12 | 13 | if ARGV.first 14 | str = ARGV.first 15 | str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding 16 | if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then 17 | version = $1 18 | ARGV.shift 19 | end 20 | end 21 | 22 | gem 'bundler', version 23 | load Gem.bin_path('bundler', 'bundle', version) 24 | -------------------------------------------------------------------------------- /ruby/bin.real/bundler: -------------------------------------------------------------------------------- 1 | #!/tmp/ruby/bin/ruby 2 | # 3 | # This file was generated by RubyGems. 4 | # 5 | # The application 'bundler' is installed as part of a gem, and 6 | # this file is here to facilitate running it. 7 | # 8 | 9 | require 'rubygems' 10 | 11 | version = ">= 0" 12 | 13 | if ARGV.first 14 | str = ARGV.first 15 | str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding 16 | if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then 17 | version = $1 18 | ARGV.shift 19 | end 20 | end 21 | 22 | gem 'bundler', version 23 | load Gem.bin_path('bundler', 'bundler', version) 24 | -------------------------------------------------------------------------------- /ruby/bin.real/gem: -------------------------------------------------------------------------------- 1 | #!/tmp/ruby/bin/ruby 2 | #-- 3 | # Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. 4 | # All rights reserved. 5 | # See LICENSE.txt for permissions. 6 | #++ 7 | 8 | require 'rubygems' 9 | require 'rubygems/gem_runner' 10 | require 'rubygems/exceptions' 11 | 12 | required_version = Gem::Requirement.new ">= 1.8.7" 13 | 14 | unless required_version.satisfied_by? Gem.ruby_version then 15 | abort "Expected Ruby Version #{required_version}, is #{Gem.ruby_version}" 16 | end 17 | 18 | args = ARGV.clone 19 | 20 | begin 21 | Gem::GemRunner.new.run args 22 | rescue Gem::SystemExitException => e 23 | exit e.exit_code 24 | end 25 | 26 | -------------------------------------------------------------------------------- /ruby/bin.real/irb: -------------------------------------------------------------------------------- 1 | #!/tmp/ruby/bin/ruby 2 | # 3 | # irb.rb - interactive ruby 4 | # $Release Version: 0.9.6 $ 5 | # $Revision: 40560 $ 6 | # by Keiju ISHITSUKA(keiju@ruby-lang.org) 7 | # 8 | 9 | require "irb" 10 | 11 | IRB.start(__FILE__) 12 | -------------------------------------------------------------------------------- /ruby/bin.real/nokogiri: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # 3 | # This file was generated by RubyGems. 4 | # 5 | # The application 'nokogiri' is installed as part of a gem, and 6 | # this file is here to facilitate running it. 7 | # 8 | 9 | require 'rubygems' 10 | 11 | version = ">= 0" 12 | 13 | if ARGV.first 14 | str = ARGV.first 15 | str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding 16 | if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then 17 | version = $1 18 | ARGV.shift 19 | end 20 | end 21 | 22 | gem 'nokogiri', version 23 | load Gem.bin_path('nokogiri', 'nokogiri', version) 24 | -------------------------------------------------------------------------------- /ruby/bin.real/posix-spawn-benchmark: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # 3 | # This file was generated by RubyGems. 4 | # 5 | # The application 'posix-spawn' is installed as part of a gem, and 6 | # this file is here to facilitate running it. 7 | # 8 | 9 | require 'rubygems' 10 | 11 | version = ">= 0" 12 | 13 | if ARGV.first 14 | str = ARGV.first 15 | str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding 16 | if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then 17 | version = $1 18 | ARGV.shift 19 | end 20 | end 21 | 22 | gem 'posix-spawn', version 23 | load Gem.bin_path('posix-spawn', 'posix-spawn-benchmark', version) 24 | -------------------------------------------------------------------------------- /ruby/bin.real/puma: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # 3 | # This file was generated by RubyGems. 4 | # 5 | # The application 'puma' is installed as part of a gem, and 6 | # this file is here to facilitate running it. 7 | # 8 | 9 | require 'rubygems' 10 | 11 | version = ">= 0" 12 | 13 | if ARGV.first 14 | str = ARGV.first 15 | str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding 16 | if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then 17 | version = $1 18 | ARGV.shift 19 | end 20 | end 21 | 22 | gem 'puma', version 23 | load Gem.bin_path('puma', 'puma', version) 24 | -------------------------------------------------------------------------------- /ruby/bin.real/pumactl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # 3 | # This file was generated by RubyGems. 4 | # 5 | # The application 'puma' is installed as part of a gem, and 6 | # this file is here to facilitate running it. 7 | # 8 | 9 | require 'rubygems' 10 | 11 | version = ">= 0" 12 | 13 | if ARGV.first 14 | str = ARGV.first 15 | str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding 16 | if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then 17 | version = $1 18 | ARGV.shift 19 | end 20 | end 21 | 22 | gem 'puma', version 23 | load Gem.bin_path('puma', 'pumactl', version) 24 | -------------------------------------------------------------------------------- /ruby/bin.real/rackup: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # 3 | # This file was generated by RubyGems. 4 | # 5 | # The application 'rack' is installed as part of a gem, and 6 | # this file is here to facilitate running it. 7 | # 8 | 9 | require 'rubygems' 10 | 11 | version = ">= 0" 12 | 13 | if ARGV.first 14 | str = ARGV.first 15 | str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding 16 | if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then 17 | version = $1 18 | ARGV.shift 19 | end 20 | end 21 | 22 | gem 'rack', version 23 | load Gem.bin_path('rack', 'rackup', version) 24 | -------------------------------------------------------------------------------- /ruby/bin.real/redcarpet: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # 3 | # This file was generated by RubyGems. 4 | # 5 | # The application 'redcarpet' is installed as part of a gem, and 6 | # this file is here to facilitate running it. 7 | # 8 | 9 | require 'rubygems' 10 | 11 | version = ">= 0" 12 | 13 | if ARGV.first 14 | str = ARGV.first 15 | str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding 16 | if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then 17 | version = $1 18 | ARGV.shift 19 | end 20 | end 21 | 22 | gem 'redcarpet', version 23 | load Gem.bin_path('redcarpet', 'redcarpet', version) 24 | -------------------------------------------------------------------------------- /ruby/bin.real/redcloth: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # 3 | # This file was generated by RubyGems. 4 | # 5 | # The application 'RedCloth' is installed as part of a gem, and 6 | # this file is here to facilitate running it. 7 | # 8 | 9 | require 'rubygems' 10 | 11 | version = ">= 0" 12 | 13 | if ARGV.first 14 | str = ARGV.first 15 | str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding 16 | if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then 17 | version = $1 18 | ARGV.shift 19 | end 20 | end 21 | 22 | gem 'RedCloth', version 23 | load Gem.bin_path('RedCloth', 'redcloth', version) 24 | -------------------------------------------------------------------------------- /ruby/bin.real/ruby: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/bin.real/ruby -------------------------------------------------------------------------------- /ruby/bin.real/thin: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # 3 | # This file was generated by RubyGems. 4 | # 5 | # The application 'thin' is installed as part of a gem, and 6 | # this file is here to facilitate running it. 7 | # 8 | 9 | require 'rubygems' 10 | 11 | version = ">= 0" 12 | 13 | if ARGV.first 14 | str = ARGV.first 15 | str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding 16 | if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then 17 | version = $1 18 | ARGV.shift 19 | end 20 | end 21 | 22 | gem 'thin', version 23 | load Gem.bin_path('thin', 'thin', version) 24 | -------------------------------------------------------------------------------- /ruby/bin.real/unicorn: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # 3 | # This file was generated by RubyGems. 4 | # 5 | # The application 'unicorn' is installed as part of a gem, and 6 | # this file is here to facilitate running it. 7 | # 8 | 9 | require 'rubygems' 10 | 11 | version = ">= 0" 12 | 13 | if ARGV.first 14 | str = ARGV.first 15 | str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding 16 | if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then 17 | version = $1 18 | ARGV.shift 19 | end 20 | end 21 | 22 | gem 'unicorn', version 23 | load Gem.bin_path('unicorn', 'unicorn', version) 24 | -------------------------------------------------------------------------------- /ruby/bin.real/unicorn_rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # 3 | # This file was generated by RubyGems. 4 | # 5 | # The application 'unicorn' is installed as part of a gem, and 6 | # this file is here to facilitate running it. 7 | # 8 | 9 | require 'rubygems' 10 | 11 | version = ">= 0" 12 | 13 | if ARGV.first 14 | str = ARGV.first 15 | str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding 16 | if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then 17 | version = $1 18 | ARGV.shift 19 | end 20 | end 21 | 22 | gem 'unicorn', version 23 | load Gem.bin_path('unicorn', 'unicorn_rails', version) 24 | -------------------------------------------------------------------------------- /ruby/bin/gem: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | ROOT=`dirname "$0"` 4 | ROOT=`cd "$ROOT/.." && pwd` 5 | eval "`\"$ROOT/bin/ruby_environment\"`" 6 | exec "$ROOT/bin.real/ruby" "$ROOT/bin.real/gem" "$@" 7 | -------------------------------------------------------------------------------- /ruby/bin/irb: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | ROOT=`dirname "$0"` 4 | ROOT=`cd "$ROOT/.." && pwd` 5 | eval "`\"$ROOT/bin/ruby_environment\"`" 6 | exec "$ROOT/bin.real/ruby" "$ROOT/bin.real/irb" "$@" 7 | -------------------------------------------------------------------------------- /ruby/bin/rake: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | ROOT=`dirname "$0"` 4 | ROOT=`cd "$ROOT/.." && pwd` 5 | eval "`\"$ROOT/bin/ruby_environment\"`" 6 | exec "$ROOT/bin.real/ruby" "$ROOT/bin.real/rake" "$@" 7 | -------------------------------------------------------------------------------- /ruby/bin/ruby: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | ROOT=`dirname "$0"` 4 | ROOT=`cd "$ROOT/.." && pwd` 5 | eval "`\"$ROOT/bin/ruby_environment\"`" 6 | exec "$ROOT/bin.real/ruby" "$@" 7 | -------------------------------------------------------------------------------- /ruby/info/GEM_EXTENSION_API_VERSION: -------------------------------------------------------------------------------- 1 | 2.2.0-static 2 | -------------------------------------------------------------------------------- /ruby/info/GEM_PLATFORM: -------------------------------------------------------------------------------- 1 | x86_64-linux 2 | -------------------------------------------------------------------------------- /ruby/info/RUBY_ARCH: -------------------------------------------------------------------------------- 1 | x86_64-linux 2 | -------------------------------------------------------------------------------- /ruby/info/RUBY_COMPAT_VERSION: -------------------------------------------------------------------------------- 1 | 2.2.0 2 | -------------------------------------------------------------------------------- /ruby/lib/ca-bundle.crt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ca-bundle.crt -------------------------------------------------------------------------------- /ruby/lib/libffi.so.6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/libffi.so.6 -------------------------------------------------------------------------------- /ruby/lib/libreadline.so.5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/libreadline.so.5 -------------------------------------------------------------------------------- /ruby/lib/libtermcap.so.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/libtermcap.so.2 -------------------------------------------------------------------------------- /ruby/lib/libz.so.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/libz.so.1 -------------------------------------------------------------------------------- /ruby/lib/restore_environment.rb: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | # immutable: string 3 | 4 | IN_TRAVELING_RUBY = true 5 | 6 | restorable_envs = ['LD_LIBRARY_PATH', 'RUBYOPT', 'RUBYLIB'].freeze 7 | restorable_envs.each do |name| 8 | ENV[name] = ENV["ORIG_#{name}"] 9 | ENV.delete("ORIG_#{name}") 10 | end 11 | 12 | # We can't restore these environments now because they'll be used later. 13 | # We just store the original values so that the program can decide what to do. 14 | $OVERRIDDEN_ENVIRONMENTS = { 15 | 'SSL_CERT_DIR' => ENV['OLD_SSL_CERT_DIR'], 16 | 'SSL_CERT_FILE' => ENV['OLD_SSL_CERT_FILE'] 17 | } 18 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/drb.rb: -------------------------------------------------------------------------------- 1 | require 'drb/drb' 2 | 3 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/drb/eq.rb: -------------------------------------------------------------------------------- 1 | module DRb 2 | class DRbObject # :nodoc: 3 | def ==(other) 4 | return false unless DRbObject === other 5 | (@ref == other.__drbref) && (@uri == other.__drburi) 6 | end 7 | 8 | def hash 9 | [@uri, @ref].hash 10 | end 11 | 12 | alias eql? == 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/drb/extserv.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | external service 3 | Copyright (c) 2000,2002 Masatoshi SEKI 4 | =end 5 | 6 | require 'drb/drb' 7 | require 'monitor' 8 | 9 | module DRb 10 | class ExtServ 11 | include MonitorMixin 12 | include DRbUndumped 13 | 14 | def initialize(there, name, server=nil) 15 | super() 16 | @server = server || DRb::primary_server 17 | @name = name 18 | ro = DRbObject.new(nil, there) 19 | synchronize do 20 | @invoker = ro.regist(name, DRbObject.new(self, @server.uri)) 21 | end 22 | end 23 | attr_reader :server 24 | 25 | def front 26 | DRbObject.new(nil, @server.uri) 27 | end 28 | 29 | def stop_service 30 | synchronize do 31 | @invoker.unregist(@name) 32 | server = @server 33 | @server = nil 34 | server.stop_service 35 | true 36 | end 37 | end 38 | 39 | def alive? 40 | @server ? @server.alive? : false 41 | end 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/drb/invokemethod.rb: -------------------------------------------------------------------------------- 1 | # for ruby-1.8.0 2 | 3 | module DRb # :nodoc: all 4 | class DRbServer 5 | module InvokeMethod18Mixin 6 | def block_yield(x) 7 | if x.size == 1 && x[0].class == Array 8 | x[0] = DRbArray.new(x[0]) 9 | end 10 | @block.call(*x) 11 | end 12 | 13 | def perform_with_block 14 | @obj.__send__(@msg_id, *@argv) do |*x| 15 | jump_error = nil 16 | begin 17 | block_value = block_yield(x) 18 | rescue LocalJumpError 19 | jump_error = $! 20 | end 21 | if jump_error 22 | case jump_error.reason 23 | when :break 24 | break(jump_error.exit_value) 25 | else 26 | raise jump_error 27 | end 28 | end 29 | block_value 30 | end 31 | end 32 | end 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/drb/observer.rb: -------------------------------------------------------------------------------- 1 | require 'observer' 2 | 3 | module DRb 4 | # The Observable module extended to DRb. See Observable for details. 5 | module DRbObservable 6 | include Observable 7 | 8 | # Notifies observers of a change in state. See also 9 | # Observable#notify_observers 10 | def notify_observers(*arg) 11 | if defined? @observer_state and @observer_state 12 | if defined? @observer_peers 13 | @observer_peers.each do |observer, method| 14 | begin 15 | observer.send(method, *arg) 16 | rescue 17 | delete_observer(observer) 18 | end 19 | end 20 | end 21 | @observer_state = false 22 | end 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/fiddle/function.rb: -------------------------------------------------------------------------------- 1 | module Fiddle 2 | class Function 3 | # The ABI of the Function. 4 | attr_reader :abi 5 | 6 | # The address of this function 7 | attr_reader :ptr 8 | 9 | # The name of this function 10 | attr_reader :name 11 | 12 | # The integer memory location of this function 13 | def to_i 14 | ptr.to_i 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/io/console/size.rb: -------------------------------------------------------------------------------- 1 | # fallback to console window size 2 | def IO.default_console_size 3 | [ 4 | ENV["LINES"].to_i.nonzero? || 25, 5 | ENV["COLUMNS"].to_i.nonzero? || 80, 6 | ] 7 | end 8 | 9 | begin 10 | require 'io/console' 11 | rescue LoadError 12 | class IO 13 | alias console_size default_console_size 14 | end 15 | else 16 | # returns console window size 17 | def IO.console_size 18 | console.winsize 19 | rescue NoMethodError 20 | default_console_size 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/irb/cmd/chws.rb: -------------------------------------------------------------------------------- 1 | # 2 | # change-ws.rb - 3 | # $Release Version: 0.9.6$ 4 | # $Revision: 47112 $ 5 | # by Keiju ISHITSUKA(keiju@ruby-lang.org) 6 | # 7 | # -- 8 | # 9 | # 10 | # 11 | 12 | require "irb/cmd/nop.rb" 13 | require "irb/ext/change-ws.rb" 14 | 15 | # :stopdoc: 16 | module IRB 17 | module ExtendCommand 18 | 19 | class CurrentWorkingWorkspaceIRB.conf[:MAIN_CONTEXT] when irb was initialized. 29 | # 30 | # See IRB::WorkSpace.new for more information. 31 | def change_workspace(*_main) 32 | if _main.empty? 33 | @workspace = home_workspace 34 | return main 35 | end 36 | 37 | @workspace = WorkSpace.new(_main[0]) 38 | 39 | if !(class<bc(1) for 28 | # more information. 29 | def math_mode=(opt) 30 | if @math_mode == true && !opt 31 | IRB.fail CantReturnToNormalMode 32 | return 33 | end 34 | 35 | @math_mode = opt 36 | if math_mode 37 | main.extend Math 38 | print "start math mode\n" if verbose? 39 | end 40 | end 41 | 42 | def inspect? 43 | @inspect_mode.nil? && !@math_mode or @inspect_mode 44 | end 45 | end 46 | end 47 | 48 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/irb/help.rb: -------------------------------------------------------------------------------- 1 | # 2 | # irb/help.rb - print usage module 3 | # $Release Version: 0.9.6$ 4 | # $Revision: 47112 $ 5 | # by Keiju ISHITSUKA(keiju@ishitsuka.com) 6 | # 7 | # -- 8 | # 9 | # 10 | # 11 | 12 | require 'irb/magic-file' 13 | 14 | module IRB 15 | # Outputs the irb help message, see IRB@Command+line+options. 16 | def IRB.print_usage 17 | lc = IRB.conf[:LC_MESSAGES] 18 | path = lc.find("irb/help-message") 19 | space_line = false 20 | IRB::MagicFile.open(path){|f| 21 | f.each_line do |l| 22 | if /^\s*$/ =~ l 23 | lc.puts l unless space_line 24 | space_line = true 25 | next 26 | end 27 | space_line = false 28 | 29 | l.sub!(/#.*$/, "") 30 | next if /^\s*$/ =~ l 31 | lc.puts l 32 | end 33 | } 34 | end 35 | end 36 | 37 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/irb/lc/error.rb: -------------------------------------------------------------------------------- 1 | # 2 | # irb/lc/error.rb - 3 | # $Release Version: 0.9.6$ 4 | # $Revision: 38600 $ 5 | # by Keiju ISHITSUKA(keiju@ruby-lang.org) 6 | # 7 | # -- 8 | # 9 | # 10 | # 11 | require "e2mmap" 12 | 13 | # :stopdoc: 14 | module IRB 15 | 16 | # exceptions 17 | extend Exception2MessageMapper 18 | def_exception :UnrecognizedSwitch, "Unrecognized switch: %s" 19 | def_exception :NotImplementedError, "Need to define `%s'" 20 | def_exception :CantReturnToNormalMode, "Can't return to normal mode." 21 | def_exception :IllegalParameter, "Invalid parameter(%s)." 22 | def_exception :IrbAlreadyDead, "Irb is already dead." 23 | def_exception :IrbSwitchedToCurrentThread, "Switched to current thread." 24 | def_exception :NoSuchJob, "No such job(%s)." 25 | def_exception :CantShiftToMultiIrbMode, "Can't shift to multi irb mode." 26 | def_exception :CantChangeBinding, "Can't change binding to (%s)." 27 | def_exception :UndefinedPromptMode, "Undefined prompt mode(%s)." 28 | def_exception :IllegalRCGenerator, 'Define illegal RC_NAME_GENERATOR.' 29 | 30 | end 31 | # :startdoc: 32 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/irb/lc/ja/encoding_aliases.rb: -------------------------------------------------------------------------------- 1 | # :stopdoc: 2 | module IRB 3 | class Locale 4 | @@legacy_encoding_alias_map = { 5 | 'ujis' => Encoding::EUC_JP, 6 | 'euc' => Encoding::EUC_JP 7 | }.freeze 8 | end 9 | end 10 | # :startdoc: 11 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/irb/lc/ja/error.rb: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # irb/lc/ja/error.rb - 3 | # $Release Version: 0.9.6$ 4 | # $Revision: 38600 $ 5 | # by Keiju ISHITSUKA(keiju@ruby-lang.org) 6 | # 7 | # -- 8 | # 9 | # 10 | # 11 | require "e2mmap" 12 | 13 | # :stopdoc: 14 | module IRB 15 | # exceptions 16 | extend Exception2MessageMapper 17 | def_exception :UnrecognizedSwitch, 'スイッチ(%s)が分りません' 18 | def_exception :NotImplementedError, '`%s\'の定義が必要です' 19 | def_exception :CantReturnToNormalMode, 'Normalモードに戻れません.' 20 | def_exception :IllegalParameter, 'パラメータ(%s)が間違っています.' 21 | def_exception :IrbAlreadyDead, 'Irbは既に死んでいます.' 22 | def_exception :IrbSwitchedToCurrentThread, 'カレントスレッドに切り替わりました.' 23 | def_exception :NoSuchJob, 'そのようなジョブ(%s)はありません.' 24 | def_exception :CantShiftToMultiIrbMode, 'multi-irb modeに移れません.' 25 | def_exception :CantChangeBinding, 'バインディング(%s)に変更できません.' 26 | def_exception :UndefinedPromptMode, 'プロンプトモード(%s)は定義されていません.' 27 | def_exception :IllegalRCNameGenerator, 'RC_NAME_GENERATORが正しく定義されていません.' 28 | end 29 | # :startdoc: 30 | # vim:fileencoding=utf-8 31 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/irb/magic-file.rb: -------------------------------------------------------------------------------- 1 | module IRB 2 | class << (MagicFile = Object.new) 3 | # see parser_magic_comment in parse.y 4 | ENCODING_SPEC_RE = %r"coding\s*[=:]\s*([[:alnum:]\-_]+)" 5 | 6 | def open(path) 7 | io = File.open(path, 'rb') 8 | line = io.gets 9 | line = io.gets if line[0,2] == "#!" 10 | encoding = detect_encoding(line) 11 | internal_encoding = encoding 12 | encoding ||= default_src_encoding 13 | io.rewind 14 | io.set_encoding(encoding, internal_encoding) 15 | 16 | if block_given? 17 | begin 18 | return (yield io) 19 | ensure 20 | io.close 21 | end 22 | else 23 | return io 24 | end 25 | end 26 | 27 | private 28 | def detect_encoding(line) 29 | return unless line[0] == ?# 30 | line = line[1..-1] 31 | line = $1 if line[/-\*-\s*(.*?)\s*-*-$/] 32 | return nil unless ENCODING_SPEC_RE =~ line 33 | encoding = $1 34 | return encoding.sub(/-(?:mac|dos|unix)/i, '') 35 | end 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/irb/src_encoding.rb: -------------------------------------------------------------------------------- 1 | # DO NOT WRITE ANY MAGIC COMMENT HERE. 2 | def default_src_encoding 3 | return __ENCODING__ 4 | end 5 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/irb/version.rb: -------------------------------------------------------------------------------- 1 | # 2 | # irb/version.rb - irb version definition file 3 | # $Release Version: 0.9.6$ 4 | # $Revision: 38358 $ 5 | # by Keiju ISHITSUKA(keiju@ishitsuka.com) 6 | # 7 | # -- 8 | # 9 | # 10 | # 11 | 12 | module IRB # :nodoc: 13 | @RELEASE_VERSION = "0.9.6" 14 | @LAST_UPDATE_DATE = "09/06/30" 15 | end 16 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/irb/ws-for-case-2.rb: -------------------------------------------------------------------------------- 1 | # 2 | # irb/ws-for-case-2.rb - 3 | # $Release Version: 0.9.6$ 4 | # $Revision: 29726 $ 5 | # by Keiju ISHITSUKA(keiju@ruby-lang.org) 6 | # 7 | # -- 8 | # 9 | # 10 | # 11 | 12 | while true 13 | IRB::BINDING_QUEUE.push _ = binding 14 | end 15 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/json/add/bigdecimal.rb: -------------------------------------------------------------------------------- 1 | unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED 2 | require 'json' 3 | end 4 | defined?(::BigDecimal) or require 'bigdecimal' 5 | 6 | class BigDecimal 7 | # Import a JSON Marshalled object. 8 | # 9 | # method used for JSON marshalling support. 10 | def self.json_create(object) 11 | BigDecimal._load object['b'] 12 | end 13 | 14 | # Marshal the object to JSON. 15 | # 16 | # method used for JSON marshalling support. 17 | def as_json(*) 18 | { 19 | JSON.create_id => self.class.name, 20 | 'b' => _dump, 21 | } 22 | end 23 | 24 | # return the JSON value 25 | def to_json(*) 26 | as_json.to_json 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/json/add/complex.rb: -------------------------------------------------------------------------------- 1 | unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED 2 | require 'json' 3 | end 4 | defined?(::Complex) or require 'complex' 5 | 6 | class Complex 7 | def self.json_create(object) 8 | Complex(object['r'], object['i']) 9 | end 10 | 11 | def as_json(*) 12 | { 13 | JSON.create_id => self.class.name, 14 | 'r' => real, 15 | 'i' => imag, 16 | } 17 | end 18 | 19 | def to_json(*) 20 | as_json.to_json 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/json/add/core.rb: -------------------------------------------------------------------------------- 1 | # This file requires the implementations of ruby core's custom objects for 2 | # serialisation/deserialisation. 3 | 4 | require 'json/add/date' 5 | require 'json/add/date_time' 6 | require 'json/add/exception' 7 | require 'json/add/range' 8 | require 'json/add/regexp' 9 | require 'json/add/struct' 10 | require 'json/add/symbol' 11 | require 'json/add/time' 12 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/json/add/date.rb: -------------------------------------------------------------------------------- 1 | unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED 2 | require 'json' 3 | end 4 | require 'date' 5 | 6 | # Date serialization/deserialization 7 | class Date 8 | 9 | # Deserializes JSON string by converting Julian year y, month 10 | # m, day d and Day of Calendar Reform sg to Date. 11 | def self.json_create(object) 12 | civil(*object.values_at('y', 'm', 'd', 'sg')) 13 | end 14 | 15 | alias start sg unless method_defined?(:start) 16 | 17 | # Returns a hash, that will be turned into a JSON object and represent this 18 | # object. 19 | def as_json(*) 20 | { 21 | JSON.create_id => self.class.name, 22 | 'y' => year, 23 | 'm' => month, 24 | 'd' => day, 25 | 'sg' => start, 26 | } 27 | end 28 | 29 | # Stores class name (Date) with Julian year y, month m, day 30 | # d and Day of Calendar Reform sg as JSON string 31 | def to_json(*args) 32 | as_json.to_json(*args) 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/json/add/exception.rb: -------------------------------------------------------------------------------- 1 | unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED 2 | require 'json' 3 | end 4 | 5 | # Exception serialization/deserialization 6 | class Exception 7 | 8 | # Deserializes JSON string by constructing new Exception object with message 9 | # m and backtrace b serialized with to_json 10 | def self.json_create(object) 11 | result = new(object['m']) 12 | result.set_backtrace object['b'] 13 | result 14 | end 15 | 16 | # Returns a hash, that will be turned into a JSON object and represent this 17 | # object. 18 | def as_json(*) 19 | { 20 | JSON.create_id => self.class.name, 21 | 'm' => message, 22 | 'b' => backtrace, 23 | } 24 | end 25 | 26 | # Stores class name (Exception) with message m and backtrace array 27 | # b as JSON string 28 | def to_json(*args) 29 | as_json.to_json(*args) 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/json/add/ostruct.rb: -------------------------------------------------------------------------------- 1 | unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED 2 | require 'json' 3 | end 4 | require 'ostruct' 5 | 6 | # OpenStruct serialization/deserialization 7 | class OpenStruct 8 | 9 | # Deserializes JSON string by constructing new Struct object with values 10 | # v serialized by to_json. 11 | def self.json_create(object) 12 | new(object['t'] || object[:t]) 13 | end 14 | 15 | # Returns a hash, that will be turned into a JSON object and represent this 16 | # object. 17 | def as_json(*) 18 | klass = self.class.name 19 | klass.to_s.empty? and raise JSON::JSONError, "Only named structs are supported!" 20 | { 21 | JSON.create_id => klass, 22 | 't' => table, 23 | } 24 | end 25 | 26 | # Stores class name (OpenStruct) with this struct's values v as a 27 | # JSON string. 28 | def to_json(*args) 29 | as_json.to_json(*args) 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/json/add/range.rb: -------------------------------------------------------------------------------- 1 | unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED 2 | require 'json' 3 | end 4 | 5 | # Range serialization/deserialization 6 | class Range 7 | 8 | # Deserializes JSON string by constructing new Range object with arguments 9 | # a serialized by to_json. 10 | def self.json_create(object) 11 | new(*object['a']) 12 | end 13 | 14 | # Returns a hash, that will be turned into a JSON object and represent this 15 | # object. 16 | def as_json(*) 17 | { 18 | JSON.create_id => self.class.name, 19 | 'a' => [ first, last, exclude_end? ] 20 | } 21 | end 22 | 23 | # Stores class name (Range) with JSON array of arguments a which 24 | # include first (integer), last (integer), and 25 | # exclude_end? (boolean) as JSON string. 26 | def to_json(*args) 27 | as_json.to_json(*args) 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/json/add/rational.rb: -------------------------------------------------------------------------------- 1 | unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED 2 | require 'json' 3 | end 4 | defined?(::Rational) or require 'rational' 5 | 6 | class Rational 7 | def self.json_create(object) 8 | Rational(object['n'], object['d']) 9 | end 10 | 11 | def as_json(*) 12 | { 13 | JSON.create_id => self.class.name, 14 | 'n' => numerator, 15 | 'd' => denominator, 16 | } 17 | end 18 | 19 | def to_json(*) 20 | as_json.to_json 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/json/add/regexp.rb: -------------------------------------------------------------------------------- 1 | unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED 2 | require 'json' 3 | end 4 | 5 | # Regexp serialization/deserialization 6 | class Regexp 7 | 8 | # Deserializes JSON string by constructing new Regexp object with source 9 | # s (Regexp or String) and options o serialized by 10 | # to_json 11 | def self.json_create(object) 12 | new(object['s'], object['o']) 13 | end 14 | 15 | # Returns a hash, that will be turned into a JSON object and represent this 16 | # object. 17 | def as_json(*) 18 | { 19 | JSON.create_id => self.class.name, 20 | 'o' => options, 21 | 's' => source, 22 | } 23 | end 24 | 25 | # Stores class name (Regexp) with options o and source s 26 | # (Regexp or String) as JSON string 27 | def to_json(*) 28 | as_json.to_json 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/json/add/struct.rb: -------------------------------------------------------------------------------- 1 | unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED 2 | require 'json' 3 | end 4 | 5 | # Struct serialization/deserialization 6 | class Struct 7 | 8 | # Deserializes JSON string by constructing new Struct object with values 9 | # v serialized by to_json. 10 | def self.json_create(object) 11 | new(*object['v']) 12 | end 13 | 14 | # Returns a hash, that will be turned into a JSON object and represent this 15 | # object. 16 | def as_json(*) 17 | klass = self.class.name 18 | klass.to_s.empty? and raise JSON::JSONError, "Only named structs are supported!" 19 | { 20 | JSON.create_id => klass, 21 | 'v' => values, 22 | } 23 | end 24 | 25 | # Stores class name (Struct) with Struct values v as a JSON string. 26 | # Only named structs are supported. 27 | def to_json(*args) 28 | as_json.to_json(*args) 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/json/add/symbol.rb: -------------------------------------------------------------------------------- 1 | unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED 2 | require 'json' 3 | end 4 | 5 | # Symbol serialization/deserialization 6 | class Symbol 7 | # Returns a hash, that will be turned into a JSON object and represent this 8 | # object. 9 | def as_json(*) 10 | { 11 | JSON.create_id => self.class.name, 12 | 's' => to_s, 13 | } 14 | end 15 | 16 | # Stores class name (Symbol) with String representation of Symbol as a JSON string. 17 | def to_json(*a) 18 | as_json.to_json(*a) 19 | end 20 | 21 | # Deserializes JSON string by converting the string value stored in the object to a Symbol 22 | def self.json_create(o) 23 | o['s'].to_sym 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/json/add/time.rb: -------------------------------------------------------------------------------- 1 | unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED 2 | require 'json' 3 | end 4 | 5 | # Time serialization/deserialization 6 | class Time 7 | 8 | # Deserializes JSON string by converting time since epoch to Time 9 | def self.json_create(object) 10 | if usec = object.delete('u') # used to be tv_usec -> tv_nsec 11 | object['n'] = usec * 1000 12 | end 13 | if instance_methods.include?(:tv_nsec) 14 | at(object['s'], Rational(object['n'], 1000)) 15 | else 16 | at(object['s'], object['n'] / 1000) 17 | end 18 | end 19 | 20 | # Returns a hash, that will be turned into a JSON object and represent this 21 | # object. 22 | def as_json(*) 23 | nanoseconds = [ tv_usec * 1000 ] 24 | respond_to?(:tv_nsec) and nanoseconds << tv_nsec 25 | nanoseconds = nanoseconds.max 26 | { 27 | JSON.create_id => self.class.name, 28 | 's' => tv_sec, 29 | 'n' => nanoseconds, 30 | } 31 | end 32 | 33 | # Stores class name (Time) with number of seconds since epoch and number of 34 | # microseconds for Time as JSON string 35 | def to_json(*args) 36 | as_json.to_json(*args) 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/json/ext.rb: -------------------------------------------------------------------------------- 1 | if ENV['SIMPLECOV_COVERAGE'].to_i == 1 2 | require 'simplecov' 3 | SimpleCov.start do 4 | add_filter "/tests/" 5 | end 6 | end 7 | require 'json/common' 8 | 9 | module JSON 10 | # This module holds all the modules/classes that implement JSON's 11 | # functionality as C extensions. 12 | module Ext 13 | require 'json/ext/parser' 14 | require 'json/ext/generator' 15 | $DEBUG and warn "Using Ext extension for JSON." 16 | JSON.parser = Parser 17 | JSON.generator = Generator 18 | end 19 | 20 | JSON_LOADED = true unless defined?(::JSON::JSON_LOADED) 21 | end 22 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/json/version.rb: -------------------------------------------------------------------------------- 1 | module JSON 2 | # JSON version 3 | VERSION = '1.8.1' 4 | VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc: 5 | VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc: 6 | VERSION_MINOR = VERSION_ARRAY[1] # :nodoc: 7 | VERSION_BUILD = VERSION_ARRAY[2] # :nodoc: 8 | end 9 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/net/http/backward.rb: -------------------------------------------------------------------------------- 1 | # for backward compatibility 2 | 3 | # :enddoc: 4 | 5 | class Net::HTTP 6 | ProxyMod = ProxyDelta 7 | end 8 | 9 | module Net 10 | HTTPSession = Net::HTTP 11 | end 12 | 13 | module Net::NetPrivate 14 | HTTPRequest = ::Net::HTTPRequest 15 | end 16 | 17 | Net::HTTPInformationCode = Net::HTTPInformation 18 | Net::HTTPSuccessCode = Net::HTTPSuccess 19 | Net::HTTPRedirectionCode = Net::HTTPRedirection 20 | Net::HTTPRetriableCode = Net::HTTPRedirection 21 | Net::HTTPClientErrorCode = Net::HTTPClientError 22 | Net::HTTPFatalErrorCode = Net::HTTPClientError 23 | Net::HTTPServerErrorCode = Net::HTTPServerError 24 | Net::HTTPResponceReceiver = Net::HTTPResponse 25 | 26 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/net/http/exceptions.rb: -------------------------------------------------------------------------------- 1 | # Net::HTTP exception class. 2 | # You cannot use Net::HTTPExceptions directly; instead, you must use 3 | # its subclasses. 4 | module Net::HTTPExceptions 5 | def initialize(msg, res) #:nodoc: 6 | super msg 7 | @response = res 8 | end 9 | attr_reader :response 10 | alias data response #:nodoc: obsolete 11 | end 12 | class Net::HTTPError < Net::ProtocolError 13 | include Net::HTTPExceptions 14 | end 15 | class Net::HTTPRetriableError < Net::ProtoRetriableError 16 | include Net::HTTPExceptions 17 | end 18 | class Net::HTTPServerException < Net::ProtoServerError 19 | # We cannot use the name "HTTPServerError", it is the name of the response. 20 | include Net::HTTPExceptions 21 | end 22 | class Net::HTTPFatalError < Net::ProtoFatalError 23 | include Net::HTTPExceptions 24 | end 25 | 26 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/net/http/proxy_delta.rb: -------------------------------------------------------------------------------- 1 | module Net::HTTP::ProxyDelta #:nodoc: internal use only 2 | private 3 | 4 | def conn_address 5 | proxy_address() 6 | end 7 | 8 | def conn_port 9 | proxy_port() 10 | end 11 | 12 | def edit_path(path) 13 | use_ssl? ? path : "http://#{addr_port()}#{path}" 14 | end 15 | end 16 | 17 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/net/http/request.rb: -------------------------------------------------------------------------------- 1 | # HTTP request class. 2 | # This class wraps together the request header and the request path. 3 | # You cannot use this class directly. Instead, you should use one of its 4 | # subclasses: Net::HTTP::Get, Net::HTTP::Post, Net::HTTP::Head. 5 | # 6 | class Net::HTTPRequest < Net::HTTPGenericRequest 7 | # Creates an HTTP request object for +path+. 8 | # 9 | # +initheader+ are the default headers to use. Net::HTTP adds 10 | # Accept-Encoding to enable compression of the response body unless 11 | # Accept-Encoding or Range are supplied in +initheader+. 12 | 13 | def initialize(path, initheader = nil) 14 | super self.class::METHOD, 15 | self.class::REQUEST_HAS_BODY, 16 | self.class::RESPONSE_HAS_BODY, 17 | path, initheader 18 | end 19 | end 20 | 21 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/net/https.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | 3 | = net/https -- SSL/TLS enhancement for Net::HTTP. 4 | 5 | This file has been merged with net/http. There is no longer any need to 6 | require 'net/https' to use HTTPS. 7 | 8 | See Net::HTTP for details on how to make HTTPS connections. 9 | 10 | == Info 11 | 'OpenSSL for Ruby 2' project 12 | Copyright (C) 2001 GOTOU Yuuzou 13 | All rights reserved. 14 | 15 | == Licence 16 | This program is licenced under the same licence as Ruby. 17 | (See the file 'LICENCE'.) 18 | 19 | =end 20 | 21 | require 'net/http' 22 | require 'openssl' 23 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/openssl.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | = $RCSfile$ -- Loader for all OpenSSL C-space and Ruby-space definitions 3 | 4 | = Info 5 | 'OpenSSL for Ruby 2' project 6 | Copyright (C) 2002 Michal Rokos 7 | All rights reserved. 8 | 9 | = Licence 10 | This program is licenced under the same licence as Ruby. 11 | (See the file 'LICENCE'.) 12 | 13 | = Version 14 | $Id: openssl.rb 32664 2011-07-25 06:30:07Z nahi $ 15 | =end 16 | 17 | require 'openssl.so' 18 | 19 | require 'openssl/bn' 20 | require 'openssl/cipher' 21 | require 'openssl/config' 22 | require 'openssl/digest' 23 | require 'openssl/x509' 24 | require 'openssl/ssl' 25 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/openssl/bn.rb: -------------------------------------------------------------------------------- 1 | #-- 2 | # 3 | # $RCSfile$ 4 | # 5 | # = Ruby-space definitions that completes C-space funcs for BN 6 | # 7 | # = Info 8 | # 'OpenSSL for Ruby 2' project 9 | # Copyright (C) 2002 Michal Rokos 10 | # All rights reserved. 11 | # 12 | # = Licence 13 | # This program is licenced under the same licence as Ruby. 14 | # (See the file 'LICENCE'.) 15 | # 16 | # = Version 17 | # $Id: bn.rb 47647 2014-09-20 01:17:05Z akr $ 18 | # 19 | #++ 20 | 21 | module OpenSSL 22 | class BN 23 | include Comparable 24 | 25 | def pretty_print(q) 26 | q.object_group(self) { 27 | q.text ' ' 28 | q.text to_i.to_s 29 | } 30 | end 31 | end # BN 32 | end # OpenSSL 33 | 34 | ## 35 | # Add double dispatch to Integer 36 | # 37 | class Integer 38 | # Casts an Integer as an OpenSSL::BN 39 | # 40 | # See `man bn` for more info. 41 | def to_bn 42 | OpenSSL::BN::new(self) 43 | end 44 | end # Integer 45 | 46 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/optionparser.rb: -------------------------------------------------------------------------------- 1 | require_relative 'optparse' 2 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/optparse/date.rb: -------------------------------------------------------------------------------- 1 | require 'optparse' 2 | require 'date' 3 | 4 | OptionParser.accept(DateTime) do |s,| 5 | begin 6 | DateTime.parse(s) if s 7 | rescue ArgumentError 8 | raise OptionParser::InvalidArgument, s 9 | end 10 | end 11 | OptionParser.accept(Date) do |s,| 12 | begin 13 | Date.parse(s) if s 14 | rescue ArgumentError 15 | raise OptionParser::InvalidArgument, s 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/optparse/shellwords.rb: -------------------------------------------------------------------------------- 1 | # -*- ruby -*- 2 | 3 | require 'shellwords' 4 | require 'optparse' 5 | 6 | OptionParser.accept(Shellwords) {|s,| Shellwords.shellwords(s)} 7 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/optparse/time.rb: -------------------------------------------------------------------------------- 1 | require 'optparse' 2 | require 'time' 3 | 4 | OptionParser.accept(Time) do |s,| 5 | begin 6 | (Time.httpdate(s) rescue Time.parse(s)) if s 7 | rescue 8 | raise OptionParser::InvalidArgument, s 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/optparse/uri.rb: -------------------------------------------------------------------------------- 1 | # -*- ruby -*- 2 | 3 | require 'optparse' 4 | require 'uri' 5 | 6 | OptionParser.accept(URI) {|s,| URI.parse(s) if s} 7 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/profile.rb: -------------------------------------------------------------------------------- 1 | require 'profiler' 2 | 3 | RubyVM::InstructionSequence.compile_option = { 4 | :trace_instruction => true, 5 | :specialized_instruction => false 6 | } 7 | END { 8 | Profiler__::print_profile(STDERR) 9 | } 10 | Profiler__::start_profile 11 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/psych/core_ext.rb: -------------------------------------------------------------------------------- 1 | class Object 2 | def self.yaml_tag url 3 | Psych.add_tag(url, self) 4 | end 5 | 6 | # FIXME: rename this to "to_yaml" when syck is removed 7 | 8 | ### 9 | # call-seq: to_yaml(options = {}) 10 | # 11 | # Convert an object to YAML. See Psych.dump for more information on the 12 | # available +options+. 13 | def psych_to_yaml options = {} 14 | Psych.dump self, options 15 | end 16 | remove_method :to_yaml rescue nil 17 | alias :to_yaml :psych_to_yaml 18 | end 19 | 20 | class Module 21 | def psych_yaml_as url 22 | return if caller[0].end_with?('rubytypes.rb') 23 | if $VERBOSE 24 | warn "#{caller[0]}: yaml_as is deprecated, please use yaml_tag" 25 | end 26 | Psych.add_tag(url, self) 27 | end 28 | 29 | remove_method :yaml_as rescue nil 30 | alias :yaml_as :psych_yaml_as 31 | end 32 | 33 | if defined?(::IRB) 34 | require 'psych/y' 35 | end 36 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/psych/exception.rb: -------------------------------------------------------------------------------- 1 | module Psych 2 | class Exception < RuntimeError 3 | end 4 | 5 | class BadAlias < Exception 6 | end 7 | 8 | class DisallowedClass < Exception 9 | def initialize klass_name 10 | super "Tried to load unspecified class: #{klass_name}" 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/psych/handlers/document_stream.rb: -------------------------------------------------------------------------------- 1 | require 'psych/tree_builder' 2 | 3 | module Psych 4 | module Handlers 5 | class DocumentStream < Psych::TreeBuilder # :nodoc: 6 | def initialize &block 7 | super 8 | @block = block 9 | end 10 | 11 | def start_document version, tag_directives, implicit 12 | n = Nodes::Document.new version, tag_directives, implicit 13 | push n 14 | end 15 | 16 | def end_document implicit_end = !streaming? 17 | @last.implicit_end = implicit_end 18 | @block.call pop 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/psych/handlers/recorder.rb: -------------------------------------------------------------------------------- 1 | require 'psych/handler' 2 | 3 | module Psych 4 | module Handlers 5 | ### 6 | # This handler will capture an event and record the event. Recorder events 7 | # are available vial Psych::Handlers::Recorder#events. 8 | # 9 | # For example: 10 | # 11 | # recorder = Psych::Handlers::Recorder.new 12 | # parser = Psych::Parser.new recorder 13 | # parser.parse '--- foo' 14 | # 15 | # recorder.events # => [list of events] 16 | # 17 | # # Replay the events 18 | # 19 | # emitter = Psych::Emitter.new $stdout 20 | # recorder.events.each do |m, args| 21 | # emitter.send m, *args 22 | # end 23 | 24 | class Recorder < Psych::Handler 25 | attr_reader :events 26 | 27 | def initialize 28 | @events = [] 29 | super 30 | end 31 | 32 | EVENTS.each do |event| 33 | define_method event do |*args| 34 | @events << [event, args] 35 | end 36 | end 37 | end 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/psych/json/ruby_events.rb: -------------------------------------------------------------------------------- 1 | module Psych 2 | module JSON 3 | module RubyEvents # :nodoc: 4 | def visit_Time o 5 | formatted = format_time o 6 | @emitter.scalar formatted, nil, nil, false, true, Nodes::Scalar::DOUBLE_QUOTED 7 | end 8 | 9 | def visit_DateTime o 10 | visit_Time o.to_time 11 | end 12 | 13 | def visit_String o 14 | @emitter.scalar o.to_s, nil, nil, false, true, Nodes::Scalar::DOUBLE_QUOTED 15 | end 16 | alias :visit_Symbol :visit_String 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/psych/json/stream.rb: -------------------------------------------------------------------------------- 1 | require 'psych/json/ruby_events' 2 | require 'psych/json/yaml_events' 3 | 4 | module Psych 5 | module JSON 6 | class Stream < Psych::Visitors::JSONTree 7 | include Psych::JSON::RubyEvents 8 | include Psych::Streaming 9 | extend Psych::Streaming::ClassMethods 10 | 11 | class Emitter < Psych::Stream::Emitter # :nodoc: 12 | include Psych::JSON::YAMLEvents 13 | end 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/psych/json/tree_builder.rb: -------------------------------------------------------------------------------- 1 | require 'psych/json/yaml_events' 2 | 3 | module Psych 4 | module JSON 5 | ### 6 | # Psych::JSON::TreeBuilder is an event based AST builder. Events are sent 7 | # to an instance of Psych::JSON::TreeBuilder and a JSON AST is constructed. 8 | class TreeBuilder < Psych::TreeBuilder 9 | include Psych::JSON::YAMLEvents 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/psych/json/yaml_events.rb: -------------------------------------------------------------------------------- 1 | module Psych 2 | module JSON 3 | module YAMLEvents # :nodoc: 4 | def start_document version, tag_directives, implicit 5 | super(version, tag_directives, !streaming?) 6 | end 7 | 8 | def end_document implicit_end = !streaming? 9 | super(implicit_end) 10 | end 11 | 12 | def start_mapping anchor, tag, implicit, style 13 | super(anchor, nil, true, Nodes::Mapping::FLOW) 14 | end 15 | 16 | def start_sequence anchor, tag, implicit, style 17 | super(anchor, nil, true, Nodes::Sequence::FLOW) 18 | end 19 | 20 | def scalar value, anchor, tag, plain, quoted, style 21 | if "tag:yaml.org,2002:null" == tag 22 | super('null', nil, nil, true, false, Nodes::Scalar::PLAIN) 23 | else 24 | super 25 | end 26 | end 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/psych/nodes/alias.rb: -------------------------------------------------------------------------------- 1 | module Psych 2 | module Nodes 3 | ### 4 | # This class represents a {YAML Alias}[http://yaml.org/spec/1.1/#alias]. 5 | # It points to an +anchor+. 6 | # 7 | # A Psych::Nodes::Alias is a terminal node and may have no children. 8 | class Alias < Psych::Nodes::Node 9 | # The anchor this alias links to 10 | attr_accessor :anchor 11 | 12 | # Create a new Alias that points to an +anchor+ 13 | def initialize anchor 14 | @anchor = anchor 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/psych/nodes/stream.rb: -------------------------------------------------------------------------------- 1 | module Psych 2 | module Nodes 3 | ### 4 | # Represents a YAML stream. This is the root node for any YAML parse 5 | # tree. This node must have one or more child nodes. The only valid 6 | # child node for a Psych::Nodes::Stream node is Psych::Nodes::Document. 7 | class Stream < Psych::Nodes::Node 8 | 9 | # Encodings supported by Psych (and libyaml) 10 | 11 | # Any encoding 12 | ANY = Psych::Parser::ANY 13 | 14 | # UTF-8 encoding 15 | UTF8 = Psych::Parser::UTF8 16 | 17 | # UTF-16LE encoding 18 | UTF16LE = Psych::Parser::UTF16LE 19 | 20 | # UTF-16BE encoding 21 | UTF16BE = Psych::Parser::UTF16BE 22 | 23 | # The encoding used for this stream 24 | attr_accessor :encoding 25 | 26 | ### 27 | # Create a new Psych::Nodes::Stream node with an +encoding+ that 28 | # defaults to Psych::Nodes::Stream::UTF8. 29 | # 30 | # See also Psych::Handler#start_stream 31 | def initialize encoding = UTF8 32 | super() 33 | @encoding = encoding 34 | end 35 | end 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/psych/omap.rb: -------------------------------------------------------------------------------- 1 | module Psych 2 | class Omap < ::Hash 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/psych/set.rb: -------------------------------------------------------------------------------- 1 | module Psych 2 | class Set < ::Hash 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/psych/stream.rb: -------------------------------------------------------------------------------- 1 | module Psych 2 | ### 3 | # Psych::Stream is a streaming YAML emitter. It will not buffer your YAML, 4 | # but send it straight to an IO. 5 | # 6 | # Here is an example use: 7 | # 8 | # stream = Psych::Stream.new($stdout) 9 | # stream.start 10 | # stream.push({:foo => 'bar'}) 11 | # stream.finish 12 | # 13 | # YAML will be immediately emitted to $stdout with no buffering. 14 | # 15 | # Psych::Stream#start will take a block and ensure that Psych::Stream#finish 16 | # is called, so you can do this form: 17 | # 18 | # stream = Psych::Stream.new($stdout) 19 | # stream.start do |em| 20 | # em.push(:foo => 'bar') 21 | # end 22 | # 23 | class Stream < Psych::Visitors::YAMLTree 24 | class Emitter < Psych::Emitter # :nodoc: 25 | def end_document implicit_end = !streaming? 26 | super 27 | end 28 | 29 | def streaming? 30 | true 31 | end 32 | end 33 | 34 | include Psych::Streaming 35 | extend Psych::Streaming::ClassMethods 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/psych/streaming.rb: -------------------------------------------------------------------------------- 1 | module Psych 2 | module Streaming 3 | module ClassMethods 4 | ### 5 | # Create a new streaming emitter. Emitter will print to +io+. See 6 | # Psych::Stream for an example. 7 | def new io 8 | emitter = const_get(:Emitter).new(io) 9 | class_loader = ClassLoader.new 10 | ss = ScalarScanner.new class_loader 11 | super(emitter, ss, {}) 12 | end 13 | end 14 | 15 | ### 16 | # Start streaming using +encoding+ 17 | def start encoding = Nodes::Stream::UTF8 18 | super.tap { yield self if block_given? } 19 | ensure 20 | finish if block_given? 21 | end 22 | 23 | private 24 | def register target, obj 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/psych/syntax_error.rb: -------------------------------------------------------------------------------- 1 | require 'psych/exception' 2 | 3 | module Psych 4 | class SyntaxError < Psych::Exception 5 | attr_reader :file, :line, :column, :offset, :problem, :context 6 | 7 | def initialize file, line, col, offset, problem, context 8 | err = [problem, context].compact.join ' ' 9 | filename = file || '' 10 | message = "(%s): %s at line %d column %d" % [filename, err, line, col] 11 | 12 | @file = file 13 | @line = line 14 | @column = col 15 | @offset = offset 16 | @problem = problem 17 | @context = context 18 | super(message) 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/psych/visitors.rb: -------------------------------------------------------------------------------- 1 | require 'psych/visitors/visitor' 2 | require 'psych/visitors/to_ruby' 3 | require 'psych/visitors/emitter' 4 | require 'psych/visitors/yaml_tree' 5 | require 'psych/visitors/json_tree' 6 | require 'psych/visitors/depth_first' 7 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/psych/visitors/depth_first.rb: -------------------------------------------------------------------------------- 1 | module Psych 2 | module Visitors 3 | class DepthFirst < Psych::Visitors::Visitor 4 | def initialize block 5 | @block = block 6 | end 7 | 8 | private 9 | 10 | def nary o 11 | o.children.each { |x| visit x } 12 | @block.call o 13 | end 14 | alias :visit_Psych_Nodes_Stream :nary 15 | alias :visit_Psych_Nodes_Document :nary 16 | alias :visit_Psych_Nodes_Sequence :nary 17 | alias :visit_Psych_Nodes_Mapping :nary 18 | 19 | def terminal o 20 | @block.call o 21 | end 22 | alias :visit_Psych_Nodes_Scalar :terminal 23 | alias :visit_Psych_Nodes_Alias :terminal 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/psych/visitors/json_tree.rb: -------------------------------------------------------------------------------- 1 | require 'psych/json/ruby_events' 2 | 3 | module Psych 4 | module Visitors 5 | class JSONTree < YAMLTree 6 | include Psych::JSON::RubyEvents 7 | 8 | def self.create options = {} 9 | emitter = Psych::JSON::TreeBuilder.new 10 | class_loader = ClassLoader.new 11 | ss = ScalarScanner.new class_loader 12 | new(emitter, ss, options) 13 | end 14 | 15 | def accept target 16 | if target.respond_to?(:encode_with) 17 | dump_coder target 18 | else 19 | send(@dispatch_cache[target.class], target) 20 | end 21 | end 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/psych/visitors/visitor.rb: -------------------------------------------------------------------------------- 1 | module Psych 2 | module Visitors 3 | class Visitor 4 | def accept target 5 | visit target 6 | end 7 | 8 | private 9 | 10 | DISPATCH = Hash.new do |hash, klass| 11 | hash[klass] = "visit_#{klass.name.gsub('::', '_')}" 12 | end 13 | 14 | def visit target 15 | send DISPATCH[target.class], target 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/psych/y.rb: -------------------------------------------------------------------------------- 1 | module Kernel 2 | ### 3 | # An alias for Psych.dump_stream meant to be used with IRB. 4 | def y *objects 5 | puts Psych.dump_stream(*objects) 6 | end 7 | private :y 8 | end 9 | 10 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/backtrace.rb: -------------------------------------------------------------------------------- 1 | module Rake 2 | module Backtrace # :nodoc: all 3 | SYS_KEYS = RbConfig::CONFIG.keys.grep(/(?:[a-z]prefix|libdir)\z/) 4 | SYS_PATHS = RbConfig::CONFIG.values_at(*SYS_KEYS).uniq + 5 | [ File.join(File.dirname(__FILE__), "..") ] 6 | 7 | SUPPRESSED_PATHS = SYS_PATHS. 8 | map { |s| s.gsub("\\", "/") }. 9 | map { |f| File.expand_path(f) }. 10 | reject { |s| s.nil? || s =~ /^ *$/ } 11 | SUPPRESSED_PATHS_RE = SUPPRESSED_PATHS.map { |f| Regexp.quote(f) }.join("|") 12 | SUPPRESSED_PATHS_RE << "|^org\\/jruby\\/\\w+\\.java" if 13 | Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby' 14 | 15 | SUPPRESS_PATTERN = %r!(\A(#{SUPPRESSED_PATHS_RE})|bin/rake:\d+)!i 16 | 17 | def self.collapse(backtrace) 18 | pattern = Rake.application.options.suppress_backtrace_pattern || 19 | SUPPRESS_PATTERN 20 | backtrace.reject { |elem| elem =~ pattern } 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/cloneable.rb: -------------------------------------------------------------------------------- 1 | module Rake 2 | ## 3 | # Mixin for creating easily cloned objects. 4 | 5 | module Cloneable # :nodoc: 6 | # The hook that is invoked by 'clone' and 'dup' methods. 7 | def initialize_copy(source) 8 | super 9 | source.instance_variables.each do |var| 10 | src_value = source.instance_variable_get(var) 11 | value = src_value.clone rescue src_value 12 | instance_variable_set(var, value) 13 | end 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/contrib/compositepublisher.rb: -------------------------------------------------------------------------------- 1 | module Rake 2 | 3 | # Manage several publishers as a single entity. 4 | class CompositePublisher 5 | def initialize 6 | @publishers = [] 7 | end 8 | 9 | # Add a publisher to the composite. 10 | def add(pub) 11 | @publishers << pub 12 | end 13 | 14 | # Upload all the individual publishers. 15 | def upload 16 | @publishers.each { |p| p.upload } 17 | end 18 | end 19 | 20 | end 21 | 22 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/contrib/rubyforgepublisher.rb: -------------------------------------------------------------------------------- 1 | # TODO: Remove in Rake 11 2 | 3 | require 'rake/contrib/sshpublisher' 4 | 5 | module Rake 6 | 7 | class RubyForgePublisher < SshDirPublisher # :nodoc: all 8 | attr_reader :project, :proj_id, :user 9 | 10 | def initialize(projname, user) 11 | super( 12 | "#{user}@rubyforge.org", 13 | "/var/www/gforge-projects/#{projname}", 14 | "html") 15 | end 16 | end 17 | 18 | end 19 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/contrib/sys.rb: -------------------------------------------------------------------------------- 1 | # TODO: Remove in Rake 11 2 | 3 | fail "ERROR: 'rake/contrib/sys' is obsolete and no longer supported. " + 4 | "Use 'FileUtils' instead." 5 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/default_loader.rb: -------------------------------------------------------------------------------- 1 | module Rake 2 | 3 | # Default Rakefile loader used by +import+. 4 | class DefaultLoader 5 | 6 | ## 7 | # Loads a rakefile into the current application from +fn+ 8 | 9 | def load(fn) 10 | Rake.load_rakefile(File.expand_path(fn)) 11 | end 12 | end 13 | 14 | end 15 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/early_time.rb: -------------------------------------------------------------------------------- 1 | module Rake 2 | 3 | # EarlyTime is a fake timestamp that occurs _before_ any other time value. 4 | class EarlyTime 5 | include Comparable 6 | include Singleton 7 | 8 | ## 9 | # The EarlyTime always comes before +other+! 10 | 11 | def <=>(other) 12 | -1 13 | end 14 | 15 | def to_s # :nodoc: 16 | "" 17 | end 18 | end 19 | 20 | EARLY = EarlyTime.instance 21 | end 22 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/ext/core.rb: -------------------------------------------------------------------------------- 1 | class Module 2 | # Check for an existing method in the current class before extending. If 3 | # the method already exists, then a warning is printed and the extension is 4 | # not added. Otherwise the block is yielded and any definitions in the 5 | # block will take effect. 6 | # 7 | # Usage: 8 | # 9 | # class String 10 | # rake_extension("xyz") do 11 | # def xyz 12 | # ... 13 | # end 14 | # end 15 | # end 16 | # 17 | def rake_extension(method) # :nodoc: 18 | if method_defined?(method) 19 | $stderr.puts "WARNING: Possible conflict with Rake extension: " + 20 | "#{self}##{method} already exists" 21 | else 22 | yield 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/ext/module.rb: -------------------------------------------------------------------------------- 1 | 2 | # TODO: remove in Rake 11 3 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/ext/pathname.rb: -------------------------------------------------------------------------------- 1 | require 'rake/ext/core' 2 | require 'pathname' 3 | 4 | class Pathname 5 | 6 | rake_extension("ext") do 7 | # Return a new Pathname with String#ext applied to it. 8 | # 9 | # This Pathname extension comes from Rake 10 | def ext(newext='') 11 | Pathname.new(Rake.from_pathname(self).ext(newext)) 12 | end 13 | end 14 | 15 | rake_extension("pathmap") do 16 | # Apply the pathmap spec to the Pathname, returning a 17 | # new Pathname with the modified paths. (See String#pathmap for 18 | # details.) 19 | # 20 | # This Pathname extension comes from Rake 21 | def pathmap(spec=nil, &block) 22 | Pathname.new(Rake.from_pathname(self).pathmap(spec, &block)) 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/ext/time.rb: -------------------------------------------------------------------------------- 1 | #-- 2 | # Extensions to time to allow comparisons with early and late time classes. 3 | 4 | require 'rake/early_time' 5 | require 'rake/late_time' 6 | 7 | class Time # :nodoc: all 8 | alias rake_original_time_compare :<=> 9 | def <=>(other) 10 | if Rake::EarlyTime === other || Rake::LateTime === other 11 | - other.<=>(self) 12 | else 13 | rake_original_time_compare(other) 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/file_creation_task.rb: -------------------------------------------------------------------------------- 1 | require 'rake/file_task' 2 | require 'rake/early_time' 3 | 4 | module Rake 5 | 6 | # A FileCreationTask is a file task that when used as a dependency will be 7 | # needed if and only if the file has not been created. Once created, it is 8 | # not re-triggered if any of its dependencies are newer, nor does trigger 9 | # any rebuilds of tasks that depend on it whenever it is updated. 10 | # 11 | class FileCreationTask < FileTask 12 | # Is this file task needed? Yes if it doesn't exist. 13 | def needed? 14 | ! File.exist?(name) 15 | end 16 | 17 | # Time stamp for file creation task. This time stamp is earlier 18 | # than any other time stamp. 19 | def timestamp 20 | Rake::EARLY 21 | end 22 | end 23 | 24 | end 25 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/gempackagetask.rb: -------------------------------------------------------------------------------- 1 | # TODO: Remove in Rake 11 2 | 3 | fail "ERROR: 'rake/gempackagetask' is obsolete and no longer supported. " + 4 | "Use 'rubygems/package_task' instead." 5 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/invocation_exception_mixin.rb: -------------------------------------------------------------------------------- 1 | module Rake 2 | module InvocationExceptionMixin 3 | # Return the invocation chain (list of Rake tasks) that were in 4 | # effect when this exception was detected by rake. May be null if 5 | # no tasks were active. 6 | def chain 7 | @rake_invocation_chain ||= nil 8 | end 9 | 10 | # Set the invocation chain in effect when this exception was 11 | # detected. 12 | def chain=(value) 13 | @rake_invocation_chain = value 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/late_time.rb: -------------------------------------------------------------------------------- 1 | module Rake 2 | # LateTime is a fake timestamp that occurs _after_ any other time value. 3 | class LateTime 4 | include Comparable 5 | include Singleton 6 | 7 | def <=>(other) 8 | 1 9 | end 10 | 11 | def to_s 12 | '' 13 | end 14 | end 15 | 16 | LATE = LateTime.instance 17 | end 18 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/loaders/makefile.rb: -------------------------------------------------------------------------------- 1 | module Rake 2 | 3 | # Makefile loader to be used with the import file loader. 4 | class MakefileLoader 5 | include Rake::DSL 6 | 7 | SPACE_MARK = "\0" 8 | 9 | # Load the makefile dependencies in +fn+. 10 | def load(fn) 11 | lines = File.read fn 12 | lines.gsub!(/\\ /, SPACE_MARK) 13 | lines.gsub!(/#[^\n]*\n/m, "") 14 | lines.gsub!(/\\\n/, ' ') 15 | lines.each_line do |line| 16 | process_line(line) 17 | end 18 | end 19 | 20 | private 21 | 22 | # Process one logical line of makefile data. 23 | def process_line(line) 24 | file_tasks, args = line.split(':', 2) 25 | return if args.nil? 26 | dependents = args.split.map { |d| respace(d) } 27 | file_tasks.scan(/\S+/) do |file_task| 28 | file_task = respace(file_task) 29 | file file_task => dependents 30 | end 31 | end 32 | 33 | def respace(str) 34 | str.tr SPACE_MARK, ' ' 35 | end 36 | end 37 | 38 | # Install the handler 39 | Rake.application.add_loader('mf', MakefileLoader.new) 40 | end 41 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/multi_task.rb: -------------------------------------------------------------------------------- 1 | module Rake 2 | 3 | # Same as a regular task, but the immediate prerequisites are done in 4 | # parallel using Ruby threads. 5 | # 6 | class MultiTask < Task 7 | private 8 | def invoke_prerequisites(task_args, invocation_chain) # :nodoc: 9 | invoke_prerequisites_concurrently(task_args, invocation_chain) 10 | end 11 | end 12 | 13 | end 14 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/name_space.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # The NameSpace class will lookup task names in the scope defined by a 3 | # +namespace+ command. 4 | 5 | class Rake::NameSpace 6 | 7 | ## 8 | # Create a namespace lookup object using the given task manager 9 | # and the list of scopes. 10 | 11 | def initialize(task_manager, scope_list) 12 | @task_manager = task_manager 13 | @scope = scope_list.dup 14 | end 15 | 16 | ## 17 | # Lookup a task named +name+ in the namespace. 18 | 19 | def [](name) 20 | @task_manager.lookup(name, @scope) 21 | end 22 | 23 | ## 24 | # The scope of the namespace (a LinkedList) 25 | 26 | def scope 27 | @scope.dup 28 | end 29 | 30 | ## 31 | # Return the list of tasks defined in this and nested namespaces. 32 | 33 | def tasks 34 | @task_manager.tasks_in_scope(@scope) 35 | end 36 | 37 | end 38 | 39 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/pathmap.rb: -------------------------------------------------------------------------------- 1 | # TODO: Remove in Rake 11 2 | 3 | require 'rake/ext/string' 4 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/phony.rb: -------------------------------------------------------------------------------- 1 | # Defines a :phony task that you can use as a dependency. This allows 2 | # file-based tasks to use non-file-based tasks as prerequisites 3 | # without forcing them to rebuild. 4 | # 5 | # See FileTask#out_of_date? and Task#timestamp for more info. 6 | 7 | require 'rake' 8 | 9 | task :phony 10 | 11 | Rake::Task[:phony].tap do |task| 12 | def task.timestamp # :nodoc: 13 | Time.at 0 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/private_reader.rb: -------------------------------------------------------------------------------- 1 | module Rake 2 | 3 | # Include PrivateReader to use +private_reader+. 4 | module PrivateReader # :nodoc: all 5 | 6 | def self.included(base) 7 | base.extend(ClassMethods) 8 | end 9 | 10 | module ClassMethods 11 | 12 | # Declare a list of private accessors 13 | def private_reader(*names) 14 | attr_reader(*names) 15 | private(*names) 16 | end 17 | end 18 | 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/pseudo_status.rb: -------------------------------------------------------------------------------- 1 | module Rake 2 | 3 | ## 4 | # Exit status class for times the system just gives us a nil. 5 | class PseudoStatus # :nodoc: all 6 | attr_reader :exitstatus 7 | 8 | def initialize(code=0) 9 | @exitstatus = code 10 | end 11 | 12 | def to_i 13 | @exitstatus << 8 14 | end 15 | 16 | def >>(n) 17 | to_i >> n 18 | end 19 | 20 | def stopped? 21 | false 22 | end 23 | 24 | def exited? 25 | true 26 | end 27 | end 28 | 29 | end 30 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/rake_module.rb: -------------------------------------------------------------------------------- 1 | require 'rake/application' 2 | 3 | module Rake 4 | 5 | class << self 6 | # Current Rake Application 7 | def application 8 | @application ||= Rake::Application.new 9 | end 10 | 11 | # Set the current Rake application object. 12 | def application=(app) 13 | @application = app 14 | end 15 | 16 | def suggested_thread_count # :nodoc: 17 | @cpu_count ||= Rake::CpuCounter.count 18 | @cpu_count + 4 19 | end 20 | 21 | # Return the original directory where the Rake application was started. 22 | def original_dir 23 | application.original_dir 24 | end 25 | 26 | # Load a rakefile. 27 | def load_rakefile(path) 28 | load(path) 29 | end 30 | 31 | # Add files to the rakelib list 32 | def add_rakelib(*files) 33 | application.options.rakelib ||= [] 34 | application.options.rakelib.concat(files) 35 | end 36 | end 37 | 38 | end 39 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/rake_test_loader.rb: -------------------------------------------------------------------------------- 1 | require 'rake' 2 | 3 | # Load the test files from the command line. 4 | argv = ARGV.select do |argument| 5 | case argument 6 | when /^-/ then 7 | argument 8 | when /\*/ then 9 | FileList[argument].to_a.each do |file| 10 | require File.expand_path file 11 | end 12 | 13 | false 14 | else 15 | require File.expand_path argument 16 | 17 | false 18 | end 19 | end 20 | 21 | ARGV.replace argv 22 | 23 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/rdoctask.rb: -------------------------------------------------------------------------------- 1 | # TODO: Remove in Rake 11 2 | 3 | fail "ERROR: 'rake/rdoctask' is obsolete and no longer supported. " + 4 | "Use 'rdoc/task' (available in RDoc 2.4.2+) instead." 5 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/ruby182_test_unit_fix.rb: -------------------------------------------------------------------------------- 1 | # TODO: Remove in rake 11 2 | 3 | # Local Rake override to fix bug in Ruby 0.8.2 4 | module Test # :nodoc: 5 | # Local Rake override to fix bug in Ruby 0.8.2 6 | module Unit # :nodoc: 7 | # Local Rake override to fix bug in Ruby 0.8.2 8 | module Collector # :nodoc: 9 | # Local Rake override to fix bug in Ruby 0.8.2 10 | class Dir # :nodoc: 11 | undef collect_file 12 | def collect_file(name, suites, already_gathered) # :nodoc: 13 | dir = File.dirname(File.expand_path(name)) 14 | $:.unshift(dir) unless $:.first == dir 15 | if @req 16 | @req.require(name) 17 | else 18 | require(name) 19 | end 20 | find_test_cases(already_gathered).each do |t| 21 | add_suite(suites, t.suite) 22 | end 23 | ensure 24 | $:.delete_at $:.rindex(dir) 25 | end 26 | end 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/rule_recursion_overflow_error.rb: -------------------------------------------------------------------------------- 1 | 2 | module Rake 3 | 4 | # Error indicating a recursion overflow error in task selection. 5 | class RuleRecursionOverflowError < StandardError 6 | def initialize(*args) 7 | super 8 | @targets = [] 9 | end 10 | 11 | def add_target(target) 12 | @targets << target 13 | end 14 | 15 | def message 16 | super + ": [" + @targets.reverse.join(' => ') + "]" 17 | end 18 | end 19 | 20 | end 21 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/runtest.rb: -------------------------------------------------------------------------------- 1 | require 'test/unit' 2 | require 'test/unit/assertions' 3 | require 'rake/file_list' 4 | 5 | module Rake 6 | include Test::Unit::Assertions 7 | 8 | ## 9 | # Deprecated way of running tests in process, but only for Test::Unit. 10 | #-- 11 | # TODO: Remove in rake 11 12 | 13 | def run_tests(pattern='test/test*.rb', log_enabled=false) # :nodoc: 14 | FileList.glob(pattern).each do |fn| 15 | $stderr.puts fn if log_enabled 16 | begin 17 | require fn 18 | rescue Exception => ex 19 | $stderr.puts "Error in #{fn}: #{ex.message}" 20 | $stderr.puts ex.backtrace 21 | assert false 22 | end 23 | end 24 | end 25 | 26 | extend self 27 | end 28 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/scope.rb: -------------------------------------------------------------------------------- 1 | module Rake 2 | class Scope < LinkedList # :nodoc: all 3 | 4 | # Path for the scope. 5 | def path 6 | map { |item| item.to_s }.reverse.join(":") 7 | end 8 | 9 | # Path for the scope + the named path. 10 | def path_with_task_name(task_name) 11 | "#{path}:#{task_name}" 12 | end 13 | 14 | # Trim +n+ innermost scope levels from the scope. In no case will 15 | # this trim beyond the toplevel scope. 16 | def trim(n) 17 | result = self 18 | while n > 0 && ! result.empty? 19 | result = result.tail 20 | n -= 1 21 | end 22 | result 23 | end 24 | 25 | # Scope lists always end with an EmptyScope object. See Null 26 | # Object Pattern) 27 | class EmptyScope < EmptyLinkedList 28 | @parent = Scope 29 | 30 | def path 31 | "" 32 | end 33 | 34 | def path_with_task_name(task_name) 35 | task_name 36 | end 37 | end 38 | 39 | # Singleton null object for an empty scope. 40 | EMPTY = EmptyScope.new 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/task_argument_error.rb: -------------------------------------------------------------------------------- 1 | module Rake 2 | 3 | # Error indicating an ill-formed task declaration. 4 | class TaskArgumentError < ArgumentError 5 | end 6 | 7 | end 8 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/tasklib.rb: -------------------------------------------------------------------------------- 1 | require 'rake' 2 | 3 | module Rake 4 | 5 | # Base class for Task Libraries. 6 | class TaskLib 7 | include Cloneable 8 | include Rake::DSL 9 | 10 | # Make a symbol by pasting two strings together. 11 | # 12 | # NOTE: DEPRECATED! This method is kinda stupid. I don't know why 13 | # I didn't just use string interpolation. But now other task 14 | # libraries depend on this so I can't remove it without breaking 15 | # other people's code. So for now it stays for backwards 16 | # compatibility. BUT DON'T USE IT. 17 | #-- 18 | # TODO: Remove in Rake 11 19 | def paste(a, b) # :nodoc: 20 | (a.to_s + b.to_s).intern 21 | end 22 | end 23 | 24 | end 25 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/trace_output.rb: -------------------------------------------------------------------------------- 1 | module Rake 2 | module TraceOutput # :nodoc: all 3 | 4 | # Write trace output to output stream +out+. 5 | # 6 | # The write is done as a single IO call (to print) to lessen the 7 | # chance that the trace output is interrupted by other tasks also 8 | # producing output. 9 | def trace_on(out, *strings) 10 | sep = $\ || "\n" 11 | if strings.empty? 12 | output = sep 13 | else 14 | output = strings.map { |s| 15 | next if s.nil? 16 | s =~ /#{sep}$/ ? s : s + sep 17 | }.join 18 | end 19 | out.print(output) 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rake/version.rb: -------------------------------------------------------------------------------- 1 | module Rake 2 | module Version # :nodoc: all 3 | MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split '.' 4 | 5 | NUMBERS = [MAJOR, MINOR, BUILD, *OTHER] 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rbconfig/datadir.rb: -------------------------------------------------------------------------------- 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 | # N.B. This file is used by Config.datadir in rubygems.rb, and must not be 8 | # removed before that require is removed. I require to avoid warning more than 9 | # once. 10 | 11 | warn 'rbconfig/datadir.rb and {Rb}Config.datadir is being deprecated from '\ 12 | 'RubyGems. It will be removed completely on or after June 2011. If you '\ 13 | 'wish to rely on a datadir, please use Gem.datadir.' 14 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/anon_class.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # An anonymous class like: 3 | # 4 | # c = Class.new do end 5 | # 6 | # AnonClass is currently not used. 7 | 8 | class RDoc::AnonClass < RDoc::ClassModule 9 | end 10 | 11 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/code_objects.rb: -------------------------------------------------------------------------------- 1 | # This file was used to load all the RDoc::CodeObject subclasses at once. Now 2 | # autoload handles this. 3 | 4 | require 'rdoc' 5 | 6 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/erb_partial.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # Allows an ERB template to be rendered in the context (binding) of an 3 | # existing ERB template evaluation. 4 | 5 | class RDoc::ERBPartial < ERB 6 | 7 | ## 8 | # Overrides +compiler+ startup to set the +eoutvar+ to an empty string only 9 | # if it isn't already set. 10 | 11 | def set_eoutvar compiler, eoutvar = '_erbout' 12 | super 13 | 14 | compiler.pre_cmd = ["#{eoutvar} ||= ''"] 15 | end 16 | 17 | end 18 | 19 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/erbio.rb: -------------------------------------------------------------------------------- 1 | require 'erb' 2 | 3 | ## 4 | # A subclass of ERB that writes directly to an IO. Credit to Aaron Patterson 5 | # and Masatoshi SEKI. 6 | # 7 | # To use: 8 | # 9 | # erbio = RDoc::ERBIO.new '<%= "hello world" %>', nil, nil 10 | # 11 | # open 'hello.txt', 'w' do |io| 12 | # erbio.result binding 13 | # end 14 | # 15 | # Note that binding must enclose the io you wish to output on. 16 | 17 | class RDoc::ERBIO < ERB 18 | 19 | ## 20 | # Defaults +eoutvar+ to 'io', otherwise is identical to ERB's initialize 21 | 22 | def initialize str, safe_level = nil, trim_mode = nil, eoutvar = 'io' 23 | super 24 | end 25 | 26 | ## 27 | # Instructs +compiler+ how to write to +io_variable+ 28 | 29 | def set_eoutvar compiler, io_variable 30 | compiler.put_cmd = "#{io_variable}.write" 31 | compiler.insert_cmd = "#{io_variable}.write" 32 | compiler.pre_cmd = [] 33 | compiler.post_cmd = [] 34 | end 35 | 36 | end 37 | 38 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/extend.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # A Module extension to a class with \#extend 3 | # 4 | # RDoc::Extend.new 'Enumerable', 'comment ...' 5 | 6 | class RDoc::Extend < RDoc::Mixin 7 | 8 | end 9 | 10 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/ghost_method.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # GhostMethod represents a method referenced only by a comment 3 | 4 | class RDoc::GhostMethod < RDoc::AnyMethod 5 | end 6 | 7 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/i18n.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # This module provides i18n realated features. 3 | 4 | module RDoc::I18n 5 | 6 | autoload :Locale, 'rdoc/i18n/locale' 7 | autoload :Text, 'rdoc/i18n/text' 8 | 9 | end 10 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/include.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # A Module included in a class with \#include 3 | # 4 | # RDoc::Include.new 'Enumerable', 'comment ...' 5 | 6 | class RDoc::Include < RDoc::Mixin 7 | 8 | end 9 | 10 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/markup/attr_changer.rb: -------------------------------------------------------------------------------- 1 | class RDoc::Markup 2 | 3 | AttrChanger = Struct.new :turn_on, :turn_off # :nodoc: 4 | 5 | end 6 | 7 | ## 8 | # An AttrChanger records a change in attributes. It contains a bitmap of the 9 | # attributes to turn on, and a bitmap of those to turn off. 10 | 11 | class RDoc::Markup::AttrChanger 12 | 13 | def to_s # :nodoc: 14 | "Attr: +#{turn_on}/-#{turn_off}" 15 | end 16 | 17 | def inspect # :nodoc: 18 | '+%d/-%d' % [turn_on, turn_off] 19 | end 20 | 21 | end 22 | 23 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/markup/attr_span.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # An array of attributes which parallels the characters in a string. 3 | 4 | class RDoc::Markup::AttrSpan 5 | 6 | ## 7 | # Creates a new AttrSpan for +length+ characters 8 | 9 | def initialize(length) 10 | @attrs = Array.new(length, 0) 11 | end 12 | 13 | ## 14 | # Toggles +bits+ from +start+ to +length+ 15 | def set_attrs(start, length, bits) 16 | for i in start ... (start+length) 17 | @attrs[i] |= bits 18 | end 19 | end 20 | 21 | ## 22 | # Accesses flags for character +n+ 23 | 24 | def [](n) 25 | @attrs[n] 26 | end 27 | 28 | end 29 | 30 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/markup/blank_line.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # An empty line. This class is a singleton. 3 | 4 | class RDoc::Markup::BlankLine 5 | 6 | @instance = new 7 | 8 | ## 9 | # RDoc::Markup::BlankLine is a singleton 10 | 11 | def self.new 12 | @instance 13 | end 14 | 15 | ## 16 | # Calls #accept_blank_line on +visitor+ 17 | 18 | def accept visitor 19 | visitor.accept_blank_line self 20 | end 21 | 22 | def pretty_print q # :nodoc: 23 | q.text 'blankline' 24 | end 25 | 26 | end 27 | 28 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/markup/block_quote.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # A quoted section which contains markup items. 3 | 4 | class RDoc::Markup::BlockQuote < RDoc::Markup::Raw 5 | 6 | ## 7 | # Calls #accept_block_quote on +visitor+ 8 | 9 | def accept visitor 10 | visitor.accept_block_quote self 11 | end 12 | 13 | end 14 | 15 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/markup/hard_break.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # A hard-break in the middle of a paragraph. 3 | 4 | class RDoc::Markup::HardBreak 5 | 6 | @instance = new 7 | 8 | ## 9 | # RDoc::Markup::HardBreak is a singleton 10 | 11 | def self.new 12 | @instance 13 | end 14 | 15 | ## 16 | # Calls #accept_hard_break on +visitor+ 17 | 18 | def accept visitor 19 | visitor.accept_hard_break self 20 | end 21 | 22 | def == other # :nodoc: 23 | self.class === other 24 | end 25 | 26 | def pretty_print q # :nodoc: 27 | q.text "[break]" 28 | end 29 | 30 | end 31 | 32 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/markup/include.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # A file included at generation time. Objects of this class are created by 3 | # RDoc::RD for an extension-less include. 4 | # 5 | # This implementation in incomplete. 6 | 7 | class RDoc::Markup::Include 8 | 9 | ## 10 | # The filename to be included, without extension 11 | 12 | attr_reader :file 13 | 14 | ## 15 | # Directories to search for #file 16 | 17 | attr_reader :include_path 18 | 19 | ## 20 | # Creates a new include that will import +file+ from +include_path+ 21 | 22 | def initialize file, include_path 23 | @file = file 24 | @include_path = include_path 25 | end 26 | 27 | def == other # :nodoc: 28 | self.class === other and 29 | @file == other.file and @include_path == other.include_path 30 | end 31 | 32 | def pretty_print q # :nodoc: 33 | q.group 2, '[incl ', ']' do 34 | q.text file 35 | q.breakable 36 | q.text 'from ' 37 | q.pp include_path 38 | end 39 | end 40 | 41 | end 42 | 43 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/markup/indented_paragraph.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # An Indented Paragraph of text 3 | 4 | class RDoc::Markup::IndentedParagraph < RDoc::Markup::Raw 5 | 6 | ## 7 | # The indent in number of spaces 8 | 9 | attr_reader :indent 10 | 11 | ## 12 | # Creates a new IndentedParagraph containing +parts+ indented with +indent+ 13 | # spaces 14 | 15 | def initialize indent, *parts 16 | @indent = indent 17 | 18 | super(*parts) 19 | end 20 | 21 | def == other # :nodoc: 22 | super and indent == other.indent 23 | end 24 | 25 | ## 26 | # Calls #accept_indented_paragraph on +visitor+ 27 | 28 | def accept visitor 29 | visitor.accept_indented_paragraph self 30 | end 31 | 32 | ## 33 | # Joins the raw paragraph text and converts inline HardBreaks to the 34 | # +hard_break+ text followed by the indent. 35 | 36 | def text hard_break = nil 37 | @parts.map do |part| 38 | if RDoc::Markup::HardBreak === part then 39 | '%1$s%3$*2$s' % [hard_break, @indent, ' '] if hard_break 40 | else 41 | part 42 | end 43 | end.join 44 | end 45 | 46 | end 47 | 48 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/markup/inline.rb: -------------------------------------------------------------------------------- 1 | warn "requiring rdoc/markup/inline is deprecated and will be removed in RDoc 4." if $-w 2 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/markup/paragraph.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # A Paragraph of text 3 | 4 | class RDoc::Markup::Paragraph < RDoc::Markup::Raw 5 | 6 | ## 7 | # Calls #accept_paragraph on +visitor+ 8 | 9 | def accept visitor 10 | visitor.accept_paragraph self 11 | end 12 | 13 | ## 14 | # Joins the raw paragraph text and converts inline HardBreaks to the 15 | # +hard_break+ text. 16 | 17 | def text hard_break = '' 18 | @parts.map do |part| 19 | if RDoc::Markup::HardBreak === part then 20 | hard_break 21 | else 22 | part 23 | end 24 | end.join 25 | end 26 | 27 | end 28 | 29 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/markup/rule.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # A horizontal rule with a weight 3 | 4 | class RDoc::Markup::Rule < Struct.new :weight 5 | 6 | ## 7 | # Calls #accept_rule on +visitor+ 8 | 9 | def accept visitor 10 | visitor.accept_rule self 11 | end 12 | 13 | def pretty_print q # :nodoc: 14 | q.group 2, '[rule:', ']' do 15 | q.pp weight 16 | end 17 | end 18 | 19 | end 20 | 21 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/markup/special.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # Hold details of a special sequence 3 | 4 | class RDoc::Markup::Special 5 | 6 | ## 7 | # Special type 8 | 9 | attr_reader :type 10 | 11 | ## 12 | # Special text 13 | 14 | attr_accessor :text 15 | 16 | ## 17 | # Creates a new special sequence of +type+ with +text+ 18 | 19 | def initialize(type, text) 20 | @type, @text = type, text 21 | end 22 | 23 | ## 24 | # Specials are equal when the have the same text and type 25 | 26 | def ==(o) 27 | self.text == o.text && self.type == o.type 28 | end 29 | 30 | def inspect # :nodoc: 31 | "#" % [ 32 | object_id, @type, text.dump] 33 | end 34 | 35 | def to_s # :nodoc: 36 | "Special: type=#{type} text=#{text.dump}" 37 | end 38 | 39 | end 40 | 41 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/meta_method.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # MetaMethod represents a meta-programmed method 3 | 4 | class RDoc::MetaMethod < RDoc::AnyMethod 5 | end 6 | 7 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/parser/markdown.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # Parse a Markdown format file. The parsed RDoc::Markup::Document is attached 3 | # as a file comment. 4 | 5 | class RDoc::Parser::Markdown < RDoc::Parser 6 | 7 | include RDoc::Parser::Text 8 | 9 | parse_files_matching(/\.(md|markdown)(?:\.[^.]+)?$/) 10 | 11 | ## 12 | # Creates an Markdown-format TopLevel for the given file. 13 | 14 | def scan 15 | comment = RDoc::Comment.new @content, @top_level 16 | comment.format = 'markdown' 17 | 18 | @top_level.comment = comment 19 | end 20 | 21 | end 22 | 23 | 24 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/parser/rd.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # Parse a RD format file. The parsed RDoc::Markup::Document is attached as a 3 | # file comment. 4 | 5 | class RDoc::Parser::RD < RDoc::Parser 6 | 7 | include RDoc::Parser::Text 8 | 9 | parse_files_matching(/\.rd(?:\.[^.]+)?$/) 10 | 11 | ## 12 | # Creates an rd-format TopLevel for the given file. 13 | 14 | def scan 15 | comment = RDoc::Comment.new @content, @top_level 16 | comment.format = 'rd' 17 | 18 | @top_level.comment = comment 19 | end 20 | 21 | end 22 | 23 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/parser/text.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # Indicates this parser is text and doesn't contain code constructs. 3 | # 4 | # Include this module in a RDoc::Parser subclass to make it show up as a file, 5 | # not as part of a class or module. 6 | #-- 7 | # This is not named File to avoid overriding ::File 8 | 9 | module RDoc::Parser::Text 10 | end 11 | 12 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/require.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # A file loaded by \#require 3 | 4 | class RDoc::Require < RDoc::CodeObject 5 | 6 | ## 7 | # Name of the required file 8 | 9 | attr_accessor :name 10 | 11 | ## 12 | # Creates a new Require that loads +name+ with +comment+ 13 | 14 | def initialize(name, comment) 15 | super() 16 | @name = name.gsub(/'|"/, "") #' 17 | @top_level = nil 18 | self.comment = comment 19 | end 20 | 21 | def inspect # :nodoc: 22 | "#<%s:0x%x require '%s' in %s>" % [ 23 | self.class, 24 | object_id, 25 | @name, 26 | parent_file_name, 27 | ] 28 | end 29 | 30 | def to_s # :nodoc: 31 | "require #{name} in: #{parent}" 32 | end 33 | 34 | ## 35 | # The RDoc::TopLevel corresponding to this require, or +nil+ if not found. 36 | 37 | def top_level 38 | @top_level ||= begin 39 | tl = RDoc::TopLevel.all_files_hash[name + '.rb'] 40 | 41 | if tl.nil? and RDoc::TopLevel.all_files.first.full_name =~ %r(^lib/) then 42 | # second chance 43 | tl = RDoc::TopLevel.all_files_hash['lib/' + name + '.rb'] 44 | end 45 | 46 | tl 47 | end 48 | end 49 | 50 | end 51 | 52 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/ri.rb: -------------------------------------------------------------------------------- 1 | require 'rdoc' 2 | 3 | ## 4 | # Namespace for the ri command line tool's implementation. 5 | # 6 | # See ri --help for details. 7 | 8 | module RDoc::RI 9 | 10 | ## 11 | # Base RI error class 12 | 13 | class Error < RDoc::Error; end 14 | 15 | autoload :Driver, 'rdoc/ri/driver' 16 | autoload :Paths, 'rdoc/ri/paths' 17 | autoload :Store, 'rdoc/ri/store' 18 | 19 | end 20 | 21 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/ri/formatter.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # For RubyGems backwards compatibility 3 | 4 | module RDoc::RI::Formatter # :nodoc: 5 | end 6 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/ri/store.rb: -------------------------------------------------------------------------------- 1 | module RDoc::RI 2 | 3 | Store = RDoc::Store # :nodoc: 4 | 5 | end 6 | 7 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/single_class.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # A singleton class 3 | 4 | class RDoc::SingleClass < RDoc::ClassModule 5 | 6 | ## 7 | # Adds the superclass to the included modules. 8 | 9 | def ancestors 10 | superclass ? super + [superclass] : super 11 | end 12 | 13 | def aref_prefix # :nodoc: 14 | 'sclass' 15 | end 16 | 17 | ## 18 | # The definition of this singleton class, class << MyClassName 19 | 20 | def definition 21 | "class << #{full_name}" 22 | end 23 | 24 | end 25 | 26 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/stats/quiet.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # Stats printer that prints nothing 3 | 4 | class RDoc::Stats::Quiet 5 | 6 | ## 7 | # Creates a new Quiet that will print nothing 8 | 9 | def initialize num_files 10 | @num_files = num_files 11 | end 12 | 13 | ## 14 | # Prints a message at the beginning of parsing 15 | 16 | def begin_adding(*) end 17 | 18 | ## 19 | # Prints when an alias is added 20 | 21 | def print_alias(*) end 22 | 23 | ## 24 | # Prints when an attribute is added 25 | 26 | def print_attribute(*) end 27 | 28 | ## 29 | # Prints when a class is added 30 | 31 | def print_class(*) end 32 | 33 | ## 34 | # Prints when a constant is added 35 | 36 | def print_constant(*) end 37 | 38 | ## 39 | # Prints when a file is added 40 | 41 | def print_file(*) end 42 | 43 | ## 44 | # Prints when a method is added 45 | 46 | def print_method(*) end 47 | 48 | ## 49 | # Prints when a module is added 50 | 51 | def print_module(*) end 52 | 53 | ## 54 | # Prints when RDoc is done 55 | 56 | def done_adding(*) end 57 | 58 | end 59 | 60 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rdoc/stats/verbose.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # Stats printer that prints everything documented, including the documented 3 | # status 4 | 5 | class RDoc::Stats::Verbose < RDoc::Stats::Normal 6 | 7 | ## 8 | # Returns a marker for RDoc::CodeObject +co+ being undocumented 9 | 10 | def nodoc co 11 | " (undocumented)" unless co.documented? 12 | end 13 | 14 | def print_alias as # :nodoc: 15 | puts " alias #{as.new_name} #{as.old_name}#{nodoc as}" 16 | end 17 | 18 | def print_attribute attribute # :nodoc: 19 | puts " #{attribute.definition} #{attribute.name}#{nodoc attribute}" 20 | end 21 | 22 | def print_class(klass) # :nodoc: 23 | puts " class #{klass.full_name}#{nodoc klass}" 24 | end 25 | 26 | def print_constant(constant) # :nodoc: 27 | puts " #{constant.name}#{nodoc constant}" 28 | end 29 | 30 | def print_file(files_so_far, file) # :nodoc: 31 | super 32 | puts 33 | end 34 | 35 | def print_method(method) # :nodoc: 36 | puts " #{method.singleton ? '::' : '#'}#{method.name}#{nodoc method}" 37 | end 38 | 39 | def print_module(mod) # :nodoc: 40 | puts " module #{mod.full_name}#{nodoc mod}" 41 | end 42 | 43 | end 44 | 45 | 46 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rexml/dtd/attlistdecl.rb: -------------------------------------------------------------------------------- 1 | require "rexml/child" 2 | module REXML 3 | module DTD 4 | class AttlistDecl < Child 5 | START = ")/um 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rexml/dtd/elementdecl.rb: -------------------------------------------------------------------------------- 1 | require "rexml/child" 2 | module REXML 3 | module DTD 4 | class ElementDecl < Child 5 | START = "/um 8 | PATTERN_RE = /^\s*#{START}\s+((?:[:\w][-\.\w]*:)?[-!\*\.\w]*)(.*?)>/ 9 | #\s*((((["']).*?\5)|[^\/'">]*)*?)(\/)?>/um, true) 10 | 11 | def initialize match 12 | @name = match[1] 13 | @rest = match[2] 14 | end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rexml/output.rb: -------------------------------------------------------------------------------- 1 | require 'rexml/encoding' 2 | 3 | module REXML 4 | class Output 5 | include Encoding 6 | 7 | attr_reader :encoding 8 | 9 | def initialize real_IO, encd="iso-8859-1" 10 | @output = real_IO 11 | self.encoding = encd 12 | 13 | @to_utf = encoding != 'UTF-8' 14 | 15 | if encoding == "UTF-16" 16 | @output << "\ufeff".encode("UTF-16BE") 17 | self.encoding = "UTF-16BE" 18 | end 19 | end 20 | 21 | def <<( content ) 22 | @output << (@to_utf ? self.encode(content) : content) 23 | end 24 | 25 | def to_s 26 | "Output[#{encoding}]" 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rexml/security.rb: -------------------------------------------------------------------------------- 1 | module REXML 2 | module Security 3 | @@entity_expansion_limit = 10_000 4 | 5 | # Set the entity expansion limit. By default the limit is set to 10000. 6 | def self.entity_expansion_limit=( val ) 7 | @@entity_expansion_limit = val 8 | end 9 | 10 | # Get the entity expansion limit. By default the limit is set to 10000. 11 | def self.entity_expansion_limit 12 | return @@entity_expansion_limit 13 | end 14 | 15 | @@entity_expansion_text_limit = 10_240 16 | 17 | # Set the entity expansion limit. By default the limit is set to 10240. 18 | def self.entity_expansion_text_limit=( val ) 19 | @@entity_expansion_text_limit = val 20 | end 21 | 22 | # Get the entity expansion limit. By default the limit is set to 10240. 23 | def self.entity_expansion_text_limit 24 | return @@entity_expansion_text_limit 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rexml/syncenumerator.rb: -------------------------------------------------------------------------------- 1 | module REXML 2 | class SyncEnumerator 3 | include Enumerable 4 | 5 | # Creates a new SyncEnumerator which enumerates rows of given 6 | # Enumerable objects. 7 | def initialize(*enums) 8 | @gens = enums 9 | @length = @gens.collect {|x| x.size }.max 10 | end 11 | 12 | # Returns the number of enumerated Enumerable objects, i.e. the size 13 | # of each row. 14 | def size 15 | @gens.size 16 | end 17 | 18 | # Returns the number of enumerated Enumerable objects, i.e. the size 19 | # of each row. 20 | def length 21 | @gens.length 22 | end 23 | 24 | # Enumerates rows of the Enumerable objects. 25 | def each 26 | @length.times {|i| 27 | yield @gens.collect {|x| x[i]} 28 | } 29 | self 30 | end 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rexml/undefinednamespaceexception.rb: -------------------------------------------------------------------------------- 1 | require 'rexml/parseexception' 2 | module REXML 3 | class UndefinedNamespaceException < ParseException 4 | def initialize( prefix, source, parser ) 5 | super( "Undefined prefix #{prefix} found" ) 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rexml/validation/validationexception.rb: -------------------------------------------------------------------------------- 1 | module REXML 2 | module Validation 3 | class ValidationException < RuntimeError 4 | def initialize msg 5 | super 6 | end 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rss/content.rb: -------------------------------------------------------------------------------- 1 | require "rss/rss" 2 | 3 | module RSS 4 | # The prefix for the Content XML namespace. 5 | CONTENT_PREFIX = 'content' 6 | # The URI of the Content specification. 7 | CONTENT_URI = "http://purl.org/rss/1.0/modules/content/" 8 | 9 | module ContentModel 10 | extend BaseModel 11 | 12 | ELEMENTS = ["#{CONTENT_PREFIX}_encoded"] 13 | 14 | def self.append_features(klass) 15 | super 16 | 17 | klass.install_must_call_validator(CONTENT_PREFIX, CONTENT_URI) 18 | ELEMENTS.each do |full_name| 19 | name = full_name[(CONTENT_PREFIX.size + 1)..-1] 20 | klass.install_text_element(name, CONTENT_URI, "?", full_name) 21 | end 22 | end 23 | end 24 | 25 | prefix_size = CONTENT_PREFIX.size + 1 26 | ContentModel::ELEMENTS.each do |full_name| 27 | name = full_name[prefix_size..-1] 28 | BaseListener.install_get_text_element(CONTENT_URI, name, full_name) 29 | end 30 | end 31 | 32 | require 'rss/content/1.0' 33 | require 'rss/content/2.0' 34 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rss/content/1.0.rb: -------------------------------------------------------------------------------- 1 | require 'rss/1.0' 2 | 3 | module RSS 4 | RDF.install_ns(CONTENT_PREFIX, CONTENT_URI) 5 | 6 | class RDF 7 | class Item; include ContentModel; end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rss/content/2.0.rb: -------------------------------------------------------------------------------- 1 | require "rss/2.0" 2 | 3 | module RSS 4 | Rss.install_ns(CONTENT_PREFIX, CONTENT_URI) 5 | 6 | class Rss 7 | class Channel 8 | class Item; include ContentModel; end 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rss/dublincore/1.0.rb: -------------------------------------------------------------------------------- 1 | require "rss/1.0" 2 | 3 | module RSS 4 | RDF.install_ns(DC_PREFIX, DC_URI) 5 | 6 | class RDF 7 | class Channel; include DublinCoreModel; end 8 | class Image; include DublinCoreModel; end 9 | class Item; include DublinCoreModel; end 10 | class Textinput; include DublinCoreModel; end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rss/dublincore/2.0.rb: -------------------------------------------------------------------------------- 1 | require "rss/2.0" 2 | 3 | module RSS 4 | Rss.install_ns(DC_PREFIX, DC_URI) 5 | 6 | class Rss 7 | class Channel 8 | include DublinCoreModel 9 | class Item; include DublinCoreModel; end 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rss/dublincore/atom.rb: -------------------------------------------------------------------------------- 1 | require "rss/atom" 2 | 3 | module RSS 4 | module Atom 5 | Feed.install_ns(DC_PREFIX, DC_URI) 6 | 7 | class Feed 8 | include DublinCoreModel 9 | class Entry; include DublinCoreModel; end 10 | end 11 | 12 | class Entry 13 | include DublinCoreModel 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rss/maker/content.rb: -------------------------------------------------------------------------------- 1 | require 'rss/content' 2 | require 'rss/maker/1.0' 3 | require 'rss/maker/2.0' 4 | 5 | module RSS 6 | module Maker 7 | module ContentModel 8 | def self.append_features(klass) 9 | super 10 | 11 | ::RSS::ContentModel::ELEMENTS.each do |name| 12 | klass.def_other_element(name) 13 | end 14 | end 15 | end 16 | 17 | class ItemsBase 18 | class ItemBase; include ContentModel; end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rss/maker/slash.rb: -------------------------------------------------------------------------------- 1 | require 'rss/slash' 2 | require 'rss/maker/1.0' 3 | 4 | module RSS 5 | module Maker 6 | module SlashModel 7 | def self.append_features(klass) 8 | super 9 | 10 | ::RSS::SlashModel::ELEMENT_INFOS.each do |name, type| 11 | full_name = "#{RSS::SLASH_PREFIX}_#{name}" 12 | case type 13 | when :csv_integer 14 | klass.def_csv_element(full_name, :integer) 15 | else 16 | klass.def_other_element(full_name) 17 | end 18 | end 19 | 20 | klass.module_eval do 21 | alias_method(:slash_hit_parades, :slash_hit_parade) 22 | alias_method(:slash_hit_parades=, :slash_hit_parade=) 23 | end 24 | end 25 | end 26 | 27 | class ItemsBase 28 | class ItemBase 29 | include SlashModel 30 | end 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rss/maker/syndication.rb: -------------------------------------------------------------------------------- 1 | require 'rss/syndication' 2 | require 'rss/maker/1.0' 3 | 4 | module RSS 5 | module Maker 6 | module SyndicationModel 7 | def self.append_features(klass) 8 | super 9 | 10 | ::RSS::SyndicationModel::ELEMENTS.each do |name| 11 | klass.def_other_element(name) 12 | end 13 | end 14 | end 15 | 16 | class ChannelBase; include SyndicationModel; end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rss/rexmlparser.rb: -------------------------------------------------------------------------------- 1 | require "rexml/document" 2 | require "rexml/streamlistener" 3 | 4 | module RSS 5 | 6 | class REXMLParser < BaseParser 7 | 8 | class << self 9 | def listener 10 | REXMLListener 11 | end 12 | end 13 | 14 | private 15 | def _parse 16 | begin 17 | REXML::Document.parse_stream(@rss, @listener) 18 | rescue RuntimeError => e 19 | raise NotWellFormedError.new{e.message} 20 | rescue REXML::ParseException => e 21 | context = e.context 22 | line = context[0] if context 23 | raise NotWellFormedError.new(line){e.message} 24 | end 25 | end 26 | 27 | end 28 | 29 | class REXMLListener < BaseListener 30 | 31 | include REXML::StreamListener 32 | include ListenerMixin 33 | 34 | class << self 35 | def raise_for_undefined_entity? 36 | false 37 | end 38 | end 39 | 40 | def xmldecl(version, encoding, standalone) 41 | super(version, encoding, standalone == "yes") 42 | # Encoding is converted to UTF-8 when REXML parse XML. 43 | @encoding = 'UTF-8' 44 | end 45 | 46 | alias_method(:cdata, :text) 47 | end 48 | 49 | end 50 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/commands/list_command.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems/command' 2 | require 'rubygems/commands/query_command' 3 | 4 | ## 5 | # An alternate to Gem::Commands::QueryCommand that searches for gems starting 6 | # with the the supplied argument. 7 | 8 | class Gem::Commands::ListCommand < Gem::Commands::QueryCommand 9 | 10 | def initialize 11 | super 'list', 'Display local gems whose name matches REGEXP' 12 | 13 | remove_option('--name-matches') 14 | end 15 | 16 | def arguments # :nodoc: 17 | "REGEXP regexp to look for in gem name" 18 | end 19 | 20 | def defaults_str # :nodoc: 21 | "--local --no-details" 22 | end 23 | 24 | def description # :nodoc: 25 | <<-EOF 26 | The list command is used to view the gems you have installed locally. 27 | 28 | The --details option displays additional details including the summary, the 29 | homepage, the author, the locations of different versions of the gem. 30 | 31 | To search for remote gems use the search command. 32 | EOF 33 | end 34 | 35 | def usage # :nodoc: 36 | "#{program_name} [STRING ...]" 37 | end 38 | 39 | end 40 | 41 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/commands/mirror_command.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems/command' 2 | 3 | unless defined? Gem::Commands::MirrorCommand 4 | class Gem::Commands::MirrorCommand < Gem::Command 5 | def initialize 6 | super('mirror', 'Mirror all gem files (requires rubygems-mirror)') 7 | begin 8 | Gem::Specification.find_by_name('rubygems-mirror').activate 9 | rescue Gem::LoadError 10 | # no-op 11 | end 12 | end 13 | 14 | def description # :nodoc: 15 | <<-EOF 16 | The mirror command has been moved to the rubygems-mirror gem. 17 | EOF 18 | end 19 | 20 | def execute 21 | alert_error "Install the rubygems-mirror gem for the mirror command" 22 | end 23 | 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/commands/outdated_command.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems/command' 2 | require 'rubygems/local_remote_options' 3 | require 'rubygems/spec_fetcher' 4 | require 'rubygems/version_option' 5 | 6 | class Gem::Commands::OutdatedCommand < Gem::Command 7 | 8 | include Gem::LocalRemoteOptions 9 | include Gem::VersionOption 10 | 11 | def initialize 12 | super 'outdated', 'Display all gems that need updates' 13 | 14 | add_local_remote_options 15 | add_platform_option 16 | end 17 | 18 | def description # :nodoc: 19 | <<-EOF 20 | The outdated command lists gems you may wish to upgrade to a newer version. 21 | 22 | You can check for dependency mismatches using the dependency command and 23 | update the gems with the update or install commands. 24 | EOF 25 | end 26 | 27 | def execute 28 | Gem::Specification.outdated_and_latest_version.each do |spec, remote_version| 29 | say "#{spec.name} (#{spec.version} < #{remote_version})" 30 | end 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/commands/search_command.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems/command' 2 | require 'rubygems/commands/query_command' 3 | 4 | class Gem::Commands::SearchCommand < Gem::Commands::QueryCommand 5 | 6 | def initialize 7 | super 'search', 'Display remote gems whose name matches REGEXP' 8 | 9 | remove_option '--name-matches' 10 | 11 | defaults[:domain] = :remote 12 | end 13 | 14 | def arguments # :nodoc: 15 | "REGEXP regexp to search for in gem name" 16 | end 17 | 18 | def defaults_str # :nodoc: 19 | "--remote --no-details" 20 | end 21 | 22 | def description # :nodoc: 23 | <<-EOF 24 | The search command displays remote gems whose name matches the given 25 | regexp. 26 | 27 | The --details option displays additional details from the gem but will 28 | take a little longer to complete as it must download the information 29 | individually from the index. 30 | 31 | To list local gems use the list command. 32 | EOF 33 | end 34 | 35 | def usage # :nodoc: 36 | "#{program_name} [REGEXP]" 37 | end 38 | 39 | end 40 | 41 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/commands/stale_command.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems/command' 2 | 3 | class Gem::Commands::StaleCommand < Gem::Command 4 | def initialize 5 | super('stale', 'List gems along with access times') 6 | end 7 | 8 | def description # :nodoc: 9 | <<-EOF 10 | The stale command lists the latest access time for all the files in your 11 | installed gems. 12 | 13 | You can use this command to discover gems and gem versions you are no 14 | longer using. 15 | EOF 16 | end 17 | 18 | def usage # :nodoc: 19 | "#{program_name}" 20 | end 21 | 22 | def execute 23 | gem_to_atime = {} 24 | Gem::Specification.each do |spec| 25 | name = spec.full_name 26 | Dir["#{spec.full_gem_path}/**/*.*"].each do |file| 27 | next if File.directory?(file) 28 | stat = File.stat(file) 29 | gem_to_atime[name] ||= stat.atime 30 | gem_to_atime[name] = stat.atime if gem_to_atime[name] < stat.atime 31 | end 32 | end 33 | 34 | gem_to_atime.sort_by { |_, atime| atime }.each do |name, atime| 35 | say "#{name} at #{atime.strftime '%c'}" 36 | end 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/ext.rb: -------------------------------------------------------------------------------- 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 | ## 8 | # Classes for building C extensions live here. 9 | 10 | module Gem::Ext; end 11 | 12 | require 'rubygems/ext/build_error' 13 | require 'rubygems/ext/builder' 14 | require 'rubygems/ext/configure_builder' 15 | require 'rubygems/ext/ext_conf_builder' 16 | require 'rubygems/ext/rake_builder' 17 | require 'rubygems/ext/cmake_builder' 18 | 19 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/ext/build_error.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # Raised when there is an error while building extensions. 3 | 4 | class Gem::Ext::BuildError < Gem::InstallError 5 | end 6 | 7 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/ext/cmake_builder.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems/command' 2 | 3 | class Gem::Ext::CmakeBuilder < Gem::Ext::Builder 4 | def self.build(extension, directory, dest_path, results, args=[], lib_dir=nil) 5 | unless File.exist?('Makefile') then 6 | cmd = "cmake . -DCMAKE_INSTALL_PREFIX=#{dest_path}" 7 | cmd << " #{Gem::Command.build_args.join ' '}" unless Gem::Command.build_args.empty? 8 | 9 | run cmd, results 10 | end 11 | 12 | make dest_path, results 13 | 14 | results 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/ext/configure_builder.rb: -------------------------------------------------------------------------------- 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 | class Gem::Ext::ConfigureBuilder < Gem::Ext::Builder 8 | 9 | def self.build(extension, directory, dest_path, results, args=[], lib_dir=nil) 10 | unless File.exist?('Makefile') then 11 | cmd = "sh ./configure --prefix=#{dest_path}" 12 | cmd << " #{args.join ' '}" unless args.empty? 13 | 14 | run cmd, results 15 | end 16 | 17 | make dest_path, results 18 | 19 | results 20 | end 21 | 22 | end 23 | 24 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/ext/rake_builder.rb: -------------------------------------------------------------------------------- 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 | class Gem::Ext::RakeBuilder < Gem::Ext::Builder 8 | 9 | def self.build(extension, directory, dest_path, results, args=[], lib_dir=nil) 10 | if File.basename(extension) =~ /mkrf_conf/i then 11 | cmd = "#{Gem.ruby} #{File.basename extension}" 12 | cmd << " #{args.join " "}" unless args.empty? 13 | run cmd, results 14 | end 15 | 16 | # Deal with possible spaces in the path, e.g. C:/Program Files 17 | dest_path = '"' + dest_path.to_s + '"' if dest_path.to_s.include?(' ') 18 | 19 | rake = ENV['rake'] 20 | 21 | rake ||= begin 22 | "#{Gem.ruby} -rubygems #{Gem.bin_path('rake', 'rake')}" 23 | rescue Gem::Exception 24 | end 25 | 26 | rake ||= Gem.default_exec_format % 'rake' 27 | 28 | cmd = "#{rake} RUBYARCHDIR=#{dest_path} RUBYLIBDIR=#{dest_path}" # ENV is frozen 29 | 30 | run cmd, results 31 | 32 | results 33 | end 34 | 35 | end 36 | 37 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/install_default_message.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems' 2 | require 'rubygems/user_interaction' 3 | 4 | ## 5 | # A post-install hook that displays "Successfully installed 6 | # some_gem-1.0 as a default gem" 7 | 8 | Gem.post_install do |installer| 9 | ui = Gem::DefaultUserInteraction.ui 10 | ui.say "Successfully installed #{installer.spec.full_name} as a default gem" 11 | end 12 | 13 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/install_message.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems' 2 | require 'rubygems/user_interaction' 3 | 4 | ## 5 | # A default post-install hook that displays "Successfully installed 6 | # some_gem-1.0" 7 | 8 | Gem.post_install do |installer| 9 | ui = Gem::DefaultUserInteraction.ui 10 | ui.say "Successfully installed #{installer.spec.full_name}" 11 | end 12 | 13 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/package/file_source.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # The primary source of gems is a file on disk, including all usages 3 | # internal to rubygems. 4 | # 5 | # This is a private class, do not depend on it directly. Instead, pass a path 6 | # object to `Gem::Package.new`. 7 | 8 | class Gem::Package::FileSource < Gem::Package::Source # :nodoc: all 9 | 10 | attr_reader :path 11 | 12 | def initialize path 13 | @path = path 14 | end 15 | 16 | def start 17 | @start ||= File.read path, 20 18 | end 19 | 20 | def present? 21 | File.exist? path 22 | end 23 | 24 | def with_write_io &block 25 | open path, 'wb', &block 26 | end 27 | 28 | def with_read_io &block 29 | open path, 'rb', &block 30 | end 31 | 32 | end 33 | 34 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/package/io_source.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # Supports reading and writing gems from/to a generic IO object. This is 3 | # useful for other applications built on top of rubygems, such as 4 | # rubygems.org. 5 | # 6 | # This is a private class, do not depend on it directly. Instead, pass an IO 7 | # object to `Gem::Package.new`. 8 | 9 | class Gem::Package::IOSource < Gem::Package::Source # :nodoc: all 10 | 11 | attr_reader :io 12 | 13 | def initialize io 14 | @io = io 15 | end 16 | 17 | def start 18 | @start ||= begin 19 | if io.pos > 0 20 | raise Gem::Package::Error, "Cannot read start unless IO is at start" 21 | end 22 | 23 | value = io.read 20 24 | io.rewind 25 | value 26 | end 27 | end 28 | 29 | def present? 30 | true 31 | end 32 | 33 | def with_read_io 34 | yield io 35 | end 36 | 37 | def with_write_io 38 | yield io 39 | end 40 | 41 | def path 42 | end 43 | 44 | end 45 | 46 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/package/source.rb: -------------------------------------------------------------------------------- 1 | class Gem::Package::Source # :nodoc: 2 | end 3 | 4 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/psych_additions.rb: -------------------------------------------------------------------------------- 1 | # This exists just to satify bugs in marshal'd gemspecs that 2 | # contain a reference to YAML::PrivateType. We prune these out 3 | # in Specification._load, but if we don't have the constant, Marshal 4 | # blows up. 5 | 6 | module Psych # :nodoc: 7 | class PrivateType # :nodoc: 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/psych_tree.rb: -------------------------------------------------------------------------------- 1 | module Gem 2 | if defined? ::Psych::Visitors 3 | class NoAliasYAMLTree < Psych::Visitors::YAMLTree 4 | def self.create 5 | new({}) 6 | end unless respond_to? :create 7 | 8 | def visit_String(str) 9 | return super unless str == '=' # or whatever you want 10 | 11 | quote = Psych::Nodes::Scalar::SINGLE_QUOTED 12 | @emitter.scalar str, nil, nil, false, true, quote 13 | end 14 | 15 | # Noop this out so there are no anchors 16 | def register(target, obj) 17 | end 18 | 19 | # This is ported over from the yaml_tree in 1.9.3 20 | def format_time time 21 | if time.utc? 22 | time.strftime("%Y-%m-%d %H:%M:%S.%9N Z") 23 | else 24 | time.strftime("%Y-%m-%d %H:%M:%S.%9N %:z") 25 | end 26 | end 27 | 28 | private :format_time 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/request/https_pool.rb: -------------------------------------------------------------------------------- 1 | class Gem::Request::HTTPSPool < Gem::Request::HTTPPool # :nodoc: 2 | private 3 | 4 | def setup_connection connection 5 | Gem::Request.configure_connection_for_https(connection, @cert_files) 6 | super 7 | end 8 | end 9 | 10 | 11 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/resolver/current_set.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # A set which represents the installed gems. Respects 3 | # all the normal settings that control where to look 4 | # for installed gems. 5 | 6 | class Gem::Resolver::CurrentSet < Gem::Resolver::Set 7 | 8 | def find_all req 9 | req.dependency.matching_specs 10 | end 11 | 12 | end 13 | 14 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/resolver/local_specification.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # A LocalSpecification comes from a .gem file on the local filesystem. 3 | 4 | class Gem::Resolver::LocalSpecification < Gem::Resolver::SpecSpecification 5 | 6 | ## 7 | # Returns +true+ if this gem is installable for the current platform. 8 | 9 | def installable_platform? 10 | return true if @source.kind_of? Gem::Source::SpecificFile 11 | 12 | super 13 | end 14 | 15 | def local? # :nodoc: 16 | true 17 | end 18 | 19 | def pretty_print q # :nodoc: 20 | q.group 2, '[LocalSpecification', ']' do 21 | q.breakable 22 | q.text "name: #{name}" 23 | 24 | q.breakable 25 | q.text "version: #{version}" 26 | 27 | q.breakable 28 | q.text "platform: #{platform}" 29 | 30 | q.breakable 31 | q.text 'dependencies:' 32 | q.breakable 33 | q.pp dependencies 34 | 35 | q.breakable 36 | q.text "source: #{@source.path}" 37 | end 38 | end 39 | 40 | end 41 | 42 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/resolver/stats.rb: -------------------------------------------------------------------------------- 1 | class Gem::Resolver::Stats 2 | def initialize 3 | @max_depth = 0 4 | @max_requirements = 0 5 | @requirements = 0 6 | @backtracking = 0 7 | @iterations = 0 8 | end 9 | 10 | def record_depth(stack) 11 | if stack.size > @max_depth 12 | @max_depth = stack.size 13 | end 14 | end 15 | 16 | def record_requirements(reqs) 17 | if reqs.size > @max_requirements 18 | @max_requirements = reqs.size 19 | end 20 | end 21 | 22 | def requirement! 23 | @requirements += 1 24 | end 25 | 26 | def backtracking! 27 | @backtracking += 1 28 | end 29 | 30 | def iteration! 31 | @iterations += 1 32 | end 33 | 34 | PATTERN = "%20s: %d\n" 35 | 36 | def display 37 | $stdout.puts "=== Resolver Statistics ===" 38 | $stdout.printf PATTERN, "Max Depth", @max_depth 39 | $stdout.printf PATTERN, "Total Requirements", @requirements 40 | $stdout.printf PATTERN, "Max Requirements", @max_requirements 41 | $stdout.printf PATTERN, "Backtracking #", @backtracking 42 | $stdout.printf PATTERN, "Iteration #", @iterations 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/resolver/vendor_specification.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # A VendorSpecification represents a gem that has been unpacked into a project 3 | # and is being loaded through a gem dependencies file through the +path:+ 4 | # option. 5 | 6 | class Gem::Resolver::VendorSpecification < Gem::Resolver::SpecSpecification 7 | 8 | def == other # :nodoc: 9 | self.class === other and 10 | @set == other.set and 11 | @spec == other.spec and 12 | @source == other.source 13 | end 14 | 15 | ## 16 | # This is a null install as this gem was unpacked into a directory. 17 | # +options+ are ignored. 18 | 19 | def install options = {} 20 | yield nil 21 | end 22 | 23 | end 24 | 25 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/source/installed.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # Represents an installed gem. This is used for dependency resolution. 3 | 4 | class Gem::Source::Installed < Gem::Source 5 | 6 | def initialize # :nodoc: 7 | @uri = nil 8 | end 9 | 10 | ## 11 | # Installed sources sort before all other sources 12 | 13 | def <=> other 14 | case other 15 | when Gem::Source::Git, 16 | Gem::Source::Lock, 17 | Gem::Source::Vendor then 18 | -1 19 | when Gem::Source::Installed then 20 | 0 21 | when Gem::Source then 22 | 1 23 | else 24 | nil 25 | end 26 | end 27 | 28 | ## 29 | # We don't need to download an installed gem 30 | 31 | def download spec, path 32 | nil 33 | end 34 | 35 | def pretty_print q # :nodoc: 36 | q.text '[Installed]' 37 | end 38 | 39 | end 40 | 41 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/source/lock.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # A Lock source wraps an installed gem's source and sorts before other sources 3 | # during dependency resolution. This allows RubyGems to prefer gems from 4 | # dependency lock files. 5 | 6 | class Gem::Source::Lock < Gem::Source 7 | 8 | ## 9 | # The wrapped Gem::Source 10 | 11 | attr_reader :wrapped 12 | 13 | ## 14 | # Creates a new Lock source that wraps +source+ and moves it earlier in the 15 | # sort list. 16 | 17 | def initialize source 18 | @wrapped = source 19 | end 20 | 21 | def <=> other # :nodoc: 22 | case other 23 | when Gem::Source::Lock then 24 | @wrapped <=> other.wrapped 25 | when Gem::Source then 26 | 1 27 | else 28 | nil 29 | end 30 | end 31 | 32 | def == other # :nodoc: 33 | 0 == (self <=> other) 34 | end 35 | 36 | ## 37 | # Delegates to the wrapped source's fetch_spec method. 38 | 39 | def fetch_spec name_tuple 40 | @wrapped.fetch_spec name_tuple 41 | end 42 | 43 | def uri # :nodoc: 44 | @wrapped.uri 45 | end 46 | 47 | end 48 | 49 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/source/vendor.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # This represents a vendored source that is similar to an installed gem. 3 | 4 | class Gem::Source::Vendor < Gem::Source::Installed 5 | 6 | ## 7 | # Creates a new Vendor source for a gem that was unpacked at +path+. 8 | 9 | def initialize path 10 | @uri = path 11 | end 12 | 13 | def <=> other 14 | case other 15 | when Gem::Source::Lock then 16 | -1 17 | when Gem::Source::Vendor then 18 | 0 19 | when Gem::Source then 20 | 1 21 | else 22 | nil 23 | end 24 | end 25 | 26 | end 27 | 28 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/source_local.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems/source' 2 | require 'rubygems/source_local' 3 | 4 | # TODO warn upon require, this file is deprecated. 5 | 6 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/source_specific_file.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems/source/specific_file' 2 | 3 | # TODO warn upon require, this file is deprecated. 4 | 5 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/ssl_certs/Class3PublicPrimaryCertificationAuthority.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG 3 | A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz 4 | cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2 5 | MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV 6 | BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt 7 | YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN 8 | ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE 9 | BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is 10 | I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G 11 | CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do 12 | lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc 13 | AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/uri_formatter.rb: -------------------------------------------------------------------------------- 1 | require 'cgi' 2 | require 'uri' 3 | 4 | ## 5 | # The UriFormatter handles URIs from user-input and escaping. 6 | # 7 | # uf = Gem::UriFormatter.new 'example.com' 8 | # 9 | # p uf.normalize #=> 'http://example.com' 10 | 11 | class Gem::UriFormatter 12 | 13 | ## 14 | # The URI to be formatted. 15 | 16 | attr_reader :uri 17 | 18 | ## 19 | # Creates a new URI formatter for +uri+. 20 | 21 | def initialize uri 22 | @uri = uri 23 | end 24 | 25 | ## 26 | # Escapes the #uri for use as a CGI parameter 27 | 28 | def escape 29 | return unless @uri 30 | CGI.escape @uri 31 | end 32 | 33 | ## 34 | # Normalize the URI by adding "http://" if it is missing. 35 | 36 | def normalize 37 | (@uri =~ /^(https?|ftp|file):/i) ? @uri : "http://#{@uri}" 38 | end 39 | 40 | ## 41 | # Unescapes the #uri which came from a CGI parameter 42 | 43 | def unescape 44 | return unless @uri 45 | CGI.unescape @uri 46 | end 47 | 48 | end 49 | 50 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/util/list.rb: -------------------------------------------------------------------------------- 1 | module Gem 2 | List = Struct.new(:value, :tail) 3 | 4 | class List 5 | def each 6 | n = self 7 | while n 8 | yield n.value 9 | n = n.tail 10 | end 11 | end 12 | 13 | def to_a 14 | ary = [] 15 | n = self 16 | while n 17 | ary.unshift n.value 18 | n = n.tail 19 | end 20 | 21 | ary 22 | end 23 | 24 | def find 25 | n = self 26 | while n 27 | v = n.value 28 | return v if yield(v) 29 | n = n.tail 30 | end 31 | 32 | nil 33 | end 34 | 35 | def prepend(value) 36 | List.new value, self 37 | end 38 | 39 | def pretty_print q # :nodoc: 40 | q.pp to_a 41 | end 42 | 43 | def self.prepend(list, value) 44 | return List.new(value) unless list 45 | List.new value, list 46 | end 47 | end 48 | end 49 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/rubygems/util/stringio.rb: -------------------------------------------------------------------------------- 1 | class Gem::StringSink 2 | def initialize 3 | @string = "" 4 | end 5 | 6 | attr_reader :string 7 | 8 | def write(s) 9 | @string += s 10 | s.size 11 | end 12 | 13 | def set_encoding(enc) 14 | @string.force_encoding enc 15 | end 16 | end 17 | 18 | class Gem::StringSource 19 | def initialize(str) 20 | @string = str.dup 21 | end 22 | 23 | def read(count=nil) 24 | if count 25 | @string.slice!(0,count) 26 | else 27 | s = @string 28 | @string = "" 29 | s 30 | end 31 | end 32 | 33 | alias_method :readpartial, :read 34 | end 35 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/shell/error.rb: -------------------------------------------------------------------------------- 1 | # 2 | # shell/error.rb - 3 | # $Release Version: 0.7 $ 4 | # $Revision: 31641 $ 5 | # by Keiju ISHITSUKA(keiju@ruby-lang.org) 6 | # 7 | # -- 8 | # 9 | # 10 | # 11 | 12 | require "e2mmap" 13 | 14 | class Shell 15 | module Error 16 | extend Exception2MessageMapper 17 | def_e2message TypeError, "wrong argument type %s (expected %s)" 18 | 19 | def_exception :DirStackEmpty, "Directory stack empty." 20 | def_exception :CantDefine, "Can't define method(%s, %s)." 21 | def_exception :CantApplyMethod, "This method(%s) does not apply to this type(%s)." 22 | def_exception :CommandNotFound, "Command not found(%s)." 23 | end 24 | end 25 | 26 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/shell/version.rb: -------------------------------------------------------------------------------- 1 | # 2 | # version.rb - shell version definition file 3 | # $Release Version: 0.7$ 4 | # $Revision: 38201 $ 5 | # by Keiju ISHITSUKA(keiju@ruby-lang.org) 6 | # 7 | # -- 8 | # 9 | # 10 | # 11 | 12 | class Shell # :nodoc: 13 | @RELEASE_VERSION = "0.7" 14 | @LAST_UPDATE_DATE = "07/03/20" 15 | end 16 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/ubygems.rb: -------------------------------------------------------------------------------- 1 | # This file allows for the running of rubygems with a nice 2 | # command line look-and-feel: ruby -rubygems foo.rb 3 | #-- 4 | # Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. 5 | # All rights reserved. 6 | # See LICENSE.txt for permissions. 7 | #++ 8 | 9 | 10 | require 'rubygems' 11 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/uri/https.rb: -------------------------------------------------------------------------------- 1 | # = uri/https.rb 2 | # 3 | # Author:: Akira Yamada 4 | # License:: You can redistribute it and/or modify it under the same term as Ruby. 5 | # Revision:: $Id: https.rb 31555 2011-05-13 20:03:21Z drbrain $ 6 | # 7 | # See URI for general documentation 8 | # 9 | 10 | require 'uri/http' 11 | 12 | module URI 13 | 14 | # The default port for HTTPS URIs is 443, and the scheme is 'https:' rather 15 | # than 'http:'. Other than that, HTTPS URIs are identical to HTTP URIs; 16 | # see URI::HTTP. 17 | class HTTPS < HTTP 18 | # A Default port of 443 for URI::HTTPS 19 | DEFAULT_PORT = 443 20 | end 21 | @@schemes['HTTPS'] = HTTPS 22 | end 23 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/uri/ldaps.rb: -------------------------------------------------------------------------------- 1 | # = uri/ldap.rb 2 | # 3 | # License:: You can redistribute it and/or modify it under the same term as Ruby. 4 | # 5 | # See URI for general documentation 6 | # 7 | 8 | require 'uri/ldap' 9 | 10 | module URI 11 | 12 | # The default port for LDAPS URIs is 636, and the scheme is 'ldaps:' rather 13 | # than 'ldap:'. Other than that, LDAPS URIs are identical to LDAP URIs; 14 | # see URI::LDAP. 15 | class LDAPS < LDAP 16 | # A Default port of 636 for URI::LDAPS 17 | DEFAULT_PORT = 636 18 | end 19 | @@schemes['LDAPS'] = LDAPS 20 | end 21 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/webrick/compat.rb: -------------------------------------------------------------------------------- 1 | # 2 | # compat.rb -- cross platform compatibility 3 | # 4 | # Author: IPR -- Internet Programming with Ruby -- writers 5 | # Copyright (c) 2002 GOTOU Yuuzou 6 | # Copyright (c) 2002 Internet Programming with Ruby writers. All rights 7 | # reserved. 8 | # 9 | # $IPR: compat.rb,v 1.6 2002/10/01 17:16:32 gotoyuzo Exp $ 10 | 11 | ## 12 | # System call error module used by webrick for cross platform compatibility. 13 | # 14 | # EPROTO:: protocol error 15 | # ECONNRESET:: remote host reset the connection request 16 | # ECONNABORTED:: Client sent TCP reset (RST) before server has accepted the 17 | # connection requested by client. 18 | # 19 | module Errno 20 | ## 21 | # Protocol error. 22 | 23 | class EPROTO < SystemCallError; end 24 | 25 | ## 26 | # Remote host reset the connection request. 27 | 28 | class ECONNRESET < SystemCallError; end 29 | 30 | ## 31 | # Client sent TCP reset (RST) before server has accepted the connection 32 | # requested by client. 33 | 34 | class ECONNABORTED < SystemCallError; end 35 | end 36 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/webrick/htmlutils.rb: -------------------------------------------------------------------------------- 1 | #-- 2 | # htmlutils.rb -- HTMLUtils Module 3 | # 4 | # Author: IPR -- Internet Programming with Ruby -- writers 5 | # Copyright (c) 2000, 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou 6 | # Copyright (c) 2002 Internet Programming with Ruby writers. All rights 7 | # reserved. 8 | # 9 | # $IPR: htmlutils.rb,v 1.7 2002/09/21 12:23:35 gotoyuzo Exp $ 10 | 11 | module WEBrick 12 | module HTMLUtils 13 | 14 | ## 15 | # Escapes &, ", > and < in +string+ 16 | 17 | def escape(string) 18 | return "" unless string 19 | str = string.b 20 | str.gsub!(/&/n, '&') 21 | str.gsub!(/\"/n, '"') 22 | str.gsub!(/>/n, '>') 23 | str.gsub!(/ 0 14 | tmp = io.sysread(size) 15 | buf << tmp 16 | size -= tmp.bytesize 17 | end 18 | return buf 19 | end 20 | 21 | STDIN.binmode 22 | 23 | len = sysread(STDIN, 8).to_i 24 | out = sysread(STDIN, len) 25 | STDOUT.reopen(open(out, "w")) 26 | 27 | len = sysread(STDIN, 8).to_i 28 | err = sysread(STDIN, len) 29 | STDERR.reopen(open(err, "w")) 30 | 31 | len = sysread(STDIN, 8).to_i 32 | dump = sysread(STDIN, len) 33 | hash = Marshal.restore(dump) 34 | ENV.keys.each{|name| ENV.delete(name) } 35 | hash.each{|k, v| ENV[k] = v if v } 36 | 37 | dir = File::dirname(ENV["SCRIPT_FILENAME"]) 38 | Dir::chdir dir 39 | 40 | if ARGV[0] 41 | argv = ARGV.dup 42 | argv << ENV["SCRIPT_FILENAME"] 43 | exec(*argv) 44 | # NOTREACHED 45 | end 46 | exec ENV["SCRIPT_FILENAME"] 47 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/webrick/version.rb: -------------------------------------------------------------------------------- 1 | #-- 2 | # version.rb -- version and release date 3 | # 4 | # Author: IPR -- Internet Programming with Ruby -- writers 5 | # Copyright (c) 2000 TAKAHASHI Masayoshi, GOTOU YUUZOU 6 | # Copyright (c) 2003 Internet Programming with Ruby writers. All rights 7 | # reserved. 8 | # 9 | # $IPR: version.rb,v 1.74 2003/07/22 19:20:43 gotoyuzo Exp $ 10 | 11 | module WEBrick 12 | 13 | ## 14 | # The WEBrick version 15 | 16 | VERSION = "1.3.1" 17 | end 18 | -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/bigdecimal.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/bigdecimal.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/continuation.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/continuation.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/date_core.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/date_core.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/digest.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/digest.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/digest/bubblebabble.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/digest/bubblebabble.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/digest/md5.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/digest/md5.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/digest/rmd160.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/digest/rmd160.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/digest/sha1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/digest/sha1.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/digest/sha2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/digest/sha2.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/big5.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/big5.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/cp949.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/cp949.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/emacs_mule.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/emacs_mule.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/encdb.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/encdb.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/euc_jp.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/euc_jp.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/euc_kr.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/euc_kr.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/euc_tw.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/euc_tw.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/gb18030.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/gb18030.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/gb2312.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/gb2312.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/gbk.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/gbk.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_1.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_10.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_10.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_11.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_11.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_13.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_13.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_14.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_14.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_15.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_15.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_16.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_16.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_2.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_3.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_3.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_4.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_4.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_5.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_5.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_6.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_6.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_7.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_7.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_8.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_8.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_9.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/iso_8859_9.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/koi8_r.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/koi8_r.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/koi8_u.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/koi8_u.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/shift_jis.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/shift_jis.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/big5.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/big5.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/chinese.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/chinese.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/emoji.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/emoji.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/emoji_iso2022_kddi.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/emoji_iso2022_kddi.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/emoji_sjis_docomo.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/emoji_sjis_docomo.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/emoji_sjis_kddi.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/emoji_sjis_kddi.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/emoji_sjis_softbank.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/emoji_sjis_softbank.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/escape.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/escape.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/gb18030.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/gb18030.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/gbk.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/gbk.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/iso2022.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/iso2022.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/japanese.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/japanese.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/japanese_euc.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/japanese_euc.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/japanese_sjis.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/japanese_sjis.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/korean.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/korean.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/single_byte.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/single_byte.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/transdb.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/transdb.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/utf8_mac.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/utf8_mac.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/utf_16_32.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/trans/utf_16_32.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/utf_16be.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/utf_16be.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/utf_16le.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/utf_16le.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/utf_32be.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/utf_32be.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/utf_32le.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/utf_32le.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/windows_1251.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/windows_1251.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/enc/windows_31j.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/enc/windows_31j.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/etc.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/etc.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/fcntl.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/fcntl.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/fiber.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/fiber.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/fiddle.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/fiddle.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/io/console.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/io/console.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/io/nonblock.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/io/nonblock.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/io/wait.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/io/wait.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/json/ext/generator.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/json/ext/generator.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/json/ext/parser.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/json/ext/parser.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/mathn/complex.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/mathn/complex.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/mathn/rational.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/mathn/rational.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/nkf.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/nkf.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/objspace.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/objspace.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/openssl.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/openssl.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/pathname.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/pathname.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/psych.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/psych.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/pty.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/pty.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/racc/cparse.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/racc/cparse.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/rbconfig/sizeof.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/rbconfig/sizeof.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/readline.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/readline.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/ripper.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/ripper.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/socket.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/socket.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/stringio.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/stringio.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/strscan.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/strscan.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/syslog.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/syslog.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/thread.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/thread.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/x86_64-linux/zlib.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stewartlord/serverless-ruby/e1c58e3a70e85e70022e78169240e38904dc01ef/ruby/lib/ruby/2.2.0/x86_64-linux/zlib.so -------------------------------------------------------------------------------- /ruby/lib/ruby/2.2.0/xmlrpc/config.rb: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: config.rb 47902 2014-10-13 08:53:16Z hsbt $ 3 | # Configuration file for XML-RPC for Ruby 4 | # 5 | 6 | module XMLRPC # :nodoc: 7 | 8 | module Config 9 | 10 | # or XMLWriter::XMLParser 11 | DEFAULT_WRITER = XMLWriter::Simple 12 | 13 | # === Available parsers 14 | # 15 | # * XMLParser::NQXMLTreeParser 16 | # * XMLParser::NQXMLStreamParser 17 | # * XMLParser::XMLTreeParser 18 | # * XMLParser::XMLStreamParser (fastest) 19 | # * XMLParser::REXMLStreamParser 20 | # * XMLParser::XMLScanStreamParser 21 | # * XMLParser::LibXMLStreamParser 22 | DEFAULT_PARSER = XMLParser::REXMLStreamParser 23 | 24 | # enable tag 25 | ENABLE_NIL_CREATE = false 26 | ENABLE_NIL_PARSER = false 27 | 28 | # allows integers greater than 32-bit if +true+ 29 | ENABLE_BIGINT = false 30 | 31 | # enable marshalling Ruby objects which include XMLRPC::Marshallable 32 | ENABLE_MARSHALLING = true 33 | 34 | # enable multiCall extension by default 35 | ENABLE_MULTICALL = false 36 | 37 | # enable Introspection extension by default 38 | ENABLE_INTROSPECTION = false 39 | 40 | end 41 | 42 | end 43 | 44 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/build_info/charlock_holmes-0.7.3.info: -------------------------------------------------------------------------------- 1 | --with-ldflags='-L. -L/usr/local/override/lib -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--whole-archive -licui18n -licuuc -licudata -Wl,--no-whole-archive -lstdc++' 2 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/build_info/eventmachine-1.0.4.info: -------------------------------------------------------------------------------- 1 | --with-ldflags='-L. -L/usr/local/override/lib -fstack-protector -rdynamic -Wl,-export-dynamic -lz' 2 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/build_info/eventmachine-1.0.6.info: -------------------------------------------------------------------------------- 1 | --with-ldflags='-L. -L/usr/local/override/lib -fstack-protector -rdynamic -Wl,-export-dynamic -lz' 2 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/build_info/puma-2.11.2.info: -------------------------------------------------------------------------------- 1 | --with-ldflags='-L. -L/usr/local/override/lib -fstack-protector -rdynamic -Wl,-export-dynamic -lz' 2 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/build_info/rugged-0.21.4.info: -------------------------------------------------------------------------------- 1 | --with-ldflags='-L. -L/usr/local/override/lib -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--whole-archive -lssl -lcrypto -Wl,--no-whole-archive' 2 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/build_info/rugged-0.22.0b5.info: -------------------------------------------------------------------------------- 1 | --with-ldflags='-L. -L/usr/local/override/lib -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--whole-archive -lssl -lcrypto -Wl,--no-whole-archive' 2 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | # Exit cleanly from an early interrupt 4 | Signal.trap("INT") { exit 1 } 5 | 6 | require 'bundler' 7 | # Check if an older version of bundler is installed 8 | $LOAD_PATH.each do |path| 9 | if path =~ %r'/bundler-0\.(\d+)' && $1.to_i < 9 10 | err = "Looks like you have a version of bundler that's older than 0.9.\n" 11 | err << "Please remove your old versions.\n" 12 | err << "An easy way to do this is by running `gem cleanup bundler`." 13 | abort(err) 14 | end 15 | end 16 | 17 | require 'bundler/friendly_errors' 18 | Bundler.with_friendly_errors do 19 | require 'bundler/cli' 20 | Bundler::CLI.start(ARGV, :debug => true) 21 | end 22 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/bin/bundler: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | # Exit cleanly from an early interrupt 4 | Signal.trap("INT") { exit 1 } 5 | 6 | require 'bundler' 7 | # Check if an older version of bundler is installed 8 | $LOAD_PATH.each do |path| 9 | if path =~ %r'/bundler-0.(\d+)' && $1.to_i < 9 10 | err = "Looks like you have a version of bundler that's older than 0.9.\n" 11 | err << "Please remove your old versions.\n" 12 | err << "An easy way to do this is by running `gem cleanup bundler`." 13 | abort(err) 14 | end 15 | end 16 | 17 | require 'bundler/friendly_errors' 18 | Bundler.with_friendly_errors do 19 | require 'bundler/cli' 20 | Bundler::CLI.start(ARGV, :debug => true) 21 | end 22 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/anonymizable_uri.rb: -------------------------------------------------------------------------------- 1 | module Bundler 2 | class AnonymizableURI 3 | attr_reader :original_uri, 4 | :without_credentials 5 | 6 | def initialize(original_uri, fallback_auth = nil) 7 | @original_uri = apply_auth(original_uri, fallback_auth).freeze 8 | @without_credentials = remove_auth(@original_uri).freeze 9 | end 10 | 11 | private 12 | 13 | def apply_auth(uri, auth = nil) 14 | if auth && uri.userinfo.nil? 15 | uri = uri.dup 16 | uri.userinfo = auth 17 | end 18 | 19 | uri 20 | end 21 | 22 | def remove_auth(uri) 23 | if uri.userinfo 24 | uri = uri.dup 25 | uri.user = uri.password = nil 26 | end 27 | 28 | uri 29 | end 30 | 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/capistrano.rb: -------------------------------------------------------------------------------- 1 | # Capistrano task for Bundler. 2 | # 3 | # Just add "require 'bundler/capistrano'" in your Capistrano deploy.rb, and 4 | # Bundler will be activated after each new deployment. 5 | require 'bundler/deployment' 6 | require 'capistrano/version' 7 | 8 | if defined?(Capistrano::Version) && Gem::Version.new(Capistrano::Version).release >= Gem::Version.new("3.0") 9 | raise "For Capistrano 3.x integration, please use http://github.com/capistrano/bundler" 10 | end 11 | 12 | Capistrano::Configuration.instance(:must_exist).load do 13 | before "deploy:finalize_update", "bundle:install" 14 | Bundler::Deployment.define_task(self, :task, :except => { :no_release => true }) 15 | set :rake, lambda { "#{fetch(:bundle_cmd, "bundle")} exec rake" } 16 | end 17 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/clean.rb: -------------------------------------------------------------------------------- 1 | module Bundler 2 | class CLI::Clean 3 | attr_reader :options 4 | 5 | def initialize(options) 6 | @options = options 7 | end 8 | 9 | def run 10 | require_path_or_force 11 | Bundler.load.clean(options[:"dry-run"]) 12 | end 13 | 14 | protected 15 | 16 | def require_path_or_force 17 | if !Bundler.settings[:path] && !options[:force] 18 | Bundler.ui.error "Cleaning all the gems on your system is dangerous! " \ 19 | "If you're sure you want to remove every system gem not in this " \ 20 | "bundle, run `bundle clean --force`." 21 | exit 1 22 | end 23 | end 24 | 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/console.rb: -------------------------------------------------------------------------------- 1 | module Bundler 2 | class CLI::Console 3 | attr_reader :options, :group 4 | def initialize(options, group) 5 | @options = options 6 | @group = group 7 | end 8 | 9 | def run 10 | group ? Bundler.require(:default, *(group.split.map! {|g| g.to_sym })) : Bundler.require 11 | ARGV.clear 12 | 13 | console = get_console(Bundler.settings[:console] || 'irb') 14 | console.start 15 | end 16 | 17 | def get_console(name) 18 | require name 19 | get_constant(name) 20 | rescue LoadError 21 | Bundler.ui.error "Couldn't load console #{name}" 22 | get_constant('irb') 23 | end 24 | 25 | def get_constant(name) 26 | const_name = { 27 | 'pry' => :Pry, 28 | 'ripl' => :Ripl, 29 | 'irb' => :IRB, 30 | }[name] 31 | Object.const_get(const_name) 32 | rescue NameError 33 | Bundler.ui.error "Could not find constant #{const_name}" 34 | exit 1 35 | end 36 | 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/init.rb: -------------------------------------------------------------------------------- 1 | module Bundler 2 | class CLI::Init 3 | attr_reader :options 4 | def initialize(options) 5 | @options = options 6 | end 7 | 8 | def run 9 | if File.exist?("Gemfile") 10 | Bundler.ui.error "Gemfile already exists at #{Dir.pwd}/Gemfile" 11 | exit 1 12 | end 13 | 14 | if options[:gemspec] 15 | gemspec = File.expand_path(options[:gemspec]) 16 | unless File.exist?(gemspec) 17 | Bundler.ui.error "Gem specification #{gemspec} doesn't exist" 18 | exit 1 19 | end 20 | spec = Gem::Specification.load(gemspec) 21 | puts "Writing new Gemfile to #{Dir.pwd}/Gemfile" 22 | File.open('Gemfile', 'wb') do |file| 23 | file << "# Generated from #{gemspec}\n" 24 | file << spec.to_gemfile 25 | end 26 | else 27 | puts "Writing new Gemfile to #{Dir.pwd}/Gemfile" 28 | FileUtils.cp(File.expand_path('../../templates/Gemfile', __FILE__), 'Gemfile') 29 | end 30 | end 31 | 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/inject.rb: -------------------------------------------------------------------------------- 1 | module Bundler 2 | class CLI::Inject 3 | attr_reader :options, :name, :version, :gems 4 | def initialize(options, name, version, gems) 5 | @options = options 6 | @name = name 7 | @version = version 8 | @gems = gems 9 | end 10 | 11 | def run 12 | # The required arguments allow Thor to give useful feedback when the arguments 13 | # are incorrect. This adds those first two arguments onto the list as a whole. 14 | gems.unshift(version).unshift(name) 15 | 16 | # Build an array of Dependency objects out of the arguments 17 | deps = [] 18 | gems.each_slice(2) do |gem_name, gem_version| 19 | deps << Bundler::Dependency.new(gem_name, gem_version) 20 | end 21 | 22 | added = Injector.inject(deps) 23 | 24 | if added.any? 25 | Bundler.ui.confirm "Added to Gemfile:" 26 | Bundler.ui.confirm added.map{ |g| " #{g}" }.join("\n") 27 | else 28 | Bundler.ui.confirm "All injected gems were already present in the Gemfile" 29 | end 30 | end 31 | 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/open.rb: -------------------------------------------------------------------------------- 1 | require 'bundler/cli/common' 2 | require 'shellwords' 3 | 4 | module Bundler 5 | class CLI::Open 6 | attr_reader :options, :name 7 | def initialize(options, name) 8 | @options = options 9 | @name = name 10 | end 11 | 12 | def run 13 | editor = [ENV['BUNDLER_EDITOR'], ENV['VISUAL'], ENV['EDITOR']].find{|e| !e.nil? && !e.empty? } 14 | return Bundler.ui.info("To open a bundled gem, set $EDITOR or $BUNDLER_EDITOR") unless editor 15 | path = Bundler::CLI::Common.select_spec(name, :regex_match).full_gem_path 16 | Dir.chdir(path) do 17 | command = Shellwords.split(editor) + [path] 18 | system(*command) || Bundler.ui.info("Could not run '#{command.join(' ')}'") 19 | end 20 | end 21 | 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/viz.rb: -------------------------------------------------------------------------------- 1 | module Bundler 2 | class CLI::Viz 3 | attr_reader :options, :gem_name 4 | def initialize(options) 5 | @options = options 6 | end 7 | 8 | def run 9 | require 'graphviz' 10 | output_file = File.expand_path(options[:file]) 11 | graph = Graph.new(Bundler.load, output_file, options[:version], options[:requirements], options[:format], options[:without]) 12 | graph.viz 13 | rescue LoadError => e 14 | Bundler.ui.error e.inspect 15 | Bundler.ui.warn "Make sure you have the graphviz ruby gem. You can install it with:" 16 | Bundler.ui.warn "`gem install ruby-graphviz`" 17 | rescue StandardError => e 18 | if e.message =~ /GraphViz not installed or dot not in PATH/ 19 | Bundler.ui.error e.message 20 | Bundler.ui.warn "Please install GraphViz. On a Mac with homebrew, you can run `brew install graphviz`." 21 | else 22 | raise 23 | end 24 | end 25 | 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/constants.rb: -------------------------------------------------------------------------------- 1 | module Bundler 2 | WINDOWS = RbConfig::CONFIG["host_os"] =~ %r!(msdos|mswin|djgpp|mingw)! 3 | FREEBSD = RbConfig::CONFIG["host_os"] =~ /bsd/ 4 | NULL = WINDOWS ? "NUL" : "/dev/null" 5 | end 6 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/dep_proxy.rb: -------------------------------------------------------------------------------- 1 | module Bundler 2 | class DepProxy 3 | 4 | attr_reader :__platform, :dep 5 | 6 | def initialize(dep, platform) 7 | @dep, @__platform = dep, platform 8 | end 9 | 10 | def hash 11 | @hash ||= dep.hash 12 | end 13 | 14 | def ==(o) 15 | dep == o.dep && __platform == o.__platform 16 | end 17 | 18 | alias eql? == 19 | 20 | def type 21 | @dep.type 22 | end 23 | 24 | def name 25 | @dep.name 26 | end 27 | 28 | def requirement 29 | @dep.requirement 30 | end 31 | 32 | def to_s 33 | "#{name} (#{requirement}) #{__platform}" 34 | end 35 | 36 | private 37 | 38 | def method_missing(*args) 39 | @dep.send(*args) 40 | end 41 | 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/deprecate.rb: -------------------------------------------------------------------------------- 1 | module Bundler 2 | 3 | if defined? ::Deprecate 4 | Deprecate = ::Deprecate 5 | elsif defined? Gem::Deprecate 6 | Deprecate = Gem::Deprecate 7 | else 8 | class Deprecate; end 9 | end 10 | 11 | unless Deprecate.respond_to?(:skip_during) 12 | def Deprecate.skip_during; yield; end 13 | end 14 | 15 | end 16 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/environment.rb: -------------------------------------------------------------------------------- 1 | module Bundler 2 | class Environment 3 | attr_reader :root 4 | 5 | def initialize(root, definition) 6 | @root = root 7 | @definition = definition 8 | 9 | env_file = Bundler.app_config_path.join('environment.rb') 10 | env_file.rmtree if env_file.exist? 11 | end 12 | 13 | def inspect 14 | @definition.to_lock.inspect 15 | end 16 | 17 | def requested_specs 18 | @definition.requested_specs 19 | end 20 | 21 | def specs 22 | @definition.specs 23 | end 24 | 25 | def dependencies 26 | @definition.dependencies 27 | end 28 | 29 | def current_dependencies 30 | @definition.current_dependencies 31 | end 32 | 33 | def lock 34 | @definition.lock(Bundler.default_lockfile) 35 | end 36 | 37 | def update(*gems) 38 | # Nothing 39 | end 40 | 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/gem_helpers.rb: -------------------------------------------------------------------------------- 1 | module Bundler 2 | module GemHelpers 3 | 4 | GENERIC_CACHE = {} 5 | GENERICS = [ 6 | [Gem::Platform.new('java'), Gem::Platform.new('java')], 7 | [Gem::Platform.new('mswin32'), Gem::Platform.new('mswin32')], 8 | [Gem::Platform.new('mswin64'), Gem::Platform.new('mswin64')], 9 | [Gem::Platform.new('universal-mingw32'), Gem::Platform.new('universal-mingw32')], 10 | [Gem::Platform.new('x64-mingw32'), Gem::Platform.new('x64-mingw32')], 11 | [Gem::Platform.new('x86_64-mingw32'), Gem::Platform.new('x64-mingw32')], 12 | [Gem::Platform.new('mingw32'), Gem::Platform.new('x86-mingw32')] 13 | ] 14 | 15 | def generic(p) 16 | return p if p == Gem::Platform::RUBY 17 | 18 | GENERIC_CACHE[p] ||= begin 19 | _, found = GENERICS.find do |match, _generic| 20 | p.os == match.os && (!match.cpu || p.cpu == match.cpu) 21 | end 22 | found || Gem::Platform::RUBY 23 | end 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/gem_installer.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems/installer' 2 | 3 | module Bundler 4 | class GemInstaller < Gem::Installer 5 | def check_executable_overwrite(filename) 6 | # Bundler needs to install gems regardless of binstub overwriting 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/gem_path_manipulation.rb: -------------------------------------------------------------------------------- 1 | module Bundler 2 | def self.preserve_gem_path 3 | original_gem_path = ENV["_ORIGINAL_GEM_PATH"] 4 | gem_path = ENV["GEM_PATH"] 5 | ENV["_ORIGINAL_GEM_PATH"] = gem_path if original_gem_path.nil? || original_gem_path == "" 6 | ENV["GEM_PATH"] = original_gem_path if gem_path.nil? || gem_path == "" 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/gem_tasks.rb: -------------------------------------------------------------------------------- 1 | require 'bundler/gem_helper' 2 | Bundler::GemHelper.install_tasks 3 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/match_platform.rb: -------------------------------------------------------------------------------- 1 | require 'bundler/gem_helpers' 2 | 3 | module Bundler 4 | module MatchPlatform 5 | include GemHelpers 6 | 7 | def match_platform(p) 8 | Gem::Platform::RUBY == platform or 9 | platform.nil? or p == platform or 10 | generic(Gem::Platform.new(platform)) === p 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/psyched_yaml.rb: -------------------------------------------------------------------------------- 1 | # Psych could be a gem, so try to ask for it 2 | begin 3 | gem 'psych' 4 | rescue LoadError 5 | end if defined?(gem) 6 | 7 | # Psych could just be in the stdlib 8 | # but it's too late if Syck is already loaded 9 | begin 10 | require 'psych' unless defined?(Syck) 11 | rescue LoadError 12 | # Apparently Psych wasn't available. Oh well. 13 | end 14 | 15 | # At least load the YAML stdlib, whatever that may be 16 | require 'yaml' unless defined?(YAML.dump) 17 | 18 | module Bundler 19 | # On encountering invalid YAML, 20 | # Psych raises Psych::SyntaxError 21 | if defined?(::Psych::SyntaxError) 22 | YamlSyntaxError = ::Psych::SyntaxError 23 | else # Syck raises ArgumentError 24 | YamlSyntaxError = ::ArgumentError 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ruby_dsl.rb: -------------------------------------------------------------------------------- 1 | module Bundler 2 | module RubyDsl 3 | def ruby(ruby_version, options = {}) 4 | raise GemfileError, "Please define :engine_version" if options[:engine] && options[:engine_version].nil? 5 | raise GemfileError, "Please define :engine" if options[:engine_version] && options[:engine].nil? 6 | 7 | raise GemfileError, "ruby_version must match the :engine_version for MRI" if options[:engine] == "ruby" && options[:engine_version] && ruby_version != options[:engine_version] 8 | @ruby_version = RubyVersion.new(ruby_version, options[:patchlevel], options[:engine], options[:engine_version]) 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/setup.rb: -------------------------------------------------------------------------------- 1 | require 'bundler/shared_helpers' 2 | 3 | if Bundler::SharedHelpers.in_bundle? 4 | require 'bundler' 5 | 6 | if STDOUT.tty? || ENV['BUNDLER_FORCE_TTY'] 7 | begin 8 | Bundler.setup 9 | rescue Bundler::BundlerError => e 10 | puts "\e[31m#{e.message}\e[0m" 11 | puts e.backtrace.join("\n") if ENV["DEBUG"] 12 | if e.is_a?(Bundler::GemNotFound) 13 | puts "\e[33mRun `bundle install` to install missing gems.\e[0m" 14 | end 15 | exit e.status_code 16 | end 17 | else 18 | Bundler.setup 19 | end 20 | 21 | # Add bundler to the load path after disabling system gems 22 | bundler_lib = File.expand_path("../..", __FILE__) 23 | $LOAD_PATH.unshift(bundler_lib) unless $LOAD_PATH.include?(bundler_lib) 24 | end 25 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ssl_certs/.document: -------------------------------------------------------------------------------- 1 | # Ignore all files in this directory 2 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ssl_certs/Class3PublicPrimaryCertificationAuthority.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG 3 | A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz 4 | cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2 5 | MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV 6 | BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt 7 | YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN 8 | ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE 9 | BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is 10 | I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G 11 | CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do 12 | lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc 13 | AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ui.rb: -------------------------------------------------------------------------------- 1 | module Bundler 2 | module UI 3 | autoload :RGProxy, 'bundler/ui/rg_proxy' 4 | autoload :Shell, 'bundler/ui/shell' 5 | autoload :Silent, 'bundler/ui/silent' 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ui/rg_proxy.rb: -------------------------------------------------------------------------------- 1 | require 'bundler/ui' 2 | require 'rubygems/user_interaction' 3 | 4 | module Bundler 5 | module UI 6 | class RGProxy < ::Gem::SilentUI 7 | def initialize(ui) 8 | @ui = ui 9 | super() 10 | end 11 | 12 | def say(message) 13 | if message =~ /native extensions/ 14 | @ui.info "with native extensions " 15 | else 16 | @ui.debug(message) 17 | end 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ui/silent.rb: -------------------------------------------------------------------------------- 1 | module Bundler 2 | module UI 3 | class Silent 4 | def info(message, newline = nil) 5 | end 6 | 7 | def confirm(message, newline = nil) 8 | end 9 | 10 | def warn(message, newline = nil) 11 | end 12 | 13 | def error(message, newline = nil) 14 | end 15 | 16 | def debug(message, newline = nil) 17 | end 18 | 19 | def debug? 20 | false 21 | end 22 | 23 | def quiet? 24 | false 25 | end 26 | 27 | def ask(message) 28 | end 29 | 30 | def level=(name) 31 | end 32 | 33 | def level(name = nil) 34 | end 35 | 36 | def trace(message, newline = nil) 37 | end 38 | 39 | def silence 40 | yield 41 | end 42 | end 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/molinillo/lib/molinillo.rb: -------------------------------------------------------------------------------- 1 | require 'bundler/vendor/molinillo/lib/molinillo/gem_metadata' 2 | require 'bundler/vendor/molinillo/lib/molinillo/errors' 3 | require 'bundler/vendor/molinillo/lib/molinillo/resolver' 4 | require 'bundler/vendor/molinillo/lib/molinillo/modules/ui' 5 | require 'bundler/vendor/molinillo/lib/molinillo/modules/specification_provider' 6 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb: -------------------------------------------------------------------------------- 1 | module Bundler::Molinillo 2 | VERSION = '0.2.3' 3 | end 4 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/net/http/faster.rb: -------------------------------------------------------------------------------- 1 | require 'net/protocol' 2 | 3 | ## 4 | # Aaron Patterson's monkeypatch (accepted into 1.9.1) to fix Net::HTTP's speed 5 | # problems. 6 | # 7 | # http://gist.github.com/251244 8 | 9 | class Net::BufferedIO #:nodoc: 10 | alias :old_rbuf_fill :rbuf_fill 11 | 12 | def rbuf_fill 13 | if @io.respond_to? :read_nonblock then 14 | begin 15 | @rbuf << @io.read_nonblock(65536) 16 | rescue Errno::EWOULDBLOCK, Errno::EAGAIN => e 17 | retry if IO.select [@io], nil, nil, @read_timeout 18 | raise Timeout::Error, e.message 19 | end 20 | else # SSL sockets do not have read_nonblock 21 | timeout @read_timeout do 22 | @rbuf << @io.sysread(65536) 23 | end 24 | end 25 | end 26 | end if RUBY_VERSION < '1.9' 27 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb: -------------------------------------------------------------------------------- 1 | class IO #:nodoc: 2 | class << self 3 | def binread(file, *args) 4 | fail ArgumentError, "wrong number of arguments (#{1 + args.size} for 1..3)" unless args.size < 3 5 | File.open(file, "rb") do |f| 6 | f.read(*args) 7 | end 8 | end unless method_defined? :binread 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/error.rb: -------------------------------------------------------------------------------- 1 | class Bundler::Thor 2 | # Bundler::Thor::Error is raised when it's caused by wrong usage of thor classes. Those 3 | # errors have their backtrace suppressed and are nicely shown to the user. 4 | # 5 | # Errors that are caused by the developer, like declaring a method which 6 | # overwrites a thor keyword, it SHOULD NOT raise a Bundler::Thor::Error. This way, we 7 | # ensure that developer errors are shown with full backtrace. 8 | class Error < StandardError 9 | end 10 | 11 | # Raised when a command was not found. 12 | class UndefinedCommandError < Error 13 | end 14 | UndefinedTaskError = UndefinedCommandError # rubocop:disable ConstantName 15 | 16 | class AmbiguousCommandError < Error 17 | end 18 | AmbiguousTaskError = AmbiguousCommandError # rubocop:disable ConstantName 19 | 20 | # Raised when a command was found, but not invoked properly. 21 | class InvocationError < Error 22 | end 23 | 24 | class UnknownArgumentError < Error 25 | end 26 | 27 | class RequiredArgumentMissingError < InvocationError 28 | end 29 | 30 | class MalformattedArgumentError < InvocationError 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/line_editor.rb: -------------------------------------------------------------------------------- 1 | require "bundler/vendor/thor/lib/thor/line_editor/basic" 2 | require "bundler/vendor/thor/lib/thor/line_editor/readline" 3 | 4 | class Bundler::Thor 5 | module LineEditor 6 | def self.readline(prompt, options = {}) 7 | best_available.new(prompt, options).readline 8 | end 9 | 10 | def self.best_available 11 | [ 12 | Bundler::Thor::LineEditor::Readline, 13 | Bundler::Thor::LineEditor::Basic 14 | ].detect(&:available?) 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb: -------------------------------------------------------------------------------- 1 | class Bundler::Thor 2 | module LineEditor 3 | class Basic 4 | attr_reader :prompt, :options 5 | 6 | def self.available? 7 | true 8 | end 9 | 10 | def initialize(prompt, options) 11 | @prompt = prompt 12 | @options = options 13 | end 14 | 15 | def readline 16 | $stdout.print(prompt) 17 | get_input 18 | end 19 | 20 | private 21 | 22 | def get_input 23 | if echo? 24 | $stdin.gets 25 | else 26 | $stdin.noecho(&:gets) 27 | end 28 | end 29 | 30 | def echo? 31 | options.fetch(:echo, true) 32 | end 33 | end 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/parser.rb: -------------------------------------------------------------------------------- 1 | require "bundler/vendor/thor/lib/thor/parser/argument" 2 | require "bundler/vendor/thor/lib/thor/parser/arguments" 3 | require "bundler/vendor/thor/lib/thor/parser/option" 4 | require "bundler/vendor/thor/lib/thor/parser/options" 5 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/version.rb: -------------------------------------------------------------------------------- 1 | class Bundler::Thor 2 | VERSION = "0.19.1" 3 | end 4 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendored_molinillo.rb: -------------------------------------------------------------------------------- 1 | module Bundler; end 2 | require 'bundler/vendor/molinillo/lib/molinillo' 3 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendored_persistent.rb: -------------------------------------------------------------------------------- 1 | # We forcibly require OpenSSL, because net/http/persistent will only autoload 2 | # it. On some Rubies, autoload fails but explicit require succeeds. 3 | begin 4 | require 'openssl' 5 | rescue LoadError 6 | # some Ruby builds don't have OpenSSL 7 | end 8 | 9 | vendor = File.expand_path('../vendor', __FILE__) 10 | $:.unshift(vendor) unless $:.include?(vendor) 11 | require 'net/http/persistent' 12 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendored_thor.rb: -------------------------------------------------------------------------------- 1 | module Bundler; end 2 | require 'bundler/vendor/thor/lib/thor' 3 | require 'bundler/vendor/thor/lib/thor/actions' 4 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/version.rb: -------------------------------------------------------------------------------- 1 | module Bundler 2 | # We're doing this because we might write tests that deal 3 | # with other versions of bundler and we are unsure how to 4 | # handle this better. 5 | VERSION = "1.9.9" unless defined?(::Bundler::VERSION) 6 | end 7 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vlad.rb: -------------------------------------------------------------------------------- 1 | # Vlad task for Bundler. 2 | # 3 | # Just add "require 'bundler/vlad'" in your Vlad deploy.rb, and 4 | # include the vlad:bundle:install task in your vlad:deploy task. 5 | require 'bundler/deployment' 6 | 7 | include Rake::DSL if defined? Rake::DSL 8 | 9 | namespace :vlad do 10 | Bundler::Deployment.define_task(Rake::RemoteTask, :remote_task, :roles => :app) 11 | end 12 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/specifications/default/bigdecimal-1.2.6.gemspec: -------------------------------------------------------------------------------- 1 | # -*- encoding: utf-8 -*- 2 | # stub: bigdecimal 1.2.6 ruby . 3 | # stub: extconf.rb 4 | 5 | Gem::Specification.new do |s| 6 | s.name = "bigdecimal" 7 | s.version = "1.2.6" 8 | 9 | s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= 10 | s.require_paths = ["."] 11 | s.authors = ["Kenta Murata", "Zachary Scott", "Shigeo Kobayashi"] 12 | s.date = "2014-12-19" 13 | s.description = "This library provides arbitrary-precision decimal floating-point number class." 14 | s.email = "mrkn@mrkn.jp" 15 | s.extensions = ["extconf.rb"] 16 | s.files = ["bigdecimal.so", "bigdecimal/jacobian.rb", "bigdecimal/ludcmp.rb", "bigdecimal/math.rb", "bigdecimal/newton.rb", "bigdecimal/util.rb", "extconf.rb"] 17 | s.homepage = "http://www.ruby-lang.org" 18 | s.rubygems_version = "2.4.5" 19 | s.summary = "Arbitrary-precision decimal floating-point number library." 20 | end 21 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/specifications/default/io-console-0.4.3.gemspec: -------------------------------------------------------------------------------- 1 | # -*- encoding: utf-8 -*- 2 | # stub: io-console 0.4.3 ruby . 3 | # stub: extconf.rb 4 | 5 | Gem::Specification.new do |s| 6 | s.name = "io-console" 7 | s.version = "0.4.3" 8 | 9 | s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= 10 | s.require_paths = ["."] 11 | s.authors = ["Nobu Nakada"] 12 | s.cert_chain = ["certs/nobu.pem"] 13 | s.date = "2014-12-17" 14 | s.description = "add console capabilities to IO instances." 15 | s.email = "nobu@ruby-lang.org" 16 | s.extensions = ["extconf.rb"] 17 | s.files = ["extconf.rb", "io/console.so", "io/console/size.rb"] 18 | s.homepage = "http://www.ruby-lang.org" 19 | s.licenses = ["ruby"] 20 | s.required_ruby_version = Gem::Requirement.new(">= 2.0.0") 21 | s.rubygems_version = "2.4.5" 22 | s.summary = "Console interface" 23 | end 24 | -------------------------------------------------------------------------------- /ruby/lib/ruby/gems/2.2.0/specifications/default/json-1.8.1.gemspec: -------------------------------------------------------------------------------- 1 | Gem::Specification.new do |s| 2 | s.name = "json" 3 | s.version = "1.8.1" 4 | s.summary = "This json is bundled with Ruby" 5 | s.executables = [] 6 | s.files = ["json.rb", "json/add/bigdecimal.rb", "json/add/complex.rb", "json/add/core.rb", "json/add/date.rb", "json/add/date_time.rb", "json/add/exception.rb", "json/add/ostruct.rb", "json/add/range.rb", "json/add/rational.rb", "json/add/regexp.rb", "json/add/struct.rb", "json/add/symbol.rb", "json/add/time.rb", "json/common.rb", "json/ext.rb", "json/ext/generator.so", "json/ext/parser.so", "json/generic_object.rb", "json/version.rb"] 7 | end 8 | -------------------------------------------------------------------------------- /serverless.yml: -------------------------------------------------------------------------------- 1 | service: serverless-ruby 2 | 3 | provider: 4 | name: aws 5 | runtime: nodejs4.3 6 | 7 | functions: 8 | hello: 9 | handler: handler.hello 10 | events: 11 | - http: 12 | path: hello 13 | method: get --------------------------------------------------------------------------------