summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2020-06-22Fix Encoding::CompatibilityError in `FileUtils::Entry_#join`Kazuhiro NISHIYAMA
2020-06-22Revert d231b8f95b35d8a344cec4f62d7bbdf360a70e1c and add debug printKazuhiro NISHIYAMA
2020-06-22Use filesystem encoding for file path onlyKazuhiro NISHIYAMA
`path_info` contains filesystem encoding and binary. Example is `"/webrick.cgi/%A5%DB%A4%B2/%A4%DB%A4%B2"` in `TestWEBrickCGI#test_cgi`.
2020-06-22Fix remove_entry error when path encoding is not compatible UTF-8Kazuhiro NISHIYAMA
2020-06-21[DOC] Mentioned that `Time.parse` method is not validatorNobuyoshi Nakada
2020-06-19Fix `ERROR ArgumentError: invalid byte sequence in UTF-8`Kazuhiro NISHIYAMA
http://ci.rvm.jp/results/trunk-test@ruby-sky1/3012894 ``` /tmp/ruby/v3/src/trunk-test/tool/lib/minitest/unit.rb:199:in `assert': webrick log start: (MiniTest::Assertion) [2020-06-19 23:01:59] ERROR ArgumentError: invalid byte sequence in UTF-8 /tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/filehandler.rb:336:in `scan' /tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/filehandler.rb:336:in `set_filename' /tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/filehandler.rb:310:in `exec_handler' /tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/filehandler.rb:245:in `do_GET' /tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/abstract.rb:105:in `service' /tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/filehandler.rb:241:in `service' /tmp/ruby/v3/src/trunk-test/lib/webrick/httpserver.rb:140:in `service' /tmp/ruby/v3/src/trunk-test/lib/webrick/httpserver.rb:96:in `run' /tmp/ruby/v3/src/trunk-test/lib/webrick/server.rb:307:in `block in start_thread' ```
2020-06-19Use filesystem encoding as FileHandler's encodingKazuhiro NISHIYAMA
instead of `@root.encoding`. And fallback to ASCII-8BIT when filesystem encoding is US-ASCII. When `@root.encoding` is not compatible filesystem encoding, `Encoding::CompatibilityError` raised at `webrick/httpservlet/filehandler.rb:341`. So `DocumentRoot` must be compatible with filesystem encoding.
2020-06-19Do not change local_path encoding in WEBrick::HTTPServlet::DefaultFileHandlerKazuhiro NISHIYAMA
This reverts 750203c514e0e9a49f7d53fb54084e6844fca42a and 93e6fa1d319d19ce7fba37e4b9924862447b9f38
2020-06-19Fix failure on mswin CIKazuhiro NISHIYAMA
https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-master/log/20200619T054159Z.fail.html.gz ``` 1) Failure: WEBrick::TestFileHandler#test_cjk_in_path [D:/tmp/mswin-build20200619-14304-utgij/ruby/test/webrick/utils.rb:72]: exceptions on 2 threads: webrick log start: [2020-06-19 16:28:42] ERROR `/あ.txt' not found. webrick log end Filesystem encoding is Windows-31J. <"200"> expected but was <"404">. --- <[]> expected but was <["[2020-06-19 16:28:42] ERROR `/\xE3\x81\x82.txt' not found.\n"]>. ``` `prevent_directory_traversal` treats `path_info` as filesystem encoding. So path_info should be filesystem encoding in request URL. On some environments, fallback to ASCII-8BIT when EncodingError.
2020-06-19Hide error location from error messageKazuhiro NISHIYAMA
2020-06-18[open3] only close streams if a block is passedJean Boussier
Ref: 5429deb075beb9a2b67adae269bbac16325876d1 The previous change totally borke `popen2e` in this usage: ```ruby require 'open3' stdin, stdout, process = Open3.popen2e("cat") puts stdout.read ``` Notes: Merged: https://github.com/ruby/ruby/pull/3236
2020-06-18lib/webrick/httpservlet/filehandler.rb: always handle a path as UTF-8Yusuke Endoh
https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-master/log/20200618T113134Z.fail.html.gz ``` 1) Failure: WEBrick::TestFileHandler#test_cjk_in_path [D:/tmp/mswin-build20200618-84004-1t0dh8f/ruby/test/webrick/utils.rb:72]: exceptions on 2 threads: webrick log start: [2020-06-18 22:18:07] ERROR `/??.txt' not found. webrick log end Filesystem encoding is Windows-31J. <"200"> expected but was <"404">. ```
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