aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix Encoding::CompatibilityError in `FileUtils::Entry_#join`Kazuhiro NISHIYAMA2020-06-221-1/+9
|
* Revert d231b8f95b35d8a344cec4f62d7bbdf360a70e1c and add debug printKazuhiro NISHIYAMA2020-06-221-5/+1
|
* Use filesystem encoding for file path onlyKazuhiro NISHIYAMA2020-06-221-4/+7
| | | | | `path_info` contains filesystem encoding and binary. Example is `"/webrick.cgi/%A5%DB%A4%B2/%A4%DB%A4%B2"` in `TestWEBrickCGI#test_cgi`.
* Fix remove_entry error when path encoding is not compatible UTF-8Kazuhiro NISHIYAMA2020-06-221-1/+5
|
* [DOC] Mentioned that `Time.parse` method is not validatorNobuyoshi Nakada2020-06-211-0/+5
|
* Fix `ERROR ArgumentError: invalid byte sequence in UTF-8`Kazuhiro NISHIYAMA2020-06-191-1/+1
| | | | | | | | | | | | | | | | | 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' ```
* Use filesystem encoding as FileHandler's encodingKazuhiro NISHIYAMA2020-06-191-10/+9
| | | | | | | | | 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.
* Do not change local_path encoding in WEBrick::HTTPServlet::DefaultFileHandlerKazuhiro NISHIYAMA2020-06-191-1/+1
| | | | This reverts 750203c514e0e9a49f7d53fb54084e6844fca42a and 93e6fa1d319d19ce7fba37e4b9924862447b9f38
* Fix failure on mswin CIKazuhiro NISHIYAMA2020-06-191-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Hide error location from error messageKazuhiro NISHIYAMA2020-06-191-1/+1
|
* [open3] only close streams if a block is passedJean Boussier2020-06-181-4/+6
| | | | | | | | | | | | Ref: 5429deb075beb9a2b67adae269bbac16325876d1 The previous change totally borke `popen2e` in this usage: ```ruby require 'open3' stdin, stdout, process = Open3.popen2e("cat") puts stdout.read ```
* lib/webrick/httpservlet/filehandler.rb: always handle a path as UTF-8Yusuke Endoh2020-06-181-6/+1
| | | | | | | | | | | | | | | | 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">. ```
* [rubygems/rubygems] Disable parallel installation by default on WindowsDavid Rodríguez2020-06-181-1/+8
| | | | | | | | | | | | | | 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
* [rubygems/rubygems] Remove unused methodDavid Rodríguez2020-06-181-6/+0
| | | | https://github.com/rubygems/rubygems/commit/b1b39b8c06
* [rubygems/rubygems] Only add .rubocop.yml when --rubocop flag is passedUtkarsh Gupta2020-06-181-1/+0
| | | | | | Signed-off-by: Utkarsh Gupta <utkarsh@debian.org> https://github.com/rubygems/rubygems/commit/ef2dae4222
* Ship default .rubocop.ymlUtkarsh Gupta2020-06-182-0/+8
| | | | | | | | | | | 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>
* [rubygems/rubygems] Only add .rubocop.yml when --rubocop flag is passedUtkarsh Gupta2020-06-181-0/+1
| | | | | | Signed-off-by: Utkarsh Gupta <utkarsh@debian.org> https://github.com/rubygems/rubygems/commit/ef2dae4222
* Rename hidden templatesDavid Rodríguez2020-06-185-4/+4
| | | | | | | 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`.
* Undeprecate the `--no-cache` flagDavid Rodríguez2020-06-181-1/+1
| | | | | This is not a remembered option, so it shouldn't have been deprecated. At least not for that reason.
* Removed the old file with https://github.com/rubygems/rubygems/pull/3667Hiroshi SHIBATA2020-06-181-6/+0
|
* Generalize CI templatesFrank Lam2020-06-183-5/+5
|
* Use consistent filenaming for Travis templateFrank Lam2020-06-182-1/+7
|
* Update github workflow templateFrank Lam2020-06-181-3/+3
| | | | * https://github.com/ruby/setup-ruby is now the more recommended action
* Update CI templatesFrank Lam2020-06-182-4/+4
| | | | | * Next version of Bundler will auto choose jobs by default * --retry 3 is already default
* [rubygems/rubygems] Fix nonexistent constant in CircleCI templateFrank Lam2020-06-181-1/+1
| | | | | Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net> https://github.com/rubygems/rubygems/commit/851f8afad1
* [rubygems/rubygems] Move already configured --test hint to before test file ↵Frank Lam2020-06-181-6/+4
| | | | | | creation https://github.com/rubygems/rubygems/commit/9e5f7a9099
* [rubygems/rubygems] Move already configured --ci hint to before CI file creationFrank Lam2020-06-181-6/+4
| | | | https://github.com/rubygems/rubygems/commit/2af2abe5fd
* [rubygems/rubygems] Lower verboseness of user-facing text for bundle gemFrank Lam2020-06-181-7/+4
| | | | https://github.com/rubygems/rubygems/commit/288f073c3c
* [rubygems/rubygems] Make test framework/CI configuration for bundle gem ↵Frank Lam2020-06-182-11/+21
| | | | | | | | consistent * Add hints for --ci option https://github.com/rubygems/rubygems/commit/5f779f45b0
* [rubygems/rubygems] Remove extra whitespaceFrank Lam2020-06-181-1/+1
| | | | https://github.com/rubygems/rubygems/commit/9986cd01fc
* [rubygems/rubygems] Incorporate naming/grammar suggestions from olleolleolleFrank Lam2020-06-182-5/+5
| | | | https://github.com/rubygems/rubygems/commit/80571452ca
* [rubygems/rubygems] minor language tweaks, small code refactorAndre Arko2020-06-181-27/+20
| | | | https://github.com/rubygems/rubygems/commit/84e9f3711c
* [rubygems/rubygems] update question textColby Swandale2020-06-181-1/+1
| | | | https://github.com/rubygems/rubygems/commit/f14c8a5ec2
* Manually cherry-picked at ↵Hiroshi SHIBATA2020-06-185-2/+89
| | | | https://github.com/rubygems/rubygems/commit/80260b3496e357bf96ffe6f381e29bf25b6749cb
* [rubygems/rubygems] Fix `only_update_to_newer_versions` regressionDavid Rodríguez2020-06-181-1/+2
| | | | | | | | | | | | | | | | | | 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
* Remove unnecessary explicit `rake` activationDavid Rodríguez2020-06-171-5/+0
|
* Remove unnecessary stuff from base test caseDavid Rodríguez2020-06-171-20/+0
|
* Tweaks to play nicer with ruby-core parallelized testsDavid Rodríguez2020-06-171-3/+3
|
* Make sure to only reset "dummy" $LOADED_FEATURESDavid Rodríguez2020-06-171-4/+1
| | | | | | | | | 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.
* Make sure tmp folder exists before calling `Dir.tmpdir`David Rodríguez2020-06-171-3/+6
| | | | | | | | 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.
* Revert "Revert "[rubygems/rubygems] Use a local temporary directory""David Rodríguez2020-06-171-0/+1
| | | | This reverts commit 20971d0df41368e0f946683823bc786514e16fef.
* Remove unneeded codeDavid Rodríguez2020-06-171-12/+0
| | | | | | | | 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.
* Fix the ArgumentError message in shellsplitAkinori MUSHA2020-06-161-2/+2
| | | | Change "double quote" to just "quote" because the message is about any type of quotes.
* Improve the document of ShellwordsAkinori MUSHA2020-06-161-13/+22
| | | | | | | | - 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
* Exit with non-zero status on disabled gem system update.Josef Šimánek2020-06-151-1/+1
|
* Add Gem.disable_system_update_message to disable gem update --system if needed.Josef Šimánek2020-06-152-0/+11
|
* Remove encoding magic commentsDavid Rodríguez2020-06-155-5/+0
| | | | They are no longer needed since ruby 2.0.
* Deprecate `Gem::Util.silent_system`David Rodríguez2020-06-151-0/+11
| | | | There's better tools for this job.
* Replace `Gem::Util.silent_system` with better toolsDavid Rodríguez2020-06-151-3/+5
|
* Remove modelines for consistencyDavid Rodríguez2020-06-151-1/+0
| | | | No other files in the repo include this.