rubygems-update 2.7.11 → 3.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +67 -0
- data/.travis.yml +24 -18
- data/CODE_OF_CONDUCT.md +10 -8
- data/CONTRIBUTING.md +148 -0
- data/History.txt +458 -8
- data/MAINTAINERS.txt +1 -0
- data/Manifest.txt +16 -9
- data/POLICIES.md +92 -0
- data/README.md +53 -26
- data/Rakefile +77 -211
- data/{UPGRADING.rdoc → UPGRADING.md} +31 -32
- data/appveyor.yml +20 -45
- data/bin/gem +1 -2
- data/bin/update_rubygems +2 -3
- data/bundler/CHANGELOG.md +65 -0
- data/bundler/bundler.gemspec +7 -1
- data/bundler/lib/bundler/build_metadata.rb +1 -1
- data/bundler/lib/bundler/cli/add.rb +15 -5
- data/bundler/lib/bundler/cli/binstubs.rb +8 -2
- data/bundler/lib/bundler/cli/doctor.rb +47 -1
- data/bundler/lib/bundler/cli/install.rb +8 -5
- data/bundler/lib/bundler/cli/list.rb +41 -5
- data/bundler/lib/bundler/cli/outdated.rb +7 -1
- data/bundler/lib/bundler/cli/pristine.rb +4 -0
- data/bundler/lib/bundler/cli/remove.rb +18 -0
- data/bundler/lib/bundler/cli.rb +63 -21
- data/bundler/lib/bundler/definition.rb +15 -16
- data/bundler/lib/bundler/dependency.rb +2 -2
- data/bundler/lib/bundler/dsl.rb +19 -3
- data/bundler/lib/bundler/feature_flag.rb +7 -0
- data/bundler/lib/bundler/gem_version_promoter.rb +4 -2
- data/bundler/lib/bundler/injector.rb +168 -9
- data/bundler/lib/bundler/installer/parallel_installer.rb +5 -0
- data/bundler/lib/bundler/installer.rb +29 -6
- data/bundler/lib/bundler/plugin/events.rb +61 -0
- data/bundler/lib/bundler/plugin.rb +10 -3
- data/bundler/lib/bundler/resolver.rb +2 -2
- data/bundler/lib/bundler/rubygems_gem_installer.rb +7 -0
- data/bundler/lib/bundler/runtime.rb +8 -2
- data/bundler/lib/bundler/settings/validator.rb +23 -0
- data/bundler/lib/bundler/settings.rb +24 -3
- data/bundler/lib/bundler/shared_helpers.rb +19 -3
- data/bundler/lib/bundler/source/metadata.rb +2 -3
- data/bundler/lib/bundler/source.rb +9 -9
- data/bundler/lib/bundler/templates/newgem/lib/newgem.rb.tt +1 -0
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/lib/bundler.rb +26 -8
- data/bundler/man/bundle-add.ronn +13 -2
- data/bundler/man/bundle-config.ronn +21 -0
- data/bundler/man/bundle-install.ronn +1 -1
- data/bundler/man/bundle-list.ronn +19 -1
- data/bundler/man/bundle-outdated.ronn +4 -0
- data/bundler/man/bundle-remove.ronn +23 -0
- data/bundler/man/bundle-update.ronn +1 -1
- data/bundler/man/bundle.ronn +3 -0
- data/lib/rubygems/available_set.rb +1 -1
- data/lib/rubygems/basic_specification.rb +12 -12
- data/lib/rubygems/bundler_version_finder.rb +3 -3
- data/lib/rubygems/command.rb +22 -15
- data/lib/rubygems/command_manager.rb +22 -5
- data/lib/rubygems/commands/build_command.rb +41 -7
- data/lib/rubygems/commands/cert_command.rb +45 -24
- data/lib/rubygems/commands/check_command.rb +1 -1
- data/lib/rubygems/commands/cleanup_command.rb +14 -7
- data/lib/rubygems/commands/contents_command.rb +14 -15
- data/lib/rubygems/commands/dependency_command.rb +17 -17
- data/lib/rubygems/commands/environment_command.rb +20 -1
- data/lib/rubygems/commands/fetch_command.rb +2 -3
- data/lib/rubygems/commands/generate_index_command.rb +2 -3
- data/lib/rubygems/commands/help_command.rb +12 -13
- data/lib/rubygems/commands/info_command.rb +33 -0
- data/lib/rubygems/commands/install_command.rb +21 -17
- data/lib/rubygems/commands/list_command.rb +0 -1
- data/lib/rubygems/commands/lock_command.rb +3 -4
- data/lib/rubygems/commands/open_command.rb +16 -10
- data/lib/rubygems/commands/owner_command.rb +21 -7
- data/lib/rubygems/commands/pristine_command.rb +23 -16
- data/lib/rubygems/commands/push_command.rb +19 -8
- data/lib/rubygems/commands/query_command.rb +24 -24
- data/lib/rubygems/commands/rdoc_command.rb +3 -4
- data/lib/rubygems/commands/search_command.rb +0 -1
- data/lib/rubygems/commands/server_command.rb +1 -2
- data/lib/rubygems/commands/setup_command.rb +86 -48
- data/lib/rubygems/commands/signin_command.rb +2 -1
- data/lib/rubygems/commands/signout_command.rb +2 -2
- data/lib/rubygems/commands/sources_command.rb +11 -12
- data/lib/rubygems/commands/specification_command.rb +7 -7
- data/lib/rubygems/commands/uninstall_command.rb +50 -18
- data/lib/rubygems/commands/unpack_command.rb +16 -7
- data/lib/rubygems/commands/update_command.rb +28 -23
- data/lib/rubygems/commands/which_command.rb +5 -8
- data/lib/rubygems/commands/yank_command.rb +1 -2
- data/lib/rubygems/compatibility.rb +1 -21
- data/lib/rubygems/config_file.rb +36 -36
- data/lib/rubygems/core_ext/kernel_require.rb +6 -6
- data/lib/rubygems/core_ext/kernel_warn.rb +45 -0
- data/lib/rubygems/defaults.rb +31 -19
- data/lib/rubygems/dependency.rb +15 -15
- data/lib/rubygems/dependency_installer.rb +30 -33
- data/lib/rubygems/dependency_list.rb +9 -10
- data/lib/rubygems/deprecate.rb +2 -3
- data/lib/rubygems/doctor.rb +5 -6
- data/lib/rubygems/errors.rb +3 -3
- data/lib/rubygems/exceptions.rb +11 -8
- data/lib/rubygems/ext/build_error.rb +0 -1
- data/lib/rubygems/ext/builder.rb +50 -23
- data/lib/rubygems/ext/cmake_builder.rb +2 -2
- data/lib/rubygems/ext/configure_builder.rb +2 -3
- data/lib/rubygems/ext/ext_conf_builder.rb +8 -7
- data/lib/rubygems/ext/rake_builder.rb +16 -18
- data/lib/rubygems/ext.rb +0 -1
- data/lib/rubygems/gem_runner.rb +2 -2
- data/lib/rubygems/gemcutter_utilities.rb +46 -12
- data/lib/rubygems/indexer.rb +19 -12
- data/lib/rubygems/install_default_message.rb +0 -1
- data/lib/rubygems/install_message.rb +0 -1
- data/lib/rubygems/install_update_options.rb +3 -29
- data/lib/rubygems/installer.rb +97 -55
- data/lib/rubygems/installer_test_case.rb +2 -16
- data/lib/rubygems/local_remote_options.rb +5 -4
- data/lib/rubygems/mock_gem_ui.rb +3 -4
- data/lib/rubygems/name_tuple.rb +4 -4
- data/lib/rubygems/package/digest_io.rb +3 -4
- data/lib/rubygems/package/file_source.rb +3 -4
- data/lib/rubygems/package/io_source.rb +1 -2
- data/lib/rubygems/package/old.rb +8 -16
- data/lib/rubygems/package/source.rb +0 -1
- data/lib/rubygems/package/tar_header.rb +13 -4
- data/lib/rubygems/package/tar_reader/entry.rb +20 -4
- data/lib/rubygems/package/tar_reader.rb +2 -4
- data/lib/rubygems/package/tar_test_case.rb +2 -8
- data/lib/rubygems/package/tar_writer.rb +13 -15
- data/lib/rubygems/package.rb +90 -63
- data/lib/rubygems/package_task.rb +0 -1
- data/lib/rubygems/path_support.rb +16 -6
- data/lib/rubygems/platform.rb +4 -5
- data/lib/rubygems/psych_tree.rb +1 -1
- data/lib/rubygems/rdoc.rb +2 -313
- data/lib/rubygems/remote_fetcher.rb +29 -82
- data/lib/rubygems/request/connection_pools.rb +24 -13
- data/lib/rubygems/request/http_pool.rb +3 -4
- data/lib/rubygems/request/https_pool.rb +1 -3
- data/lib/rubygems/request.rb +17 -16
- data/lib/rubygems/request_set/gem_dependency_api.rb +46 -49
- data/lib/rubygems/request_set/lockfile/parser.rb +18 -29
- data/lib/rubygems/request_set/lockfile/tokenizer.rb +9 -9
- data/lib/rubygems/request_set/lockfile.rb +12 -12
- data/lib/rubygems/request_set.rb +52 -25
- data/lib/rubygems/requirement.rb +32 -21
- data/lib/rubygems/resolver/activation_request.rb +6 -6
- data/lib/rubygems/resolver/api_set.rb +5 -6
- data/lib/rubygems/resolver/api_specification.rb +2 -3
- data/lib/rubygems/resolver/best_set.rb +5 -6
- data/lib/rubygems/resolver/composed_set.rb +5 -6
- data/lib/rubygems/resolver/conflict.rb +5 -5
- data/lib/rubygems/resolver/current_set.rb +1 -2
- data/lib/rubygems/resolver/dependency_request.rb +4 -4
- data/lib/rubygems/resolver/git_set.rb +5 -6
- data/lib/rubygems/resolver/git_specification.rb +4 -5
- data/lib/rubygems/resolver/index_set.rb +5 -6
- data/lib/rubygems/resolver/index_specification.rb +3 -4
- data/lib/rubygems/resolver/installed_specification.rb +3 -4
- data/lib/rubygems/resolver/installer_set.rb +12 -12
- data/lib/rubygems/resolver/local_specification.rb +1 -2
- data/lib/rubygems/resolver/lock_set.rb +5 -6
- data/lib/rubygems/resolver/lock_specification.rb +7 -8
- data/lib/rubygems/resolver/requirement_list.rb +1 -1
- data/lib/rubygems/resolver/set.rb +2 -2
- data/lib/rubygems/resolver/source_set.rb +4 -5
- data/lib/rubygems/resolver/spec_specification.rb +1 -2
- data/lib/rubygems/resolver/specification.rb +10 -7
- data/lib/rubygems/resolver/stats.rb +1 -1
- data/lib/rubygems/resolver/vendor_set.rb +4 -5
- data/lib/rubygems/resolver/vendor_specification.rb +2 -3
- data/lib/rubygems/resolver.rb +14 -16
- data/lib/rubygems/s3_uri_signer.rb +183 -0
- data/lib/rubygems/safe_yaml.rb +18 -10
- data/lib/rubygems/security/policies.rb +1 -2
- data/lib/rubygems/security/policy.rb +25 -25
- data/lib/rubygems/security/signer.rb +72 -24
- data/lib/rubygems/security/trust_dir.rb +10 -10
- data/lib/rubygems/security.rb +21 -22
- data/lib/rubygems/security_option.rb +0 -1
- data/lib/rubygems/server.rb +21 -21
- data/lib/rubygems/source/git.rb +9 -10
- data/lib/rubygems/source/installed.rb +3 -4
- data/lib/rubygems/source/local.rb +7 -7
- data/lib/rubygems/source/lock.rb +4 -4
- data/lib/rubygems/source/specific_file.rb +5 -5
- data/lib/rubygems/source/vendor.rb +2 -3
- data/lib/rubygems/source.rb +16 -25
- data/lib/rubygems/source_list.rb +2 -2
- data/lib/rubygems/source_local.rb +0 -1
- data/lib/rubygems/spec_fetcher.rb +5 -6
- data/lib/rubygems/specification.rb +219 -558
- data/lib/rubygems/specification_policy.rb +407 -0
- data/lib/rubygems/stub_specification.rb +12 -17
- data/lib/rubygems/test_case.rb +161 -75
- data/lib/rubygems/test_utilities.rb +20 -35
- data/lib/rubygems/text.rb +6 -6
- data/lib/rubygems/uninstaller.rb +38 -27
- data/lib/rubygems/uri_formatter.rb +1 -2
- data/lib/rubygems/user_interaction.rb +37 -89
- data/lib/rubygems/util/licenses.rb +27 -1
- data/lib/rubygems/util/list.rb +1 -1
- data/lib/rubygems/util.rb +32 -14
- data/lib/rubygems/validator.rb +4 -5
- data/lib/rubygems/version.rb +15 -15
- data/lib/rubygems/version_option.rb +2 -3
- data/lib/rubygems.rb +71 -102
- data/rubygems-update.gemspec +43 -0
- data/setup.rb +2 -8
- data/test/rubygems/ca_cert.pem +74 -65
- data/test/rubygems/client.pem +103 -45
- data/test/rubygems/rubygems_plugin.rb +0 -1
- data/test/rubygems/simple_gem.rb +1 -1
- data/test/rubygems/ssl_cert.pem +78 -17
- data/test/rubygems/ssl_key.pem +25 -13
- data/test/rubygems/test_bundled_ca.rb +1 -1
- data/test/rubygems/test_config.rb +7 -2
- data/test/rubygems/test_gem.rb +205 -132
- data/test/rubygems/test_gem_bundler_version_finder.rb +4 -0
- data/test/rubygems/test_gem_command.rb +0 -1
- data/test/rubygems/test_gem_command_manager.rb +18 -3
- data/test/rubygems/test_gem_commands_build_command.rb +220 -15
- data/test/rubygems/test_gem_commands_cert_command.rb +69 -8
- data/test/rubygems/test_gem_commands_check_command.rb +1 -1
- data/test/rubygems/test_gem_commands_cleanup_command.rb +27 -1
- data/test/rubygems/test_gem_commands_contents_command.rb +1 -2
- data/test/rubygems/test_gem_commands_dependency_command.rb +33 -34
- data/test/rubygems/test_gem_commands_environment_command.rb +1 -0
- data/test/rubygems/test_gem_commands_fetch_command.rb +0 -1
- data/test/rubygems/test_gem_commands_generate_index_command.rb +0 -1
- data/test/rubygems/test_gem_commands_help_command.rb +7 -4
- data/test/rubygems/test_gem_commands_info_command.rb +44 -0
- data/test/rubygems/test_gem_commands_install_command.rb +79 -12
- data/test/rubygems/test_gem_commands_lock_command.rb +0 -1
- data/test/rubygems/test_gem_commands_open_command.rb +29 -0
- data/test/rubygems/test_gem_commands_outdated_command.rb +0 -1
- data/test/rubygems/test_gem_commands_owner_command.rb +93 -57
- data/test/rubygems/test_gem_commands_pristine_command.rb +65 -30
- data/test/rubygems/test_gem_commands_push_command.rb +54 -0
- data/test/rubygems/test_gem_commands_query_command.rb +102 -100
- data/test/rubygems/test_gem_commands_search_command.rb +0 -1
- data/test/rubygems/test_gem_commands_server_command.rb +0 -1
- data/test/rubygems/test_gem_commands_setup_command.rb +50 -15
- data/test/rubygems/test_gem_commands_signin_command.rb +1 -1
- data/test/rubygems/test_gem_commands_sources_command.rb +0 -1
- data/test/rubygems/test_gem_commands_specification_command.rb +2 -3
- data/test/rubygems/test_gem_commands_stale_command.rb +3 -2
- data/test/rubygems/test_gem_commands_uninstall_command.rb +161 -8
- data/test/rubygems/test_gem_commands_unpack_command.rb +17 -1
- data/test/rubygems/test_gem_commands_update_command.rb +19 -2
- data/test/rubygems/test_gem_commands_which_command.rb +0 -1
- data/test/rubygems/test_gem_commands_yank_command.rb +0 -1
- data/test/rubygems/test_gem_config_file.rb +4 -2
- data/test/rubygems/test_gem_dependency.rb +0 -1
- data/test/rubygems/test_gem_dependency_installer.rb +8 -5
- data/test/rubygems/test_gem_dependency_list.rb +6 -7
- data/test/rubygems/test_gem_dependency_resolution_error.rb +0 -1
- data/test/rubygems/test_gem_doctor.rb +1 -2
- data/test/rubygems/test_gem_ext_builder.rb +10 -23
- data/test/rubygems/test_gem_ext_cmake_builder.rb +5 -4
- data/test/rubygems/test_gem_ext_configure_builder.rb +3 -3
- data/test/rubygems/test_gem_ext_ext_conf_builder.rb +8 -9
- data/test/rubygems/test_gem_ext_rake_builder.rb +20 -5
- data/test/rubygems/test_gem_gem_runner.rb +0 -1
- data/test/rubygems/test_gem_gemcutter_utilities.rb +32 -6
- data/test/rubygems/test_gem_impossible_dependencies_error.rb +0 -1
- data/test/rubygems/test_gem_indexer.rb +16 -10
- data/test/rubygems/test_gem_install_update_options.rb +1 -20
- data/test/rubygems/test_gem_installer.rb +154 -119
- data/test/rubygems/test_gem_local_remote_options.rb +3 -3
- data/test/rubygems/test_gem_name_tuple.rb +0 -1
- data/test/rubygems/test_gem_package.rb +77 -31
- data/test/rubygems/test_gem_package_old.rb +0 -1
- data/test/rubygems/test_gem_package_tar_header.rb +42 -2
- data/test/rubygems/test_gem_package_tar_reader.rb +0 -1
- data/test/rubygems/test_gem_package_tar_reader_entry.rb +11 -0
- data/test/rubygems/test_gem_package_tar_writer.rb +43 -7
- data/test/rubygems/test_gem_package_task.rb +2 -2
- data/test/rubygems/test_gem_path_support.rb +28 -11
- data/test/rubygems/test_gem_platform.rb +4 -5
- data/test/rubygems/test_gem_rdoc.rb +1 -136
- data/test/rubygems/test_gem_remote_fetcher.rb +241 -141
- data/test/rubygems/test_gem_request.rb +9 -9
- data/test/rubygems/test_gem_request_connection_pools.rb +24 -3
- data/test/rubygems/test_gem_request_set.rb +5 -5
- data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +82 -64
- data/test/rubygems/test_gem_request_set_lockfile.rb +1 -2
- data/test/rubygems/test_gem_request_set_lockfile_parser.rb +4 -9
- data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +1 -1
- data/test/rubygems/test_gem_requirement.rb +24 -4
- data/test/rubygems/test_gem_resolver.rb +13 -17
- data/test/rubygems/test_gem_resolver_activation_request.rb +0 -1
- data/test/rubygems/test_gem_resolver_api_set.rb +0 -1
- data/test/rubygems/test_gem_resolver_api_specification.rb +0 -1
- data/test/rubygems/test_gem_resolver_best_set.rb +0 -1
- data/test/rubygems/test_gem_resolver_composed_set.rb +0 -1
- data/test/rubygems/test_gem_resolver_conflict.rb +0 -1
- data/test/rubygems/test_gem_resolver_dependency_request.rb +0 -1
- data/test/rubygems/test_gem_resolver_git_set.rb +0 -1
- data/test/rubygems/test_gem_resolver_git_specification.rb +0 -1
- data/test/rubygems/test_gem_resolver_index_set.rb +0 -1
- data/test/rubygems/test_gem_resolver_index_specification.rb +0 -1
- data/test/rubygems/test_gem_resolver_installed_specification.rb +0 -1
- data/test/rubygems/test_gem_resolver_installer_set.rb +2 -3
- data/test/rubygems/test_gem_resolver_local_specification.rb +0 -1
- data/test/rubygems/test_gem_resolver_lock_set.rb +0 -1
- data/test/rubygems/test_gem_resolver_lock_specification.rb +0 -1
- data/test/rubygems/test_gem_resolver_requirement_list.rb +0 -1
- data/test/rubygems/test_gem_resolver_specification.rb +1 -2
- data/test/rubygems/test_gem_resolver_vendor_set.rb +0 -1
- data/test/rubygems/test_gem_resolver_vendor_specification.rb +0 -1
- data/test/rubygems/test_gem_security.rb +1 -3
- data/test/rubygems/test_gem_security_policy.rb +5 -6
- data/test/rubygems/test_gem_security_signer.rb +4 -3
- data/test/rubygems/test_gem_security_trust_dir.rb +1 -2
- data/test/rubygems/test_gem_server.rb +4 -4
- data/test/rubygems/test_gem_source.rb +0 -13
- data/test/rubygems/test_gem_source_fetch_problem.rb +0 -1
- data/test/rubygems/test_gem_source_git.rb +0 -1
- data/test/rubygems/test_gem_source_installed.rb +0 -1
- data/test/rubygems/test_gem_source_lock.rb +0 -1
- data/test/rubygems/test_gem_source_vendor.rb +0 -1
- data/test/rubygems/test_gem_spec_fetcher.rb +0 -1
- data/test/rubygems/test_gem_specification.rb +366 -198
- data/test/rubygems/test_gem_stream_ui.rb +15 -32
- data/test/rubygems/test_gem_stub_specification.rb +0 -2
- data/test/rubygems/test_gem_text.rb +4 -0
- data/test/rubygems/test_gem_uninstaller.rb +42 -3
- data/test/rubygems/test_gem_unsatisfiable_dependency_error.rb +0 -1
- data/test/rubygems/test_gem_uri_formatter.rb +0 -1
- data/test/rubygems/test_gem_util.rb +31 -11
- data/test/rubygems/test_gem_validator.rb +0 -1
- data/test/rubygems/test_gem_version.rb +11 -11
- data/test/rubygems/test_gem_version_option.rb +0 -1
- data/test/rubygems/test_remote_fetch_error.rb +0 -1
- data/test/rubygems/test_require.rb +67 -52
- data/util/CL2notes +1 -2
- data/util/ci +20 -12
- data/util/cops/deprecations.rb +52 -0
- data/util/create_certs.rb +6 -7
- data/util/create_certs.sh +27 -0
- data/util/create_encrypted_key.rb +4 -5
- data/util/patch_with_prs.rb +1 -1
- data/util/rubocop +8 -0
- data/util/update_bundled_ca_certificates.rb +12 -13
- data/util/update_changelog.rb +1 -1
- metadata +61 -51
- data/.autotest +0 -71
- data/.document +0 -5
- data/CONTRIBUTING.rdoc +0 -130
- data/CVE-2013-4287.txt +0 -35
- data/CVE-2013-4363.txt +0 -45
- data/CVE-2015-3900.txt +0 -40
- data/POLICIES.rdoc +0 -74
- data/test/rubygems/fix_openssl_warnings.rb +0 -13
@@ -1,57 +1,56 @@
|
|
1
|
-
|
1
|
+
# How to upgrade/downgrade Rubygems:
|
2
2
|
|
3
|
-
|
3
|
+
## For RubyGems 1.5.0 and 1.5.1:
|
4
4
|
|
5
|
-
RubyGems 1.5.0 and 1.5.1 shipped with a broken
|
6
|
-
|
5
|
+
RubyGems 1.5.0 and 1.5.1 shipped with a broken `gem update --system`. You will
|
6
|
+
need to use the Manual Upgrade Recipe below.
|
7
7
|
|
8
|
-
|
8
|
+
## On Ruby 1.9.x:
|
9
9
|
|
10
|
-
|
10
|
+
### From stock ruby shipping with 1.9:
|
11
11
|
|
12
12
|
Use the Normal Upgrade Method below. (finally!)
|
13
13
|
|
14
|
-
|
14
|
+
## On Ruby 1.8.x:
|
15
15
|
|
16
|
-
|
16
|
+
### From rubygems 1.3.x:
|
17
17
|
|
18
18
|
Use the Normal Upgrade Recipe below.
|
19
19
|
|
20
|
-
|
20
|
+
### From rubygems 1-1.x through 1.2.x:
|
21
21
|
|
22
|
-
RubyGems 1.1 and 1.2 have problems upgrading when there is no
|
23
|
-
|
24
|
-
|
22
|
+
RubyGems 1.1 and 1.2 have problems upgrading when there is no rubygems-update
|
23
|
+
installed. You will need to use the following instructions if you see "Nothing
|
24
|
+
to update".
|
25
25
|
|
26
26
|
Use the Manual Upgrade Recipe below.
|
27
27
|
|
28
|
-
|
28
|
+
### From rubygems < 1.1.x:
|
29
29
|
|
30
30
|
Use the Normal Upgrade Recipe below.
|
31
31
|
|
32
|
-
|
32
|
+
## Downgrade Recipe
|
33
33
|
|
34
|
-
|
34
|
+
### Normal Downgrade
|
35
35
|
|
36
|
-
|
36
|
+
#### With rubygems 1.5.2 and higher:
|
37
37
|
|
38
38
|
$ gem update --system 1.3.7
|
39
39
|
|
40
|
-
|
40
|
+
#### With rubygems 1.5.1 and lower:
|
41
41
|
|
42
42
|
Use sudo/su as appropriate:
|
43
43
|
|
44
44
|
$ gem install rubygems-update -v 1.3.7
|
45
45
|
$ update_rubygems _1.3.7_
|
46
46
|
|
47
|
-
Replace 1.3.7 with whatever version you want to downgrade to. This
|
48
|
-
|
49
|
-
the latest.
|
47
|
+
Replace 1.3.7 with whatever version you want to downgrade to. This recipe can
|
48
|
+
also be used to upgrade to a specific version instead of the latest.
|
50
49
|
|
51
50
|
Do make sure that you don't have any other versions of rubygems-update
|
52
51
|
installed when you run the second command.
|
53
52
|
|
54
|
-
|
53
|
+
### 1.9.2 Downgrade from Rubygems 1.4.x+ to stock 1.9 rubygems:
|
55
54
|
|
56
55
|
Use sudo/su as appropriate:
|
57
56
|
|
@@ -62,31 +61,31 @@ Use sudo/su as appropriate:
|
|
62
61
|
$ gem -v
|
63
62
|
1.3.7
|
64
63
|
|
65
|
-
|
64
|
+
## Upgrade Recipes
|
66
65
|
|
67
|
-
|
66
|
+
### Normal Upgrade
|
68
67
|
|
69
68
|
Use sudo/su as appropriate:
|
70
69
|
|
71
70
|
$ gem update --system
|
72
71
|
|
73
|
-
|
72
|
+
### Manual Upgrade
|
74
73
|
|
75
|
-
If you have an older version of RubyGems installed, then you can still
|
76
|
-
|
74
|
+
If you have an older version of RubyGems installed, then you can still do it
|
75
|
+
in two steps:
|
77
76
|
|
78
77
|
Use sudo/su as appropriate:
|
79
78
|
|
80
79
|
$ gem install rubygems-update
|
81
80
|
$ update_rubygems
|
82
81
|
|
83
|
-
|
82
|
+
### Manual Install
|
84
83
|
|
85
|
-
If you don't have any RubyGems install, there is still the pre-gem
|
86
|
-
|
84
|
+
If you don't have any RubyGems install, there is still the pre-gem approach to
|
85
|
+
getting software, doing it manually:
|
87
86
|
|
88
87
|
Use sudo/su as appropriate:
|
89
88
|
|
90
|
-
*
|
91
|
-
*
|
92
|
-
*
|
89
|
+
* Download from: https://rubygems.org/pages/download
|
90
|
+
* Unpack into a directory and cd there
|
91
|
+
* Install with: ruby setup.rb
|
data/appveyor.yml
CHANGED
@@ -7,62 +7,37 @@ branches:
|
|
7
7
|
skip_tags: true
|
8
8
|
clone_depth: 10
|
9
9
|
|
10
|
-
init:
|
11
|
-
- mklink /d C:\git "C:\Program Files\Git"
|
12
|
-
- if %ruby_version%==_trunk (
|
13
|
-
appveyor DownloadFile https://ci.appveyor.com/api/projects/MSP-Greg/ruby-loco/artifacts/ruby_trunk.7z -FileName C:\ruby_trunk.7z &
|
14
|
-
7z x C:\ruby_trunk.7z -oC:\ruby_trunk )
|
15
|
-
|
16
10
|
environment:
|
17
|
-
PATH: C:/ruby%ruby_version%/bin;C:/Program Files/7-Zip;C:/Program Files/AppVeyor/BuildAgent;C:/git/cmd;C:/Program Files (x86)/GNU/GnuPG/pub;C:/Windows/system32;C:\Windows;
|
18
|
-
WINDIR: C:\Windows
|
19
11
|
matrix:
|
20
|
-
- ruby_version: 193
|
21
|
-
- ruby_version: 200
|
22
|
-
- ruby_version: 200-x64
|
23
|
-
- ruby_version: 21
|
24
|
-
- ruby_version: 21-x64
|
25
|
-
- ruby_version: 22
|
26
|
-
- ruby_version: 22-x64
|
27
12
|
- ruby_version: 23-x64
|
28
|
-
GIT: C:/git/cmd/git.exe
|
29
13
|
- ruby_version: 24-x64
|
30
|
-
|
14
|
+
- ruby_version: 25-x64
|
31
15
|
- ruby_version: _trunk
|
32
|
-
GIT: C:/git/cmd/git.exe
|
33
16
|
|
34
|
-
|
35
|
-
|
36
|
-
|
17
|
+
init:
|
18
|
+
- set PATH=C:/Ruby%ruby_version%/bin;C:/Program Files/7-Zip;C:/Program Files/AppVeyor/BuildAgent;C:/git/cmd;C:/Program Files (x86)/GNU/GnuPG/pub;C:/Windows/system32;C:\Windows;
|
19
|
+
- mklink /j C:\git "C:\Program Files\Git"
|
20
|
+
- set GIT=C:/git/cmd/git.exe
|
21
|
+
- ps: >-
|
22
|
+
if ($env:ruby_version -eq '_trunk') {
|
23
|
+
$trunk_uri = 'https://ci.appveyor.com/api/projects/MSP-Greg/ruby-loco/artifacts/ruby_trunk.7z'
|
24
|
+
(New-Object Net.WebClient).DownloadFile($trunk_uri, 'C:\ruby_trunk.7z')
|
25
|
+
7z.exe x C:\ruby_trunk.7z -oC:\Ruby_trunk
|
26
|
+
}
|
37
27
|
|
38
28
|
install:
|
39
|
-
-
|
40
|
-
|
41
|
-
|
42
|
-
$env:path = 'C:\Ruby' + $env:ruby_version + '\bin;' + $env:path
|
43
|
-
|
44
|
-
if ((gem query -i rake) -eq $False){ gem install rake --no-document }
|
29
|
+
- git submodule update --init --recursive
|
30
|
+
- gem install "rake:>=10.4.2" "minitest:>=5.4.3" --conservative --no-document
|
45
31
|
|
46
|
-
|
47
|
-
|
48
|
-
gem install minitest -v "~> 4.7" --no-document
|
32
|
+
test_script:
|
33
|
+
- rake test
|
49
34
|
|
50
|
-
|
35
|
+
on_finish:
|
36
|
+
- ruby -v
|
51
37
|
|
52
|
-
|
53
|
-
|
54
|
-
-
|
55
|
-
- C:\Ruby200-x64\lib\ruby\gems\2.0.0
|
56
|
-
- C:\Ruby21\lib\ruby\gems\2.1.0
|
57
|
-
- C:\Ruby21-x64\lib\ruby\gems\2.1.0
|
58
|
-
- C:\Ruby22\lib\ruby\gems\2.2.0
|
59
|
-
- C:\Ruby22-x64\lib\ruby\gems\2.2.0
|
60
|
-
- C:\Ruby23-x64\lib\ruby\gems\2.3.0
|
61
|
-
- C:\Ruby24-x64\lib\ruby\gems\2.4.0
|
38
|
+
matrix:
|
39
|
+
allow_failures:
|
40
|
+
- ruby_version: _trunk
|
62
41
|
|
63
42
|
build: off
|
64
|
-
test_script:
|
65
|
-
- rake -rdevkit test
|
66
|
-
on_finish:
|
67
|
-
- ruby -v
|
68
43
|
deploy: off
|
data/bin/gem
CHANGED
@@ -11,7 +11,7 @@ require 'rubygems/exceptions'
|
|
11
11
|
|
12
12
|
required_version = Gem::Requirement.new ">= 1.8.7"
|
13
13
|
|
14
|
-
unless required_version.satisfied_by? Gem.ruby_version
|
14
|
+
unless required_version.satisfied_by? Gem.ruby_version
|
15
15
|
abort "Expected Ruby version #{required_version}, is #{Gem.ruby_version}"
|
16
16
|
end
|
17
17
|
|
@@ -22,4 +22,3 @@ begin
|
|
22
22
|
rescue Gem::SystemExitException => e
|
23
23
|
exit e.exit_code
|
24
24
|
end
|
25
|
-
|
data/bin/update_rubygems
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
require 'rubygems'
|
9
9
|
|
10
|
-
if ARGV.include? '-h' or ARGV.include? '--help'
|
10
|
+
if ARGV.include? '-h' or ARGV.include? '--help'
|
11
11
|
$stderr.puts "rubygems_update [options]"
|
12
12
|
$stderr.puts
|
13
13
|
$stderr.puts "This will install the latest version of RubyGems."
|
@@ -16,7 +16,7 @@ if ARGV.include? '-h' or ARGV.include? '--help' then
|
|
16
16
|
exit
|
17
17
|
end
|
18
18
|
|
19
|
-
unless ARGV.grep(/--version=([\d\.]*)/).empty?
|
19
|
+
unless ARGV.grep(/--version=([\d\.]*)/).empty?
|
20
20
|
exec Gem.ruby, '-S', $PROGRAM_NAME, "_#{$1}_"
|
21
21
|
end
|
22
22
|
|
@@ -34,4 +34,3 @@ else
|
|
34
34
|
ENV["GEM_PREV_VER"] = Gem::VERSION
|
35
35
|
system(Gem.ruby, 'setup.rb', *ARGV)
|
36
36
|
end
|
37
|
-
|
data/bundler/CHANGELOG.md
CHANGED
@@ -1,3 +1,68 @@
|
|
1
|
+
## 1.17.3 (2018-12-27)
|
2
|
+
|
3
|
+
Bugfixes:
|
4
|
+
|
5
|
+
- Fix a Bundler error when installing gems on old versions of RubyGems ([#6839](https://github.com/bundler/bundler/issues/6839), @colby-swandale)
|
6
|
+
- Fix a rare issue where Bundler was removing itself after a `bundle clean` ([#6829](https://github.com/bundler/bundler/issues/6829), @colby-swandale)
|
7
|
+
|
8
|
+
Documentation:
|
9
|
+
|
10
|
+
- Add entry for the `bundle remove` command to the main Bundler manual page
|
11
|
+
|
12
|
+
## 1.17.2 (2018-12-11)
|
13
|
+
|
14
|
+
- Add compatibility for bundler merge with Ruby 2.6
|
15
|
+
|
16
|
+
## 1.17.1 (2018-10-25)
|
17
|
+
|
18
|
+
- Convert `Pathname`s to `String`s before sorting them, fixing #6760 and #6758 ([#6761](https://github.com/bundler/bundler/pull/6761), @alexggordon)
|
19
|
+
|
20
|
+
## 1.17.0 (2018-10-25)
|
21
|
+
|
22
|
+
No new changes.
|
23
|
+
|
24
|
+
## 1.17.0.pre.2 (2018-10-13)
|
25
|
+
|
26
|
+
Features:
|
27
|
+
|
28
|
+
- Configure Bundler home, cache, config and plugin directories with `BUNDLE_USER_HOME`, `BUNDLE_USER_CACHE`, `BUNDLE_USER_CONFIG` and `BUNDLE_USER_PLUGIN` env vars ([#4333](https://github.com/bundler/bundler/issues/4333), @gwerbin)
|
29
|
+
- Add `--all` option to `bundle binstubs` that will generate an executable file for all gems with commands in the bundle
|
30
|
+
- Add `bundle remove` command to remove gems from the Gemfile via the CLI
|
31
|
+
- Improve checking file permissions and asking for `sudo` in Bundler when it doesn't need to
|
32
|
+
- Add error message to `bundle add` to check adding duplicate gems to the Gemfile
|
33
|
+
- When asking for `sudo`, Bundler will show a list of folders/files that require elevated permissions to write to.
|
34
|
+
|
35
|
+
The following new features are available but are not enabled by default. These are intended to be tested by users for the upcoming release of Bundler 2.
|
36
|
+
|
37
|
+
- Improve deprecation warning message for `bundle show` command
|
38
|
+
- Improve deprecation warning message for the `--force` option in `bundle install`
|
39
|
+
|
40
|
+
## 1.17.0.pre.1 (2018-09-24)
|
41
|
+
|
42
|
+
Features:
|
43
|
+
|
44
|
+
- Check folder/file permissions of the Bundle home directory in the `bundle doctor` command ([#5786](https://github.com/bundler/bundler/issues/5786), @ajwann)
|
45
|
+
- Remove compiled gem extensions when running `bundle clean` ([#5596](https://github.com/bundler/bundler/issues/5596), @akhramov)
|
46
|
+
- Add `--paths` option to `bundle list` command ([#6172](https://github.com/bundler/bundler/issues/6172), @colby-swandale)
|
47
|
+
- Add base error class to gems generated from `bundle gem` ([#6260](https://github.com/bundler/bundler/issues/6260), @christhekeele)
|
48
|
+
- Correctly re-install gem extensions with a git source when running `bundle pristine` ([#6294](https://github.com/bundler/bundler/issues/6294), @wagenet)
|
49
|
+
- Add config option to disable platform warnings ([#6124](https://github.com/bundler/bundler/issues/6124), @agrim123)
|
50
|
+
- Add `--skip-install` option to `bundle add` command to add gems to the Gemfile without installation ([#6511](https://github.com/bundler/bundler/issues/6511), @agrim123)
|
51
|
+
- Add `--only-explicit` option to `bundle outdated` to list only outdated gems in the Gemfile ([#5366](https://github.com/bundler/bundler/issues/5366), @peret)
|
52
|
+
- Support adding multiple gems to the Gemfile with `bundle add` ([#6543](https://github.com/bundler/bundler/issues/6543), @agrim123)
|
53
|
+
- Make registered plugin events easier to manage in the Plugin API (@jules2689)
|
54
|
+
- Add new gem install hooks to the Plugin API (@jules2689)
|
55
|
+
- Add `--optimistic` and `--strict` options to `bundle add` ([#6553](https://github.com/bundler/bundler/issues/6553), @agrim123)
|
56
|
+
- Add `--without-group` and `--only-group` options to `bundle list` ([#6564](https://github.com/bundler/bundler/issues/6564), @agrim123)
|
57
|
+
- Add `--gemfile` option to the `bundle exec` command ([#5924](https://github.com/bundler/bundler/issues/5924), @ankitkataria)
|
58
|
+
|
59
|
+
The following new features are available but are not enabled by default. These are intended to be tested by users for the upcoming release of Bundler 2.
|
60
|
+
|
61
|
+
- Make `install --path` relative to the current working directory ([#2048](https://github.com/bundler/bundler/issues/2048), @igorbozato)
|
62
|
+
- Auto-configure job count ([#5808](https://github.com/bundler/bundler/issues/5808), @segiddins)
|
63
|
+
- Use the Gem Version Promoter for major gem updates ([#5993](https://github.com/bundler/bundler/issues/5993), @segiddins)
|
64
|
+
- Add config option to add the Ruby scope to `bundle config path` when configured globally (@segiddins)
|
65
|
+
|
1
66
|
## 1.16.6 (2018-10-05)
|
2
67
|
|
3
68
|
Changes:
|
data/bundler/bundler.gemspec
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
|
4
|
+
begin
|
5
|
+
require File.expand_path("../lib/bundler/version", __FILE__)
|
6
|
+
rescue LoadError
|
7
|
+
# for Ruby core repository
|
8
|
+
require File.expand_path("../bundler/version", __FILE__)
|
9
|
+
end
|
10
|
+
|
5
11
|
require "shellwords"
|
6
12
|
|
7
13
|
Gem::Specification.new do |s|
|
@@ -2,13 +2,18 @@
|
|
2
2
|
|
3
3
|
module Bundler
|
4
4
|
class CLI::Add
|
5
|
-
def initialize(options,
|
6
|
-
@
|
5
|
+
def initialize(options, gems)
|
6
|
+
@gems = gems
|
7
7
|
@options = options
|
8
8
|
@options[:group] = @options[:group].split(",").map(&:strip) if !@options[:group].nil? && !@options[:group].empty?
|
9
9
|
end
|
10
10
|
|
11
11
|
def run
|
12
|
+
raise InvalidOption, "You can not specify `--strict` and `--optimistic` at the same time." if @options[:strict] && @options[:optimistic]
|
13
|
+
|
14
|
+
# raise error when no gems are specified
|
15
|
+
raise InvalidOption, "Please specify gems to add." if @gems.empty?
|
16
|
+
|
12
17
|
version = @options[:version].nil? ? nil : @options[:version].split(",").map(&:strip)
|
13
18
|
|
14
19
|
unless version.nil?
|
@@ -16,10 +21,15 @@ module Bundler
|
|
16
21
|
raise InvalidOption, "Invalid gem requirement pattern '#{v}'" unless Gem::Requirement::PATTERN =~ v.to_s
|
17
22
|
end
|
18
23
|
end
|
19
|
-
dependency = Bundler::Dependency.new(@gem_name, version, @options)
|
20
24
|
|
21
|
-
|
22
|
-
|
25
|
+
dependencies = @gems.map {|g| Bundler::Dependency.new(g, version, @options) }
|
26
|
+
|
27
|
+
Injector.inject(dependencies,
|
28
|
+
:conservative_versioning => @options[:version].nil?, # Perform conservative versioning only when version is not specified
|
29
|
+
:optimistic => @options[:optimistic],
|
30
|
+
:strict => @options[:strict])
|
31
|
+
|
32
|
+
Installer.install(Bundler.root, Bundler.definition) unless @options["skip-install"]
|
23
33
|
end
|
24
34
|
end
|
25
35
|
end
|
@@ -16,7 +16,13 @@ module Bundler
|
|
16
16
|
Bundler.settings.set_command_option_if_given :shebang, options["shebang"]
|
17
17
|
installer = Installer.new(Bundler.root, Bundler.definition)
|
18
18
|
|
19
|
-
|
19
|
+
installer_opts = { :force => options[:force], :binstubs_cmd => true }
|
20
|
+
|
21
|
+
if options[:all]
|
22
|
+
raise InvalidOption, "Cannot specify --all with specific gems" unless gems.empty?
|
23
|
+
@gems = Bundler.definition.specs.map(&:name)
|
24
|
+
installer_opts.delete(:binstubs_cmd)
|
25
|
+
elsif gems.empty?
|
20
26
|
Bundler.ui.error "`bundle binstubs` needs at least one gem to run."
|
21
27
|
exit 1
|
22
28
|
end
|
@@ -35,7 +41,7 @@ module Bundler
|
|
35
41
|
installer.generate_standalone_bundler_executable_stubs(spec)
|
36
42
|
end
|
37
43
|
else
|
38
|
-
installer.generate_bundler_executable_stubs(spec,
|
44
|
+
installer.generate_bundler_executable_stubs(spec, installer_opts)
|
39
45
|
end
|
40
46
|
end
|
41
47
|
end
|
@@ -78,6 +78,8 @@ module Bundler
|
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
81
|
+
permissions_valid = check_home_permissions
|
82
|
+
|
81
83
|
if broken_links.any?
|
82
84
|
message = "The following gems are missing OS dependencies:"
|
83
85
|
broken_links.map do |spec, paths|
|
@@ -86,9 +88,53 @@ module Bundler
|
|
86
88
|
end
|
87
89
|
end.flatten.sort.each {|m| message += m }
|
88
90
|
raise ProductionError, message
|
89
|
-
|
91
|
+
elsif !permissions_valid
|
90
92
|
Bundler.ui.info "No issues found with the installed bundle"
|
91
93
|
end
|
92
94
|
end
|
95
|
+
|
96
|
+
private
|
97
|
+
|
98
|
+
def check_home_permissions
|
99
|
+
require "find"
|
100
|
+
files_not_readable_or_writable = []
|
101
|
+
files_not_rw_and_owned_by_different_user = []
|
102
|
+
files_not_owned_by_current_user_but_still_rw = []
|
103
|
+
Find.find(Bundler.home.to_s).each do |f|
|
104
|
+
if !File.writable?(f) || !File.readable?(f)
|
105
|
+
if File.stat(f).uid != Process.uid
|
106
|
+
files_not_rw_and_owned_by_different_user << f
|
107
|
+
else
|
108
|
+
files_not_readable_or_writable << f
|
109
|
+
end
|
110
|
+
elsif File.stat(f).uid != Process.uid
|
111
|
+
files_not_owned_by_current_user_but_still_rw << f
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
ok = true
|
116
|
+
if files_not_owned_by_current_user_but_still_rw.any?
|
117
|
+
Bundler.ui.warn "Files exist in the Bundler home that are owned by another " \
|
118
|
+
"user, but are still readable/writable. These files are:\n - #{files_not_owned_by_current_user_but_still_rw.join("\n - ")}"
|
119
|
+
|
120
|
+
ok = false
|
121
|
+
end
|
122
|
+
|
123
|
+
if files_not_rw_and_owned_by_different_user.any?
|
124
|
+
Bundler.ui.warn "Files exist in the Bundler home that are owned by another " \
|
125
|
+
"user, and are not readable/writable. These files are:\n - #{files_not_rw_and_owned_by_different_user.join("\n - ")}"
|
126
|
+
|
127
|
+
ok = false
|
128
|
+
end
|
129
|
+
|
130
|
+
if files_not_readable_or_writable.any?
|
131
|
+
Bundler.ui.warn "Files exist in the Bundler home that are not " \
|
132
|
+
"readable/writable by the current user. These files are:\n - #{files_not_readable_or_writable.join("\n - ")}"
|
133
|
+
|
134
|
+
ok = false
|
135
|
+
end
|
136
|
+
|
137
|
+
ok
|
138
|
+
end
|
93
139
|
end
|
94
140
|
end
|
@@ -71,8 +71,7 @@ module Bundler
|
|
71
71
|
if Bundler.use_system_gems?
|
72
72
|
Bundler.ui.confirm "Use `bundle info [gemname]` to see where a bundled gem is installed."
|
73
73
|
else
|
74
|
-
|
75
|
-
relative_path = absolute_path.sub(File.expand_path(".") + File::SEPARATOR, "." + File::SEPARATOR)
|
74
|
+
relative_path = Bundler.configured_bundle_path.base_path_relative_to_pwd
|
76
75
|
Bundler.ui.confirm "Bundled gems are installed into `#{relative_path}`"
|
77
76
|
end
|
78
77
|
|
@@ -169,9 +168,13 @@ module Bundler
|
|
169
168
|
|
170
169
|
def normalize_settings
|
171
170
|
Bundler.settings.set_command_option :path, nil if options[:system]
|
172
|
-
Bundler.settings.
|
173
|
-
|
174
|
-
|
171
|
+
Bundler.settings.temporary(:path_relative_to_cwd => false) do
|
172
|
+
Bundler.settings.set_command_option :path, "vendor/bundle" if options[:deployment]
|
173
|
+
end
|
174
|
+
Bundler.settings.set_command_option_if_given :path, options[:path]
|
175
|
+
Bundler.settings.temporary(:path_relative_to_cwd => false) do
|
176
|
+
Bundler.settings.set_command_option :path, "bundle" if options["standalone"] && Bundler.settings[:path].nil?
|
177
|
+
end
|
175
178
|
|
176
179
|
bin_option = options["binstubs"]
|
177
180
|
bin_option = nil if bin_option && bin_option.empty?
|
@@ -7,16 +7,52 @@ module Bundler
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def run
|
10
|
-
|
11
|
-
|
10
|
+
raise InvalidOption, "The `--only-group` and `--without-group` options cannot be used together" if @options["only-group"] && @options["without-group"]
|
11
|
+
|
12
|
+
raise InvalidOption, "The `--name-only` and `--paths` options cannot be used together" if @options["name-only"] && @options[:paths]
|
13
|
+
|
14
|
+
specs = if @options["only-group"] || @options["without-group"]
|
15
|
+
filtered_specs_by_groups
|
16
|
+
else
|
17
|
+
Bundler.load.specs
|
18
|
+
end.reject {|s| s.name == "bundler" }.sort_by(&:name)
|
12
19
|
|
13
20
|
return Bundler.ui.info "No gems in the Gemfile" if specs.empty?
|
21
|
+
|
22
|
+
return specs.each {|s| Bundler.ui.info s.name } if @options["name-only"]
|
23
|
+
return specs.each {|s| Bundler.ui.info s.full_gem_path } if @options["paths"]
|
24
|
+
|
14
25
|
Bundler.ui.info "Gems included by the bundle:"
|
15
|
-
|
16
|
-
|
17
|
-
end
|
26
|
+
|
27
|
+
specs.each {|s| Bundler.ui.info " * #{s.name} (#{s.version}#{s.git_version})" }
|
18
28
|
|
19
29
|
Bundler.ui.info "Use `bundle info` to print more detailed information about a gem"
|
20
30
|
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
def verify_group_exists(groups)
|
35
|
+
raise InvalidOption, "`#{@options["without-group"]}` group could not be found." if @options["without-group"] && !groups.include?(@options["without-group"].to_sym)
|
36
|
+
|
37
|
+
raise InvalidOption, "`#{@options["only-group"]}` group could not be found." if @options["only-group"] && !groups.include?(@options["only-group"].to_sym)
|
38
|
+
end
|
39
|
+
|
40
|
+
def filtered_specs_by_groups
|
41
|
+
definition = Bundler.definition
|
42
|
+
groups = definition.groups
|
43
|
+
|
44
|
+
verify_group_exists(groups)
|
45
|
+
|
46
|
+
show_groups =
|
47
|
+
if @options["without-group"]
|
48
|
+
groups.reject {|g| g == @options["without-group"].to_sym }
|
49
|
+
elsif @options["only-group"]
|
50
|
+
groups.select {|g| g == @options["only-group"].to_sym }
|
51
|
+
else
|
52
|
+
groups
|
53
|
+
end.map(&:to_sym)
|
54
|
+
|
55
|
+
definition.specs_for(show_groups)
|
56
|
+
end
|
21
57
|
end
|
22
58
|
end
|
@@ -66,7 +66,13 @@ module Bundler
|
|
66
66
|
current_dependencies.key? spec.name
|
67
67
|
end
|
68
68
|
|
69
|
-
|
69
|
+
specs = if options["only-explicit"]
|
70
|
+
gemfile_specs
|
71
|
+
else
|
72
|
+
gemfile_specs + dependency_specs
|
73
|
+
end
|
74
|
+
|
75
|
+
specs.sort_by(&:name).each do |current_spec|
|
70
76
|
next if !gems.empty? && !gems.include?(current_spec.name)
|
71
77
|
|
72
78
|
dependency = current_dependencies[current_spec.name]
|
@@ -30,6 +30,10 @@ module Bundler
|
|
30
30
|
FileUtils.rm_rf spec.full_gem_path
|
31
31
|
when Source::Git
|
32
32
|
source.remote!
|
33
|
+
if extension_cache_path = source.extension_cache_path(spec)
|
34
|
+
FileUtils.rm_rf extension_cache_path
|
35
|
+
end
|
36
|
+
FileUtils.rm_rf spec.extension_dir if spec.respond_to?(:extension_dir)
|
33
37
|
FileUtils.rm_rf spec.full_gem_path
|
34
38
|
else
|
35
39
|
Bundler.ui.warn("Cannot pristine #{gem_name}. Gem is sourced from local path.")
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bundler
|
4
|
+
class CLI::Remove
|
5
|
+
def initialize(gems, options)
|
6
|
+
@gems = gems
|
7
|
+
@options = options
|
8
|
+
end
|
9
|
+
|
10
|
+
def run
|
11
|
+
raise InvalidOption, "Please specify gems to remove." if @gems.empty?
|
12
|
+
|
13
|
+
Injector.remove(@gems, {})
|
14
|
+
|
15
|
+
Installer.install(Bundler.root, Bundler.definition) if @options["install"]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|