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
data/POLICIES.md
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
## Pull Requests
|
2
|
+
|
3
|
+
Contributions to RubyGems are made via GitHub pull requests, which must be
|
4
|
+
approved by a project committer other than the author. To approve a PR, a
|
5
|
+
maintainer can leave a comment including the text "@bundlerbot r+", indicating
|
6
|
+
that they have reviewed the PR and approve it. Bundlerbot will then
|
7
|
+
automatically create a merge commit, test the merge, and land the PR if the
|
8
|
+
merge commit passes the tests.
|
9
|
+
|
10
|
+
This process guarantees that our release branches always have passing tests,
|
11
|
+
and reduces siloing of information to a single contributor. For a full list of
|
12
|
+
possible commands, see [the Bundlerbot
|
13
|
+
documentation](https://bors.tech/documentation/).
|
14
|
+
|
15
|
+
## Long-Term Support
|
16
|
+
|
17
|
+
RubyGems will support Ruby versions for as long as the Ruby team supports that
|
18
|
+
Ruby version. That means that the latest RubyGems release will always support
|
19
|
+
the currently-supported Ruby versions, and RubyGems security fixes will be
|
20
|
+
released for any RubyGems version that shipped inside a currently-supported
|
21
|
+
Ruby version.
|
22
|
+
|
23
|
+
### Bugfix Releases
|
24
|
+
|
25
|
+
RubyGems generally releases bugfixes from the master branch. We may mix bug
|
26
|
+
fixes and new features in the same release. RubyGems does not guarantee it
|
27
|
+
will ship bugfix releases for previous minor or major versions.
|
28
|
+
|
29
|
+
For example, after RubyGems 2.5 is released, the RubyGems team will not
|
30
|
+
provide non-security fixes for RubyGems 2.4, or any earlier versions.
|
31
|
+
|
32
|
+
### Security Releases
|
33
|
+
|
34
|
+
Security releases will be made for RubyGems minor versions that were included
|
35
|
+
in a currently-supported Ruby release.
|
36
|
+
|
37
|
+
For example, since RubyGems 2.0 was shipped in Ruby 2.0, RubyGems 2.0 will
|
38
|
+
receive security fixes until Ruby 2.0 reaches end-of-life.
|
39
|
+
|
40
|
+
### Ruby Version Support
|
41
|
+
|
42
|
+
When a Ruby version reaches end-of-life the following minor release of
|
43
|
+
RubyGems will drop backwards compatibility with that Ruby version.
|
44
|
+
|
45
|
+
For example, since Ruby 2.2 has reached end-of-life, future RubyGems minor
|
46
|
+
releases will only support Ruby 2.3 and above. As of this writing RubyGems is
|
47
|
+
at version 2.7, so when RubyGems 2.8 is released, it will only support Ruby
|
48
|
+
2.3 and later.
|
49
|
+
|
50
|
+
## Release Process
|
51
|
+
|
52
|
+
Releases of new versions should follow these steps, to ensure the process is
|
53
|
+
smooth and no needed steps are missed.
|
54
|
+
|
55
|
+
### Steps for security releases
|
56
|
+
|
57
|
+
* Obtain CVE numbers as needed from HackerOne or Red Hat.
|
58
|
+
* Agree on a release date with ruby-core, so patches can be backported to
|
59
|
+
older Ruby versions as needed.
|
60
|
+
* Avoid releasing security updates on Fridays, so platform services don't
|
61
|
+
have to work on weekends.
|
62
|
+
* Continue with the regular release process below.
|
63
|
+
|
64
|
+
|
65
|
+
### Steps for all releases
|
66
|
+
|
67
|
+
* Confirm milestone on GitHub is complete
|
68
|
+
* Update History.txt
|
69
|
+
* Update Manifest.txt
|
70
|
+
* Create and push git tag
|
71
|
+
* Create and push `rubygems-update` gem and tgz
|
72
|
+
* Publish blog post
|
73
|
+
|
74
|
+
|
75
|
+
## Committer Access
|
76
|
+
|
77
|
+
RubyGems committers may lose their commit privileges if they are inactive for
|
78
|
+
longer than 12 months. Committer permission may be restored upon request by
|
79
|
+
having a pull request merged.
|
80
|
+
|
81
|
+
This is designed to improve the maintainability of RubyGems by requiring
|
82
|
+
committers to maintain familiarity with RubyGems activity and to improve the
|
83
|
+
security of RubyGems by preventing idle committers from having their commit
|
84
|
+
permissions compromised or exposed.
|
85
|
+
|
86
|
+
## Changing These Policies
|
87
|
+
|
88
|
+
These policies were set in order to reduce the burden of maintenance and to
|
89
|
+
keep committers current with existing development and policies. RubyGems work
|
90
|
+
is primarily volunteer-driven which limits the ability to provide long-term
|
91
|
+
support. By joining [Ruby Together](https://rubytogether.org) you can help
|
92
|
+
extend support for older RubyGems versions.
|
data/README.md
CHANGED
@@ -1,49 +1,76 @@
|
|
1
|
-
# RubyGems [](http://travis-ci.org/rubygems/rubygems) [](https://ci.appveyor.com/project/rubygems/rubygems?branch=master)
|
1
|
+
# RubyGems [](http://travis-ci.org/rubygems/rubygems) [](https://ci.appveyor.com/project/rubygems/rubygems?branch=master) [](https://codeclimate.com/github/rubygems/rubygems/maintainability)
|
2
2
|
|
3
3
|
RubyGems is a package management framework for Ruby.
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
A package (also known as a library) contains a set of functionality that can be invoked by a Ruby program, such as reading and parsing an XML file.
|
6
|
+
We call these packages "gems" and RubyGems is a tool to install, create, manage and load these packages in your Ruby environment.
|
7
7
|
|
8
|
-
|
8
|
+
RubyGems is also a client for [RubyGems.org](https://rubygems.org), a public repository of Gems that allows you to publish a Gem
|
9
|
+
that can be shared and used by other developers. See our guide on publishing a Gem at [guides.rubygems.org](http://guides.rubygems.org/publishing/)
|
9
10
|
|
10
|
-
|
11
|
+
## Getting Started
|
12
|
+
|
13
|
+
Installing and managing a Gem is done through the `gem` command. To install a Gem such as [Nokogiri](https://github.com/sparklemotion/nokogiri) which lets
|
14
|
+
you read and parse XML in Ruby:
|
15
|
+
|
16
|
+
$ gem install nokogiri
|
17
|
+
|
18
|
+
RubyGems will download the Nokogiri Gem from RubyGems.org and install it into your Ruby environment.
|
19
|
+
|
20
|
+
Finally, inside your Ruby program, load the Nokogiri gem and start parsing your XML:
|
21
|
+
|
22
|
+
require 'nokogiri'
|
23
|
+
|
24
|
+
Nokogiri.XML('<h1>Hello World</h1>')
|
25
|
+
|
26
|
+
For more information about how to use RubyGems, see our RubyGems basics guide at [guides.rubygems.org](http://guides.rubygems.org/rubygems-basics/)
|
27
|
+
|
28
|
+
## Requirements
|
29
|
+
|
30
|
+
* RubyGems 2.6 supports Ruby 2.4 or lower.
|
31
|
+
* RubyGems 2.7 supports Ruby 2.5 or lower.
|
32
|
+
* RubyGems 3.0 supports Ruby 2.3 or later.
|
11
33
|
|
12
|
-
|
13
|
-
$ gem update --system # you might need to be an administrator or root
|
14
|
-
```
|
34
|
+
## Installation
|
15
35
|
|
16
|
-
|
36
|
+
RubyGems is likely already installed in your Ruby environment, you can check by running `gem --version` in your terminal emulator.
|
37
|
+
In some cases your OS's package manager may install RubyGems as a separate package from Ruby. It's recommended to check
|
38
|
+
with your OS's package manager before installing RubyGems manually.
|
17
39
|
|
18
|
-
|
40
|
+
If you would like to manually install RubyGems:
|
19
41
|
|
20
|
-
|
42
|
+
* Download from https://rubygems.org/pages/download, unpack, and `cd` into RubyGems' src
|
43
|
+
* OR clone this repository and `cd` into the repository (make sure to run `git submodule update --init`)
|
21
44
|
|
22
|
-
|
23
|
-
|
24
|
-
|
45
|
+
Install RubyGems by running:
|
46
|
+
|
47
|
+
$ ruby setup.rb
|
48
|
+
|
49
|
+
Note: You may need to run the install script with admin/root privileges.
|
25
50
|
|
26
51
|
For more details and other options, see:
|
27
52
|
|
28
|
-
|
29
|
-
|
30
|
-
|
53
|
+
$ ruby setup.rb --help
|
54
|
+
|
55
|
+
## Upgrading RubyGems
|
56
|
+
|
57
|
+
To upgrade to the latest RubyGems, run:
|
58
|
+
|
59
|
+
$ gem update --system
|
60
|
+
|
61
|
+
Note: You might need to run the command as an administrator or root user.
|
62
|
+
|
63
|
+
See [UPGRADING](UPGRADING.md) for more details and alternative instructions.
|
31
64
|
|
32
65
|
## Documentation
|
33
66
|
|
34
67
|
RubyGems uses [rdoc](https://github.com/rdoc/rdoc) for documentation. A compiled set of the docs
|
35
|
-
can be viewed online at http://www.rubydoc.info/github/rubygems/rubygems
|
68
|
+
can be viewed online at [rubydoc](http://www.rubydoc.info/github/rubygems/rubygems).
|
36
69
|
|
37
70
|
RubyGems also provides a comprehensive set of guides which covers numerous topics such as
|
38
71
|
creating a new gem, security practices and other resources at http://guides.rubygems.org
|
39
72
|
|
40
|
-
##
|
41
|
-
|
42
|
-
### Support Requests
|
43
|
-
|
44
|
-
Are you unsure of how to use RubyGems? Do you think you've found a bug and
|
45
|
-
you're not sure? If that is the case, the best place for you is to file a
|
46
|
-
support request at [help.rubygems.org](http://help.rubygems.org).
|
73
|
+
## Getting Help
|
47
74
|
|
48
75
|
### Filing Tickets
|
49
76
|
|
@@ -63,7 +90,7 @@ See http://bundler.io/compatibility for known issues.
|
|
63
90
|
|
64
91
|
### Contributing
|
65
92
|
|
66
|
-
If you'd like to contribute to RubyGems, that's awesome, and we <3 you. Check out our [guide to contributing](
|
93
|
+
If you'd like to contribute to RubyGems, that's awesome, and we <3 you. Check out our [guide to contributing](CONTRIBUTING.md) for more information.
|
67
94
|
|
68
95
|
While some RubyGems 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.
|
69
96
|
|
data/Rakefile
CHANGED
@@ -2,10 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'rubygems'
|
4
4
|
require 'rubygems/package_task'
|
5
|
-
|
6
|
-
if ENV['YAML'] == "syck"
|
7
|
-
ENV['TEST_SYCK'] = "1"
|
8
|
-
end
|
5
|
+
require "rake/testtask"
|
9
6
|
|
10
7
|
begin
|
11
8
|
require 'psych'
|
@@ -13,146 +10,50 @@ rescue ::LoadError
|
|
13
10
|
require 'yaml'
|
14
11
|
end
|
15
12
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
abort <<-ERR
|
20
|
-
Error while loading the hoe gem.
|
21
|
-
#{e}
|
22
|
-
ERR
|
23
|
-
rescue ::LoadError
|
24
|
-
abort <<-ERR
|
25
|
-
Error while loading the hoe gem.
|
26
|
-
Please install it by running the following:
|
27
|
-
|
28
|
-
$ [sudo] gem install hoe
|
29
|
-
ERR
|
30
|
-
end
|
31
|
-
|
32
|
-
Hoe::RUBY_FLAGS << " --disable-gems" if RUBY_VERSION > "1.9"
|
33
|
-
|
34
|
-
Hoe.plugin :git
|
35
|
-
Hoe.plugin :travis
|
36
|
-
Hoe.plugin :newb
|
37
|
-
|
38
|
-
hoe = Hoe.spec 'rubygems-update' do
|
39
|
-
self.author = ['Jim Weirich', 'Chad Fowler', 'Eric Hodel']
|
40
|
-
self.email = %w[rubygems-developers@rubyforge.org]
|
41
|
-
self.readme_file = 'README.md'
|
42
|
-
|
43
|
-
license 'Ruby'
|
44
|
-
license 'MIT'
|
45
|
-
|
46
|
-
spec_extras[:required_rubygems_version] = Gem::Requirement.default
|
47
|
-
spec_extras[:required_ruby_version] = Gem::Requirement.new '>= 1.8.7'
|
48
|
-
spec_extras[:executables] = ['update_rubygems']
|
49
|
-
spec_extras[:homepage] = 'https://rubygems.org'
|
50
|
-
|
51
|
-
rdoc_locations <<
|
52
|
-
'docs-push.seattlerb.org:/data/www/docs.seattlerb.org/rubygems/'
|
53
|
-
|
54
|
-
clean_globs.push('**/debug.log',
|
55
|
-
'*.out',
|
56
|
-
'.config',
|
57
|
-
'data__',
|
58
|
-
'html',
|
59
|
-
'logs',
|
60
|
-
'graph.dot',
|
61
|
-
'pkgs/sources/sources*.gem',
|
62
|
-
'scripts/*.hieraki')
|
63
|
-
|
64
|
-
extra_dev_deps.clear
|
65
|
-
|
66
|
-
dependency 'builder', '~> 2.1', :dev
|
67
|
-
dependency 'hoe-seattlerb', '~> 1.2', :dev
|
68
|
-
dependency 'rdoc', '~> 4.0', :dev
|
69
|
-
dependency 'ZenTest', '~> 4.5', :dev
|
70
|
-
dependency 'rake', '~> 10.5', :dev
|
71
|
-
dependency 'minitest', '~> 4.0', :dev
|
72
|
-
|
73
|
-
self.extra_rdoc_files = Dir["*.rdoc"] + %w[
|
74
|
-
CVE-2013-4287.txt
|
75
|
-
CVE-2013-4363.txt
|
76
|
-
]
|
77
|
-
|
78
|
-
spec_extras['rdoc_options'] = proc do |rdoc_options|
|
79
|
-
rdoc_options << "--title=RubyGems Update Documentation"
|
80
|
-
end
|
81
|
-
|
82
|
-
self.rsync_args += " --no-p -O"
|
83
|
-
|
84
|
-
self.version = File.open('lib/rubygems.rb', 'r:utf-8') do |f|
|
85
|
-
f.read[/VERSION\s+=\s+(['"])(#{Gem::Version::VERSION_PATTERN})\1/, 2]
|
86
|
-
end
|
87
|
-
|
88
|
-
spec_extras['require_paths'] = %w[hide_lib_for_update]
|
89
|
-
end
|
13
|
+
desc "Setup Rubygems dev environment"
|
14
|
+
task :setup => ["bundler:checkout"] do
|
15
|
+
gemspec = Gem::Specification.load(File.expand_path("../rubygems-update.gemspec", __FILE__))
|
90
16
|
|
91
|
-
|
92
|
-
|
93
|
-
Hoe::Package.send(:define_method, :install_gem) do |*args|
|
94
|
-
existing_install_gem.bind(self).call(*args).tap { Gem::Specification.reset }
|
17
|
+
gemspec.dependencies.each do |dep|
|
18
|
+
sh "gem install '#{dep.name}:#{dep.requirement.to_s}'"
|
95
19
|
end
|
96
20
|
end
|
97
21
|
|
98
|
-
|
22
|
+
Rake::TestTask.new do |t|
|
23
|
+
t.ruby_opts = %w[--disable-gems]
|
24
|
+
t.ruby_opts << '-rdevkit' if Gem.win_platform?
|
99
25
|
|
100
|
-
|
26
|
+
t.libs << "test"
|
27
|
+
t.libs << "bundler/lib"
|
101
28
|
|
102
|
-
|
103
|
-
|
104
|
-
gem "minitest", "~> 4.0"
|
105
|
-
$:.unshift #{File.expand_path("../bundler/lib", __FILE__).dump}
|
106
|
-
if "1.8" < RUBY_VERSION && RUBY_VERSION < "2.2"
|
107
|
-
module Gem
|
108
|
-
@path_to_default_spec_map.delete_if do |_path, spec|
|
109
|
-
spec.name == "bundler"
|
110
|
-
end
|
111
|
-
end
|
112
|
-
end
|
113
|
-
RUBY
|
29
|
+
t.test_files = FileList['test/**/test_*.rb']
|
30
|
+
end
|
114
31
|
|
115
|
-
|
116
|
-
Rake::Task['clobber_docs'].clear
|
32
|
+
task :default => :test
|
117
33
|
|
118
|
-
|
119
|
-
|
120
|
-
require 'rdoc/task'
|
34
|
+
spec = Gem::Specification.load('rubygems-update.gemspec')
|
35
|
+
v = spec.version
|
121
36
|
|
122
|
-
|
123
|
-
doc.main = hoe.readme_file
|
124
|
-
doc.title = "RubyGems #{v} API Documentation"
|
37
|
+
require 'rdoc/task'
|
125
38
|
|
126
|
-
|
127
|
-
|
39
|
+
RDoc::Task.new :rdoc => 'docs', :clobber_rdoc => 'clobber_docs' do |doc|
|
40
|
+
doc.main = 'README.md'
|
41
|
+
doc.title = "RubyGems #{v} API Documentation"
|
128
42
|
|
129
|
-
|
43
|
+
rdoc_files = Rake::FileList.new %w[lib bundler/lib]
|
44
|
+
rdoc_files.add %w[History.txt LICENSE.txt MIT.txt CODE_OF_CONDUCT.md CONTRIBUTING.rdoc
|
45
|
+
MAINTAINERS.txt Manifest.txt POLICIES.rdoc README.md UPGRADING.rdoc bundler/CHANGELOG.md
|
46
|
+
bundler/CODE_OF_CONDUCT.md bundler/CONTRIBUTING.md bundler/LICENSE.md bundler/README.md
|
47
|
+
hide_lib_for_update/note.txt].map(&:freeze)
|
130
48
|
|
131
|
-
|
132
|
-
end
|
133
|
-
rescue LoadError, RuntimeError # rake 10.1 on rdoc from ruby 1.9.2 and earlier
|
134
|
-
task 'docs' do
|
135
|
-
abort 'You must install rdoc to build documentation, try `rake newb` again'
|
136
|
-
end
|
137
|
-
end
|
49
|
+
doc.rdoc_files = rdoc_files
|
138
50
|
|
139
|
-
|
140
|
-
module Deps
|
141
|
-
alias_method :default_check_extra_task, :check_extra_deps_task
|
142
|
-
def check_extra_deps_task
|
143
|
-
default_check_extra_task
|
144
|
-
rescue Gem::LoadError => e
|
145
|
-
raise unless e.name == 'rake'
|
146
|
-
details = "#{e.class}: #{e}"
|
147
|
-
abort "To override your default rake version, run: `rake _x.y.z_ task_name`:\n\t#{details}"
|
148
|
-
end
|
149
|
-
end
|
51
|
+
doc.rdoc_dir = 'doc'
|
150
52
|
end
|
151
|
-
task(:newb).prerequisites.unshift "bundler:checkout"
|
152
53
|
|
153
54
|
desc "Install gems needed to run the tests"
|
154
55
|
task :install_test_deps => :clean do
|
155
|
-
sh "gem install minitest -v '~>
|
56
|
+
sh "gem install minitest -v '~> 5.0'"
|
156
57
|
end
|
157
58
|
|
158
59
|
begin
|
@@ -170,13 +71,37 @@ rescue LoadError
|
|
170
71
|
end
|
171
72
|
end
|
172
73
|
|
74
|
+
desc "Run rubocop"
|
75
|
+
task(:rubocop) do
|
76
|
+
sh "util/rubocop"
|
77
|
+
end
|
78
|
+
|
173
79
|
# --------------------------------------------------------------------
|
174
80
|
# Creating a release
|
175
81
|
|
176
|
-
task :prerelease => %w[clobber
|
177
|
-
|
82
|
+
task :prerelease => %w[clobber test bundler:build_metadata check_deprecations]
|
178
83
|
task :postrelease => %w[bundler:build_metadata:clean upload guides:publish blog:publish]
|
179
84
|
|
85
|
+
desc "Check for deprecated methods with expired deprecation horizon"
|
86
|
+
task :check_deprecations do
|
87
|
+
if v.segments[1] == 0 && v.segments[2] == 0
|
88
|
+
sh("util/rubocop -r ./util/cops/deprecations --only Rubygems/Deprecations")
|
89
|
+
else
|
90
|
+
puts "Skipping deprecation checks since not releasing a major version."
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
desc "Release rubygems-#{v}"
|
95
|
+
task :release => :prerelease do
|
96
|
+
Rake::Task["package"].invoke
|
97
|
+
sh "gem push pkg/rubygems-update-#{v}.gem"
|
98
|
+
Rake::Task["postrelease"].invoke
|
99
|
+
end
|
100
|
+
|
101
|
+
Gem::PackageTask.new(spec) {}
|
102
|
+
|
103
|
+
Rake::Task["package"].enhance ["pkg/rubygems-#{v}.tgz", "pkg/rubygems-#{v}.zip"]
|
104
|
+
|
180
105
|
file "pkg/rubygems-#{v}" => "pkg/rubygems-update-#{v}" do |t|
|
181
106
|
require 'find'
|
182
107
|
|
@@ -186,7 +111,7 @@ file "pkg/rubygems-#{v}" => "pkg/rubygems-update-#{v}" do |t|
|
|
186
111
|
Find.find '.' do |file|
|
187
112
|
dest = File.expand_path file, dest_root
|
188
113
|
|
189
|
-
if File.directory? file
|
114
|
+
if File.directory? file
|
190
115
|
mkdir_p dest
|
191
116
|
else
|
192
117
|
rm_f dest
|
@@ -196,39 +121,36 @@ file "pkg/rubygems-#{v}" => "pkg/rubygems-update-#{v}" do |t|
|
|
196
121
|
end
|
197
122
|
end
|
198
123
|
|
199
|
-
|
200
|
-
|
201
|
-
file "pkg/rubygems-#{v}.tgz" => source_pkg_dir do
|
124
|
+
file "pkg/rubygems-#{v}.zip" => "pkg/rubygems-#{v}" do
|
202
125
|
cd 'pkg' do
|
203
|
-
sh "
|
126
|
+
sh "zip -q -r rubygems-#{v}.zip rubygems-#{v}"
|
204
127
|
end
|
205
128
|
end
|
206
129
|
|
207
|
-
file "pkg/rubygems-#{v}.
|
130
|
+
file "pkg/rubygems-#{v}.tgz" => "pkg/rubygems-#{v}" do
|
208
131
|
cd 'pkg' do
|
209
|
-
sh "
|
132
|
+
sh "tar -czf rubygems-#{v}.tgz --owner=rubygems:0 --group=rubygems:0 rubygems-#{v}"
|
210
133
|
end
|
211
134
|
end
|
212
135
|
|
213
|
-
file "pkg/rubygems-update-#{v}.gem"
|
214
|
-
|
215
|
-
task :package => %W[
|
216
|
-
pkg/rubygems-update-#{v}.gem
|
217
|
-
pkg/rubygems-#{v}.tgz
|
218
|
-
pkg/rubygems-#{v}.zip
|
219
|
-
]
|
220
|
-
|
221
136
|
desc "Upload release to S3"
|
222
137
|
task :upload_to_s3 do
|
223
|
-
|
138
|
+
begin
|
139
|
+
require "aws-sdk-s3"
|
140
|
+
rescue LoadError
|
141
|
+
abort "Install the aws-sdk-s3 gem to be able to upload gems to rubygems.org."
|
142
|
+
end
|
143
|
+
|
144
|
+
s3 = Aws::S3::Resource.new(region:'us-west-2')
|
145
|
+
%w[zip tgz].each do |ext|
|
146
|
+
obj = s3.bucket('oregon.production.s3.rubygems.org').object("rubygems/rubygems-#{v}.#{ext}")
|
147
|
+
obj.upload_file("pkg/rubygems-#{v}.#{ext}")
|
148
|
+
end
|
224
149
|
end
|
225
150
|
|
226
151
|
desc "Upload release to rubygems.org"
|
227
152
|
task :upload => %w[upload_to_s3]
|
228
153
|
|
229
|
-
# Ignonre to publish rdoc to docs.seattlerb.org
|
230
|
-
Rake::Task['publish_docs'].clear
|
231
|
-
|
232
154
|
directory '../guides.rubygems.org' do
|
233
155
|
sh 'git', 'clone',
|
234
156
|
'git@github.com:rubygems/guides.git',
|
@@ -325,7 +247,7 @@ namespace 'blog' do
|
|
325
247
|
|
326
248
|
history = File.read 'History.txt'
|
327
249
|
|
328
|
-
history.force_encoding Encoding::UTF_8
|
250
|
+
history.force_encoding Encoding::UTF_8
|
329
251
|
|
330
252
|
_, change_log, = history.split %r%^===\s*\d.*%, 3
|
331
253
|
|
@@ -360,7 +282,7 @@ namespace 'blog' do
|
|
360
282
|
|
361
283
|
last_change_type = change_types.pop
|
362
284
|
|
363
|
-
if change_types.empty?
|
285
|
+
if change_types.empty?
|
364
286
|
change_types = ''
|
365
287
|
else
|
366
288
|
change_types = change_types.join(', ') << ' and '
|
@@ -433,64 +355,6 @@ end
|
|
433
355
|
|
434
356
|
# Misc Tasks ---------------------------------------------------------
|
435
357
|
|
436
|
-
# These tasks expect to have the following directory structure:
|
437
|
-
#
|
438
|
-
# git/git.rubini.us/code # Rubinius git HEAD checkout
|
439
|
-
# svn/ruby/trunk # ruby subversion HEAD checkout
|
440
|
-
# svn/rubygems/trunk # RubyGems subversion HEAD checkout
|
441
|
-
#
|
442
|
-
# If you don't have this directory structure, set RUBY_PATH and/or
|
443
|
-
# RUBINIUS_PATH.
|
444
|
-
|
445
|
-
def rsync_with dir
|
446
|
-
rsync_options =
|
447
|
-
"-avP " +
|
448
|
-
"--exclude '*svn*' " +
|
449
|
-
"--exclude '*swp' " +
|
450
|
-
"--exclude '*rbc' " +
|
451
|
-
"--exclude '*.rej' " +
|
452
|
-
"--exclude '*.orig' " +
|
453
|
-
"--exclude 'lib/rubygems/defaults/*' " +
|
454
|
-
"--exclude gauntlet_rubygems.rb"
|
455
|
-
|
456
|
-
sh "rsync #{rsync_options} bin/gem #{dir}/bin/gem"
|
457
|
-
sh "rsync #{rsync_options} lib/ #{dir}/lib"
|
458
|
-
sh "rsync #{rsync_options} test/ #{dir}/test"
|
459
|
-
end
|
460
|
-
|
461
|
-
def diff_with dir
|
462
|
-
diff_options = "-urpN --exclude '*svn*' --exclude '*swp' --exclude '*rbc'"
|
463
|
-
sh "diff #{diff_options} bin/gem #{dir}/bin/gem; true"
|
464
|
-
sh "diff #{diff_options} lib/ubygems.rb #{dir}/lib/ubygems.rb; true"
|
465
|
-
sh "diff #{diff_options} lib/rubygems.rb #{dir}/lib/rubygems.rb; true"
|
466
|
-
sh "diff #{diff_options} lib/rubygems #{dir}/lib/rubygems; true"
|
467
|
-
sh "diff #{diff_options} lib/rbconfig #{dir}/lib/rbconfig; true"
|
468
|
-
sh "diff #{diff_options} test/rubygems #{dir}/test/rubygems; true"
|
469
|
-
end
|
470
|
-
|
471
|
-
rubinius_dir = ENV['RUBINIUS_PATH'] || '../git.rubini.us/code'
|
472
|
-
ruby_dir = ENV['RUBY_PATH'] || '../../svn/ruby/trunk'
|
473
|
-
|
474
|
-
desc "Updates Ruby HEAD with the currently checked-out copy of RubyGems."
|
475
|
-
task :update_ruby do
|
476
|
-
rsync_with ruby_dir
|
477
|
-
end
|
478
|
-
|
479
|
-
desc "Updates Rubinius HEAD with the currently checked-out copy of RubyGems."
|
480
|
-
task :update_rubinius do
|
481
|
-
rsync_with rubinius_dir
|
482
|
-
end
|
483
|
-
|
484
|
-
desc "Diffs Ruby HEAD with the currently checked-out copy of RubyGems."
|
485
|
-
task :diff_ruby do
|
486
|
-
diff_with ruby_dir
|
487
|
-
end
|
488
|
-
|
489
|
-
desc "Diffs Rubinius HEAD with the currently checked-out copy of RubyGems."
|
490
|
-
task :diff_rubinius do
|
491
|
-
diff_with rubinius_dir
|
492
|
-
end
|
493
|
-
|
494
358
|
desc "Cleanup trailing whitespace"
|
495
359
|
task :whitespace do
|
496
360
|
system 'find . -not \( -name .svn -prune -o -name .git -prune \) -type f -print0 | xargs -0 sed -i "" -E "s/[[:space:]]*$//"'
|
@@ -499,9 +363,10 @@ end
|
|
499
363
|
desc "Update the manifest to reflect what's on disk"
|
500
364
|
task :update_manifest do
|
501
365
|
files = []
|
502
|
-
|
503
|
-
|
504
|
-
|
366
|
+
exclude = %r[\.git|\./bundler/(?!lib|man|exe|[^/]+\.md|bundler.gemspec)]ox
|
367
|
+
tracked_files = `git ls-files --recurse-submodules`.split("\n").map {|f| "./#{f}" }
|
368
|
+
|
369
|
+
tracked_files.each do |path|
|
505
370
|
next unless File.file?(path)
|
506
371
|
next if path =~ exclude
|
507
372
|
files << path[2..-1]
|
@@ -510,6 +375,7 @@ task :update_manifest do
|
|
510
375
|
end
|
511
376
|
|
512
377
|
namespace :bundler do
|
378
|
+
desc "Initialize bundler submodule"
|
513
379
|
task :checkout do
|
514
380
|
sh "git submodule update --init"
|
515
381
|
end
|