rubygems-update 2.6.3 → 2.7.7
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 +5 -5
- data/.travis.yml +17 -34
- data/CODE_OF_CONDUCT.md +36 -33
- data/CONTRIBUTING.rdoc +56 -55
- data/History.txt +467 -10
- data/Manifest.txt +276 -4
- data/POLICIES.rdoc +4 -4
- data/README.md +72 -0
- data/Rakefile +77 -10
- data/appveyor.yml +61 -31
- data/bin/gem +1 -1
- data/bin/update_rubygems +2 -2
- data/bundler/CHANGELOG.md +2910 -0
- data/bundler/CODE_OF_CONDUCT.md +42 -0
- data/bundler/CONTRIBUTING.md +17 -0
- data/bundler/LICENSE.md +23 -0
- data/bundler/README.md +63 -0
- data/bundler/bundler.gemspec +57 -0
- data/bundler/exe/bundle +31 -0
- data/bundler/exe/bundle_ruby +60 -0
- data/bundler/exe/bundler +4 -0
- data/bundler/lib/bundler/build_metadata.rb +36 -0
- data/bundler/lib/bundler/capistrano.rb +22 -0
- data/bundler/lib/bundler/cli/add.rb +25 -0
- data/bundler/lib/bundler/cli/binstubs.rb +43 -0
- data/bundler/lib/bundler/cli/cache.rb +36 -0
- data/bundler/lib/bundler/cli/check.rb +38 -0
- data/bundler/lib/bundler/cli/clean.rb +25 -0
- data/bundler/lib/bundler/cli/common.rb +102 -0
- data/bundler/lib/bundler/cli/config.rb +119 -0
- data/bundler/lib/bundler/cli/console.rb +43 -0
- data/bundler/lib/bundler/cli/doctor.rb +94 -0
- data/bundler/lib/bundler/cli/exec.rb +104 -0
- data/bundler/lib/bundler/cli/gem.rb +252 -0
- data/bundler/lib/bundler/cli/info.rb +50 -0
- data/bundler/lib/bundler/cli/init.rb +47 -0
- data/bundler/lib/bundler/cli/inject.rb +60 -0
- data/bundler/lib/bundler/cli/install.rb +214 -0
- 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 +63 -0
- data/bundler/lib/bundler/cli/open.rb +26 -0
- data/bundler/lib/bundler/cli/outdated.rb +260 -0
- data/bundler/lib/bundler/cli/package.rb +49 -0
- data/bundler/lib/bundler/cli/platform.rb +46 -0
- data/bundler/lib/bundler/cli/plugin.rb +24 -0
- data/bundler/lib/bundler/cli/pristine.rb +43 -0
- data/bundler/lib/bundler/cli/show.rb +75 -0
- data/bundler/lib/bundler/cli/update.rb +91 -0
- data/bundler/lib/bundler/cli/viz.rb +31 -0
- data/bundler/lib/bundler/cli.rb +748 -0
- data/bundler/lib/bundler/compact_index_client/cache.rb +118 -0
- data/bundler/lib/bundler/compact_index_client/updater.rb +116 -0
- data/bundler/lib/bundler/compact_index_client.rb +109 -0
- data/bundler/lib/bundler/compatibility_guard.rb +14 -0
- data/bundler/lib/bundler/constants.rb +7 -0
- data/bundler/lib/bundler/current_ruby.rb +86 -0
- data/bundler/lib/bundler/definition.rb +989 -0
- data/bundler/lib/bundler/dep_proxy.rb +48 -0
- data/bundler/lib/bundler/dependency.rb +138 -0
- data/bundler/lib/bundler/deployment.rb +69 -0
- data/bundler/lib/bundler/deprecate.rb +43 -0
- data/bundler/lib/bundler/dsl.rb +599 -0
- data/bundler/lib/bundler/endpoint_specification.rb +141 -0
- data/bundler/lib/bundler/env.rb +153 -0
- data/bundler/lib/bundler/environment_preserver.rb +59 -0
- data/bundler/lib/bundler/errors.rb +158 -0
- data/bundler/lib/bundler/feature_flag.rb +67 -0
- data/bundler/lib/bundler/fetcher/base.rb +52 -0
- data/bundler/lib/bundler/fetcher/compact_index.rb +126 -0
- data/bundler/lib/bundler/fetcher/dependency.rb +82 -0
- data/bundler/lib/bundler/fetcher/downloader.rb +79 -0
- data/bundler/lib/bundler/fetcher/index.rb +52 -0
- data/bundler/lib/bundler/fetcher.rb +312 -0
- data/bundler/lib/bundler/friendly_errors.rb +131 -0
- data/bundler/lib/bundler/gem_helper.rb +202 -0
- data/bundler/lib/bundler/gem_helpers.rb +101 -0
- data/bundler/lib/bundler/gem_remote_fetcher.rb +43 -0
- data/bundler/lib/bundler/gem_tasks.rb +7 -0
- data/bundler/lib/bundler/gem_version_promoter.rb +176 -0
- data/bundler/lib/bundler/gemdeps.rb +29 -0
- data/bundler/lib/bundler/graph.rb +152 -0
- data/bundler/lib/bundler/index.rb +213 -0
- data/bundler/lib/bundler/injector.rb +94 -0
- data/bundler/lib/bundler/inline.rb +74 -0
- data/bundler/lib/bundler/installer/gem_installer.rb +83 -0
- data/bundler/lib/bundler/installer/parallel_installer.rb +228 -0
- data/bundler/lib/bundler/installer/standalone.rb +53 -0
- data/bundler/lib/bundler/installer.rb +295 -0
- data/bundler/lib/bundler/lazy_specification.rb +123 -0
- data/bundler/lib/bundler/lockfile_generator.rb +95 -0
- data/bundler/lib/bundler/lockfile_parser.rb +256 -0
- data/bundler/lib/bundler/match_platform.rb +24 -0
- data/bundler/lib/bundler/mirror.rb +223 -0
- data/bundler/lib/bundler/plugin/api/source.rb +306 -0
- data/bundler/lib/bundler/plugin/api.rb +81 -0
- data/bundler/lib/bundler/plugin/dsl.rb +53 -0
- data/bundler/lib/bundler/plugin/index.rb +162 -0
- data/bundler/lib/bundler/plugin/installer/git.rb +38 -0
- data/bundler/lib/bundler/plugin/installer/rubygems.rb +27 -0
- data/bundler/lib/bundler/plugin/installer.rb +96 -0
- data/bundler/lib/bundler/plugin/source_list.rb +27 -0
- data/bundler/lib/bundler/plugin.rb +285 -0
- data/bundler/lib/bundler/process_lock.rb +24 -0
- data/bundler/lib/bundler/psyched_yaml.rb +37 -0
- data/bundler/lib/bundler/remote_specification.rb +114 -0
- data/bundler/lib/bundler/resolver/spec_group.rb +110 -0
- data/bundler/lib/bundler/resolver.rb +372 -0
- data/bundler/lib/bundler/retry.rb +66 -0
- data/bundler/lib/bundler/ruby_dsl.rb +18 -0
- data/bundler/lib/bundler/ruby_version.rb +152 -0
- data/bundler/lib/bundler/rubygems_ext.rb +210 -0
- data/bundler/lib/bundler/rubygems_gem_installer.rb +99 -0
- data/bundler/lib/bundler/rubygems_integration.rb +898 -0
- data/bundler/lib/bundler/runtime.rb +316 -0
- data/bundler/lib/bundler/settings/validator.rb +79 -0
- data/bundler/lib/bundler/settings.rb +442 -0
- data/bundler/lib/bundler/setup.rb +28 -0
- data/bundler/lib/bundler/shared_helpers.rb +356 -0
- data/bundler/lib/bundler/similarity_detector.rb +63 -0
- data/bundler/lib/bundler/source/gemspec.rb +18 -0
- data/bundler/lib/bundler/source/git/git_proxy.rb +262 -0
- data/bundler/lib/bundler/source/git.rb +329 -0
- data/bundler/lib/bundler/source/metadata.rb +63 -0
- data/bundler/lib/bundler/source/path/installer.rb +74 -0
- data/bundler/lib/bundler/source/path.rb +249 -0
- data/bundler/lib/bundler/source/rubygems/remote.rb +66 -0
- data/bundler/lib/bundler/source/rubygems.rb +535 -0
- data/bundler/lib/bundler/source.rb +94 -0
- data/bundler/lib/bundler/source_list.rb +186 -0
- data/bundler/lib/bundler/spec_set.rb +192 -0
- data/bundler/lib/bundler/ssl_certs/.document +1 -0
- data/bundler/lib/bundler/ssl_certs/certificate_manager.rb +66 -0
- data/bundler/lib/bundler/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem +21 -0
- data/bundler/lib/bundler/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem +23 -0
- data/bundler/lib/bundler/stub_specification.rb +108 -0
- data/bundler/lib/bundler/templates/.document +1 -0
- data/bundler/lib/bundler/templates/Executable +29 -0
- data/bundler/lib/bundler/templates/Executable.bundler +105 -0
- data/bundler/lib/bundler/templates/Executable.standalone +14 -0
- data/bundler/lib/bundler/templates/Gemfile +7 -0
- data/bundler/lib/bundler/templates/gems.rb +8 -0
- data/bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +74 -0
- data/bundler/lib/bundler/templates/newgem/Gemfile.tt +6 -0
- data/bundler/lib/bundler/templates/newgem/LICENSE.txt.tt +21 -0
- data/bundler/lib/bundler/templates/newgem/README.md.tt +47 -0
- data/bundler/lib/bundler/templates/newgem/Rakefile.tt +29 -0
- data/bundler/lib/bundler/templates/newgem/bin/console.tt +14 -0
- data/bundler/lib/bundler/templates/newgem/bin/setup.tt +8 -0
- data/bundler/lib/bundler/templates/newgem/exe/newgem.tt +3 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +3 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +9 -0
- data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem.h.tt +6 -0
- data/bundler/lib/bundler/templates/newgem/gitignore.tt +20 -0
- data/bundler/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +7 -0
- data/bundler/lib/bundler/templates/newgem/lib/newgem.rb.tt +12 -0
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +51 -0
- data/bundler/lib/bundler/templates/newgem/rspec.tt +3 -0
- data/bundler/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +9 -0
- data/bundler/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +14 -0
- data/bundler/lib/bundler/templates/newgem/test/newgem_test.rb.tt +11 -0
- data/bundler/lib/bundler/templates/newgem/test/test_helper.rb.tt +4 -0
- data/bundler/lib/bundler/templates/newgem/travis.yml.tt +5 -0
- data/bundler/lib/bundler/ui/rg_proxy.rb +19 -0
- data/bundler/lib/bundler/ui/shell.rb +146 -0
- data/bundler/lib/bundler/ui/silent.rb +69 -0
- data/bundler/lib/bundler/ui.rb +9 -0
- data/bundler/lib/bundler/uri_credentials_filter.rb +37 -0
- data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +1638 -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 +57 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +81 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +36 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +66 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +62 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +63 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +61 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +126 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +46 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +36 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +126 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +223 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +138 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +6 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +101 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +67 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +837 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +46 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +58 -0
- data/bundler/lib/bundler/vendor/molinillo/lib/molinillo.rb +12 -0
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/faster.rb +27 -0
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/ssl_reuse.rb +129 -0
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +1233 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +104 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +60 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +118 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +143 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +364 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +109 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions.rb +321 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/base.rb +679 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/command.rb +135 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +97 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb +12 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/ordered_hash.rb +129 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/error.rb +32 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/group.rb +281 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/invocation.rb +177 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb +37 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb +88 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb +17 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +70 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +175 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/option.rb +146 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +221 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser.rb +4 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +71 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/runner.rb +324 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +437 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb +149 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/html.rb +126 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell.rb +81 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/util.rb +268 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +3 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor.rb +509 -0
- data/bundler/lib/bundler/vendored_fileutils.rb +9 -0
- data/bundler/lib/bundler/vendored_molinillo.rb +4 -0
- data/bundler/lib/bundler/vendored_persistent.rb +52 -0
- data/bundler/lib/bundler/vendored_thor.rb +8 -0
- data/bundler/lib/bundler/version.rb +28 -0
- data/bundler/lib/bundler/version_ranges.rb +76 -0
- data/bundler/lib/bundler/vlad.rb +17 -0
- data/bundler/lib/bundler/worker.rb +106 -0
- data/bundler/lib/bundler/yaml_serializer.rb +90 -0
- data/bundler/lib/bundler.rb +545 -0
- data/bundler/man/bundle-add.ronn +29 -0
- data/bundler/man/bundle-binstubs.ronn +43 -0
- data/bundler/man/bundle-check.ronn +26 -0
- data/bundler/man/bundle-clean.ronn +18 -0
- data/bundler/man/bundle-config.ronn +376 -0
- data/bundler/man/bundle-doctor.ronn +33 -0
- data/bundler/man/bundle-exec.ronn +152 -0
- data/bundler/man/bundle-gem.ronn +78 -0
- data/bundler/man/bundle-info.ronn +17 -0
- data/bundler/man/bundle-init.ronn +29 -0
- data/bundler/man/bundle-inject.ronn +22 -0
- data/bundler/man/bundle-install.ronn +369 -0
- data/bundler/man/bundle-list.ronn +15 -0
- data/bundler/man/bundle-lock.ronn +94 -0
- data/bundler/man/bundle-open.ronn +19 -0
- data/bundler/man/bundle-outdated.ronn +107 -0
- data/bundler/man/bundle-package.ronn +72 -0
- data/bundler/man/bundle-platform.ronn +42 -0
- data/bundler/man/bundle-pristine.ronn +34 -0
- data/bundler/man/bundle-show.ronn +20 -0
- data/bundler/man/bundle-update.ronn +346 -0
- data/bundler/man/bundle-viz.ronn +30 -0
- data/bundler/man/bundle.ronn +108 -0
- data/bundler/man/gemfile.5.ronn +506 -0
- data/lib/rubygems/basic_specification.rb +8 -4
- data/lib/rubygems/bundler_version_finder.rb +116 -0
- data/lib/rubygems/command.rb +10 -2
- data/lib/rubygems/command_manager.rb +3 -1
- data/lib/rubygems/commands/cert_command.rb +31 -6
- data/lib/rubygems/commands/cleanup_command.rb +10 -3
- data/lib/rubygems/commands/generate_index_command.rb +1 -1
- data/lib/rubygems/commands/help_command.rb +1 -1
- data/lib/rubygems/commands/open_command.rb +1 -1
- data/lib/rubygems/commands/owner_command.rb +4 -2
- data/lib/rubygems/commands/pristine_command.rb +11 -8
- data/lib/rubygems/commands/push_command.rb +3 -2
- data/lib/rubygems/commands/query_command.rb +17 -17
- data/lib/rubygems/commands/setup_command.rb +175 -70
- data/lib/rubygems/commands/signin_command.rb +33 -0
- data/lib/rubygems/commands/signout_command.rb +33 -0
- data/lib/rubygems/commands/sources_command.rb +1 -1
- data/lib/rubygems/commands/uninstall_command.rb +4 -3
- data/lib/rubygems/commands/unpack_command.rb +19 -7
- data/lib/rubygems/commands/update_command.rb +2 -2
- data/lib/rubygems/commands/which_command.rb +1 -1
- data/lib/rubygems/commands/yank_command.rb +4 -11
- data/lib/rubygems/config_file.rb +21 -28
- data/lib/rubygems/core_ext/kernel_require.rb +10 -9
- data/lib/rubygems/defaults.rb +18 -0
- data/lib/rubygems/dependency.rb +10 -4
- data/lib/rubygems/dependency_installer.rb +8 -2
- data/lib/rubygems/dependency_list.rb +1 -1
- data/lib/rubygems/errors.rb +4 -0
- data/lib/rubygems/exceptions.rb +11 -1
- data/lib/rubygems/ext/builder.rb +2 -2
- data/lib/rubygems/ext/ext_conf_builder.rb +7 -7
- data/lib/rubygems/ext/rake_builder.rb +2 -2
- data/lib/rubygems/gem_runner.rb +5 -1
- data/lib/rubygems/indexer.rb +6 -5
- data/lib/rubygems/install_update_options.rb +5 -28
- data/lib/rubygems/installer.rb +53 -22
- data/lib/rubygems/installer_test_case.rb +6 -3
- data/lib/rubygems/package/file_source.rb +2 -2
- data/lib/rubygems/package/old.rb +3 -3
- data/lib/rubygems/package/tar_header.rb +14 -9
- data/lib/rubygems/package/tar_writer.rb +12 -16
- data/lib/rubygems/package.rb +48 -9
- data/lib/rubygems/platform.rb +1 -1
- data/lib/rubygems/remote_fetcher.rb +13 -18
- data/lib/rubygems/request.rb +47 -1
- data/lib/rubygems/request_set/gem_dependency_api.rb +3 -3
- data/lib/rubygems/request_set/lockfile/tokenizer.rb +1 -1
- data/lib/rubygems/request_set/lockfile.rb +1 -1
- data/lib/rubygems/request_set.rb +22 -3
- data/lib/rubygems/requirement.rb +5 -1
- data/lib/rubygems/resolver/installer_set.rb +4 -6
- data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb +50 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb +80 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb +35 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +65 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +61 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +62 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +60 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb +125 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/set_payload.rb +45 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb +35 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb +125 -0
- data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb +78 -147
- data/lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb +1 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb +1 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb +1 -1
- data/lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb +110 -75
- data/lib/rubygems/resolver/molinillo/lib/molinillo/state.rb +4 -2
- data/lib/rubygems/resolver/set.rb +1 -1
- data/lib/rubygems/resolver.rb +61 -5
- data/lib/rubygems/safe_yaml.rb +51 -0
- data/lib/rubygems/security/signer.rb +2 -0
- data/lib/rubygems/security/trust_dir.rb +1 -1
- data/lib/rubygems/security.rb +12 -5
- data/lib/rubygems/security_option.rb +43 -0
- data/lib/rubygems/server.rb +49 -40
- 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.rb +9 -6
- 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 +317 -251
- data/lib/rubygems/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem +21 -0
- data/lib/rubygems/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem +25 -0
- data/lib/rubygems/stub_specification.rb +10 -4
- data/lib/rubygems/test_case.rb +51 -11
- data/lib/rubygems/test_utilities.rb +2 -2
- data/lib/rubygems/text.rb +14 -1
- data/lib/rubygems/user_interaction.rb +22 -20
- data/lib/rubygems/util/licenses.rb +37 -0
- data/lib/rubygems/util.rb +6 -16
- data/lib/rubygems/validator.rb +3 -3
- data/lib/rubygems/version.rb +24 -5
- data/lib/rubygems/version_option.rb +6 -1
- data/lib/rubygems.rb +147 -45
- data/lib/ubygems.rb +3 -0
- data/setup.rb +1 -1
- data/test/rubygems/alternate_cert.pem +10 -9
- data/test/rubygems/alternate_cert_32.pem +10 -9
- data/test/rubygems/child_cert.pem +11 -9
- data/test/rubygems/child_cert_32.pem +11 -9
- data/test/rubygems/encrypted_private_key.pem +26 -26
- data/test/rubygems/expired_cert.pem +9 -8
- data/test/rubygems/future_cert.pem +9 -8
- data/test/rubygems/future_cert_32.pem +9 -8
- data/test/rubygems/grandchild_cert.pem +11 -9
- data/test/rubygems/grandchild_cert_32.pem +11 -9
- data/test/rubygems/invalid_issuer_cert.pem +11 -9
- data/test/rubygems/invalid_issuer_cert_32.pem +11 -9
- data/test/rubygems/invalid_signer_cert.pem +10 -9
- data/test/rubygems/invalid_signer_cert_32.pem +10 -9
- data/test/rubygems/invalidchild_cert.pem +11 -9
- data/test/rubygems/invalidchild_cert_32.pem +11 -9
- data/test/rubygems/private3072_key.pem +40 -0
- data/test/rubygems/public3072_cert.pem +25 -0
- data/test/rubygems/public_cert.pem +11 -9
- data/test/rubygems/public_cert_32.pem +10 -9
- data/test/rubygems/rubygems_plugin.rb +4 -0
- data/test/rubygems/test_bundled_ca.rb +1 -1
- data/test/rubygems/test_config.rb +1 -1
- data/test/rubygems/test_gem.rb +168 -55
- data/test/rubygems/test_gem_bundler_version_finder.rb +125 -0
- data/test/rubygems/test_gem_command.rb +7 -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_cleanup_command.rb +44 -1
- data/test/rubygems/test_gem_commands_install_command.rb +36 -2
- data/test/rubygems/test_gem_commands_open_command.rb +2 -1
- data/test/rubygems/test_gem_commands_owner_command.rb +25 -0
- data/test/rubygems/test_gem_commands_pristine_command.rb +1 -1
- data/test/rubygems/test_gem_commands_push_command.rb +5 -5
- data/test/rubygems/test_gem_commands_query_command.rb +154 -1
- data/test/rubygems/test_gem_commands_setup_command.rb +140 -10
- data/test/rubygems/test_gem_commands_signin_command.rb +98 -0
- data/test/rubygems/test_gem_commands_signout_command.rb +37 -0
- data/test/rubygems/test_gem_commands_sources_command.rb +52 -0
- data/test/rubygems/test_gem_commands_uninstall_command.rb +14 -2
- data/test/rubygems/test_gem_commands_update_command.rb +1 -7
- data/test/rubygems/test_gem_commands_which_command.rb +3 -3
- data/test/rubygems/test_gem_config_file.rb +1 -2
- data/test/rubygems/test_gem_dependency.rb +28 -0
- data/test/rubygems/test_gem_dependency_installer.rb +1 -1
- data/test/rubygems/test_gem_doctor.rb +2 -2
- data/test/rubygems/test_gem_ext_builder.rb +8 -8
- data/test/rubygems/test_gem_ext_configure_builder.rb +1 -1
- data/test/rubygems/test_gem_ext_ext_conf_builder.rb +23 -0
- data/test/rubygems/test_gem_ext_rake_builder.rb +33 -16
- data/test/rubygems/test_gem_gemcutter_utilities.rb +4 -4
- data/test/rubygems/test_gem_indexer.rb +1 -2
- data/test/rubygems/test_gem_install_update_options.rb +4 -1
- data/test/rubygems/test_gem_installer.rb +230 -32
- data/test/rubygems/test_gem_package.rb +156 -29
- data/test/rubygems/test_gem_package_old.rb +1 -1
- data/test/rubygems/test_gem_package_tar_header.rb +21 -0
- data/test/rubygems/test_gem_package_tar_writer.rb +24 -0
- data/test/rubygems/test_gem_rdoc.rb +2 -0
- data/test/rubygems/test_gem_remote_fetcher.rb +38 -19
- data/test/rubygems/test_gem_request.rb +132 -0
- data/test/rubygems/test_gem_request_connection_pools.rb +6 -7
- data/test/rubygems/test_gem_request_set.rb +7 -7
- data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +3 -3
- data/test/rubygems/test_gem_request_set_lockfile.rb +4 -4
- data/test/rubygems/test_gem_request_set_lockfile_parser.rb +1 -1
- data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +1 -1
- data/test/rubygems/test_gem_requirement.rb +6 -0
- data/test/rubygems/test_gem_resolver.rb +29 -3
- data/test/rubygems/test_gem_resolver_conflict.rb +1 -1
- data/test/rubygems/test_gem_resolver_git_specification.rb +1 -1
- data/test/rubygems/test_gem_security.rb +5 -0
- data/test/rubygems/test_gem_security_policy.rb +27 -27
- data/test/rubygems/test_gem_security_signer.rb +14 -6
- data/test/rubygems/test_gem_security_trust_dir.rb +2 -2
- data/test/rubygems/test_gem_server.rb +210 -12
- data/test/rubygems/test_gem_source.rb +12 -3
- data/test/rubygems/test_gem_source_fetch_problem.rb +8 -0
- data/test/rubygems/test_gem_source_git.rb +1 -1
- data/test/rubygems/test_gem_spec_fetcher.rb +20 -0
- data/test/rubygems/test_gem_specification.rb +163 -32
- data/test/rubygems/test_gem_stream_ui.rb +6 -6
- data/test/rubygems/test_gem_stub_specification.rb +85 -6
- data/test/rubygems/test_gem_text.rb +11 -0
- data/test/rubygems/test_gem_util.rb +26 -0
- data/test/rubygems/test_gem_version.rb +46 -7
- data/test/rubygems/test_gem_version_option.rb +15 -0
- data/test/rubygems/test_kernel.rb +30 -0
- data/test/rubygems/test_remote_fetch_error.rb +21 -0
- data/test/rubygems/test_require.rb +95 -21
- data/test/rubygems/wrong_key_cert.pem +10 -9
- data/test/rubygems/wrong_key_cert_32.pem +10 -9
- data/util/ci +74 -0
- data/util/create_certs.rb +64 -49
- data/util/generate_spdx_license_list.rb +2 -1
- data/util/patch_with_prs.rb +77 -0
- data/util/update_bundled_ca_certificates.rb +23 -2
- data/util/update_changelog.rb +67 -0
- metadata +301 -48
- data/README.rdoc +0 -54
- data/lib/gauntlet_rubygems.rb +0 -51
- data/lib/rubygems/ssl_certs/index.rubygems.org/GlobalSignRoot.pem +0 -18
- /data/{lib/rubygems/ssl_certs/rubygems.org/AddTrustExternalCARoot-2048.pem → bundler/lib/bundler/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem} +0 -0
@@ -0,0 +1,42 @@
|
|
1
|
+
# Bundler Code of Conduct
|
2
|
+
|
3
|
+
The Bundler project strongly values contributors from anywhere, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, race, ethnicity, age, religion, or nationality. As a result, the Bundler team has agreed to and enforces this code of conduct in order to provide a harassment-free experience for everyone who participates in the development of Bundler.
|
4
|
+
|
5
|
+
### Summary
|
6
|
+
|
7
|
+
Harassment in code and discussion or violation of physical boundaries is completely unacceptable anywhere in the Bundler project’s codebases, issue trackers, chat rooms, mailing lists, meetups, and any other events. Violators will be warned and then blocked or banned by the core team at or before the 3rd violation.
|
8
|
+
|
9
|
+
### In detail
|
10
|
+
|
11
|
+
Harassment includes offensive verbal comments related to level of experience, gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, race, ethnicity, age, religion, nationality, the use of sexualized language or imagery, deliberate intimidation, stalking, sustained disruption, and unwelcome sexual attention.
|
12
|
+
|
13
|
+
Individuals asked to stop any harassing behavior are expected to comply immediately.
|
14
|
+
|
15
|
+
Maintainers, including the core team, are also subject to the anti-harassment policy.
|
16
|
+
|
17
|
+
If anyone engages in abusive, harassing, or otherwise unacceptable behavior, including maintainers, we may take appropriate action, up to and including warning the offender, deletion of comments, removal from the project’s codebase and communication systems, and escalation to GitHub support.
|
18
|
+
|
19
|
+
If you are being harassed, notice that someone else is being harassed, or have any other concerns, please contact a member of [the core team](http://bundler.io/contributors.html) or [email the core team](mailto:team@bundler.io) immediately.
|
20
|
+
|
21
|
+
We expect everyone to follow these rules anywhere in the Bundler project’s codebases, issue trackers, IRC channel, group chat, and mailing lists.
|
22
|
+
|
23
|
+
This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
|
24
|
+
|
25
|
+
Finally, don't forget that it is human to make mistakes! We all do. Let’s work together to help each other, resolve issues, and learn from the mistakes that we will all inevitably make from time to time.
|
26
|
+
|
27
|
+
|
28
|
+
### Thanks
|
29
|
+
|
30
|
+
Thanks to the [JSConf Code of Conduct](http://jsconf.com/codeofconduct.html) and [Fedora Code of Conduct](http://fedoraproject.org/code-of-conduct) for inspiration and ideas. Additional thanks to [Contributor Covenant](http://contributor-covenant.org) for the [default code of conduct](https://github.com/bundler/bundler/blob/master/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt) included in generated gems.
|
31
|
+
|
32
|
+
|
33
|
+
### License
|
34
|
+
|
35
|
+
<p class="license" xmlns:dct="http://purl.org/dc/terms/" xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#">
|
36
|
+
To the extent possible under law, <a rel="dct:publisher" href="http://bundler.io">The Bundler Team</a> has waived all copyright and related or neighboring rights to the <span property="dct:title">Bundler Code of Conduct</span>. This work is published from the <span property="vcard:Country" datatype="dct:ISO3166" content="US" about="http://bundler.io">United States.</span>
|
37
|
+
<br>
|
38
|
+
<br>
|
39
|
+
<a rel="license" href="http://creativecommons.org/publicdomain/zero/1.0/">
|
40
|
+
<img src="http://i.creativecommons.org/p/zero/1.0/88x31.png" style="border-style: none;" alt="CC0">
|
41
|
+
</a>
|
42
|
+
</p>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Contributing to Bundler
|
2
|
+
|
3
|
+
Welcome to Bundler! We are so happy that you're here. We know joining a new open source project can be daunting, so here's a quick overview of what you can expect from this documentation.
|
4
|
+
|
5
|
+
Bundler welcomes contributions from *everyone*. While contributing, please follow the project [code of conduct](http://bundler.io/conduct.html), so that everyone can be included.
|
6
|
+
|
7
|
+
## Quick start
|
8
|
+
|
9
|
+
Some guides you might find useful:
|
10
|
+
|
11
|
+
* [Submitting pull requests](doc/development/PULL_REQUESTS.md)
|
12
|
+
* [Filing an issue](doc/contributing/ISSUES.md)
|
13
|
+
* [Bug triage](doc/contributing/BUG_TRIAGE.md)
|
14
|
+
|
15
|
+
## Comprehensive guides
|
16
|
+
|
17
|
+
Not finding what you're looking for? More comprehensive guides are [available here](doc/README.md).
|
data/bundler/LICENSE.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
Portions copyright (c) 2010 Andre Arko
|
2
|
+
Portions copyright (c) 2009 Engine Yard
|
3
|
+
|
4
|
+
MIT License
|
5
|
+
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
7
|
+
a copy of this software and associated documentation files (the
|
8
|
+
"Software"), to deal in the Software without restriction, including
|
9
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
10
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
11
|
+
permit persons to whom the Software is furnished to do so, subject to
|
12
|
+
the following conditions:
|
13
|
+
|
14
|
+
The above copyright notice and this permission notice shall be
|
15
|
+
included in all copies or substantial portions of the Software.
|
16
|
+
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
18
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
19
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
20
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
21
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
22
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
23
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/bundler/README.md
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
[![Version ](https://img.shields.io/gem/v/bundler.svg?style=flat)](https://rubygems.org/gems/bundler)
|
2
|
+
[![Build Status](https://img.shields.io/travis/bundler/bundler/master.svg?style=flat)](https://travis-ci.org/bundler/bundler)
|
3
|
+
[![Code Climate](https://img.shields.io/codeclimate/github/bundler/bundler.svg?style=flat)](https://codeclimate.com/github/bundler/bundler)
|
4
|
+
[![Inline docs ](http://inch-ci.org/github/bundler/bundler.svg?style=flat)](http://inch-ci.org/github/bundler/bundler)
|
5
|
+
[![Slack ](http://bundler-slackin.herokuapp.com/badge.svg)](http://bundler-slackin.herokuapp.com)
|
6
|
+
|
7
|
+
# Bundler: a gem to bundle gems
|
8
|
+
|
9
|
+
Bundler makes sure Ruby applications run the same code on every machine.
|
10
|
+
|
11
|
+
It does this by managing the gems that the application depends on. Given a list of gems, it can automatically download and install those gems, as well as any other gems needed by the gems that are listed. Before installing gems, it checks the versions of every gem to make sure that they are compatible, and can all be loaded at the same time. After the gems have been installed, Bundler can help you update some or all of them when new versions become available. Finally, it records the exact versions that have been installed, so that others can install the exact same gems.
|
12
|
+
|
13
|
+
### Installation and usage
|
14
|
+
|
15
|
+
To install (or update to the latest version):
|
16
|
+
|
17
|
+
```
|
18
|
+
gem install bundler
|
19
|
+
```
|
20
|
+
|
21
|
+
To install a prerelease version (if one is available), run `gem install bundler --pre`. To uninstall Bundler, run `gem uninstall bundler`.
|
22
|
+
|
23
|
+
Bundler is most commonly used to manage your application's dependencies. For example, these commands will allow you to use Bundler to manage the `rspec` gem for your application:
|
24
|
+
|
25
|
+
```
|
26
|
+
bundle init
|
27
|
+
echo 'gem "rspec"' >> Gemfile
|
28
|
+
bundle install
|
29
|
+
bundle exec rspec
|
30
|
+
```
|
31
|
+
|
32
|
+
See [bundler.io](http://bundler.io) for the full documentation.
|
33
|
+
|
34
|
+
### Troubleshooting
|
35
|
+
|
36
|
+
For help with common problems, see [TROUBLESHOOTING](doc/TROUBLESHOOTING.md).
|
37
|
+
|
38
|
+
Still stuck? Try [filing an issue](doc/contributing/ISSUES.md).
|
39
|
+
|
40
|
+
### Other questions
|
41
|
+
|
42
|
+
To see what has changed in recent versions of Bundler, see the [CHANGELOG](CHANGELOG.md).
|
43
|
+
|
44
|
+
To get in touch with the Bundler core team and other Bundler users, please see [getting help](doc/contributing/GETTING_HELP.md).
|
45
|
+
|
46
|
+
### Contributing
|
47
|
+
|
48
|
+
If you'd like to contribute to Bundler, that's awesome, and we <3 you. There's a guide to contributing to Bundler (both code and general help) over in [our documentation section](doc/README.md).
|
49
|
+
|
50
|
+
While some Bundler contributors are compensated by Ruby Together, the project maintainers make decisions independent of Ruby Together. As a project, we welcome contributions regardless of the author’s affiliation with Ruby Together.
|
51
|
+
|
52
|
+
### Supporting
|
53
|
+
|
54
|
+
<a href="https://rubytogether.org/"><img src="https://rubytogether.org/images/rubies.svg" width="150"></a><br>
|
55
|
+
<a href="https://rubytogether.org/">Ruby Together</a> pays some Bundler maintainers for their ongoing work. As a grassroots initiative committed to supporting the critical Ruby infrastructure you rely on, Ruby Together is funded entirely by the Ruby community. Contribute today <a href="https://rubytogether.org/developers">as an individual</a> or (better yet) <a href="https://rubytogether.org/companies">as a company</a> to ensure that Bundler, RubyGems, and other shared tooling is around for years to come.
|
56
|
+
|
57
|
+
### Code of Conduct
|
58
|
+
|
59
|
+
Everyone interacting in the Bundler project’s codebases, issue trackers, chat rooms, and mailing lists is expected to follow the [Bundler code of conduct](https://github.com/bundler/bundler/blob/master/CODE_OF_CONDUCT.md).
|
60
|
+
|
61
|
+
### License
|
62
|
+
|
63
|
+
[MIT License](https://github.com/bundler/bundler/blob/master/LICENSE.md)
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require File.expand_path("../lib/bundler/version", __FILE__)
|
5
|
+
require "shellwords"
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "bundler"
|
9
|
+
s.version = Bundler::VERSION
|
10
|
+
s.license = "MIT"
|
11
|
+
s.authors = [
|
12
|
+
"André Arko", "Samuel Giddins", "Chris Morris", "James Wen", "Tim Moore",
|
13
|
+
"André Medeiros", "Jessica Lynn Suttles", "Terence Lee", "Carl Lerche",
|
14
|
+
"Yehuda Katz"
|
15
|
+
]
|
16
|
+
s.email = ["team@bundler.io"]
|
17
|
+
s.homepage = "http://bundler.io"
|
18
|
+
s.summary = "The best way to manage your application's dependencies"
|
19
|
+
s.description = "Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably"
|
20
|
+
|
21
|
+
if s.respond_to?(:metadata=)
|
22
|
+
s.metadata = {
|
23
|
+
"bug_tracker_uri" => "http://github.com/bundler/bundler/issues",
|
24
|
+
"changelog_uri" => "https://github.com/bundler/bundler/blob/master/CHANGELOG.md",
|
25
|
+
"homepage_uri" => "https://bundler.io/",
|
26
|
+
"source_code_uri" => "http://github.com/bundler/bundler/",
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
if s.version >= Gem::Version.new("2.a".dup)
|
31
|
+
s.required_ruby_version = ">= 2.3.0"
|
32
|
+
s.required_rubygems_version = ">= 2.5.0"
|
33
|
+
else
|
34
|
+
s.required_ruby_version = ">= 1.8.7"
|
35
|
+
s.required_rubygems_version = ">= 1.3.6"
|
36
|
+
end
|
37
|
+
|
38
|
+
s.add_development_dependency "automatiek", "~> 0.1.0"
|
39
|
+
s.add_development_dependency "mustache", "0.99.6"
|
40
|
+
s.add_development_dependency "rake", "~> 10.0"
|
41
|
+
s.add_development_dependency "rdiscount", "~> 2.2"
|
42
|
+
s.add_development_dependency "ronn", "~> 0.7.3"
|
43
|
+
s.add_development_dependency "rspec", "~> 3.6"
|
44
|
+
|
45
|
+
s.files = `git ls-files -z`.split("\x0").select {|f| f.match(%r{^(lib|exe)/}) }
|
46
|
+
# we don't check in man pages, but we need to ship them because
|
47
|
+
# we use them to generate the long-form help for each command.
|
48
|
+
s.files += Dir.glob("man/**/*")
|
49
|
+
# Include the CHANGELOG.md, LICENSE.md, README.md manually
|
50
|
+
s.files += %w[CHANGELOG.md LICENSE.md README.md]
|
51
|
+
# include the gemspec itself because warbler breaks w/o it
|
52
|
+
s.files += %w[bundler.gemspec]
|
53
|
+
|
54
|
+
s.bindir = "exe"
|
55
|
+
s.executables = %w[bundle bundler]
|
56
|
+
s.require_paths = ["lib"]
|
57
|
+
end
|
data/bundler/exe/bundle
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
# Exit cleanly from an early interrupt
|
5
|
+
Signal.trap("INT") do
|
6
|
+
Bundler.ui.debug("\n#{caller.join("\n")}") if defined?(Bundler)
|
7
|
+
exit 1
|
8
|
+
end
|
9
|
+
|
10
|
+
require "bundler"
|
11
|
+
# Check if an older version of bundler is installed
|
12
|
+
$LOAD_PATH.each do |path|
|
13
|
+
next unless path =~ %r{/bundler-0\.(\d+)} && $1.to_i < 9
|
14
|
+
err = String.new
|
15
|
+
err << "Looks like you have a version of bundler that's older than 0.9.\n"
|
16
|
+
err << "Please remove your old versions.\n"
|
17
|
+
err << "An easy way to do this is by running `gem cleanup bundler`."
|
18
|
+
abort(err)
|
19
|
+
end
|
20
|
+
|
21
|
+
require "bundler/friendly_errors"
|
22
|
+
Bundler.with_friendly_errors do
|
23
|
+
require "bundler/cli"
|
24
|
+
|
25
|
+
# Allow any command to use --help flag to show help for that command
|
26
|
+
help_flags = %w[--help -h]
|
27
|
+
help_flag_used = ARGV.any? {|a| help_flags.include? a }
|
28
|
+
args = help_flag_used ? Bundler::CLI.reformatted_help_args(ARGV) : ARGV
|
29
|
+
|
30
|
+
Bundler::CLI.start(args, :debug => true)
|
31
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "bundler/shared_helpers"
|
5
|
+
|
6
|
+
Bundler::SharedHelpers.major_deprecation(2, "the bundle_ruby executable has been removed in favor of `bundle platform --ruby`")
|
7
|
+
|
8
|
+
Signal.trap("INT") { exit 1 }
|
9
|
+
|
10
|
+
require "bundler/errors"
|
11
|
+
require "bundler/ruby_version"
|
12
|
+
require "bundler/ruby_dsl"
|
13
|
+
|
14
|
+
module Bundler
|
15
|
+
class Dsl
|
16
|
+
include RubyDsl
|
17
|
+
|
18
|
+
attr_accessor :ruby_version
|
19
|
+
|
20
|
+
def initialize
|
21
|
+
@ruby_version = nil
|
22
|
+
end
|
23
|
+
|
24
|
+
def eval_gemfile(gemfile, contents = nil)
|
25
|
+
contents ||= File.open(gemfile, "rb", &:read)
|
26
|
+
instance_eval(contents, gemfile.to_s, 1)
|
27
|
+
rescue SyntaxError => e
|
28
|
+
bt = e.message.split("\n")[1..-1]
|
29
|
+
raise GemfileError, ["Gemfile syntax error:", *bt].join("\n")
|
30
|
+
rescue ScriptError, RegexpError, NameError, ArgumentError => e
|
31
|
+
e.backtrace[0] = "#{e.backtrace[0]}: #{e.message} (#{e.class})"
|
32
|
+
STDERR.puts e.backtrace.join("\n ")
|
33
|
+
raise GemfileError, "There was an error in your Gemfile," \
|
34
|
+
" and Bundler cannot continue."
|
35
|
+
end
|
36
|
+
|
37
|
+
def source(source, options = {})
|
38
|
+
end
|
39
|
+
|
40
|
+
def gem(name, *args)
|
41
|
+
end
|
42
|
+
|
43
|
+
def group(*args)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
dsl = Bundler::Dsl.new
|
49
|
+
begin
|
50
|
+
dsl.eval_gemfile(Bundler::SharedHelpers.default_gemfile)
|
51
|
+
ruby_version = dsl.ruby_version
|
52
|
+
if ruby_version
|
53
|
+
puts ruby_version
|
54
|
+
else
|
55
|
+
puts "No ruby version specified"
|
56
|
+
end
|
57
|
+
rescue Bundler::GemfileError => e
|
58
|
+
puts e.message
|
59
|
+
exit(-1)
|
60
|
+
end
|
data/bundler/exe/bundler
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bundler
|
4
|
+
# Represents metadata from when the Bundler gem was built.
|
5
|
+
module BuildMetadata
|
6
|
+
# begin ivars
|
7
|
+
@release = false
|
8
|
+
# end ivars
|
9
|
+
|
10
|
+
# A hash representation of the build metadata.
|
11
|
+
def self.to_h
|
12
|
+
{
|
13
|
+
"Built At" => built_at,
|
14
|
+
"Git SHA" => git_commit_sha,
|
15
|
+
"Released Version" => release?,
|
16
|
+
}
|
17
|
+
end
|
18
|
+
|
19
|
+
# A string representing the date the bundler gem was built.
|
20
|
+
def self.built_at
|
21
|
+
@built_at ||= Time.now.utc.strftime("%Y-%m-%d").freeze
|
22
|
+
end
|
23
|
+
|
24
|
+
# The SHA for the git commit the bundler gem was built from.
|
25
|
+
def self.git_commit_sha
|
26
|
+
@git_commit_sha ||= Dir.chdir(File.expand_path("..", __FILE__)) do
|
27
|
+
`git rev-parse --short HEAD`.strip.freeze
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
# Whether this is an official release build of Bundler.
|
32
|
+
def self.release?
|
33
|
+
@release
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "bundler/shared_helpers"
|
4
|
+
Bundler::SharedHelpers.major_deprecation 2,
|
5
|
+
"The Bundler task for Capistrano. Please use http://github.com/capistrano/bundler"
|
6
|
+
|
7
|
+
# Capistrano task for Bundler.
|
8
|
+
#
|
9
|
+
# Add "require 'bundler/capistrano'" in your Capistrano deploy.rb, and
|
10
|
+
# Bundler will be activated after each new deployment.
|
11
|
+
require "bundler/deployment"
|
12
|
+
require "capistrano/version"
|
13
|
+
|
14
|
+
if defined?(Capistrano::Version) && Gem::Version.new(Capistrano::Version).release >= Gem::Version.new("3.0")
|
15
|
+
raise "For Capistrano 3.x integration, please use http://github.com/capistrano/bundler"
|
16
|
+
end
|
17
|
+
|
18
|
+
Capistrano::Configuration.instance(:must_exist).load do
|
19
|
+
before "deploy:finalize_update", "bundle:install"
|
20
|
+
Bundler::Deployment.define_task(self, :task, :except => { :no_release => true })
|
21
|
+
set :rake, lambda { "#{fetch(:bundle_cmd, "bundle")} exec rake" }
|
22
|
+
end
|
@@ -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
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bundler
|
4
|
+
class CLI::Binstubs
|
5
|
+
attr_reader :options, :gems
|
6
|
+
def initialize(options, gems)
|
7
|
+
@options = options
|
8
|
+
@gems = gems
|
9
|
+
end
|
10
|
+
|
11
|
+
def run
|
12
|
+
Bundler.definition.validate_runtime!
|
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"]
|
17
|
+
installer = Installer.new(Bundler.root, Bundler.definition)
|
18
|
+
|
19
|
+
if gems.empty?
|
20
|
+
Bundler.ui.error "`bundle binstubs` needs at least one gem to run."
|
21
|
+
exit 1
|
22
|
+
end
|
23
|
+
|
24
|
+
gems.each do |gem_name|
|
25
|
+
spec = Bundler.definition.specs.find {|s| s.name == gem_name }
|
26
|
+
unless spec
|
27
|
+
raise GemNotFound, Bundler::CLI::Common.gem_not_found_message(
|
28
|
+
gem_name, Bundler.definition.specs
|
29
|
+
)
|
30
|
+
end
|
31
|
+
|
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
|
37
|
+
else
|
38
|
+
installer.generate_bundler_executable_stubs(spec, :force => options[:force], :binstubs_cmd => true)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bundler
|
4
|
+
class CLI::Cache
|
5
|
+
attr_reader :options
|
6
|
+
def initialize(options)
|
7
|
+
@options = options
|
8
|
+
end
|
9
|
+
|
10
|
+
def run
|
11
|
+
Bundler.definition.validate_runtime!
|
12
|
+
Bundler.definition.resolve_with_cache!
|
13
|
+
setup_cache_all
|
14
|
+
Bundler.settings.set_command_option_if_given :cache_all_platforms, options["all-platforms"]
|
15
|
+
Bundler.load.cache
|
16
|
+
Bundler.settings.set_command_option_if_given :no_prune, options["no-prune"]
|
17
|
+
Bundler.load.lock
|
18
|
+
rescue GemNotFound => e
|
19
|
+
Bundler.ui.error(e.message)
|
20
|
+
Bundler.ui.warn "Run `bundle install` to install missing gems."
|
21
|
+
exit 1
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def setup_cache_all
|
27
|
+
Bundler.settings.set_command_option_if_given :cache_all, options[:all]
|
28
|
+
|
29
|
+
if Bundler.definition.has_local_dependencies? && !Bundler.feature_flag.cache_all?
|
30
|
+
Bundler.ui.warn "Your Gemfile contains path and git dependencies. If you want " \
|
31
|
+
"to package them as well, please pass the --all flag. This will be the default " \
|
32
|
+
"on Bundler 2.0."
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bundler
|
4
|
+
class CLI::Check
|
5
|
+
attr_reader :options
|
6
|
+
|
7
|
+
def initialize(options)
|
8
|
+
@options = options
|
9
|
+
end
|
10
|
+
|
11
|
+
def run
|
12
|
+
Bundler.settings.set_command_option_if_given :path, options[:path]
|
13
|
+
|
14
|
+
begin
|
15
|
+
definition = Bundler.definition
|
16
|
+
definition.validate_runtime!
|
17
|
+
not_installed = definition.missing_specs
|
18
|
+
rescue GemNotFound, VersionConflict
|
19
|
+
Bundler.ui.error "Bundler can't satisfy your Gemfile's dependencies."
|
20
|
+
Bundler.ui.warn "Install missing gems with `bundle install`."
|
21
|
+
exit 1
|
22
|
+
end
|
23
|
+
|
24
|
+
if not_installed.any?
|
25
|
+
Bundler.ui.error "The following gems are missing"
|
26
|
+
not_installed.each {|s| Bundler.ui.error " * #{s.name} (#{s.version})" }
|
27
|
+
Bundler.ui.warn "Install missing gems with `bundle install`"
|
28
|
+
exit 1
|
29
|
+
elsif !Bundler.default_lockfile.file? && Bundler.frozen_bundle?
|
30
|
+
Bundler.ui.error "This bundle has been frozen, but there is no #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} present"
|
31
|
+
exit 1
|
32
|
+
else
|
33
|
+
Bundler.load.lock(:preserve_unknown_sections => true) unless options[:"dry-run"]
|
34
|
+
Bundler.ui.info "The Gemfile's dependencies are satisfied"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bundler
|
4
|
+
class CLI::Clean
|
5
|
+
attr_reader :options
|
6
|
+
|
7
|
+
def initialize(options)
|
8
|
+
@options = options
|
9
|
+
end
|
10
|
+
|
11
|
+
def run
|
12
|
+
require_path_or_force unless options[:"dry-run"]
|
13
|
+
Bundler.load.clean(options[:"dry-run"])
|
14
|
+
end
|
15
|
+
|
16
|
+
protected
|
17
|
+
|
18
|
+
def require_path_or_force
|
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`."
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,102 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bundler
|
4
|
+
module CLI::Common
|
5
|
+
def self.output_post_install_messages(messages)
|
6
|
+
return if Bundler.settings["ignore_messages"]
|
7
|
+
messages.to_a.each do |name, msg|
|
8
|
+
print_post_install_message(name, msg) unless Bundler.settings["ignore_messages.#{name}"]
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.print_post_install_message(name, msg)
|
13
|
+
Bundler.ui.confirm "Post-install message from #{name}:"
|
14
|
+
Bundler.ui.info msg
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.output_without_groups_message
|
18
|
+
return if Bundler.settings[:without].empty?
|
19
|
+
Bundler.ui.confirm without_groups_message
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.without_groups_message
|
23
|
+
groups = Bundler.settings[:without]
|
24
|
+
group_list = [groups[0...-1].join(", "), groups[-1..-1]].
|
25
|
+
reject {|s| s.to_s.empty? }.join(" and ")
|
26
|
+
group_str = (groups.size == 1) ? "group" : "groups"
|
27
|
+
"Gems in the #{group_str} #{group_list} were not installed."
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.select_spec(name, regex_match = nil)
|
31
|
+
specs = []
|
32
|
+
regexp = Regexp.new(name) if regex_match
|
33
|
+
|
34
|
+
Bundler.definition.specs.each do |spec|
|
35
|
+
return spec if spec.name == name
|
36
|
+
specs << spec if regexp && spec.name =~ regexp
|
37
|
+
end
|
38
|
+
|
39
|
+
case specs.count
|
40
|
+
when 0
|
41
|
+
raise GemNotFound, gem_not_found_message(name, Bundler.definition.dependencies)
|
42
|
+
when 1
|
43
|
+
specs.first
|
44
|
+
else
|
45
|
+
ask_for_spec_from(specs)
|
46
|
+
end
|
47
|
+
rescue RegexpError
|
48
|
+
raise GemNotFound, gem_not_found_message(name, Bundler.definition.dependencies)
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.ask_for_spec_from(specs)
|
52
|
+
if !$stdout.tty? && ENV["BUNDLE_SPEC_RUN"].nil?
|
53
|
+
raise GemNotFound, gem_not_found_message(name, Bundler.definition.dependencies)
|
54
|
+
end
|
55
|
+
|
56
|
+
specs.each_with_index do |spec, index|
|
57
|
+
Bundler.ui.info "#{index.succ} : #{spec.name}", true
|
58
|
+
end
|
59
|
+
Bundler.ui.info "0 : - exit -", true
|
60
|
+
|
61
|
+
num = Bundler.ui.ask("> ").to_i
|
62
|
+
num > 0 ? specs[num - 1] : nil
|
63
|
+
end
|
64
|
+
|
65
|
+
def self.gem_not_found_message(missing_gem_name, alternatives)
|
66
|
+
require "bundler/similarity_detector"
|
67
|
+
message = "Could not find gem '#{missing_gem_name}'."
|
68
|
+
alternate_names = alternatives.map {|a| a.respond_to?(:name) ? a.name : a }
|
69
|
+
suggestions = SimilarityDetector.new(alternate_names).similar_word_list(missing_gem_name)
|
70
|
+
message += "\nDid you mean #{suggestions}?" if suggestions
|
71
|
+
message
|
72
|
+
end
|
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
|
+
|
81
|
+
def self.configure_gem_version_promoter(definition, options)
|
82
|
+
patch_level = patch_level_options(options)
|
83
|
+
raise InvalidOption, "Provide only one of the following options: #{patch_level.join(", ")}" unless patch_level.length <= 1
|
84
|
+
definition.gem_version_promoter.tap do |gvp|
|
85
|
+
gvp.level = patch_level.first || :major
|
86
|
+
gvp.strict = options[:strict] || options["update-strict"]
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
def self.patch_level_options(options)
|
91
|
+
[:major, :minor, :patch].select {|v| options.keys.include?(v.to_s) }
|
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
|
101
|
+
end
|
102
|
+
end
|