Граф коммитов

8417 Коммитов

Автор SHA1 Сообщение Дата
Colby Swandale 65a4b03781 [rubygems/rubygems] fix missing identation
https://github.com/rubygems/rubygems/commit/2cca6714f3
2020-07-31 21:07:19 +09:00
Jean Boussier 561576367b [rubygems/rubygems] Deduplicate the requirement operators in memory
https://github.com/rubygems/rubygems/commit/9963d33cf2
2020-07-31 21:07:19 +09:00
Jeremy Evans 1a935606b5 [rubygems/rubygems] Fix Kernel#warn override to handle backtrace location with nil path
It's very unlikely to hit this case, but it is possible, as
Thread::Backtrace::Location#path can return nil if the location is
a cfunc with no previous iseq.  See location_path in vm_backtrace.c
in Ruby.

https://github.com/rubygems/rubygems/commit/511935645a
2020-07-31 21:07:19 +09:00
Benoit Daloze 331fe6a88f [rubygems/rubygems] Ignore internal frames in RubyGems' Kernel#warn
* See https://github.com/oracle/truffleruby/issues/2046
* `<internal:` is a common prefix also used by core Ruby files in CRuby.
* test_no_kernel_require_in_*warn_with_uplevel already test this.
* Unfortunately just skipping `<internal:` in the Ruby implementation
  is not enough, because RubyGems' #warn would not skip the
  `<internal:` require (TruffleRuby defines #require in Ruby),
  and the Ruby implementation's #warn would not skip
  RubyGems's #require. The #caller_locations(0) look like this:

  warnee.rb:1:in `<top (required)>' # where #warn is called
  <internal:core> core/kernel.rb:234:in `gem_original_require' # not skipped by RubyGems' warn, skipped by the Ruby impl
  rubygems/core_ext/kernel_require.rb:54:in `require' # not skipped by the Ruby impl's warn, what would be shown without this fix
  warn.rb:1:in `<main>' # what would be correct

  warn.rb is
  require "warnee"
  warnee.rb is
  puts caller_locations(0), nil
  warn "oops", uplevel: 1

https://github.com/rubygems/rubygems/commit/7c838f7419
2020-07-31 21:07:19 +09:00
David Rodríguez 14ab281faa [rubygems/rubygems] Disallow warnings to creep into the test suite
https://github.com/rubygems/rubygems/commit/694e6afee7
2020-07-31 21:07:19 +09:00
David Rodríguez 9d6123da15 [rubygems/rubygems] Fix test warning
https://github.com/rubygems/rubygems/commit/f4c4cddb68
2020-07-31 21:07:19 +09:00
David Rodríguez 06f84d0567 [rubygems/rubygems] Don't `super` on main test setup
The `teardown` method doesn't call it either and I don't think it's
necessary.

https://github.com/rubygems/rubygems/commit/ca2a5d485d
2020-07-31 21:07:19 +09:00
David Rodríguez d0cc4ecb8f [rubygems/rubygems] Remove very old compatibility code
https://github.com/rubygems/rubygems/commit/6e4bef758b
2020-07-31 21:07:19 +09:00
David Rodríguez 1260d22cae [rubygems/rubygems] Extract some common code into a private method
https://github.com/rubygems/rubygems/commit/d1be8cdb3a
2020-07-31 21:07:19 +09:00
David Rodríguez d5b5a7ab31 [rubygems/rubygems] Remove very old TODO note
It was added 10 years ago on a "146 additions, 170 deletions" commit
named "Deprecation removals and minor cleanup." that didn't explain much
other than that.

This TODO doesn't necessarily apply nowadays. I don't see how anyways.
TODO notes, if useful at all, should include a clear explanation of what
should be done either via the note itself or the commit message. This
note doens't meet any of these.

So I want to remove it because it distracts me every time I go through
it.

https://github.com/rubygems/rubygems/commit/58d81e8a32
2020-07-31 21:07:19 +09:00
Jean Boussier 76722c4928 [rubygems/rubygems] Optimize Gem.already_loaded?
Profiling a simple `ruby -e '1'` I see:

```
==================================
  Mode: wall(10)
  Samples: 3414 (55.10% miss rate)
  GC: 856 (25.07%)
==================================
     TOTAL    (pct)     SAMPLES    (pct)     FRAME
       689  (20.2%)         669  (19.6%)     Gem.already_loaded?
       462  (13.5%)         462  (13.5%)     (marking)
       393  (11.5%)         393  (11.5%)     (sweeping)
       815  (23.9%)         365  (10.7%)     Gem::Specification.load
      1050  (30.8%)         156   (4.6%)     Gem.register_default_spec
       100   (2.9%)          84   (2.5%)     Gem::Specification#files
        64   (1.9%)          64   (1.9%)     Gem::BasicSpecification#internal_init
       136   (4.0%)          59   (1.7%)     <top (required)>
      2312  (67.7%)          58   (1.7%)     <top (required)>
        57   (1.7%)          57   (1.7%)     RbConfig.expand
        81   (2.4%)          55   (1.6%)     Gem::Requirement.parse
       191   (5.6%)          51   (1.5%)     <top (required)>
       128   (3.7%)          47   (1.4%)     Gem::Requirement#initialize
        41   (1.2%)          41   (1.2%)     Gem.suffix_regexp
       229   (6.7%)          35   (1.0%)     <module:Gem>
       260   (7.6%)          34   (1.0%)     Kernel#require
```

So clearly `Gem.already_loaded?` is a major hotspot.

After this optimization, it's down to:
```
==================================
  Mode: wall(10)
  Samples: 2653 (58.21% miss rate)
  GC: 718 (27.06%)
==================================
     TOTAL    (pct)     SAMPLES    (pct)     FRAME
       416  (15.7%)         416  (15.7%)     (marking)
       715  (27.0%)         312  (11.8%)     Gem::Specification.load
       299  (11.3%)         299  (11.3%)     (sweeping)
       279  (10.5%)         279  (10.5%)     Gem.already_loaded?
       564  (21.3%)         106   (4.0%)     Gem.register_default_spec
        95   (3.6%)          80   (3.0%)     Gem::Specification#files
        72   (2.7%)          72   (2.7%)     Gem::BasicSpecification#internal_init
       129   (4.9%)          58   (2.2%)     <top (required)>
        53   (2.0%)          53   (2.0%)     RbConfig.expand
      1697  (64.0%)          52   (2.0%)     <top (required)>
        68   (2.6%)          49   (1.8%)     Gem::Requirement.parse
       183   (6.9%)          48   (1.8%)     <top (required)>
       112   (4.2%)          44   (1.7%)     Gem::Requirement#initialize
       220   (8.3%)          33   (1.2%)     <module:Gem>
       250   (9.4%)          32   (1.2%)     Kernel#require
```

The idea is that the vast majority of the time `already_loaded?` won't match
anything. So by first looking for candidate paths that `end_with?` the file we
look for, we save `default_gem_load_paths.size` iterations and string concatenations.

https://github.com/rubygems/rubygems/commit/c60ce88d49
2020-07-31 21:07:19 +09:00
Hiroshi SHIBATA 832fe77879 Bump version to 3.2.0.rc.1 2020-07-31 21:07:19 +09:00
Bart de Water 734c5276f0 [rubygems/rubygems] Simplify digest name selection and use SHA256
The previous commit introduces the Gem::Security.create_digest method, allowing to:
- decouple algorithm choice from implementation (OpenSSL or Ruby built-in)
- untangle the SHA512 fallback for TarWriter from the generic hashing digest choice (undoing commit 9471f8ed2bdc12248d2619bbbce6e53cd6c16cb6)

https://github.com/rubygems/rubygems/commit/1bc03231e4
2020-07-31 21:07:19 +09:00
Bart de Water 8161cf85ba Stop using deprecated OpenSSL::Digest constants 2020-07-31 21:07:19 +09:00
Karol Bucek e7b6e0ff58 [rubygems/rubygems] remove explicit require(s) for auto-loaded constant(s)
the Gem module's auto-loads will handle loading these as needed,

this started as a redundancy found in *rubygems.rb* which had:
`autoload :Specification, 'rubygems/specification'` as well as
`require 'rubygems/specification'`

https://github.com/rubygems/rubygems/commit/43ceae7ac0
2020-07-31 21:07:19 +09:00
Marc-Andre Lafortune c3b480b776 [rubygems/rubygems] Test files should not be included in spec.files
https://github.com/rubygems/rubygems/commit/0c0760b734
2020-07-31 21:07:19 +09:00
David Rodríguez a89665b7b1 Enforce no empty lines around class body in rubygems
To normalize the code style with `bundler`.
2020-07-31 21:07:19 +09:00
Nobuyoshi Nakada b2d96abb42 Extract version number from the source
"requiring version.rb" strategy has some issues.

- cannot work when cross-compiling
- often introduces wrong namespace
- must know the superclasses
- costs at each runtime than at build-time

etc.
2020-07-30 19:03:18 +09:00
Nobuyoshi Nakada 7fb12be99f [ruby/net-ftp] Moved Net::Ftp::Version to Net::FTP
On case-insensitive filesystem, generated Net/FTP.html is
overwritten by Net/Ftp.html.

https://github.com/ruby/net-ftp/commit/14a6ff5134
2020-07-28 15:14:01 +09:00
Sergio e4b63202eb Remove unnecessary word from comment 2020-07-28 12:14:45 +09:00
aycabta c4f8095e97 Use typewriter notation for var[:sym] correctly 2020-07-27 15:24:03 +09:00
Nobuyoshi Nakada ba99eae2a5
[ruby/optparse] Fix ls-files matching regexp
As splitting by NUL means to allow the file names to contain
newlines, path names should match at beginning-of-string instead
of beginning-of-line.

https://github.com/ruby/optparse/commit/df3933aa2b
2020-07-24 11:00:34 +09:00
Yusuke Endoh 098e8c2873 Suppress "assigned but unused variable" warnings 2020-07-23 23:44:25 +09:00
Tom Rothe e43d629575 [ruby/observer] add symbol usage example to Observer#add_observer [doc]
https://github.com/ruby/observer/commit/62a94e3799
2020-07-23 09:49:03 -04:00
Nobuyoshi Nakada f120e65200 [ruby/optparse] Define OptionParser::Version
https://github.com/ruby/optparse/commit/4c0021b5b2
2020-07-23 10:57:33 +09:00
Nobuyoshi Nakada cd429e68d2 [ruby/optparse] Update required ruby version
Now needs `DidYouMean#formatter` which is provided since
did_you_mean 1.2, which requires ruby 2.5.

https://github.com/ruby/optparse/commit/d44bb5c715
2020-07-23 10:57:31 +09:00
Hiroshi SHIBATA 7befc0cdfc
Promote optparse to default gems 2020-07-22 18:38:51 +09:00
aycabta 20172672db Add require 'irb/ruby-lex' to use RubyLex 2020-07-22 04:11:38 +09:00
hyrious 02951a45f0 [ruby/rdoc] Create link to unary operator methods correctly
https://github.com/ruby/rdoc/commit/54500cf12a
2020-07-22 02:35:12 +09:00
Benoit Tigeot 7693aa7056 [ruby/rdoc] Remove empty lines from html file by using ERB trim_mode flag
https://github.com/ruby/rdoc/commit/9e27299a46
2020-07-22 02:34:58 +09:00
Jeremy Evans 38480ad507 [ruby/rdoc] Fix parsing of rb_define_module_under
Fixes Ruby Bug #15819

https://github.com/ruby/rdoc/commit/94a052d833
2020-07-22 02:34:49 +09:00
aycabta f76d67f484 [ruby/rdoc] Fix RDoc::Context#instance_method_list
The warn method returns nil, it's a bug of #instance_method_list.

https://github.com/ruby/rdoc/commit/a20df89263
2020-07-22 02:34:26 +09:00
Nobuhiro IMAI f6e789e3b0 [ruby/irb] handle rescue modifier properly
https://github.com/ruby/irb/commit/6de1341f5e
2020-07-22 02:31:47 +09:00
Masataka Pocke Kuwabara b40e925c92 [ruby/irb] Fix error when `inspect` is called but not found in inspector
https://github.com/ruby/irb/commit/ce6d53e6d9
2020-07-22 02:31:47 +09:00
aycabta c72a2fad97 [ruby/irb] Simplify RubyLex.compile_with_errors_suppressed
nobu-san reviewed,

https://github.com/ruby/irb/pull/106#pullrequestreview-423400033
> How about lexer = Ripper::Lexer.new(";\n#{code}", nil, 0)?
> Encoding pragma is effective only at the beginning.
> And the semicolon and newline will be skipped because the position is before
> the initial pos.

I employ the way.

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>

https://github.com/ruby/irb/commit/e593cc65b7
2020-07-22 02:31:46 +09:00
aycabta 1dfd24a7fc [ruby/irb] Suppress incomplete encoding magic comment error
https://github.com/ruby/irb/commit/443e90af80
2020-07-22 02:31:46 +09:00
aycabta 78ccab2530 [ruby/irb] Suppress incomplete coding magic comment error
https://github.com/ruby/irb/commit/6a457edbd1
2020-07-22 02:31:46 +09:00
Gabriel Nagy a8eecceaef [ruby/csv] Bump minimum ruby version to 2.5.0 (#159)
A dependency to stringio was added to csv, which requires Ruby version
>= 2.5. Bump the gemspec version accordingly.
https://github.com/ruby/csv/commit/bc5a26029f
2020-07-21 09:17:56 +09:00
Sutou Kouhei c6f389d84e [ruby/csv] Move doc/* to doc/csv/* to work in ruby/ruby too
https://github.com/ruby/csv/commit/910f8e0c5d
2020-07-21 09:17:54 +09:00
Burdette Lamar 935d0b3d05 [ruby/csv] Enhanced RDoc for several methods (#158)
* Enhanced RDoc for several methods

* Update lib/csv.rb

Co-authored-by: Sutou Kouhei <kou@cozmixng.org>

Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
https://github.com/ruby/csv/commit/72e8b00e51
2020-07-20 15:39:31 +09:00
Sutou Kouhei 78893f16b2 [ruby/csv] Bump version
https://github.com/ruby/csv/commit/f9cd046d66
2020-07-20 15:39:29 +09:00
Sutou Kouhei d919b0e4f9 [ruby/csv] Require stringio 0.1.3 or later
https://github.com/ruby/csv/commit/09dd9f2771
2020-07-20 15:39:26 +09:00
Sutou Kouhei 4fcfa85cb6
[ruby/csv] CSV.generate_line: use the encoding of the first non ASCII field as the expected encoding
See also: https://github.com/ruby/stringio/issues/13#issuecomment-660543554

https://github.com/ruby/csv/commit/004cf49d18
2020-07-20 02:32:55 +09:00
Sutou Kouhei 178649e6dc
[ruby/csv] force_quotes: add support for specifying the target indexes or names
GitHub: fix GH-153

Reported by Aleksandr. Thanks!!!

https://github.com/ruby/csv/commit/8812c58a26
2020-07-20 02:32:54 +09:00
Burdette Lamar d9749b4715
[ruby/csv] RDoc for converters (#157)
* More on RDoc for converters

* More on RDoc for converters

* Fix indent

Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
https://github.com/ruby/csv/commit/6044976160
2020-07-20 02:32:54 +09:00
Burdette Lamar d7c42df0b1
[ruby/csv] Adding call-seq to methods RDoc (#155)
* Adding call-seq to methods RDoc

Co-authored-by: Sutou Kouhei <kou@cozmixng.org>


https://github.com/ruby/csv/commit/dbd860c1cd
2020-07-20 02:32:54 +09:00
Burdette Lamar 544d82f49b
[ruby/csv] RDoc: summary lists for options (#154)
* RDoc: summary lists for options

* Enhanced RDoc for certain attributes and instance methods

* Enhanced RDoc for certain attributes and instance methods

* Enhanced RDoc for certain attributes and instance methods

* Enhanced RDoc for certain attributes and instance methods
https://github.com/ruby/csv/commit/72d8a25dc9
2020-07-20 02:32:54 +09:00
Burdette Lamar 40c5023629
[ruby/csv] RDoc remark about instance methods (#152)
https://github.com/ruby/csv/commit/76379bbe62
2020-07-20 02:32:54 +09:00
Burdette Lamar a0bee2bbd6
[ruby/csv] Revised introductory RDoc (#151)
https://github.com/ruby/csv/commit/60f6f1c28f
2020-07-20 02:32:54 +09:00
Burdette Lamar da83401ba4
[ruby/csv] Enhanced RDoc for filter (#149)
* Enhanced RDoc for filter

* Correct return values for ::filter, ::foreach, ::parse

* Enhanced RDoc for filter

* Remove "returns nil"s

Co-authored-by: Sutou Kouhei <kou@clear-code.com>
https://github.com/ruby/csv/commit/2c347f9a3d
2020-07-20 02:32:54 +09:00
Burdette Lamar 66b5cedc29
[ruby/csv] Enhancements for RDoc (#148)
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
https://github.com/ruby/csv/commit/25dd4cddbb
2020-07-20 02:32:53 +09:00
Burdette Lamar d9eff306f5
[ruby/csv] Organize files in doc/ (#145)
https://github.com/ruby/csv/commit/bc9ea859b0
2020-07-20 02:32:53 +09:00
Burdette Lamar 920a16893a
[ruby/csv] RDoc for parse_line (adds headers examples) (#143)
* RDoc for parse_line (adds headers examples)

* RDoc for parse_line (adds headers examples)
https://github.com/ruby/csv/commit/a161be928e
2020-07-20 02:32:53 +09:00
Burdette Lamar 6106b7badd
[ruby/csv] Added headers to RDoc for CSV.foreach (#142)
* Added headers: to RDoc for CSV.foreach

* Correct options remark for CSV.generate

* Improve citation for option headers
https://github.com/ruby/csv/commit/b01945ec3a
2020-07-20 02:32:53 +09:00
Burdette Lamar e4742fec64
[ruby/csv] Add headers cases to CSV.parse (#141)
* Add headers cases to CSV.parse

* Adjust call-seq for CSV.parse

* Update csv.rb
https://github.com/ruby/csv/commit/848c760c43
2020-07-20 02:32:53 +09:00
Burdette Lamar 013cca1f9a
[ruby/csv] doc: fix return value of open {} and use File.open {} (#139)
* Enhanced RDoc for CSV

* Repair example code for foreach
https://github.com/ruby/csv/commit/16b425eb37
2020-07-20 02:32:52 +09:00
Burdette Lamar 7c55c96147
[ruby/csv] Rdoc (#137)
Enhancements for open, parse, minor tweaks.
https://github.com/ruby/csv/commit/35392f4e45
2020-07-20 02:32:52 +09:00
Burdette Lamar f89186aebb
[ruby/csv] Add document for CSV.instance (#136)
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
https://github.com/ruby/csv/commit/85e293c1ba
2020-07-20 02:32:52 +09:00
Burdette Lamar 1ac702cd29
[ruby/csv] Add RDoc links for delegated methods (#135)
https://github.com/ruby/csv/commit/1a4b96b418
2020-07-20 02:32:52 +09:00
Koichi ITO 08e70126ae
[ruby/csv] Add `invalid: :replace` for `CSV.open` (#130)
This PR adds `invalid: :replace` for `CSV.open`. It is a PR similar to #129.
https://github.com/ruby/csv/commit/5bf687341c
2020-07-20 02:32:52 +09:00
Koichi ITO cee10c1b70
[ruby/csv] Fix an error for `CSV.open` (#131)
Follow up to https://github.com/ruby/csv/pull/130/files#r434885191.

This PR fixes `ArgumentError` for `CSV.open` when processing
invalid byte sequence in UTF-8.
https://github.com/ruby/csv/commit/a4b528c209
2020-07-20 02:32:52 +09:00
Koichi ITO 4e33a87879
[ruby/csv] Add `undef: :replace` for `CSV.open` (#129)
This PR adds `undef: :replace` option for `CSV.open`.

`File.open` has `undef: :replace` option, but `CSV.open` does not.
It would be convenient if `CSV.open` could have a shortcut by having
`undef: :replace` option.
https://github.com/ruby/csv/commit/cff8b18480
2020-07-20 02:32:51 +09:00
Burdette Lamar cf8157e001
[ruby/csv] RDoc for foreach, generate (#127)
* Rdoc for foreach

* Enhanced Rdoc for CSV.generate
https://github.com/ruby/csv/commit/8c26c0ab1f
2020-07-20 02:32:51 +09:00
Sutou Kouhei 731c0eb44d
[ruby/csv] Bump version
https://github.com/ruby/csv/commit/c6577e5b6e
2020-07-20 02:32:51 +09:00
Burdette Lamar 9e6d54a501
[ruby/csv] Enhanced Rdoc (#124)
* Enhanced Rdoc for ::new

* Rdoc for parse_line

* More on parse_line

* Make ::new neater with :call-seq:

* Make better use of :call-seq:

* Rdoc for generate_line

* Respond to review
https://github.com/ruby/csv/commit/0d42df39cb
2020-07-20 02:32:51 +09:00
Sutou Kouhei e3808c5aca
[ruby/csv] Add missing document files to .gem
GitHub: fix GH-125

Reported by joast. Thanks!!!

https://github.com/ruby/csv/commit/bf41fa94cf
2020-07-20 02:32:51 +09:00
Sutou Kouhei 71bee3819f
[ruby/csv] Bump version
https://github.com/ruby/csv/commit/936f15f3cd
2020-07-20 02:32:50 +09:00
Sutou Kouhei 1822b19221
[ruby/csv] Don't drop stack trace in CSV.parse_line
GitHub: fix GH-120

Reported by Kyle d'Oliveira. Thanks!!!

https://github.com/ruby/csv/commit/2959483f90
2020-07-20 02:32:50 +09:00
Sutou Kouhei cf7e472ab4
[ruby/csv] test scanner: specify encoding explicitly
https://github.com/ruby/csv/commit/6e83a1de9c
2020-07-20 02:32:50 +09:00
Sutou Kouhei b8084b5cb4
[ruby/csv] Fix a bug that write_nil_value or write_empty_value don't work with non String
GitHub: fix GH-123

Reported by asm256. Thanks!!!

https://github.com/ruby/csv/commit/b4492139be
2020-07-20 02:32:50 +09:00
Burdette Lamar 6ba1abd40c
[ruby/csv] Enhanced Rdoc for CSV (#122)
https://github.com/ruby/csv/commit/cd670595d5
2020-07-20 02:32:50 +09:00
Sutou Kouhei 033514c62f
[ruby/csv] Bump version
https://github.com/ruby/csv/commit/edc6cb9022
2020-07-20 02:32:49 +09:00
Sutou Kouhei 814bfc8adc
[ruby/csv] Fix a parse bug when split character exists in middle of column value
GitHub: fix #115

Reported by TOMITA Masahiro. Thanks!!!

https://github.com/ruby/csv/commit/398b3564c5
2020-07-20 02:32:49 +09:00
TOMITA Masahiro aeac7db823
[ruby/csv] Fix docs for :strip option (#114)
https://github.com/ruby/csv/commit/fb10925271
2020-07-20 02:32:49 +09:00
Seiei Miyagi 3c5b67e0db
[ruby/csv] Ensuring StringIO's encoding in CSV.generate (#111)
https://github.com/ruby/csv/commit/dbf55ef008
2020-07-20 02:32:49 +09:00
Mike MacDonald d57bc03ba9
[ruby/csv] Do not loop forever when skip_lines regexp matches zero length with anchors (#110)
* Do not loop forever when skip_lines regexp matches zero length with anchors

* Remove needless white spaces

* Add missing eos check in skip_needless_lines

* Simplify test

https://github.com/ruby/csv/commit/3b15d4a3e8
2020-07-20 02:32:49 +09:00
Jim Kane b219cd5ac3
[ruby/csv] Make CSV::Row#dup return a usable Row (#108)
* Make CSV::Row#dup return a usable Row

Previously, calling `dup` on a `CSV::Row` object yielded an object whose
copy was too shallow. Changing the clone's fields would also change the
fields on the source. This change makes the clone more distinct from the
source, so that changes can be made to its fields without affecting the
source.

* Simplify

https://github.com/ruby/csv/commit/64a1ea06fc
2020-07-20 02:32:49 +09:00
Sutou Kouhei 172cfce6dc
[ruby/csv] Bump version
https://github.com/ruby/csv/commit/284ce810bc
2020-07-20 02:32:48 +09:00
David Rodríguez 5783d0dbfc Import remaining changes
The "sync with commits" scripts failed to properly import these for some
reason.
2020-07-15 16:05:12 +09:00
David Rodríguez 0c8d90b526 [rubygems/rubygems] Unswallow `Gem::Package::FormatError`
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
2020-07-15 16:05:12 +09:00
David Rodríguez 4f9c673cab [rubygems/rubygems] Allow setting a tag prefix to be used by gem release tasks
https://github.com/rubygems/rubygems/commit/679008f23a
2020-07-15 16:05:12 +09:00
Utkarsh Gupta ca133c0366 [rubygems/rubygems] Fix line spacing to make Layout/EmptyLines happy
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
2020-07-15 16:05:12 +09:00
Utkarsh Gupta 95f90e3d2b [rubygems/rubygems] Add blank lines to make Bundler/OrderedGems happy
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
2020-07-15 16:05:12 +09:00
Utkarsh Gupta 281898ed6c [rubygems/rubygems] Fix Rakefile to make Style/SymbolArray happy
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
2020-07-15 16:05:12 +09:00
Utkarsh Gupta 8c65f612f4 [rubygems/rubygems] Fix remaining RuboCop issues
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
2020-07-15 16:05:12 +09:00
Jean Boussier 40f73b3a00 [rubygems/rubygems] Avoid calling LoadError#message because of its slowness
Instead we can rely on `LoadError#path`

https://github.com/rubygems/rubygems/commit/16d5c3b43c
2020-07-15 16:05:12 +09:00
Utkarsh Gupta e2837a77be [rubygems/rubygems] Constrain (shipped) RuboCop's version
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
2020-07-15 16:05:12 +09:00
Utkarsh Gupta ecb87b55d8 [rubygems/rubygems] Lock rubocop version to 0.80.1
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
2020-07-15 16:05:12 +09:00
Utkarsh Gupta b28c6d04d0 [rubygems/rubygems] Make Style/HashSyntax cop happy
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
2020-07-15 16:05:12 +09:00
Utkarsh Gupta cbe4d29c2d [rubygems/rubygems] Roll back to Dir.chdir block
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
2020-07-15 16:05:12 +09:00
Utkarsh Gupta 3b0d2a3d6d [rubygems/rubygems] Fix RuboCop offenses
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
2020-07-15 16:05:12 +09:00
MSP-Greg f3ad8a00e2 [rubygems/rubygems] bundler/lib/bundler/installer.rb - fix Windows 'executable_stubs'
Windows normal shell requires binstubs with *.cmd extensions

https://github.com/rubygems/rubygems/commit/b46326eb1f
2020-07-15 16:05:12 +09:00
Nobuyoshi Nakada c2a6295ec0
Make the mkmf methods private in the global [Bug #16896] 2020-07-13 18:44:22 +09:00
Kazuhiro NISHIYAMA 16bc9bf7e8
[DOC] Use https:// instead of http:// [ci skip] 2020-07-13 11:33:40 +09:00
Masataka Pocke Kuwabara ba81bc24e6
Add instance_methods to class generated by DelegateClass
Also, make DelegateClass.instance_method fallback to superclass.

Fixes [Bug #16982]
2020-07-09 15:01:10 -07:00
Bart de Water 3621a7debf Avoid deprecated OpenSSL::Digest constants 2020-06-29 13:25:32 +09:00
Richard Schneeman 2d89af45ea Add require to Delegator examples
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.
2020-06-25 11:21:13 -04:00
Nobuyoshi Nakada 9a78e24f7d
Removed nonsense `rubygems_version` in input gemspec files
As it is ignored and set at building packages automatically, it is
just nonsense to set in gemspec file for input.
2020-06-25 15:44:56 +09:00
Kazuhiro NISHIYAMA 6adbdb56ed
Fix Encoding::CompatibilityError in `FileUtils::Entry_#join` 2020-06-22 18:34:24 +09:00
Kazuhiro NISHIYAMA 7ac6c967e4
Revert d231b8f95b and add debug print 2020-06-22 18:18:16 +09:00