summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2020-07-15Import remaining changesDavid Rodríguez
The "sync with commits" scripts failed to properly import these for some reason. Notes: Merged: https://github.com/ruby/ruby/pull/3275
2020-07-15[rubygems/rubygems] Unswallow `Gem::Package::FormatError`David Rodríguez
This error happen in a CI run, and as it is currently, it doesn't give any useful information about the underlying cause. Let's not swallow the original error. https://github.com/rubygems/rubygems/commit/8c17ba2f45 Notes: Merged: https://github.com/ruby/ruby/pull/3275
2020-07-15[rubygems/rubygems] Allow setting a tag prefix to be used by gem release tasksDavid Rodríguez
https://github.com/rubygems/rubygems/commit/679008f23a Notes: Merged: https://github.com/ruby/ruby/pull/3275
2020-07-15[rubygems/rubygems] Fix line spacing to make Layout/EmptyLines happyUtkarsh Gupta
The Gemfile wasn't properly put in the last commit. As a result, Layout/EmptyLines inspected an offense in the Gemfile. This also fixes the spec w.r.t change in the task default. Signed-off-by: Utkarsh Gupta <utkarsh@debian.org> https://github.com/rubygems/rubygems/commit/d1418fddd3 Notes: Merged: https://github.com/ruby/ruby/pull/3275
2020-07-15[rubygems/rubygems] Add blank lines to make Bundler/OrderedGems happyUtkarsh Gupta
If the blank lines aren't used, then rubocop tries to sort them in alphabetical order within their section. Thus, adding lines so rubocop considers them as different sections and doesn't try to sort them. Signed-off-by: Utkarsh Gupta <utkarsh@debian.org> https://github.com/rubygems/rubygems/commit/cf44b18f0f Notes: Merged: https://github.com/ruby/ruby/pull/3275
2020-07-15[rubygems/rubygems] Fix Rakefile to make Style/SymbolArray happyUtkarsh Gupta
In case of multiple Rake tasks, the default tasks would look something like this: `task default: [:spec, :rubocop]` Instead, they should use %i and look something like this: `task default: %i[spec rubocop]` Signed-off-by: Utkarsh Gupta <utkarsh@debian.org> https://github.com/rubygems/rubygems/commit/487ecd59ce Notes: Merged: https://github.com/ruby/ruby/pull/3275
2020-07-15[rubygems/rubygems] Fix remaining RuboCop issuesUtkarsh Gupta
With #3731 and #3740 merged, this covers up the remaining part of the issues. This was discovered when one tries to create a gem with a different framework. Could be reproduced with: `bundle gem foo --ext --test=test-unit` Signed-off-by: Utkarsh Gupta <utkarsh@debian.org> https://github.com/rubygems/rubygems/commit/51b6457150 Notes: Merged: https://github.com/ruby/ruby/pull/3275
2020-07-15[rubygems/rubygems] Avoid calling LoadError#message because of its slownessJean Boussier
Instead we can rely on `LoadError#path` https://github.com/rubygems/rubygems/commit/16d5c3b43c Notes: Merged: https://github.com/ruby/ruby/pull/3275
2020-07-15[rubygems/rubygems] Constrain (shipped) RuboCop's versionUtkarsh Gupta
Right now, we're not specifying the version constraints on RuboCop that is shipped when a new gem is created. This can break specs which runs rubocop on a new skeleton gem as the newer versions of RuboCop are released. This commit ensures that the specs don't break by constraining the RuboCop version. Signed-off-by: Utkarsh Gupta <utkarsh@debian.org> https://github.com/rubygems/rubygems/commit/0b47243edd Notes: Merged: https://github.com/ruby/ruby/pull/3275
2020-07-15[rubygems/rubygems] Lock rubocop version to 0.80.1Utkarsh Gupta
The later RuboCop versions don't work with ruby2.3 so we should lock the version to what works with ruby2.3 as we haven't dropped the support yet. And since we're using the older version of rubocop, also fix `Max` value of `LineLength` to 120, which is the current standard. Without this, rubocop will throw the line length offenses. Signed-off-by: Utkarsh Gupta <utkarsh@debian.org> https://github.com/rubygems/rubygems/commit/46d0a800a2 Notes: Merged: https://github.com/ruby/ruby/pull/3275
2020-07-15[rubygems/rubygems] Make Style/HashSyntax cop happyUtkarsh Gupta
Previously, we were using the old syntax like: `task :default => :spec`, but now this commit uses the new Ruby 1.9 hash syntax. Signed-off-by: Utkarsh Gupta <utkarsh@debian.org> https://github.com/rubygems/rubygems/commit/b41d0fdb56 Notes: Merged: https://github.com/ruby/ruby/pull/3275
2020-07-15[rubygems/rubygems] Roll back to Dir.chdir blockUtkarsh Gupta
since without that, evaluating the gemspec from outside `File.expand_path( __dir__)` won't work. Signed-off-by: Utkarsh Gupta <utkarsh@debian.org> https://github.com/rubygems/rubygems/commit/9e5e52a1d9 Notes: Merged: https://github.com/ruby/ruby/pull/3275
2020-07-15[rubygems/rubygems] Fix RuboCop offensesUtkarsh Gupta
These offenses appear when you create a gem with `bundle gem foo` and run `rubocop` over it. Initially, there were around 45 offenses detected, but with #3731 and this, the number of offenses have been reduced to 2. Signed-off-by: Utkarsh Gupta <utkarsh@debian.org> https://github.com/rubygems/rubygems/commit/fe9dcaa1b4 Notes: Merged: https://github.com/ruby/ruby/pull/3275
2020-07-15[rubygems/rubygems] bundler/lib/bundler/installer.rb - fix Windows ↵MSP-Greg
'executable_stubs' Windows normal shell requires binstubs with *.cmd extensions https://github.com/rubygems/rubygems/commit/b46326eb1f Notes: Merged: https://github.com/ruby/ruby/pull/3275
2020-07-13Make the mkmf methods private in the global [Bug #16896]Nobuyoshi Nakada
2020-07-13[DOC] Use https:// instead of http:// [ci skip]Kazuhiro NISHIYAMA
2020-07-09Add instance_methods to class generated by DelegateClassMasataka Pocke Kuwabara
Also, make DelegateClass.instance_method fallback to superclass. Fixes [Bug #16982] Notes: Merged: https://github.com/ruby/ruby/pull/3221 Merged-By: jeremyevans <code@jeremyevans.net>
2020-06-29Avoid deprecated OpenSSL::Digest constantsBart de Water
Notes: Merged: https://github.com/ruby/ruby/pull/3270
2020-06-25Add require to Delegator examplesRichard Schneeman
In Ruby 2.7.1 SimpeDelegator cannot be used without requiring `delegate` this PR adds the require to the first example for each class so that devs don't have to hunt for what require to use. Notes: Merged: https://github.com/ruby/ruby/pull/3254
2020-06-25Removed nonsense `rubygems_version` in input gemspec filesNobuyoshi Nakada
As it is ignored and set at building packages automatically, it is just nonsense to set in gemspec file for input.
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