summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2020-06-18[rubygems/rubygems] Disable parallel installation by default on WindowsDavid Rodríguez
Since we enabled parallel installation by default, we've fixed all the issues related to it that have come up, except for a Windows issue that we haven't yet figured out. This issue is hit by our specs on a daily basis and there's no reason to believe that it won't be hit by end users in a similar way. So, both to stop the testing flakyness and to prevent regressions in the default behavior on Windows, I'd rather leave the default as it was before on Windows for now. https://github.com/rubygems/rubygems/commit/5d8ab57131 Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-18[rubygems/rubygems] Remove unused methodDavid Rodríguez
https://github.com/rubygems/rubygems/commit/b1b39b8c06 Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-18[rubygems/rubygems] Only add .rubocop.yml when --rubocop flag is passedUtkarsh Gupta
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org> https://github.com/rubygems/rubygems/commit/ef2dae4222 Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-18Ship default .rubocop.ymlUtkarsh Gupta
Currently, there is no `.rubocop.yml` shipped by default. So when a user runs `rubocop` after creating a new gem via `bundle gem foo`, it throws a bunch of offenses. With the default `.rubocop.yml` present, the number of those offenses significantly reduce by 25. Signed-off-by: Utkarsh Gupta <utkarsh@debian.org> Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-18[rubygems/rubygems] Only add .rubocop.yml when --rubocop flag is passedUtkarsh Gupta
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org> https://github.com/rubygems/rubygems/commit/ef2dae4222 Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-18Rename hidden templatesDavid Rodríguez
Because they don't play nice with ruby-core's gitignore and cause issues with ruby-core integration. Also, because it's consistent with other templates such as `gitignore.tt`. Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-18Undeprecate the `--no-cache` flagDavid Rodríguez
This is not a remembered option, so it shouldn't have been deprecated. At least not for that reason. Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-18Removed the old file with https://github.com/rubygems/rubygems/pull/3667Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-18Generalize CI templatesFrank Lam
Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-18Use consistent filenaming for Travis templateFrank Lam
Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-18Update github workflow templateFrank Lam
* https://github.com/ruby/setup-ruby is now the more recommended action Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-18Update CI templatesFrank Lam
* Next version of Bundler will auto choose jobs by default * --retry 3 is already default Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-18[rubygems/rubygems] Fix nonexistent constant in CircleCI templateFrank Lam
Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net> https://github.com/rubygems/rubygems/commit/851f8afad1 Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-18[rubygems/rubygems] Move already configured --test hint to before test file ↵Frank Lam
creation https://github.com/rubygems/rubygems/commit/9e5f7a9099 Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-18[rubygems/rubygems] Move already configured --ci hint to before CI file creationFrank Lam
https://github.com/rubygems/rubygems/commit/2af2abe5fd Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-18[rubygems/rubygems] Lower verboseness of user-facing text for bundle gemFrank Lam
https://github.com/rubygems/rubygems/commit/288f073c3c Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-18[rubygems/rubygems] Make test framework/CI configuration for bundle gem ↵Frank Lam
consistent * Add hints for --ci option https://github.com/rubygems/rubygems/commit/5f779f45b0 Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-18[rubygems/rubygems] Remove extra whitespaceFrank Lam
https://github.com/rubygems/rubygems/commit/9986cd01fc Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-18[rubygems/rubygems] Incorporate naming/grammar suggestions from olleolleolleFrank Lam
https://github.com/rubygems/rubygems/commit/80571452ca Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-18[rubygems/rubygems] minor language tweaks, small code refactorAndre Arko
https://github.com/rubygems/rubygems/commit/84e9f3711c Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-18[rubygems/rubygems] update question textColby Swandale
https://github.com/rubygems/rubygems/commit/f14c8a5ec2 Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-18Manually cherry-picked at ↵Hiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/80260b3496e357bf96ffe6f381e29bf25b6749cb Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-18[rubygems/rubygems] Fix `only_update_to_newer_versions` regressionDavid Rodríguez
The `only_update_to_newer_versions` feature flag will enable some new behaviour in bundler 3 (or maybe earlier if we decide to consider it a bug fix) that prevents `bundle update` from unexpectedly downgrading direct dependencies. This seems reasonable, but the current implementation is adding additional requirements for all locked dependencies, not only from the ones in the `Gemfile`. That causes some situations where the `Gemfile` is edited and will resolve to older versions to start failing. This commit fixes the problem by making sure extra requirements are added exclusively for direct dependencies in the `Gemfile`, not for all direct dependencies in the lock file. https://github.com/rubygems/rubygems/commit/128b4596e1 Notes: Merged: https://github.com/ruby/ruby/pull/3212
2020-06-17Remove unnecessary explicit `rake` activationDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/3213
2020-06-17Remove unnecessary stuff from base test caseDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/3213
2020-06-17Tweaks to play nicer with ruby-core parallelized testsDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/3213
2020-06-17Make sure to only reset "dummy" $LOADED_FEATURESDavid Rodríguez
Namely, those generated under `/tmp`. The previous approach was brittle and broken in the case of ruby-core, because under that setup, the current folder is in the original `$LOAD_PATH`, and dummy features are created under `./tmp`, so they were failing to be reset. Notes: Merged: https://github.com/ruby/ruby/pull/3213
2020-06-17Make sure tmp folder exists before calling `Dir.tmpdir`David Rodríguez
This was guaranteed by our gitignore setup where a `tmp/` folder is always present right after cloning the repository, but was not guaranteed under the ruby-core setup. This alternative approach should always work. Notes: Merged: https://github.com/ruby/ruby/pull/3213
2020-06-17Revert "Revert "[rubygems/rubygems] Use a local temporary directory""David Rodríguez
This reverts commit 20971d0df41368e0f946683823bc786514e16fef. Notes: Merged: https://github.com/ruby/ruby/pull/3213
2020-06-17Remove unneeded codeDavid Rodríguez
This was added ~8 years to fix some json warning but I'm pretty sure it's not needed anymore. This has caused several issues in both ruby-core and rdoc test suite and it doesn't make much sense to me these days so let's kill it. Notes: Merged: https://github.com/ruby/ruby/pull/3213
2020-06-16Fix the ArgumentError message in shellsplitAkinori MUSHA
Change "double quote" to just "quote" because the message is about any type of quotes.
2020-06-16Improve the document of ShellwordsAkinori MUSHA
- Improve careless examples - Insert `--` before a file name for cat(1) - Insert `-e` before a search pattern for grep(1) - Add a caution about passing an arbitrary argument to a command
2020-06-15Exit with non-zero status on disabled gem system update.Josef Šimánek
Notes: Merged: https://github.com/ruby/ruby/pull/3229
2020-06-15Add Gem.disable_system_update_message to disable gem update --system if needed.Josef Šimánek
Notes: Merged: https://github.com/ruby/ruby/pull/3229
2020-06-15Remove encoding magic commentsDavid Rodríguez
They are no longer needed since ruby 2.0. Notes: Merged: https://github.com/ruby/ruby/pull/3229
2020-06-15Deprecate `Gem::Util.silent_system`David Rodríguez
There's better tools for this job. Notes: Merged: https://github.com/ruby/ruby/pull/3229
2020-06-15Replace `Gem::Util.silent_system` with better toolsDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/3229
2020-06-15Remove modelines for consistencyDavid Rodríguez
No other files in the repo include this. Notes: Merged: https://github.com/ruby/ruby/pull/3229
2020-06-15Remove random codeDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/3229
2020-06-15Use space inside block braces everywhereDavid Rodríguez
To make rubygems code style consistent with bundler. Notes: Merged: https://github.com/ruby/ruby/pull/3229
2020-06-15Fix ruby-head failing testsDavid Rodríguez
In `ruby-head` (where system rubygems already has the `XDG` standard implementation), some tests currently depend on the presence of a `~/.gem` folder in the home of the user that runs the tests. If that file is present, tests pass, otherwise they don't. For example, the following passes if you have a `~/.gem` folder but fails otherwise with: ``` $ rake TESTOPTS="--name=/TestGemCommandsGenerateIndexCommand#test_execute$\|TestGemCommandsUpdateCommand#test_execute_user_install/ -v" Run options: "--name=/TestGemCommandsGenerateIndexCommand#test_execute$|TestGemCommandsUpdateCommand#test_execute_user_install/" -v --seed 17318 # Running: TestGemCommandsGenerateIndexCommand#test_execute = 0.02 s = . TestGemCommandsUpdateCommand#test_execute_user_install = /rubygems/test/rubygems/test_gem_commands_update_command.rb:412: warning: instance variable @user_install not initialized 0.04 s = F Finished in 0.095337s, 20.9783 runs/s, 20.9783 assertions/s. 1) Failure: TestGemCommandsUpdateCommand#test_execute_user_install [/rubygems/test/rubygems/test_gem_commands_update_command.rb:414]: user_install must be set on the installer 2 runs, 2 assertions, 1 failures, 0 errors, 0 skips rake aborted! Command failed with status (1) Tasks: TOP => default => test (See full trace by running task with --trace) ``` This is because the very initial `require` of the default `did_you_mean` gem that ruby does on startup runs _before_ the global `setup` hook of our tests run. During this require `Gem.data_home` and its value is memoized to a path in the real users home (not the fake user's home that our tests setup, since that code hasn't run yet). Then that memoized value is used when looking for the default folders to look for gems, and since there's no `~/.gem` folder, its value is actually used as part of the `Gem.user_dir` folder in `Gem::Specification.dirs` (this is how we've approached backwards compatibility for the `XDG` feature). That means dummy test gems with the `--user-install` flag are installed to global, real locations and everything is messed up. This commit fixes the issue by resetting the `Gem.data_home` value in case it has already been memoized. Notes: Merged: https://github.com/ruby/ruby/pull/3211
2020-06-15Revert "Revert "[rubygems/rubygems] Remove unneeded global teardown""David Rodríguez
This reverts commit ac2c07e98373bb62be618001c897fa9d5809d8a4. Notes: Merged: https://github.com/ruby/ruby/pull/3211
2020-06-15Use filesystem encoding in do_GET of filehandlerKazuhiro NISHIYAMA
Try to fix 404 error on mswinci. https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-master/log/20200614T225859Z.fail.html.gz ``` 1) Failure: WEBrick::TestFileHandler#test_cjk_in_path [D:/tmp/mswin-build20200615-24932-11ykstf/ruby/test/webrick/utils.rb:72]: exceptions on 2 threads: webrick log start: [2020-06-15 09:48:29] ERROR `/あ.txt' not found. webrick log end. <"200"> expected but was <"404">. --- <[]> expected but was <["[2020-06-15 09:48:29] ERROR `/\xE3\x81\x82.txt' not found.\n"]>. ``` Notes: Merged: https://github.com/ruby/ruby/pull/3227
2020-06-12Revert "[ruby/fileutils] Make verbose output go to stdout instead of stderr"Nobuyoshi Nakada
This reverts commit 7cddb844e6d51f954c6669341b9cc656bd7d3492, because the test of rake 13.0.1 is depending on the previous behavior.
2020-06-12[ruby/fileutils] Fix #install with "X" mode optionNobuyoshi Nakada
`FileUtils#install` methed raises an unexpected `TypeError`, when called with `mode:` option which has `"X"`. ``` $ ruby -rfileutils -e 'FileUtils.install("tmp/a", "tmp/b", mode: "o+X")' /opt/local/lib/ruby/2.7.0/fileutils.rb:942:in `directory?': no implicit conversion of File::Stat into String (TypeError) from /opt/local/lib/ruby/2.7.0/fileutils.rb:942:in `block (3 levels) in symbolic_modes_to_i' from /opt/local/lib/ruby/2.7.0/fileutils.rb:933:in `each_char' from /opt/local/lib/ruby/2.7.0/fileutils.rb:933:in `each' from /opt/local/lib/ruby/2.7.0/fileutils.rb:933:in `inject' from /opt/local/lib/ruby/2.7.0/fileutils.rb:933:in `block (2 levels) in symbolic_modes_to_i' from /opt/local/lib/ruby/2.7.0/fileutils.rb:931:in `each' from /opt/local/lib/ruby/2.7.0/fileutils.rb:931:in `each_slice' from /opt/local/lib/ruby/2.7.0/fileutils.rb:931:in `block in symbolic_modes_to_i' from /opt/local/lib/ruby/2.7.0/fileutils.rb:926:in `each' from /opt/local/lib/ruby/2.7.0/fileutils.rb:926:in `inject' from /opt/local/lib/ruby/2.7.0/fileutils.rb:926:in `symbolic_modes_to_i' from /opt/local/lib/ruby/2.7.0/fileutils.rb:973:in `fu_mode' from /opt/local/lib/ruby/2.7.0/fileutils.rb:883:in `block in install' from /opt/local/lib/ruby/2.7.0/fileutils.rb:1588:in `block in fu_each_src_dest' from /opt/local/lib/ruby/2.7.0/fileutils.rb:1604:in `fu_each_src_dest0' from /opt/local/lib/ruby/2.7.0/fileutils.rb:1586:in `fu_each_src_dest' from /opt/local/lib/ruby/2.7.0/fileutils.rb:877:in `install' from -e:1:in `<main>' ``` In spite of that `symbolic_modes_to_i` considers the `File::Stat` `path` case at the beginning, in `"X"` case, `path` is passed to `FileTest.directory?` method which requires a `String`. In such case, the mode in `path` should be examined instead. https://github.com/ruby/fileutils/commit/af675af6b2
2020-06-12[ruby/fileutils] Make verbose output go to stdout instead of stderrJeremy Evans
Verbose output is not error output, and should be sent to stdout and not stderr. Fixes Ruby bug 4436 https://github.com/ruby/fileutils/commit/563a383025
2020-06-11Make mutating the result of SortedSet#to_a not affect the setJeremy Evans
Fixes [Bug #15834] Notes: Merged: https://github.com/ruby/ruby/pull/3215
2020-06-11Revert encoding to `::Encoding::UTF_8` if `fu_windows?`Kazuhiro NISHIYAMA
2020-06-11Fix error in `remove_entry`Kazuhiro NISHIYAMA
When `LANG=C`, dir is `UTF-8` and `base` is 'ASCII-8BIT` in `FileUtils::Entry_#join`. So `Encoding::CompatibilityError` occurred and files are not removed. https://rubyci.org/logs/rubyci.s3.amazonaws.com/arch/ruby-master/log/20200611T060002Z.fail.html.gz ``` 1) Error: WEBrick::TestFileHandler#test_cjk_in_path: Errno::ENOTEMPTY: Directory not empty @ dir_s_rmdir - /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/tmp/???20200611-1887828-3nn72a /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:1460:in `rmdir' /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:1460:in `block in remove_dir1' /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:1471:in `platform_support' /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:1459:in `remove_dir1' /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:1452:in `remove' /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:780:in `block in remove_entry' /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:1509:in `ensure in postorder_traverse' /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:1509:in `postorder_traverse' /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:778:in `remove_entry' /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/tmpdir.rb:97:in `mktmpdir' /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/test/webrick/test_filehandler.rb:292:in `test_cjk_in_path' ```
2020-06-11[ruby/logger] Mention `File::Null` in Logger#new documentMasataka Pocke Kuwabara
https://github.com/ruby/logger/commit/2e772770be