Commit graph

128 commits

Author SHA1 Message Date
Hiroshi SHIBATA
ac2c07e983 Revert "[rubygems/rubygems] Remove unneeded global teardown"
This reverts commit 93d1588c78.
2020-05-08 14:13:29 +09:00
Hiroshi SHIBATA
20971d0df4 Revert "[rubygems/rubygems] Use a local temporary directory"
This reverts commit e98455f289.
2020-05-08 14:13:29 +09:00
David Rodríguez
93293043f1 [rubygems/rubygems] Remove unneeded global teardown
Instead, make each test cleanup after itself.

e0aba9d64f
2020-05-08 14:13:29 +09:00
Hiroshi SHIBATA
58af4c0a1f [rubygems/rubygems] Split credential helper as credential_setup and use it
b0c55c76ca
2020-05-08 14:13:29 +09:00
David Rodríguez
ce88e2a8aa [rubygems/rubygems] Suppress warnings coming from jar-dependencies
This is a default gem on jruby, which ships with a rubygems plugin,
which prints warnings all over the place during our tests.

This plugin is unnecessary from our tests, so I disable it through the
`JARS_SKIP` environment variable provided by this gem.

0aabbcf269
2020-05-08 14:13:29 +09:00
David Rodríguez
314d7f897c Remove builder gem requirement for gem regenerate_index
This requirement was introduced 14 years ago in
7ce7039b390440754954df5efea619e9f57ef823, and I don't think it's
necessary anymore. I made several tests introducing UTF-8 characters in
gemspec files and generating indexes out of them, and couldn't find any
issues. Gemspecs are read with UTF-8 encoding these days.
2020-05-08 14:13:29 +09:00
David Rodríguez
2efe741902 [rubygems/rubygems] Use a local temporary directory
To make tests more deterministic, since `Dir.tmpdir` sometimes will
return the current directory dependending on the writability of other
paths, and in that case since the current directory is changed by our
tests, tests can fail.

Force a local tmp folder instead, which will always be writable.

3e522bac65
2020-05-08 14:13:29 +09:00
David Rodríguez
fca24dd121 [rubygems/rubygems] No longer necessary
Fixed in
45df1c24d2,
released with ruby 2.3

f8f67f3952
2020-05-08 14:13:29 +09:00
David Rodríguez
676d816ef1 [rubygems/rubygems] Refactor ruby command line building for tests
43819b6973
2020-05-08 14:13:29 +09:00
David Rodríguez
9042787508 [rubygems/rubygems] Remove unnecessary @@ruby variable
5f20647ec1
2020-05-08 14:13:29 +09:00
Josef Šimánek
832a7b0458 [rubygems/rubygems] Add gem build test to check for removed methods.
c07b9cf4f1
2020-05-08 07:38:50 +09:00
Hiroshi SHIBATA
7050f86ae1 [rubygems/rubygems] Removed deprecated methods for Minitest5
It was migrated on ruby core repository too.

  e5db3da9d3

848bbe3c76
2020-05-08 07:38:50 +09:00
Hiroshi SHIBATA
e29c94e86b [rubygems/rubygems] Minitest::Test is works fine with the ruby core repository
afa01a29a3
2020-05-08 07:38:50 +09:00
Hiroshi SHIBATA
3041e2626d [rubygems/rubygems] Revert https://github.com/rubygems/rubygems/pull/3445
These changes completely broke the test suite on ruby core repository.

84b0bea3e1
2020-05-08 07:38:50 +09:00
David Rodríguez
3256480317 [rubygems/rubygems] Don't swallow gem activation exception
Our tests are now guaranteed to not work on older versions of minitest,
so I don't think we should swallow this activation error because it will
make it very clear for the user what the problem is if she has a
minitest version not satisfying the requirement.

a291b65369
2020-05-08 07:38:50 +09:00
David Rodríguez
b8ef5ed8bd [rubygems/rubygems] Remove minitest compatibility code
24213b97d8
2020-05-08 07:38:50 +09:00
David Rodríguez
f4022f943d [rubygems/rubygems] [rubygems/rubygems] Require minitest ~> 5.13
f2cc5d7033

ae5b4e2043
2020-05-08 07:38:50 +09:00
Nobuyoshi Nakada
c6020ba277
Clear cached XDG path names 2020-04-25 02:35:57 +09:00
Hiroshi SHIBATA
5c6269c459
Support XDG_* (#2174)
* Support XDG_CONFIG_HOME for gemrc.

* Support XDG_DATA_HOME for .gem

* Added test for XDG_DATA_HOME

* Do not reuse environmental variable.

* Unify .rdoc path to RDoc.home.

* Support XDG_DATA_HOME for .rdoc

* Ignore exists?

* Extracted config_home path

* Use XDG_CONFIG_HOME for default credential path

* Fixed inconsistency location.

* Fixed the broken tests.

* Support XDG_CONFIG_HOME for irbrc

* Introduce Gem.cache_home as XDG_CACHE_HOME

* Use Gem.cache_home instead of Gem.config_home for the credential file of RubyGems.

* Initialized the old configurations

* Fixed test failure related the configuration initialization

* restore XDG_DATA_HOME

* Fixed the broken examples of bundler with XDG_*

* Do not modify environmental variable on test file

* Use XDG_DATA_HOME insted of XDG_CACHE_HOME for credential file

* stub out Gem.data_home

* Move dir accessor to defaults.rb file

* Use XDG_DATA_HOME for signed gem features

* Use XDG_DATA_HOME for spec cache

* Do not rely on Gem.user_home

* Gem.user_home is always exists. Don't need to use FileUitls.mkdir_p

* Bump support version to RubyGems 3.2.0+

* Removed the needless fallback configuration

* Fixed the inconsistency methods that are find_config_file and config_file

* Use Gem.configuration.credentials_path instead of hard-coded path

* gem_path is always provided

* Removed the duplicated code of find_home

* Also removed the duplicated code of user_home

* use Gem::UNTAINT instead of untaint for surpressing the warnings

* Use File.directory

* Restore XDG_DATA_HOME

* Use File.write
2020-04-23 19:16:06 +09:00
Hiroshi SHIBATA
e5db3da9d3
Migrate {assert,refute}_patch_exits for compatibility with Minitest5 2020-03-30 21:32:26 +09:00
David Rodríguez
7e1e60b044 [rubygems/rubygems] Remove ruby 1.8 leftovers
84c89275b8
2020-03-30 12:49:24 +09:00
David Rodríguez
061add792e
[rubygems/rubygems] Enable Style/ExtraSpacing and auto-correct
6fa0b1b679
2020-03-30 12:48:23 +09:00
David Rodríguez
ba9dcdab36
[rubygems/rubygems] Enable Style/PercentLiteralDelimiters cop in rubygems
So it matches the style used by bundler.

ab0580fd65
2020-03-30 12:42:10 +09:00
David Rodríguez
96064e6f1c
Sync rubygems with current master (#2889) 2020-03-24 15:39:24 +09:00
Hiroshi SHIBATA
600a715c9b
Merge the current master branch of rubygems/rubygems.
Just started to develop RubyGems 3.2.0.
2020-02-01 11:14:57 +09:00
Hiroshi SHIBATA
e672494cd7
Merge RubyGems 3.1.2 2019-12-20 11:50:32 +09:00
Hiroshi SHIBATA
7d463e360b Merge RubyGems 3.1.0.pre3
* Fix gem pristine not accounting for user installed gems. Pull request
    #2914 by Luis Sagastume.
  * Refactor keyword argument test for Ruby 2.7. Pull request #2947 by
    SHIBATA Hiroshi.
  * Fix errors at frozen Gem::Version. Pull request #2949 by Nobuyoshi
    Nakada.
  * Remove taint usage on Ruby 2.7+. Pull request #2951 by Jeremy Evans.
  * Check Manifest.txt is up to date. Pull request #2953 by David Rodríguez.
  * Clarify symlink conditionals in tests. Pull request #2962 by David
    Rodríguez.
  * Update command line parsing to work under ps. Pull request #2966 by
    David Rodríguez.
  * Properly test `Gem::Specifications.stub_for`. Pull request #2970 by
    David Rodríguez.
  * Fix Gem::LOADED_SPECS_MUTEX handling for recursive locking. Pull request
    #2985 by MSP-Greg.
2019-11-11 16:59:49 +09:00
Nobuyoshi Nakada
8b8e7e6e9e
$LOAD_PATH elements should be real paths
Installed path may contain symbolic links.
2019-08-18 00:32:21 +09:00
Hiroshi SHIBATA
dd16f8524c
Revert "Revert "[rubygems/rubygems] [Require] Ensure -I beats a default gem""
This reverts commit 75d29db8f9.
2019-08-17 15:12:45 +09:00
Hiroshi SHIBATA
75d29db8f9
Revert "[rubygems/rubygems] [Require] Ensure -I beats a default gem"
This reverts commit 00cd5d74ce.
2019-08-17 08:52:39 +09:00
Samuel Giddins
00cd5d74ce
[rubygems/rubygems] [Require] Ensure -I beats a default gem
6fbda98eb3
2019-08-17 07:35:48 +09:00
David Rodríguez
0817d95714
[rubygems/rubygems] Enable Layout/EmptyLinesAroundAccessModifier
41b1cebc33
2019-07-31 07:47:02 +08:00
Hiroshi SHIBATA
d1806bd8da
[rubygems/rubygems] There is no usage of @orig_env_* variables in test suite.
2adef51dc9
2019-07-31 07:47:02 +08:00
Hiroshi SHIBATA
a3c0ea55f8
[rubygems/rubygems] Ignore GEMRC variable for test suite. It affects with some test case.
4a0ca2583a
2019-07-31 07:47:02 +08:00
bronzdoc
7081185664
[rubygems/rubygems] Remove unused 'raise' from test_case
2481efcb37
2019-07-31 07:47:01 +08:00
bronzdoc
eb35124cca
[rubygems/rubygems] Remove TODO comment, there's no Gem::Dirs constant
4bacf577f1
2019-07-31 07:47:01 +08:00
Nobuyoshi Nakada
99680f81e8 [rubygems/rubygems] Resolve @@project_dir from test file paths
`Dir.pwd` may differ from the source path.  Test directories and
files should be resolved from test file paths.

e18e7c81b4
2019-07-24 18:15:47 +08:00
Hiroshi SHIBATA
56660de3c6 Merge rubygems master from upstream.
I picked the commit from 3c469e0da538428a0ddd94f99aa73c32da22e8ba
2019-06-01 13:50:41 +03:00
David Rodríguez
d0a5467320 Update rubygems with latest upstream changes
Closes: https://github.com/ruby/ruby/pull/2154
2019-04-28 11:07:45 +09:00
hsbt
f28be7e02d Merge rubygems/rubygems from upstream.
The current master branch is
  97b264f0fa

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-02 11:48:18 +00:00
hsbt
08f8cfe14e Merge RubyGems upstream: 56c0bbb69e4506bda7ef7f447dfec5db820df20b
It fixed the multiple vulnerabilities.
  https://blog.rubygems.org/2019/03/05/security-advisories-2019-03.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-05 03:32:58 +00:00
hsbt
4ae3df42f7 Merge RubyGems master@9be7858f7f17eae3058204f3c03e4b798ba18b9c
This version contains the some style changes by RuboCop.

    * 9d810be0ed
    * 61ea98a727
    * 795893dce3
    * 9be7858f7f

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-14 12:59:03 +00:00
hsbt
3dc6efbe9c Merge rubygems master targeted RubyGems 3.1.0.
1172320540

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-22 06:28:04 +00:00
sorah
6b861342b9 Unset SOURCE_DATE_EPOCH on Rubygems test cases
Relates to r66554. When test suites run with SOURCE_DATE_EPOCH, several
tests would fail.  Environment Variables are already kept with this
setup & teardown phase.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-30 03:15:58 +00:00
hsbt
5335ce0e06 Merge master branch from rubygems/rubygems upstream.
* Enable Style/MethodDefParentheses in Rubocop
    https://github.com/rubygems/rubygems/pull/2478
  * Enable Style/MultilineIfThen in Rubocop
    https://github.com/rubygems/rubygems/pull/2479
  * Fix required_ruby_version with prereleases and improve error message
    https://github.com/rubygems/rubygems/pull/2344
  * Fix bundler rubygems binstub not properly looking for bundler
    https://github.com/rubygems/rubygems/pull/2426

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-21 10:20:47 +00:00
hsbt
3e047420d6 Merge upstream from rubygems/rubygems master branch.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-31 03:23:30 +00:00
hsbt
615ac35934 Merge rubygems master branch from github.com/rubygems/rubygems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-22 00:27:02 +00:00
hsbt
85d461456c Merge master branch from rubygems upstream.
* It's preparation to release RubyGems 3.0.0.beta2 and Ruby 2.6.0
    preview 3.
  * https://github.com/rubygems/rubygems/compare/v3.0.0.beta1...fad2eb15a282b19dfcb4b48bc95b8b39ebb4511f

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27 10:05:04 +00:00
hsbt
8da8d4b043 Merge RubyGems 3.0.0.beta1.
* It drop to support < Ruby 2.2
  * Cleanup deprecated methods and classes.
  * Mark obsoleted methods to deprecate.
  * and other enhancements.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-30 13:01:35 +00:00
hsbt
c6da9cadb3 Merge RubyGems 2.7.7
see release details here: https://blog.rubygems.org/2018/05/18/2.7.7-released.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-18 01:39:13 +00:00