rubygems-update 2.6.14 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rubygems-update might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.travis.yml +10 -7
- data/CONTRIBUTING.rdoc +53 -54
- data/History.txt +173 -9
- data/Manifest.txt +39 -11
- data/POLICIES.rdoc +3 -3
- data/README.md +72 -0
- data/Rakefile +30 -5
- data/appveyor.yml +29 -1
- data/bin/gem +1 -1
- data/bin/update_rubygems +2 -2
- data/bundler/CHANGELOG.md +269 -9
- data/bundler/CODE_OF_CONDUCT.md +1 -1
- data/bundler/CONTRIBUTING.md +10 -29
- data/bundler/README.md +22 -10
- data/bundler/exe/bundle +5 -7
- data/bundler/exe/bundle_ruby +4 -3
- data/bundler/lib/bundler.rb +94 -74
- data/bundler/lib/bundler/build_metadata.rb +36 -0
- data/bundler/lib/bundler/capistrano.rb +5 -0
- data/bundler/lib/bundler/cli.rb +229 -66
- data/bundler/lib/bundler/cli/add.rb +25 -0
- data/bundler/lib/bundler/cli/binstubs.rb +9 -7
- data/bundler/lib/bundler/cli/cache.rb +5 -4
- data/bundler/lib/bundler/cli/check.rb +3 -5
- data/bundler/lib/bundler/cli/clean.rb +5 -6
- data/bundler/lib/bundler/cli/common.rb +18 -2
- data/bundler/lib/bundler/cli/config.rb +26 -7
- data/bundler/lib/bundler/cli/console.rb +2 -1
- data/bundler/lib/bundler/cli/doctor.rb +1 -0
- data/bundler/lib/bundler/cli/exec.rb +3 -2
- data/bundler/lib/bundler/cli/gem.rb +36 -15
- data/bundler/lib/bundler/cli/info.rb +50 -0
- data/bundler/lib/bundler/cli/init.rb +20 -7
- data/bundler/lib/bundler/cli/inject.rb +13 -4
- data/bundler/lib/bundler/cli/install.rb +61 -77
- data/bundler/lib/bundler/cli/issue.rb +40 -0
- data/bundler/lib/bundler/cli/list.rb +22 -0
- data/bundler/lib/bundler/cli/lock.rb +4 -2
- data/bundler/lib/bundler/cli/open.rb +2 -2
- data/bundler/lib/bundler/cli/outdated.rb +30 -28
- data/bundler/lib/bundler/cli/package.rb +9 -6
- data/bundler/lib/bundler/cli/platform.rb +1 -0
- data/bundler/lib/bundler/cli/plugin.rb +1 -0
- data/bundler/lib/bundler/cli/pristine.rb +43 -0
- data/bundler/lib/bundler/cli/show.rb +1 -1
- data/bundler/lib/bundler/cli/update.rb +32 -11
- data/bundler/lib/bundler/cli/viz.rb +5 -1
- data/bundler/lib/bundler/compact_index_client.rb +1 -0
- data/bundler/lib/bundler/compact_index_client/cache.rb +1 -2
- data/bundler/lib/bundler/compact_index_client/updater.rb +26 -7
- data/bundler/lib/bundler/compatibility_guard.rb +14 -0
- data/bundler/lib/bundler/constants.rb +1 -0
- data/bundler/lib/bundler/current_ruby.rb +8 -7
- data/bundler/lib/bundler/definition.rb +231 -159
- data/bundler/lib/bundler/dep_proxy.rb +2 -0
- data/bundler/lib/bundler/dependency.rb +6 -7
- data/bundler/lib/bundler/deployment.rb +1 -1
- data/bundler/lib/bundler/deprecate.rb +14 -3
- data/bundler/lib/bundler/dsl.rb +103 -62
- data/bundler/lib/bundler/endpoint_specification.rb +12 -2
- data/bundler/lib/bundler/env.rb +97 -36
- data/bundler/lib/bundler/environment_preserver.rb +27 -6
- data/bundler/lib/bundler/errors.rb +3 -1
- data/bundler/lib/bundler/feature_flag.rb +39 -4
- data/bundler/lib/bundler/fetcher.rb +15 -8
- data/bundler/lib/bundler/fetcher/base.rb +1 -0
- data/bundler/lib/bundler/fetcher/compact_index.rb +2 -12
- data/bundler/lib/bundler/fetcher/dependency.rb +2 -1
- data/bundler/lib/bundler/fetcher/downloader.rb +4 -2
- data/bundler/lib/bundler/fetcher/index.rb +1 -0
- data/bundler/lib/bundler/friendly_errors.rb +5 -2
- data/bundler/lib/bundler/gem_helper.rb +23 -9
- data/bundler/lib/bundler/gem_helpers.rb +1 -0
- data/bundler/lib/bundler/gem_remote_fetcher.rb +1 -0
- data/bundler/lib/bundler/gem_tasks.rb +1 -0
- data/bundler/lib/bundler/gem_version_promoter.rb +1 -0
- data/bundler/lib/bundler/gemdeps.rb +1 -0
- data/bundler/lib/bundler/graph.rb +1 -0
- data/bundler/lib/bundler/index.rb +19 -11
- data/bundler/lib/bundler/injector.rb +51 -27
- data/bundler/lib/bundler/inline.rb +10 -10
- data/bundler/lib/bundler/installer.rb +104 -50
- data/bundler/lib/bundler/installer/gem_installer.rb +5 -2
- data/bundler/lib/bundler/installer/parallel_installer.rb +91 -42
- data/bundler/lib/bundler/installer/standalone.rb +1 -0
- data/bundler/lib/bundler/lazy_specification.rb +17 -4
- data/bundler/lib/bundler/lockfile_generator.rb +95 -0
- data/bundler/lib/bundler/lockfile_parser.rb +49 -35
- data/bundler/lib/bundler/match_platform.rb +1 -0
- data/bundler/lib/bundler/mirror.rb +8 -3
- data/bundler/lib/bundler/plugin.rb +6 -1
- data/bundler/lib/bundler/plugin/api/source.rb +16 -3
- data/bundler/lib/bundler/plugin/index.rb +2 -0
- data/bundler/lib/bundler/plugin/installer.rb +7 -6
- data/bundler/lib/bundler/plugin/source_list.rb +7 -8
- data/bundler/lib/bundler/process_lock.rb +24 -0
- data/bundler/lib/bundler/psyched_yaml.rb +10 -0
- data/bundler/lib/bundler/remote_specification.rb +25 -1
- data/bundler/lib/bundler/resolver.rb +171 -192
- data/bundler/lib/bundler/resolver/spec_group.rb +111 -0
- data/bundler/lib/bundler/retry.rb +1 -0
- data/bundler/lib/bundler/ruby_dsl.rb +1 -0
- data/bundler/lib/bundler/ruby_version.rb +6 -1
- data/bundler/lib/bundler/rubygems_ext.rb +18 -8
- data/bundler/lib/bundler/rubygems_gem_installer.rb +25 -2
- data/bundler/lib/bundler/rubygems_integration.rb +157 -66
- data/bundler/lib/bundler/runtime.rb +28 -18
- data/bundler/lib/bundler/settings.rb +202 -87
- data/bundler/lib/bundler/settings/validator.rb +79 -0
- data/bundler/lib/bundler/setup.rb +4 -7
- data/bundler/lib/bundler/shared_helpers.rb +129 -25
- data/bundler/lib/bundler/similarity_detector.rb +1 -0
- data/bundler/lib/bundler/source.rb +53 -1
- data/bundler/lib/bundler/source/gemspec.rb +1 -0
- data/bundler/lib/bundler/source/git.rb +49 -21
- data/bundler/lib/bundler/source/git/git_proxy.rb +17 -12
- data/bundler/lib/bundler/source/metadata.rb +63 -0
- data/bundler/lib/bundler/source/path.rb +38 -17
- data/bundler/lib/bundler/source/path/installer.rb +4 -2
- data/bundler/lib/bundler/source/rubygems.rb +154 -82
- data/bundler/lib/bundler/source/rubygems/remote.rb +8 -1
- data/bundler/lib/bundler/source_list.rb +75 -15
- data/bundler/lib/bundler/spec_set.rb +34 -21
- data/bundler/lib/bundler/ssl_certs/certificate_manager.rb +2 -1
- data/bundler/lib/bundler/stub_specification.rb +86 -2
- data/bundler/lib/bundler/templates/Executable +5 -1
- data/bundler/lib/bundler/templates/Executable.bundler +105 -0
- data/bundler/lib/bundler/templates/Executable.standalone +5 -5
- data/bundler/lib/bundler/templates/Gemfile +3 -0
- data/bundler/lib/bundler/templates/gems.rb +8 -0
- data/bundler/lib/bundler/templates/newgem/Gemfile.tt +4 -2
- data/bundler/lib/bundler/templates/newgem/LICENSE.txt.tt +1 -1
- data/bundler/lib/bundler/templates/newgem/README.md.tt +14 -8
- data/bundler/lib/bundler/templates/newgem/Rakefile.tt +5 -5
- data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +4 -4
- data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem.h.tt +3 -3
- data/bundler/lib/bundler/templates/newgem/gitignore.tt +0 -1
- data/bundler/lib/bundler/templates/newgem/lib/newgem.rb.tt +6 -6
- data/bundler/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +4 -4
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +13 -10
- data/bundler/lib/bundler/templates/newgem/rspec.tt +1 -0
- data/bundler/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +0 -2
- data/bundler/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +3 -0
- data/bundler/lib/bundler/templates/newgem/test/newgem_test.rb.tt +1 -1
- data/bundler/lib/bundler/templates/newgem/test/test_helper.rb.tt +3 -3
- data/bundler/lib/bundler/ui.rb +1 -0
- data/bundler/lib/bundler/ui/rg_proxy.rb +1 -0
- data/bundler/lib/bundler/ui/shell.rb +24 -10
- data/bundler/lib/bundler/ui/silent.rb +12 -1
- data/bundler/lib/bundler/uri_credentials_filter.rb +1 -0
- data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +1638 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo.rb +2 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/compatibility.rb +26 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +7 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +1 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +16 -5
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +1 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +10 -2
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +1 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +1 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +1 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +1 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +1 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +1 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +5 -4
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +69 -6
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +2 -1
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +1 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +3 -1
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +501 -138
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +1 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +8 -4
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +3 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor.rb +46 -21
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions.rb +24 -22
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +2 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +2 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +2 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +16 -8
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +66 -18
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +17 -15
- data/bundler/lib/bundler/vendor/thor/lib/thor/base.rb +55 -32
- data/bundler/lib/bundler/vendor/thor/lib/thor/command.rb +13 -11
- data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +21 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb +7 -5
- data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/ordered_hash.rb +94 -63
- data/bundler/lib/bundler/vendor/thor/lib/thor/error.rb +3 -3
- data/bundler/lib/bundler/vendor/thor/lib/thor/group.rb +13 -13
- data/bundler/lib/bundler/vendor/thor/lib/thor/invocation.rb +4 -5
- data/bundler/lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb +2 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +4 -7
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +16 -16
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/option.rb +42 -21
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +13 -10
- data/bundler/lib/bundler/vendor/thor/lib/thor/runner.rb +31 -29
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +49 -33
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/html.rb +4 -4
- data/bundler/lib/bundler/vendor/thor/lib/thor/util.rb +8 -7
- data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/bundler/lib/bundler/vendored_fileutils.rb +9 -0
- data/bundler/lib/bundler/vendored_molinillo.rb +1 -0
- data/bundler/lib/bundler/vendored_persistent.rb +35 -0
- data/bundler/lib/bundler/vendored_thor.rb +6 -2
- data/bundler/lib/bundler/version.rb +19 -2
- data/bundler/lib/bundler/version_ranges.rb +76 -0
- data/bundler/lib/bundler/vlad.rb +5 -0
- data/bundler/lib/bundler/worker.rb +3 -1
- data/bundler/lib/bundler/yaml_serializer.rb +3 -3
- data/bundler/man/bundle-add.ronn +29 -0
- data/bundler/man/bundle-binstubs.ronn +14 -0
- data/bundler/man/bundle-check.ronn +26 -0
- data/bundler/man/bundle-clean.ronn +18 -0
- data/bundler/man/bundle-config.ronn +180 -60
- data/bundler/man/bundle-exec.ronn +7 -0
- data/bundler/man/bundle-gem.ronn +3 -2
- data/bundler/man/bundle-info.ronn +17 -0
- data/bundler/man/bundle-init.ronn +18 -0
- data/bundler/man/bundle-inject.ronn +22 -0
- data/bundler/man/bundle-install.ronn +32 -32
- data/bundler/man/bundle-list.ronn +15 -0
- data/bundler/man/bundle-open.ronn +19 -0
- data/bundler/man/bundle-outdated.ronn +1 -1
- data/bundler/man/bundle-package.ronn +5 -0
- data/bundler/man/bundle-pristine.ronn +34 -0
- data/bundler/man/bundle-show.ronn +20 -0
- data/bundler/man/bundle-update.ronn +6 -3
- data/bundler/man/bundle-viz.ronn +30 -0
- data/bundler/man/bundle.ronn +11 -20
- data/bundler/man/gemfile.5.ronn +55 -64
- data/lib/rubygems.rb +79 -36
- data/lib/rubygems/basic_specification.rb +8 -4
- data/lib/rubygems/bundler_version_finder.rb +112 -0
- data/lib/rubygems/command.rb +1 -1
- data/lib/rubygems/command_manager.rb +3 -1
- data/lib/rubygems/commands/cert_command.rb +31 -6
- data/lib/rubygems/commands/cleanup_command.rb +1 -1
- data/lib/rubygems/commands/help_command.rb +1 -1
- data/lib/rubygems/commands/owner_command.rb +3 -1
- data/lib/rubygems/commands/pristine_command.rb +11 -8
- data/lib/rubygems/commands/push_command.rb +2 -1
- data/lib/rubygems/commands/query_command.rb +13 -14
- data/lib/rubygems/commands/setup_command.rb +124 -69
- data/lib/rubygems/commands/signin_command.rb +33 -0
- data/lib/rubygems/commands/signout_command.rb +33 -0
- data/lib/rubygems/commands/uninstall_command.rb +4 -3
- data/lib/rubygems/commands/unpack_command.rb +16 -4
- data/lib/rubygems/commands/update_command.rb +1 -1
- data/lib/rubygems/commands/which_command.rb +1 -1
- data/lib/rubygems/commands/yank_command.rb +4 -11
- data/lib/rubygems/config_file.rb +13 -24
- data/lib/rubygems/core_ext/kernel_require.rb +10 -9
- data/lib/rubygems/dependency.rb +2 -0
- data/lib/rubygems/dependency_installer.rb +4 -0
- data/lib/rubygems/errors.rb +3 -0
- data/lib/rubygems/exceptions.rb +6 -0
- data/lib/rubygems/ext/builder.rb +1 -1
- data/lib/rubygems/ext/ext_conf_builder.rb +2 -4
- data/lib/rubygems/ext/rake_builder.rb +1 -1
- data/lib/rubygems/gem_runner.rb +5 -1
- data/lib/rubygems/install_update_options.rb +5 -28
- data/lib/rubygems/installer.rb +12 -7
- data/lib/rubygems/installer_test_case.rb +6 -3
- data/lib/rubygems/package/old.rb +1 -1
- data/lib/rubygems/request.rb +1 -1
- data/lib/rubygems/request_set.rb +20 -3
- data/lib/rubygems/request_set/gem_dependency_api.rb +3 -3
- data/lib/rubygems/requirement.rb +5 -1
- data/lib/rubygems/resolver.rb +24 -3
- data/lib/rubygems/resolver/installer_set.rb +4 -6
- data/lib/rubygems/safe_yaml.rb +4 -1
- data/lib/rubygems/security.rb +10 -3
- data/lib/rubygems/security_option.rb +43 -0
- data/lib/rubygems/server.rb +4 -12
- data/lib/rubygems/source.rb +7 -4
- data/lib/rubygems/source/git.rb +2 -1
- data/lib/rubygems/source/local.rb +38 -35
- data/lib/rubygems/source/lock.rb +4 -1
- data/lib/rubygems/source_local.rb +3 -1
- data/lib/rubygems/source_specific_file.rb +3 -2
- data/lib/rubygems/spec_fetcher.rb +7 -3
- data/lib/rubygems/specification.rb +281 -231
- data/lib/rubygems/stub_specification.rb +2 -3
- data/lib/rubygems/test_case.rb +14 -1
- data/lib/rubygems/user_interaction.rb +15 -13
- data/lib/rubygems/util.rb +6 -17
- data/lib/rubygems/version.rb +17 -3
- data/lib/rubygems/version_option.rb +6 -1
- data/setup.rb +1 -1
- data/test/rubygems/private3072_key.pem +40 -0
- data/test/rubygems/public3072_cert.pem +25 -0
- data/test/rubygems/test_config.rb +1 -1
- data/test/rubygems/test_gem.rb +72 -14
- data/test/rubygems/test_gem_bundler_version_finder.rb +125 -0
- data/test/rubygems/test_gem_command.rb +1 -1
- data/test/rubygems/test_gem_commands_build_command.rb +27 -1
- data/test/rubygems/test_gem_commands_cert_command.rb +64 -0
- data/test/rubygems/test_gem_commands_install_command.rb +35 -2
- data/test/rubygems/test_gem_commands_pristine_command.rb +1 -1
- data/test/rubygems/test_gem_commands_query_command.rb +19 -0
- data/test/rubygems/test_gem_commands_setup_command.rb +17 -0
- data/test/rubygems/test_gem_commands_signin_command.rb +95 -0
- data/test/rubygems/test_gem_commands_signout_command.rb +37 -0
- data/test/rubygems/test_gem_commands_sources_command.rb +1 -1
- data/test/rubygems/test_gem_commands_uninstall_command.rb +12 -0
- data/test/rubygems/test_gem_commands_update_command.rb +1 -1
- data/test/rubygems/test_gem_commands_which_command.rb +3 -3
- data/test/rubygems/test_gem_dependency.rb +28 -0
- data/test/rubygems/test_gem_ext_builder.rb +2 -2
- data/test/rubygems/test_gem_ext_rake_builder.rb +2 -2
- data/test/rubygems/test_gem_install_update_options.rb +2 -1
- data/test/rubygems/test_gem_installer.rb +29 -27
- data/test/rubygems/test_gem_package.rb +5 -5
- data/test/rubygems/test_gem_remote_fetcher.rb +2 -2
- data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +3 -3
- data/test/rubygems/test_gem_requirement.rb +6 -0
- data/test/rubygems/test_gem_resolver.rb +26 -0
- data/test/rubygems/test_gem_resolver_conflict.rb +1 -1
- data/test/rubygems/test_gem_security.rb +5 -0
- data/test/rubygems/test_gem_security_policy.rb +24 -24
- data/test/rubygems/test_gem_security_signer.rb +6 -6
- data/test/rubygems/test_gem_security_trust_dir.rb +2 -2
- data/test/rubygems/test_gem_server.rb +18 -1
- data/test/rubygems/test_gem_source.rb +9 -0
- data/test/rubygems/test_gem_spec_fetcher.rb +20 -0
- data/test/rubygems/test_gem_specification.rb +85 -10
- data/test/rubygems/test_gem_stream_ui.rb +6 -6
- data/test/rubygems/test_gem_stub_specification.rb +19 -1
- data/test/rubygems/test_gem_util.rb +1 -0
- data/test/rubygems/test_gem_version.rb +28 -7
- data/test/rubygems/test_gem_version_option.rb +15 -0
- data/test/rubygems/test_kernel.rb +30 -0
- data/test/rubygems/test_require.rb +44 -0
- metadata +47 -46
- data/README.rdoc +0 -54
- data/bundler/DEVELOPMENT.md +0 -150
- data/bundler/ISSUES.md +0 -117
- data/bundler/lib/bundler/postit_trampoline.rb +0 -73
- data/bundler/lib/bundler/vendor/postit/lib/postit.rb +0 -15
- data/bundler/lib/bundler/vendor/postit/lib/postit/environment.rb +0 -44
- data/bundler/lib/bundler/vendor/postit/lib/postit/installer.rb +0 -28
- data/bundler/lib/bundler/vendor/postit/lib/postit/parser.rb +0 -21
- data/bundler/lib/bundler/vendor/postit/lib/postit/setup.rb +0 -12
- data/bundler/lib/bundler/vendor/postit/lib/postit/version.rb +0 -3
- data/bundler/man/index.txt +0 -8
@@ -0,0 +1,15 @@
|
|
1
|
+
bundle-list(1) -- List all the gems in the bundle
|
2
|
+
=========================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bundle list` [--name-only]
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
Prints a list of all the gems in the bundle including their version.
|
11
|
+
|
12
|
+
## OPTIONS
|
13
|
+
|
14
|
+
* `--name-only`:
|
15
|
+
Print only the name of each gem.
|
@@ -0,0 +1,19 @@
|
|
1
|
+
bundle-open(1) -- Opens the source directory for a gem in your bundle
|
2
|
+
=====================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bundle open` [GEM]
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
Opens the source directory of the provided GEM in your editor.
|
11
|
+
|
12
|
+
For this to work the `EDITOR` or `BUNDLER_EDITOR` environment variable has to
|
13
|
+
be set.
|
14
|
+
|
15
|
+
Example:
|
16
|
+
|
17
|
+
bundle open 'rack'
|
18
|
+
|
19
|
+
Will open the source directory for the 'rack' gem in your bundle.
|
@@ -37,7 +37,7 @@ are up to date, Bundler will exit with a status of 0. Otherwise, it will exit 1.
|
|
37
37
|
* `--strict`:
|
38
38
|
Only list newer versions allowed by your Gemfile requirements.
|
39
39
|
|
40
|
-
* `--parseable`:
|
40
|
+
* `--parseable`, `--porcelain`:
|
41
41
|
Use minimal formatting for more parseable output.
|
42
42
|
|
43
43
|
* `--group`:
|
@@ -65,3 +65,8 @@ machine and check in the gems. For instance, you can run
|
|
65
65
|
`bundle package` on an identical staging box during your
|
66
66
|
staging process, and check in the `vendor/cache` before
|
67
67
|
deploying to production.
|
68
|
+
|
69
|
+
By default, [bundle package(1)][bundle-package] fetches and also
|
70
|
+
installs the gems to the default location. To package the
|
71
|
+
dependencies to `vendor/cache` without installing them to the
|
72
|
+
local install location, you can run `bundle package --no-install`.
|
@@ -0,0 +1,34 @@
|
|
1
|
+
bundle-pristine(1) -- Restores installed gems to their pristine condition
|
2
|
+
===========================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bundle pristine`
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
`pristine` restores the installed gems in the bundle to their pristine condition
|
11
|
+
using the local gem cache from RubyGems. For git gems, a forced checkout will be performed.
|
12
|
+
|
13
|
+
For further explanation, `bundle pristine` ignores unpacked files on disk. In other
|
14
|
+
words, this command utilizes the local `.gem` cache or the gem's git repository
|
15
|
+
as if one were installing from scratch.
|
16
|
+
|
17
|
+
Note: the Bundler gem cannot be restored to its original state with `pristine`.
|
18
|
+
One also cannot use `bundle pristine` on gems with a 'path' option in the Gemfile,
|
19
|
+
because bundler has no original copy it can restore from.
|
20
|
+
|
21
|
+
When is it practical to use `bundle pristine`?
|
22
|
+
|
23
|
+
It comes in handy when a developer is debugging a gem. `bundle pristine` is a
|
24
|
+
great way to get rid of experimental changes to a gem that one may not want.
|
25
|
+
|
26
|
+
Why use `bundle pristine` over `gem pristine --all`?
|
27
|
+
|
28
|
+
Both commands are very similar.
|
29
|
+
For context: `bundle pristine`, without arguments, cleans all gems from the lockfile.
|
30
|
+
Meanwhile, `gem pristine --all` cleans all installed gems for that Ruby version.
|
31
|
+
|
32
|
+
If a developer forgets which gems in their project they might
|
33
|
+
have been debugging, the Rubygems `gem pristine [GEMNAME]` command may be inconvenient.
|
34
|
+
One can avoid waiting for `gem pristine --all`, and instead run `bundle pristine`.
|
@@ -0,0 +1,20 @@
|
|
1
|
+
bundle-show(1) -- Shows all the gems in your bundle, or the path to a gem
|
2
|
+
=========================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bundle show` [GEM]
|
7
|
+
[--paths]
|
8
|
+
|
9
|
+
## DESCRIPTION
|
10
|
+
|
11
|
+
Without the [GEM] option, `show` will print a list of the names and versions of
|
12
|
+
all gems that are required by your `Gemfile(5)`.
|
13
|
+
|
14
|
+
Calling show with [GEM] will list the exact location of that gem on your
|
15
|
+
machine.
|
16
|
+
|
17
|
+
## OPTIONS
|
18
|
+
|
19
|
+
* `--paths`:
|
20
|
+
List the paths of all gems that are required by your `Gemfile(5)`.
|
@@ -28,7 +28,7 @@ gem.
|
|
28
28
|
|
29
29
|
## OPTIONS
|
30
30
|
|
31
|
-
* `--group=<name
|
31
|
+
* `--group=<name>`, `-g=[<name>]`:
|
32
32
|
Only update the gems in the specified group. For instance, you can update all gems
|
33
33
|
in the development group with `bundle update --group development`. You can also
|
34
34
|
call `bundle update rails --group test` to update the rails gem and all gems in
|
@@ -51,8 +51,11 @@ gem.
|
|
51
51
|
* `--full-index`:
|
52
52
|
Fall back to using the single-file index of all gems.
|
53
53
|
|
54
|
-
* `--jobs`:
|
55
|
-
Specify the number of jobs to run in parallel.
|
54
|
+
* `--jobs=[<number>]`, `-j[<number>]`:
|
55
|
+
Specify the number of jobs to run in parallel. The default is `1`.
|
56
|
+
|
57
|
+
* `--retry=[<number>]`:
|
58
|
+
Retry failed network or git requests for <number> times.
|
56
59
|
|
57
60
|
* `--quiet`:
|
58
61
|
Only output warnings and errors.
|
@@ -0,0 +1,30 @@
|
|
1
|
+
bundle-viz(1) -- Generates a visual dependency graph for your Gemfile
|
2
|
+
=====================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bundle viz` [--file=FILE]
|
7
|
+
[--format=FORMAT]
|
8
|
+
[--requirements]
|
9
|
+
[--version]
|
10
|
+
[--without=GROUP GROUP]
|
11
|
+
|
12
|
+
## DESCRIPTION
|
13
|
+
|
14
|
+
`viz` generates a PNG file of the current `Gemfile(5)` as a dependency graph.
|
15
|
+
`viz` requires the ruby-graphviz gem (and its dependencies).
|
16
|
+
|
17
|
+
The associated gems must also be installed via `bundle install(1)`.
|
18
|
+
|
19
|
+
## OPTIONS
|
20
|
+
|
21
|
+
* `--file`, `-f`:
|
22
|
+
The name to use for the generated file. See `--format` option
|
23
|
+
* `--format`, `-F`:
|
24
|
+
This is output format option. Supported format is png, jpg, svg, dot ...
|
25
|
+
* `--requirements`, `-R`:
|
26
|
+
Set to show the version of each required dependency.
|
27
|
+
* `--version`, `-v`:
|
28
|
+
Set to show each gem version.
|
29
|
+
* `--without`, `-W`:
|
30
|
+
Exclude gems that are part of the specified named group.
|
data/bundler/man/bundle.ronn
CHANGED
@@ -18,7 +18,10 @@ started, and Gemfile(5) for more information on the `Gemfile` format.
|
|
18
18
|
* `--no-color`:
|
19
19
|
Print all output without color
|
20
20
|
|
21
|
-
* `--
|
21
|
+
* `--retry`, `-r`:
|
22
|
+
Specify the number of times you wish to attempt network commands
|
23
|
+
|
24
|
+
* `--verbose`, `-V`:
|
22
25
|
Print out additional logging information
|
23
26
|
|
24
27
|
## BUNDLE COMMANDS
|
@@ -48,6 +51,12 @@ We divide `bundle` subcommands into primary commands and utilities.
|
|
48
51
|
|
49
52
|
## UTILITIES
|
50
53
|
|
54
|
+
* `bundle add(1)`:
|
55
|
+
Add the named gem to the Gemfile and run `bundle install`
|
56
|
+
|
57
|
+
* `bundle binstubs(1)`:
|
58
|
+
Generate binstubs for executables in a gem
|
59
|
+
|
51
60
|
* `bundle check(1)`:
|
52
61
|
Determine whether the requirements for your application are installed
|
53
62
|
and available to bundler
|
@@ -91,27 +100,9 @@ When running a command that isn't listed in PRIMARY COMMANDS or UTILITIES,
|
|
91
100
|
Bundler will try to find an executable on your path named `bundler-<command>`
|
92
101
|
and execute it, passing down any extra arguments to it.
|
93
102
|
|
94
|
-
## BUNDLER TRAMPOLINING
|
95
|
-
|
96
|
-
Bundler includes a feature called trampolining, designed to allow a single
|
97
|
-
developer to work on multiple projects, each on different Bundler versions.
|
98
|
-
The trampoline will infer the correct version of Bundler to use for each project
|
99
|
-
and load that version instead of the version directly invoked (which is almost
|
100
|
-
always the newest version installed locally).
|
101
|
-
|
102
|
-
Bundler by default will use the Bundler version in the current directory to
|
103
|
-
determine the version to trampoline to, reading from the `BUNDLED WITH` section.
|
104
|
-
However, if the `BUNDLER_VERSION` environment variable is set, that version will
|
105
|
-
override the lockfile inference and can be used in directories without a
|
106
|
-
lockfile.
|
107
|
-
|
108
|
-
Until the target version is Bundler 2 or later, `BUNDLE_TRAMPOLINE_FORCE` must
|
109
|
-
be set for the trampoline to be used. Additionally, `BUNDLE_TRAMPOLINE_DISABLE` can
|
110
|
-
be set to completely disable the trampoline.
|
111
|
-
|
112
103
|
## OBSOLETE
|
113
104
|
|
114
105
|
These commands are obsolete and should no longer be used
|
115
106
|
|
116
107
|
* `bundle cache(1)`
|
117
|
-
* `bundle
|
108
|
+
* `bundle show(1)`
|
data/bundler/man/gemfile.5.ronn
CHANGED
@@ -30,7 +30,7 @@ Sources are checked for gems following the heuristics described in
|
|
30
30
|
will print a warning after installing the gem indicating which source was used,
|
31
31
|
and listing the other sources where the gem is available. A specific source can
|
32
32
|
be selected for gems that need to use a non-standard repository, suppressing
|
33
|
-
this warning, by using the [`:source` option](#SOURCE
|
33
|
+
this warning, by using the [`:source` option](#SOURCE) or a
|
34
34
|
[`source` block](#BLOCK-FORM-OF-SOURCE-GIT-PATH-GROUP-and-PLATFORMS).
|
35
35
|
|
36
36
|
### CREDENTIALS
|
@@ -69,6 +69,22 @@ the Ruby version that the engine is compatible with.
|
|
69
69
|
Each application _may_ specify a Ruby engine. If an engine is specified, an
|
70
70
|
engine version _must_ also be specified.
|
71
71
|
|
72
|
+
What exactly is an Engine?
|
73
|
+
- A Ruby engine is an implementation of the Ruby language.
|
74
|
+
|
75
|
+
- For background: the reference or original implementation of the Ruby
|
76
|
+
programming language is called
|
77
|
+
[Matz's Ruby Interpreter](https://en.wikipedia.org/wiki/Ruby_MRI), or MRI
|
78
|
+
for short. This is named after Ruby creator Yukihiro Matsumoto,
|
79
|
+
also known as Matz. MRI is also known as CRuby, because it is written in C.
|
80
|
+
MRI is the most widely used Ruby engine.
|
81
|
+
|
82
|
+
- [Other implementations](https://www.ruby-lang.org/en/about/) of Ruby exist.
|
83
|
+
Some of the more well-known implementations include
|
84
|
+
[Rubinius](https://rubinius.com/), and [JRuby](http://jruby.org/).
|
85
|
+
Rubinius is an alternative implementation of Ruby written in Ruby.
|
86
|
+
JRuby is an implementation of Ruby on the JVM, short for Java Virtual Machine.
|
87
|
+
|
72
88
|
### ENGINE VERSION
|
73
89
|
|
74
90
|
Each application _may_ specify a Ruby engine version. If an engine version is
|
@@ -173,78 +189,38 @@ There are a number of `Gemfile` platforms:
|
|
173
189
|
|
174
190
|
* `ruby`:
|
175
191
|
C Ruby (MRI) or Rubinius, but `NOT` Windows
|
176
|
-
* `ruby_18`:
|
177
|
-
_ruby_ `AND` version 1.8
|
178
|
-
* `ruby_19`:
|
179
|
-
_ruby_ `AND` version 1.9
|
180
|
-
* `ruby_20`:
|
181
|
-
_ruby_ `AND` version 2.0
|
182
|
-
* `ruby_21`:
|
183
|
-
_ruby_ `AND` version 2.1
|
184
|
-
* `ruby_22`:
|
185
|
-
_ruby_ `AND` version 2.2
|
186
|
-
* `ruby_23`:
|
187
|
-
_ruby_ `AND` version 2.3
|
188
|
-
* `ruby_24`:
|
189
|
-
_ruby_ `AND` version 2.4
|
190
|
-
* `ruby_25`:
|
191
|
-
_ruby_ `AND` version 2.5
|
192
192
|
* `mri`:
|
193
193
|
Same as _ruby_, but not Rubinius
|
194
|
-
* `
|
195
|
-
|
196
|
-
* `
|
197
|
-
|
198
|
-
* `mri_20`:
|
199
|
-
_mri_ `AND` version 2.0
|
200
|
-
* `mri_21`:
|
201
|
-
_mri_ `AND` version 2.1
|
202
|
-
* `mri_22`:
|
203
|
-
_mri_ `AND` version 2.2
|
204
|
-
* `mri_23`:
|
205
|
-
_mri_ `AND` version 2.3
|
206
|
-
* `mri_24`:
|
207
|
-
_mri_ `AND` version 2.4
|
208
|
-
* `mri_25`:
|
209
|
-
_mri_ `AND` version 2.5
|
194
|
+
* `mingw`:
|
195
|
+
Windows 32 bit 'mingw32' platform (aka RubyInstaller)
|
196
|
+
* `x64_mingw`:
|
197
|
+
Windows 64 bit 'mingw32' platform (aka RubyInstaller x64)
|
210
198
|
* `rbx`:
|
211
199
|
Same as _ruby_, but only Rubinius (not MRI)
|
212
200
|
* `jruby`:
|
213
201
|
JRuby
|
214
202
|
* `mswin`:
|
215
203
|
Windows
|
204
|
+
|
205
|
+
You can restrict further by platform and version for all platforms *except* for
|
206
|
+
`rbx`, `jruby`, and `mswin`.
|
207
|
+
|
208
|
+
To specify a version in addition to a platform, append the version number without
|
209
|
+
the delimiter to the platform. For example, to specify that a gem should only be
|
210
|
+
used on platforms with Ruby 2.3, use:
|
211
|
+
|
212
|
+
ruby_23
|
213
|
+
|
214
|
+
The full list of platforms and supported versions includes:
|
215
|
+
|
216
|
+
* `ruby`:
|
217
|
+
1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5
|
218
|
+
* `mri`:
|
219
|
+
1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5
|
216
220
|
* `mingw`:
|
217
|
-
|
218
|
-
* `mingw_18`:
|
219
|
-
_mingw_ `AND` version 1.8
|
220
|
-
* `mingw_19`:
|
221
|
-
_mingw_ `AND` version 1.9
|
222
|
-
* `mingw_20`:
|
223
|
-
_mingw_ `AND` version 2.0
|
224
|
-
* `mingw_21`:
|
225
|
-
_mingw_ `AND` version 2.1
|
226
|
-
* `mingw_22`:
|
227
|
-
_mingw_ `AND` version 2.2
|
228
|
-
* `mingw_23`:
|
229
|
-
_mingw_ `AND` version 2.3
|
230
|
-
* `mingw_24`:
|
231
|
-
_mingw_ `AND` version 2.4
|
232
|
-
* `mingw_25`:
|
233
|
-
_mingw_ `AND` version 2.5
|
221
|
+
1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5
|
234
222
|
* `x64_mingw`:
|
235
|
-
|
236
|
-
* `x64_mingw_20`:
|
237
|
-
_x64_mingw_ `AND` version 2.0
|
238
|
-
* `x64_mingw_21`:
|
239
|
-
_x64_mingw_ `AND` version 2.1
|
240
|
-
* `x64_mingw_22`:
|
241
|
-
_x64_mingw_ `AND` version 2.2
|
242
|
-
* `x64_mingw_23`:
|
243
|
-
_x64_mingw_ `AND` version 2.3
|
244
|
-
* `x64_mingw_24`:
|
245
|
-
_x64_mingw_ `AND` version 2.4
|
246
|
-
* `x64_mingw_25`:
|
247
|
-
_x64_mingw_ `AND` version 2.5
|
223
|
+
2.0, 2.1, 2.2, 2.3, 2.4, 2.5
|
248
224
|
|
249
225
|
As with groups, you can specify one or more platforms:
|
250
226
|
|
@@ -273,7 +249,7 @@ back on global sources using the ordering described in [SOURCE PRIORITY][].
|
|
273
249
|
|
274
250
|
Selecting a specific source repository this way also suppresses the ambiguous
|
275
251
|
gem warning described above in
|
276
|
-
[GLOBAL SOURCES (#source)](#GLOBAL-SOURCES
|
252
|
+
[GLOBAL SOURCES (#source)](#GLOBAL-SOURCES).
|
277
253
|
|
278
254
|
### GIT
|
279
255
|
|
@@ -327,7 +303,17 @@ Git repositories support a number of additional options.
|
|
327
303
|
* `branch`, `tag`, and `ref`:
|
328
304
|
You `MUST` only specify at most one of these options. The default
|
329
305
|
is `:branch => "master"`
|
306
|
+
* For example:
|
307
|
+
|
308
|
+
git "https://github.com/rails/rails.git", :branch => "5-0-stable" do
|
309
|
+
|
310
|
+
git "https://github.com/rails/rails.git", :tag => "v5.0.0" do
|
311
|
+
|
312
|
+
git "https://github.com/rails/rails.git", :ref => "4aded" do
|
313
|
+
|
330
314
|
* `submodules`:
|
315
|
+
For reference, a [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
|
316
|
+
lets you have another git repository within a subfolder of your repository.
|
331
317
|
Specify `:submodules => true` to cause bundler to expand any
|
332
318
|
submodules included in the git repository
|
333
319
|
|
@@ -479,6 +465,11 @@ software is installed or some other conditions are met.
|
|
479
465
|
|
480
466
|
## GEMSPEC
|
481
467
|
|
468
|
+
The [.gemspec](http://guides.rubygems.org/specification-reference/) file is where
|
469
|
+
you provide metadata about your gem to Rubygems. Some required Gemspec
|
470
|
+
attributes include the name, description, and homepage of your gem. This is
|
471
|
+
also where you specify the dependencies your gem needs to run.
|
472
|
+
|
482
473
|
If you wish to use Bundler to help install dependencies for a gem while it is
|
483
474
|
being developed, use the `gemspec` method to pull in the dependencies listed in
|
484
475
|
the `.gemspec` file.
|
data/lib/rubygems.rb
CHANGED
@@ -10,7 +10,7 @@ require 'rbconfig'
|
|
10
10
|
require 'thread'
|
11
11
|
|
12
12
|
module Gem
|
13
|
-
VERSION = "2.
|
13
|
+
VERSION = "2.7.0"
|
14
14
|
end
|
15
15
|
|
16
16
|
# Must be first since it unloads the prelude from 1.9.2
|
@@ -39,7 +39,7 @@ require 'rubygems/errors'
|
|
39
39
|
# Further RubyGems documentation can be found at:
|
40
40
|
#
|
41
41
|
# * {RubyGems Guides}[http://guides.rubygems.org]
|
42
|
-
# * {RubyGems API}[http://
|
42
|
+
# * {RubyGems API}[http://www.rubydoc.info/github/rubygems/rubygems] (also available from
|
43
43
|
# <tt>gem server</tt>)
|
44
44
|
#
|
45
45
|
# == RubyGems Plugins
|
@@ -47,15 +47,16 @@ require 'rubygems/errors'
|
|
47
47
|
# As of RubyGems 1.3.2, RubyGems will load plugins installed in gems or
|
48
48
|
# $LOAD_PATH. Plugins must be named 'rubygems_plugin' (.rb, .so, etc) and
|
49
49
|
# placed at the root of your gem's #require_path. Plugins are discovered via
|
50
|
-
# Gem::find_files then loaded. Take care when implementing a plugin as your
|
50
|
+
# Gem::find_files and then loaded. Take care when implementing a plugin as your
|
51
51
|
# plugin file may be loaded multiple times if multiple versions of your gem
|
52
52
|
# are installed.
|
53
53
|
#
|
54
|
-
# For an example plugin, see the
|
54
|
+
# For an example plugin, see the {Graph gem}[https://github.com/seattlerb/graph]
|
55
|
+
# which adds a `gem graph` command.
|
55
56
|
#
|
56
57
|
# == RubyGems Defaults, Packaging
|
57
58
|
#
|
58
|
-
# RubyGems defaults are stored in rubygems/defaults.rb. If you're packaging
|
59
|
+
# RubyGems defaults are stored in lib/rubygems/defaults.rb. If you're packaging
|
59
60
|
# RubyGems or implementing Ruby you can change RubyGems' defaults.
|
60
61
|
#
|
61
62
|
# For RubyGems packagers, provide lib/rubygems/defaults/operating_system.rb
|
@@ -65,7 +66,7 @@ require 'rubygems/errors'
|
|
65
66
|
# override any defaults from lib/rubygems/defaults.rb.
|
66
67
|
#
|
67
68
|
# If you need RubyGems to perform extra work on install or uninstall, your
|
68
|
-
# defaults override file can set pre
|
69
|
+
# defaults override file can set pre/post install and uninstall hooks.
|
69
70
|
# See Gem::pre_install, Gem::pre_uninstall, Gem::post_install,
|
70
71
|
# Gem::post_uninstall.
|
71
72
|
#
|
@@ -106,6 +107,8 @@ require 'rubygems/errors'
|
|
106
107
|
#
|
107
108
|
# (If your name is missing, PLEASE let us know!)
|
108
109
|
#
|
110
|
+
# == License
|
111
|
+
#
|
109
112
|
# See {LICENSE.txt}[rdoc-ref:lib/rubygems/LICENSE.txt] for permissions.
|
110
113
|
#
|
111
114
|
# Thanks!
|
@@ -130,6 +133,7 @@ module Gem
|
|
130
133
|
|
131
134
|
GEM_DEP_FILES = %w[
|
132
135
|
gem.deps.rb
|
136
|
+
gems.rb
|
133
137
|
Gemfile
|
134
138
|
Isolate
|
135
139
|
]
|
@@ -159,7 +163,7 @@ module Gem
|
|
159
163
|
# these are defined in Ruby 1.8.7, hence the need for this convoluted setup.
|
160
164
|
|
161
165
|
READ_BINARY_ERRORS = begin
|
162
|
-
read_binary_errors = [Errno::EACCES]
|
166
|
+
read_binary_errors = [Errno::EACCES, Errno::EROFS]
|
163
167
|
read_binary_errors << Errno::ENOTSUP if Errno.const_defined?(:ENOTSUP)
|
164
168
|
read_binary_errors
|
165
169
|
end.freeze
|
@@ -174,6 +178,8 @@ module Gem
|
|
174
178
|
write_binary_errors
|
175
179
|
end.freeze
|
176
180
|
|
181
|
+
USE_BUNDLER_FOR_GEMDEPS = true # :nodoc:
|
182
|
+
|
177
183
|
@@win_platform = nil
|
178
184
|
|
179
185
|
@configuration = nil
|
@@ -266,17 +272,22 @@ module Gem
|
|
266
272
|
|
267
273
|
return loaded if loaded && dep.matches_spec?(loaded)
|
268
274
|
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
275
|
+
find_specs = proc { dep.matching_specs(true) }
|
276
|
+
if dep.to_s == "bundler (>= 0.a)"
|
277
|
+
specs = Gem::BundlerVersionFinder.without_filtering(&find_specs)
|
278
|
+
else
|
279
|
+
specs = find_specs.call
|
280
|
+
end
|
273
281
|
|
274
282
|
specs = specs.find_all { |spec|
|
275
283
|
spec.executables.include? exec_name
|
276
284
|
} if exec_name
|
277
285
|
|
278
286
|
unless spec = specs.first
|
279
|
-
msg = "can't find gem #{
|
287
|
+
msg = "can't find gem #{dep} with executable #{exec_name}"
|
288
|
+
if name == "bundler" && bundler_message = Gem::BundlerVersionFinder.missing_version_message
|
289
|
+
msg = bundler_message
|
290
|
+
end
|
280
291
|
raise Gem::GemNotFoundException, msg
|
281
292
|
end
|
282
293
|
|
@@ -297,7 +308,10 @@ module Gem
|
|
297
308
|
|
298
309
|
def self.activate_bin_path name, exec_name, requirement # :nodoc:
|
299
310
|
spec = find_spec_for_exe name, exec_name, [requirement]
|
300
|
-
Gem::LOADED_SPECS_MUTEX.synchronize
|
311
|
+
Gem::LOADED_SPECS_MUTEX.synchronize do
|
312
|
+
spec.activate
|
313
|
+
finish_resolve
|
314
|
+
end
|
301
315
|
spec.bin_file exec_name
|
302
316
|
end
|
303
317
|
|
@@ -356,12 +370,16 @@ module Gem
|
|
356
370
|
# package is not available as a gem, return nil.
|
357
371
|
|
358
372
|
def self.datadir(gem_name)
|
359
|
-
# TODO: deprecate
|
360
373
|
spec = @loaded_specs[gem_name]
|
361
374
|
return nil if spec.nil?
|
362
375
|
spec.datadir
|
363
376
|
end
|
364
377
|
|
378
|
+
class << self
|
379
|
+
extend Gem::Deprecate
|
380
|
+
deprecate :datadir, "spec.datadir", 2016, 10
|
381
|
+
end
|
382
|
+
|
365
383
|
##
|
366
384
|
# A Zlib::Deflate.deflate wrapper
|
367
385
|
|
@@ -594,7 +612,6 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
594
612
|
# Zlib::GzipReader wrapper that unzips +data+.
|
595
613
|
|
596
614
|
def self.gunzip(data)
|
597
|
-
require 'rubygems/util'
|
598
615
|
Gem::Util.gunzip data
|
599
616
|
end
|
600
617
|
|
@@ -602,7 +619,6 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
602
619
|
# Zlib::GzipWriter wrapper that zips +data+.
|
603
620
|
|
604
621
|
def self.gzip(data)
|
605
|
-
require 'rubygems/util'
|
606
622
|
Gem::Util.gzip data
|
607
623
|
end
|
608
624
|
|
@@ -610,7 +626,6 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
610
626
|
# A Zlib::Inflate#inflate wrapper
|
611
627
|
|
612
628
|
def self.inflate(data)
|
613
|
-
require 'rubygems/util'
|
614
629
|
Gem::Util.inflate data
|
615
630
|
end
|
616
631
|
|
@@ -716,9 +731,20 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
716
731
|
|
717
732
|
##
|
718
733
|
# The file name and line number of the caller of the caller of this method.
|
734
|
+
#
|
735
|
+
# +depth+ is how many layers up the call stack it should go.
|
736
|
+
#
|
737
|
+
# e.g.,
|
738
|
+
#
|
739
|
+
# def a; Gem.location_of_caller; end
|
740
|
+
# a #=> ["x.rb", 2] # (it'll vary depending on file name and line number)
|
741
|
+
#
|
742
|
+
# def b; c; end
|
743
|
+
# def c; Gem.location_of_caller(2); end
|
744
|
+
# b #=> ["x.rb", 6] # (it'll vary depending on file name and line number)
|
719
745
|
|
720
|
-
def self.location_of_caller
|
721
|
-
caller[
|
746
|
+
def self.location_of_caller(depth = 1)
|
747
|
+
caller[depth] =~ /(.*?):(\d+).*?$/i
|
722
748
|
file = $1
|
723
749
|
lineno = $2.to_i
|
724
750
|
|
@@ -1149,8 +1175,6 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
1149
1175
|
path = path.dup
|
1150
1176
|
|
1151
1177
|
if path == "-" then
|
1152
|
-
require 'rubygems/util'
|
1153
|
-
|
1154
1178
|
Gem::Util.traverse_parents Dir.pwd do |directory|
|
1155
1179
|
dep_file = GEM_DEP_FILES.find { |f| File.file?(f) }
|
1156
1180
|
|
@@ -1169,18 +1193,36 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
1169
1193
|
raise ArgumentError, "Unable to find gem dependencies file at #{path}"
|
1170
1194
|
end
|
1171
1195
|
|
1172
|
-
|
1173
|
-
|
1196
|
+
if USE_BUNDLER_FOR_GEMDEPS
|
1197
|
+
|
1198
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path(path)
|
1199
|
+
require 'rubygems/user_interaction'
|
1200
|
+
Gem::DefaultUserInteraction.use_ui(ui) do
|
1201
|
+
require "bundler"
|
1202
|
+
@gemdeps = Bundler.setup
|
1203
|
+
Bundler.ui = nil
|
1204
|
+
@gemdeps.requested_specs.map(&:to_spec).sort_by(&:name)
|
1205
|
+
end
|
1206
|
+
|
1207
|
+
else
|
1208
|
+
|
1209
|
+
rs = Gem::RequestSet.new
|
1210
|
+
@gemdeps = rs.load_gemdeps path
|
1211
|
+
|
1212
|
+
rs.resolve_current.map do |s|
|
1213
|
+
s.full_spec.tap(&:activate)
|
1214
|
+
end
|
1174
1215
|
|
1175
|
-
rs.resolve_current.map do |s|
|
1176
|
-
sp = s.full_spec
|
1177
|
-
sp.activate
|
1178
|
-
sp
|
1179
1216
|
end
|
1180
|
-
rescue
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1217
|
+
rescue => e
|
1218
|
+
case e
|
1219
|
+
when Gem::LoadError, Gem::UnsatisfiableDependencyError, (defined?(Bundler::GemNotFound) ? Bundler::GemNotFound : Gem::LoadError)
|
1220
|
+
warn e.message
|
1221
|
+
warn "You may need to `gem install -g` to install missing gems"
|
1222
|
+
warn ""
|
1223
|
+
else
|
1224
|
+
raise
|
1225
|
+
end
|
1184
1226
|
end
|
1185
1227
|
|
1186
1228
|
class << self
|
@@ -1226,6 +1268,8 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
1226
1268
|
prefix_pattern = /^(#{prefix_group})/
|
1227
1269
|
end
|
1228
1270
|
|
1271
|
+
suffix_pattern = /#{Regexp.union(Gem.suffixes)}\z/
|
1272
|
+
|
1229
1273
|
spec.files.each do |file|
|
1230
1274
|
if new_format
|
1231
1275
|
file = file.sub(prefix_pattern, "")
|
@@ -1233,6 +1277,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
1233
1277
|
end
|
1234
1278
|
|
1235
1279
|
@path_to_default_spec_map[file] = spec
|
1280
|
+
@path_to_default_spec_map[file.sub(suffix_pattern, "")] = spec
|
1236
1281
|
end
|
1237
1282
|
end
|
1238
1283
|
|
@@ -1240,11 +1285,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
1240
1285
|
# Find a Gem::Specification of default gem from +path+
|
1241
1286
|
|
1242
1287
|
def find_unresolved_default_spec(path)
|
1243
|
-
|
1244
|
-
spec = @path_to_default_spec_map["#{path}#{suffix}"]
|
1245
|
-
return spec if spec
|
1246
|
-
end
|
1247
|
-
nil
|
1288
|
+
@path_to_default_spec_map[path]
|
1248
1289
|
end
|
1249
1290
|
|
1250
1291
|
##
|
@@ -1315,6 +1356,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
1315
1356
|
|
1316
1357
|
MARSHAL_SPEC_DIR = "quick/Marshal.#{Gem.marshal_version}/"
|
1317
1358
|
|
1359
|
+
autoload :BundlerVersionFinder, 'rubygems/bundler_version_finder'
|
1318
1360
|
autoload :ConfigFile, 'rubygems/config_file'
|
1319
1361
|
autoload :Dependency, 'rubygems/dependency'
|
1320
1362
|
autoload :DependencyList, 'rubygems/dependency_list'
|
@@ -1330,6 +1372,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
1330
1372
|
autoload :SourceList, 'rubygems/source_list'
|
1331
1373
|
autoload :SpecFetcher, 'rubygems/spec_fetcher'
|
1332
1374
|
autoload :Specification, 'rubygems/specification'
|
1375
|
+
autoload :Util, 'rubygems/util'
|
1333
1376
|
autoload :Version, 'rubygems/version'
|
1334
1377
|
|
1335
1378
|
require "rubygems/specification"
|