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,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bundler
|
4
|
+
class CLI::Add
|
5
|
+
def initialize(options, gem_name)
|
6
|
+
@gem_name = gem_name
|
7
|
+
@options = options
|
8
|
+
@options[:group] = @options[:group].split(",").map(&:strip) if !@options[:group].nil? && !@options[:group].empty?
|
9
|
+
end
|
10
|
+
|
11
|
+
def run
|
12
|
+
version = @options[:version].nil? ? nil : @options[:version].split(",").map(&:strip)
|
13
|
+
|
14
|
+
unless version.nil?
|
15
|
+
version.each do |v|
|
16
|
+
raise InvalidOption, "Invalid gem requirement pattern '#{v}'" unless Gem::Requirement::PATTERN =~ v.to_s
|
17
|
+
end
|
18
|
+
end
|
19
|
+
dependency = Bundler::Dependency.new(@gem_name, version, @options)
|
20
|
+
|
21
|
+
Injector.inject([dependency], :conservative_versioning => @options[:version].nil?) # Perform conservative versioning only when version is not specified
|
22
|
+
Installer.install(Bundler.root, Bundler.definition)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -1,5 +1,4 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
require "bundler/cli/common"
|
3
2
|
|
4
3
|
module Bundler
|
5
4
|
class CLI::Binstubs
|
@@ -11,8 +10,10 @@ module Bundler
|
|
11
10
|
|
12
11
|
def run
|
13
12
|
Bundler.definition.validate_runtime!
|
14
|
-
|
15
|
-
|
13
|
+
path_option = options["path"]
|
14
|
+
path_option = nil if path_option && path_option.empty?
|
15
|
+
Bundler.settings.set_command_option :bin, path_option if options["path"]
|
16
|
+
Bundler.settings.set_command_option_if_given :shebang, options["shebang"]
|
16
17
|
installer = Installer.new(Bundler.root, Bundler.definition)
|
17
18
|
|
18
19
|
if gems.empty?
|
@@ -28,10 +29,11 @@ module Bundler
|
|
28
29
|
)
|
29
30
|
end
|
30
31
|
|
31
|
-
if
|
32
|
-
Bundler.ui.warn
|
33
|
-
|
34
|
-
|
32
|
+
if options[:standalone]
|
33
|
+
next Bundler.ui.warn("Sorry, Bundler can only be run via RubyGems.") if gem_name == "bundler"
|
34
|
+
Bundler.settings.temporary(:path => (Bundler.settings[:path] || Bundler.root)) do
|
35
|
+
installer.generate_standalone_bundler_executable_stubs(spec)
|
36
|
+
end
|
35
37
|
else
|
36
38
|
installer.generate_bundler_executable_stubs(spec, :force => options[:force], :binstubs_cmd => true)
|
37
39
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module Bundler
|
3
4
|
class CLI::Cache
|
4
5
|
attr_reader :options
|
@@ -10,9 +11,9 @@ module Bundler
|
|
10
11
|
Bundler.definition.validate_runtime!
|
11
12
|
Bundler.definition.resolve_with_cache!
|
12
13
|
setup_cache_all
|
13
|
-
Bundler.settings
|
14
|
+
Bundler.settings.set_command_option_if_given :cache_all_platforms, options["all-platforms"]
|
14
15
|
Bundler.load.cache
|
15
|
-
Bundler.settings
|
16
|
+
Bundler.settings.set_command_option_if_given :no_prune, options["no-prune"]
|
16
17
|
Bundler.load.lock
|
17
18
|
rescue GemNotFound => e
|
18
19
|
Bundler.ui.error(e.message)
|
@@ -23,9 +24,9 @@ module Bundler
|
|
23
24
|
private
|
24
25
|
|
25
26
|
def setup_cache_all
|
26
|
-
Bundler.settings
|
27
|
+
Bundler.settings.set_command_option_if_given :cache_all, options[:all]
|
27
28
|
|
28
|
-
if Bundler.definition.has_local_dependencies? && !Bundler.
|
29
|
+
if Bundler.definition.has_local_dependencies? && !Bundler.feature_flag.cache_all?
|
29
30
|
Bundler.ui.warn "Your Gemfile contains path and git dependencies. If you want " \
|
30
31
|
"to package them as well, please pass the --all flag. This will be the default " \
|
31
32
|
"on Bundler 2.0."
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module Bundler
|
3
4
|
class CLI::Check
|
4
5
|
attr_reader :options
|
@@ -8,10 +9,7 @@ module Bundler
|
|
8
9
|
end
|
9
10
|
|
10
11
|
def run
|
11
|
-
|
12
|
-
Bundler.settings[:path] = File.expand_path(options[:path])
|
13
|
-
Bundler.settings[:disable_shared_gems] = true
|
14
|
-
end
|
12
|
+
Bundler.settings.set_command_option_if_given :path, options[:path]
|
15
13
|
|
16
14
|
begin
|
17
15
|
definition = Bundler.definition
|
@@ -28,7 +26,7 @@ module Bundler
|
|
28
26
|
not_installed.each {|s| Bundler.ui.error " * #{s.name} (#{s.version})" }
|
29
27
|
Bundler.ui.warn "Install missing gems with `bundle install`"
|
30
28
|
exit 1
|
31
|
-
elsif !Bundler.default_lockfile.
|
29
|
+
elsif !Bundler.default_lockfile.file? && Bundler.frozen?
|
32
30
|
Bundler.ui.error "This bundle has been frozen, but there is no #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} present"
|
33
31
|
exit 1
|
34
32
|
else
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module Bundler
|
3
4
|
class CLI::Clean
|
4
5
|
attr_reader :options
|
@@ -15,12 +16,10 @@ module Bundler
|
|
15
16
|
protected
|
16
17
|
|
17
18
|
def require_path_or_force
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
exit 1
|
23
|
-
end
|
19
|
+
return unless Bundler.use_system_gems? && !options[:force]
|
20
|
+
raise InvalidOption, "Cleaning all the gems on your system is dangerous! " \
|
21
|
+
"If you're sure you want to remove every system gem not in this " \
|
22
|
+
"bundle, run `bundle clean --force`."
|
24
23
|
end
|
25
24
|
end
|
26
25
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module Bundler
|
3
4
|
module CLI::Common
|
4
5
|
def self.output_post_install_messages(messages)
|
@@ -14,12 +15,12 @@ module Bundler
|
|
14
15
|
end
|
15
16
|
|
16
17
|
def self.output_without_groups_message
|
17
|
-
return
|
18
|
+
return if Bundler.settings[:without].empty?
|
18
19
|
Bundler.ui.confirm without_groups_message
|
19
20
|
end
|
20
21
|
|
21
22
|
def self.without_groups_message
|
22
|
-
groups = Bundler.settings
|
23
|
+
groups = Bundler.settings[:without]
|
23
24
|
group_list = [groups[0...-1].join(", "), groups[-1..-1]].
|
24
25
|
reject {|s| s.to_s.empty? }.join(" and ")
|
25
26
|
group_str = (groups.size == 1) ? "group" : "groups"
|
@@ -70,6 +71,13 @@ module Bundler
|
|
70
71
|
message
|
71
72
|
end
|
72
73
|
|
74
|
+
def self.ensure_all_gems_in_lockfile!(names, locked_gems = Bundler.locked_gems)
|
75
|
+
locked_names = locked_gems.specs.map(&:name)
|
76
|
+
names.-(locked_names).each do |g|
|
77
|
+
raise GemNotFound, gem_not_found_message(g, locked_names)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
73
81
|
def self.configure_gem_version_promoter(definition, options)
|
74
82
|
patch_level = patch_level_options(options)
|
75
83
|
raise InvalidOption, "Provide only one of the following options: #{patch_level.join(", ")}" unless patch_level.length <= 1
|
@@ -82,5 +90,13 @@ module Bundler
|
|
82
90
|
def self.patch_level_options(options)
|
83
91
|
[:major, :minor, :patch].select {|v| options.keys.include?(v.to_s) }
|
84
92
|
end
|
93
|
+
|
94
|
+
def self.clean_after_install?
|
95
|
+
clean = Bundler.settings[:clean]
|
96
|
+
return clean unless clean.nil?
|
97
|
+
clean ||= Bundler.feature_flag.auto_clean_without_path? && Bundler.settings[:path].nil?
|
98
|
+
clean &&= !Bundler.use_system_gems?
|
99
|
+
clean
|
100
|
+
end
|
85
101
|
end
|
86
102
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module Bundler
|
3
4
|
class CLI::Config
|
4
5
|
attr_reader :name, :options, :scope, :thor
|
@@ -33,6 +34,13 @@ module Bundler
|
|
33
34
|
end
|
34
35
|
|
35
36
|
if args.empty?
|
37
|
+
if options[:parseable]
|
38
|
+
if value = Bundler.settings[name]
|
39
|
+
Bundler.ui.info("#{name}=#{value}")
|
40
|
+
end
|
41
|
+
return
|
42
|
+
end
|
43
|
+
|
36
44
|
confirm(name)
|
37
45
|
return
|
38
46
|
end
|
@@ -44,11 +52,20 @@ module Bundler
|
|
44
52
|
private
|
45
53
|
|
46
54
|
def confirm_all
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
55
|
+
if @options[:parseable]
|
56
|
+
thor.with_padding do
|
57
|
+
Bundler.settings.all.each do |setting|
|
58
|
+
val = Bundler.settings[setting]
|
59
|
+
Bundler.ui.info "#{setting}=#{val}"
|
60
|
+
end
|
61
|
+
end
|
62
|
+
else
|
63
|
+
Bundler.ui.confirm "Settings are listed in order of priority. The top value will be used.\n"
|
64
|
+
Bundler.settings.all.each do |setting|
|
65
|
+
Bundler.ui.confirm "#{setting}"
|
66
|
+
show_pretty_values_for(setting)
|
67
|
+
Bundler.ui.confirm ""
|
68
|
+
end
|
52
69
|
end
|
53
70
|
end
|
54
71
|
|
@@ -68,7 +85,9 @@ module Bundler
|
|
68
85
|
|
69
86
|
def message
|
70
87
|
locations = Bundler.settings.locations(name)
|
71
|
-
if
|
88
|
+
if @options[:parseable]
|
89
|
+
"#{name}=#{new_value}" if new_value
|
90
|
+
elsif scope == "global"
|
72
91
|
if locations[:local]
|
73
92
|
"Your application has set #{name} to #{locations[:local].inspect}. " \
|
74
93
|
"This will override the global value you are currently setting"
|
@@ -94,7 +113,7 @@ module Bundler
|
|
94
113
|
end
|
95
114
|
|
96
115
|
def valid_scope?(scope)
|
97
|
-
%w
|
116
|
+
%w[delete local global].include?(scope)
|
98
117
|
end
|
99
118
|
end
|
100
119
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module Bundler
|
3
4
|
class CLI::Console
|
4
5
|
attr_reader :options, :group
|
@@ -8,7 +9,7 @@ module Bundler
|
|
8
9
|
end
|
9
10
|
|
10
11
|
def run
|
11
|
-
Bundler::SharedHelpers.major_deprecation "bundle console will be replaced " \
|
12
|
+
Bundler::SharedHelpers.major_deprecation 2, "bundle console will be replaced " \
|
12
13
|
"by `bin/console` generated by `bundle gem <name>`"
|
13
14
|
|
14
15
|
group ? Bundler.require(:default, *(group.split.map!(&:to_sym))) : Bundler.require
|
@@ -1,11 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require "bundler/current_ruby"
|
3
4
|
|
4
5
|
module Bundler
|
5
6
|
class CLI::Exec
|
6
7
|
attr_reader :options, :args, :cmd
|
7
8
|
|
8
|
-
RESERVED_SIGNALS = %w
|
9
|
+
RESERVED_SIGNALS = %w[SEGV BUS ILL FPE VTALRM KILL STOP].freeze
|
9
10
|
|
10
11
|
def initialize(options, args)
|
11
12
|
@options = options
|
@@ -72,7 +73,7 @@ module Bundler
|
|
72
73
|
signals = Signal.list.keys - RESERVED_SIGNALS
|
73
74
|
signals.each {|s| trap(s, "DEFAULT") }
|
74
75
|
Kernel.load(file)
|
75
|
-
rescue SystemExit
|
76
|
+
rescue SystemExit, SignalException
|
76
77
|
raise
|
77
78
|
rescue Exception => e # rubocop:disable Lint/RescueException
|
78
79
|
Bundler.ui = ui
|
@@ -1,7 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require "pathname"
|
3
4
|
|
4
5
|
module Bundler
|
6
|
+
class CLI
|
7
|
+
Bundler.require_thor_actions
|
8
|
+
include Thor::Actions
|
9
|
+
end
|
10
|
+
|
5
11
|
class CLI::Gem
|
6
12
|
TEST_FRAMEWORK_VERSIONS = {
|
7
13
|
"rspec" => "3.0",
|
@@ -13,7 +19,10 @@ module Bundler
|
|
13
19
|
def initialize(options, gem_name, thor)
|
14
20
|
@options = options
|
15
21
|
@gem_name = resolve_name(gem_name)
|
22
|
+
|
16
23
|
@thor = thor
|
24
|
+
thor.behavior = :invoke
|
25
|
+
thor.destination_root = nil
|
17
26
|
|
18
27
|
@name = @gem_name
|
19
28
|
@target = SharedHelpers.pwd.join(gem_name)
|
@@ -29,8 +38,11 @@ module Bundler
|
|
29
38
|
constant_name = name.gsub(/-[_-]*(?![_-]|$)/) { "::" }.gsub(/([_-]+|(::)|^)(.|$)/) { $2.to_s + $3.upcase }
|
30
39
|
constant_array = constant_name.split("::")
|
31
40
|
|
32
|
-
|
33
|
-
|
41
|
+
git_installed = Bundler.git_present?
|
42
|
+
|
43
|
+
git_author_name = git_installed ? `git config user.name`.chomp : ""
|
44
|
+
github_username = git_installed ? `git config github.user`.chomp : ""
|
45
|
+
git_user_email = git_installed ? `git config user.email`.chomp : ""
|
34
46
|
|
35
47
|
config = {
|
36
48
|
:name => name,
|
@@ -39,19 +51,18 @@ module Bundler
|
|
39
51
|
:makefile_path => "#{underscored_name}/#{underscored_name}",
|
40
52
|
:constant_name => constant_name,
|
41
53
|
:constant_array => constant_array,
|
42
|
-
:author =>
|
54
|
+
:author => git_author_name.empty? ? "TODO: Write your name" : git_author_name,
|
43
55
|
:email => git_user_email.empty? ? "TODO: Write your email address" : git_user_email,
|
44
56
|
:test => options[:test],
|
45
57
|
:ext => options[:ext],
|
46
58
|
:exe => options[:exe],
|
47
59
|
:bundler_version => bundler_dependency_version,
|
48
|
-
:
|
60
|
+
:github_username => github_username.empty? ? "[USERNAME]" : github_username
|
49
61
|
}
|
50
62
|
ensure_safe_gem_name(name, constant_array)
|
51
63
|
|
52
64
|
templates = {
|
53
65
|
"Gemfile.tt" => "Gemfile",
|
54
|
-
"gitignore.tt" => ".gitignore",
|
55
66
|
"lib/newgem.rb.tt" => "lib/#{namespaced_path}.rb",
|
56
67
|
"lib/newgem/version.rb.tt" => "lib/#{namespaced_path}/version.rb",
|
57
68
|
"newgem.gemspec.tt" => "#{name}.gemspec",
|
@@ -61,10 +72,12 @@ module Bundler
|
|
61
72
|
"bin/setup.tt" => "bin/setup"
|
62
73
|
}
|
63
74
|
|
64
|
-
executables = %w
|
75
|
+
executables = %w[
|
65
76
|
bin/console
|
66
77
|
bin/setup
|
67
|
-
|
78
|
+
]
|
79
|
+
|
80
|
+
templates.merge!("gitignore.tt" => ".gitignore") if Bundler.git_present?
|
68
81
|
|
69
82
|
if test_framework = ask_and_set_test_framework
|
70
83
|
config[:test] = test_framework
|
@@ -122,23 +135,31 @@ module Bundler
|
|
122
135
|
end
|
123
136
|
|
124
137
|
templates.each do |src, dst|
|
125
|
-
|
138
|
+
destination = target.join(dst)
|
139
|
+
SharedHelpers.filesystem_access(destination) do
|
140
|
+
thor.template("newgem/#{src}", destination, config)
|
141
|
+
end
|
126
142
|
end
|
127
143
|
|
128
144
|
executables.each do |file|
|
129
|
-
|
130
|
-
|
131
|
-
|
145
|
+
SharedHelpers.filesystem_access(target.join(file)) do |path|
|
146
|
+
executable = (path.stat.mode | 0o111)
|
147
|
+
path.chmod(executable)
|
148
|
+
end
|
132
149
|
end
|
133
150
|
|
134
|
-
Bundler.
|
135
|
-
|
136
|
-
|
137
|
-
|
151
|
+
if Bundler.git_present?
|
152
|
+
Bundler.ui.info "Initializing git repo in #{target}"
|
153
|
+
Dir.chdir(target) do
|
154
|
+
`git init`
|
155
|
+
`git add .`
|
156
|
+
end
|
138
157
|
end
|
139
158
|
|
140
159
|
# Open gemspec in editor
|
141
160
|
open_editor(options["edit"], target.join("#{name}.gemspec")) if options[:edit]
|
161
|
+
rescue Errno::EEXIST => e
|
162
|
+
raise GenericSystemCallError.new(e, "There was a conflict while creating the new gem.")
|
142
163
|
end
|
143
164
|
|
144
165
|
private
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bundler
|
4
|
+
class CLI::Info
|
5
|
+
attr_reader :gem_name, :options
|
6
|
+
def initialize(options, gem_name)
|
7
|
+
@options = options
|
8
|
+
@gem_name = gem_name
|
9
|
+
end
|
10
|
+
|
11
|
+
def run
|
12
|
+
spec = spec_for_gem(gem_name)
|
13
|
+
|
14
|
+
spec_not_found(gem_name) unless spec
|
15
|
+
return print_gem_path(spec) if @options[:path]
|
16
|
+
print_gem_info(spec)
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def spec_for_gem(gem_name)
|
22
|
+
spec = Bundler.definition.specs.find {|s| s.name == gem_name }
|
23
|
+
spec || default_gem_spec(gem_name)
|
24
|
+
end
|
25
|
+
|
26
|
+
def default_gem_spec(gem_name)
|
27
|
+
return unless Gem::Specification.respond_to?(:find_all_by_name)
|
28
|
+
gem_spec = Gem::Specification.find_all_by_name(gem_name).last
|
29
|
+
return gem_spec if gem_spec && gem_spec.respond_to?(:default_gem?) && gem_spec.default_gem?
|
30
|
+
end
|
31
|
+
|
32
|
+
def spec_not_found(gem_name)
|
33
|
+
raise GemNotFound, Bundler::CLI::Common.gem_not_found_message(gem_name, Bundler.definition.dependencies)
|
34
|
+
end
|
35
|
+
|
36
|
+
def print_gem_path(spec)
|
37
|
+
Bundler.ui.info spec.full_gem_path
|
38
|
+
end
|
39
|
+
|
40
|
+
def print_gem_info(spec)
|
41
|
+
gem_info = String.new
|
42
|
+
gem_info << " * #{spec.name} (#{spec.version}#{spec.git_version})\n"
|
43
|
+
gem_info << "\tSummary: #{spec.summary}\n" if spec.summary
|
44
|
+
gem_info << "\tHomepage: #{spec.homepage}\n" if spec.homepage
|
45
|
+
gem_info << "\tPath: #{spec.full_gem_path}\n"
|
46
|
+
gem_info << "\tDefault Gem: yes" if spec.respond_to?(:default_gem?) && spec.default_gem?
|
47
|
+
Bundler.ui.info gem_info
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|