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

76 Коммитов

Автор SHA1 Сообщение Дата
David Rodríguez 6e2240a2f9 Sync latest bundler & rubygems development version 2021-07-07 13:30:20 +09:00
Yusuke Endoh b957c3dbcb [rubygems/rubygems] Rename test/rubygems/test_{case,utilities}.rb to avoid "test_" prefix
This changes "test/rubygems/test_case.rb" to "test/rubygems/helper.rb",
and "test/rubygems/test_utilities.rb" to "test/rubygems/utilities.rb".

The two files are a helper for tests, not test files. However, a file
starting with "test_" prefix is handled as a test file directly loaded
by test-unit because Rakefile specifies:

```
t.test_files = FileList['test/**/test_*.rb']
```

Directly loading test/rubygems/test_utilities.rb caused "uninitialized
constant Gem::TestCase". This issue was fixed by
59c6820971, but the fix caused a
"circular require" warning because test_utilities.rb and test_case.rb
are now requiring each other.

Anyway, adding "test_" prefix to a test helper file is confusing, so
this changeset reverts the fix and solve the issue by renaming them.

https://github.com/rubygems/rubygems/commit/6460e018df
2021-06-03 12:23:22 +09:00
Hiroshi SHIBATA e487ba7dda
[rubygems/rubygems] Use pend instead of skip 2021-05-28 12:33:16 +09:00
David Rodríguez f7732ae2eb [rubygems/rubygems] Require the new files in `test/` relatively
https://github.com/rubygems/rubygems/commit/c77868a555
2021-05-28 11:53:09 +09:00
Hiroshi SHIBATA c30594bb0c [rubygems/rubygems] Use assert_raise instead of assert_raises
https://github.com/rubygems/rubygems/commit/769e87f011
2021-05-12 17:24:43 +09:00
Hiroshi SHIBATA 3948be3503 [rubygems/rubygems] Use assert_path_exist and assert_path_not_exist instead of assert_path_exists and refute_path_exists
https://github.com/rubygems/rubygems/commit/a7c93558c3
2021-05-12 17:24:43 +09:00
Hiroshi SHIBATA 4aca77edde Merge prepare version of RubyGems 3.2.0 2020-12-08 17:30:02 +09:00
Hiroshi SHIBATA b717f73402
Revert "Manually merged from https://github.com/rubygems/rubygems/pull/2636"
31a6eaabc1 is obsoleted with
  https://github.com/rubygems/rubygems/pull/3820
2020-09-23 22:01:44 +09:00
Hiroshi SHIBATA 31a6eaabc1
Manually merged from https://github.com/rubygems/rubygems/pull/2636
Enable Style/EmptyLinesAroundClassBody rubocop cop.
2020-09-23 21:02:56 +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
David Rodríguez 955f1837a1 Use space inside block braces everywhere
To make rubygems code style consistent with bundler.
2020-06-15 21:20:37 +09:00
Nobuyoshi Nakada 449b62ba01
Skip tests which do not work until installed when load-relative 2020-06-05 10:20:38 +09:00
Nobuyoshi Nakada 073ff73972
Show better failure messages 2020-06-05 10:20:06 +09:00
Yuki Nishijima 77ba8a1d61 [rubygems/rubygems] Use LoadError#path to figure out the argument passed to 'require'
https://github.com/rubygems/rubygems/commit/5995394ec4
2020-06-05 07:32:42 +09:00
David Rodríguez f8f5e7fadf [rubygems/rubygems] Respect files loaded from default gems before rubygems
https://github.com/rubygems/rubygems/commit/f3da3c1190
2020-06-05 07:32:42 +09:00
Benoit Daloze ff5ca548c3 [rubygems/rubygems] Use a real file to run the test
* JRuby doesn't support multi-line -e.

https://github.com/rubygems/rubygems/commit/1fb6657a7d
2020-06-05 07:32:42 +09:00
Benoit Daloze ae3d0d8a20 [rubygems/rubygems] Add a more comprehensive and reliable test for upgraded default gems
* Test that the correct version is loaded and that the default gem is
  not loaded at all.

https://github.com/rubygems/rubygems/commit/ee08508b2a
2020-06-05 07:32:42 +09:00
Benoit Daloze 5f0e84ba8d [rubygems/rubygems] Fix check for testing in the ruby repository
* When testing in the rubygems/rubygems repository, the previous code would
  move the lib/ dir at the end of $LOAD_PATH, which would cause to load
  a mix of lib/ RubyGems and in-stdlib-dir RubyGems, which blows up.

https://github.com/rubygems/rubygems/commit/f6f6f00ed1
2020-06-05 07:32:42 +09:00
Benoit Daloze 709d58446f [rubygems/rubygems] Clarify what test_activate_via_require_respects_loaded_files does and tests
* Clearly require the benchmark stdlib instead of far away in test_case.rb

https://github.com/rubygems/rubygems/commit/d74b9ca04c
2020-06-05 07:32:42 +09:00
Benoit Daloze 5c1957e95c [rubygems/rubygems] Simplify #warn test to not rely on the effect of -C on -I
https://github.com/rubygems/rubygems/commit/382642a0d4
2020-06-05 07:32:42 +09:00
David Rodríguez f0f138aa5d [rubygems/rubygems] Fix `$LOADED_FEATURES` cache sometimes not respected
In the cases where the initial manually `-I` path resolution succeeded,
we were passing a full path to the original require effectively skipping
the `$LOADED_FEATURES` cache. With this change, we _only_ do the
resolution when a matching requirable path is found in a default gem. In
that case, we skip activation of the default gem if we detect that the
required file will be picked up for a `-I` path.

https://github.com/rubygems/rubygems/commit/22ad5717c3
2020-06-05 07:32:42 +09:00
David Rodríguez a18e81d797 [rubygems/rubygems] Fix performance regression in `require`
Our check for `-I` paths should not go through all activated gems.

https://github.com/rubygems/rubygems/commit/00d98eb8a3
2020-06-05 07:32:42 +09:00
David Rodríguez 676d816ef1 [rubygems/rubygems] Refactor ruby command line building for tests
https://github.com/rubygems/rubygems/commit/43819b6973
2020-05-08 14:13:29 +09:00
Brandon Fish 1635394347 [rubygems/rubygems] Update test_realworld_default_gem to use rubygems project sources
https://github.com/rubygems/rubygems/commit/7506f7eb07
2020-05-08 14:13:29 +09:00
David Rodríguez 9042787508 [rubygems/rubygems] Remove unnecessary `@@ruby` variable
https://github.com/rubygems/rubygems/commit/5f20647ec1
2020-05-08 14:13:29 +09:00
David Rodríguez ba9dcdab36
[rubygems/rubygems] Enable Style/PercentLiteralDelimiters cop in rubygems
So it matches the style used by bundler.

https://github.com/rubygems/rubygems/commit/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 8c67080381
Revert "[rubygems/rubygems] Fix require issue with file extension priority"
This reverts commit d767da428c.

  It fails with spec/ruby/core/kernel/require_spec.rb:5
2020-02-06 22:07:39 +09:00
David Rodríguez d767da428c
[rubygems/rubygems] Fix require issue with file extension priority
If `require "a"` is run when two folders have been specified in the -I
option including a "a.rb" file and a "a.so" file respectively, the ruby
spec says that the ".rb" file should always be preferred. However, the
logic we added in https://github.com/rubygems/rubygems/commit/6b81076d9
to make the -I option always beat default gems does not respect this
spec, creating a difference from the original ruby-core's require.

[the ruby spec says]: d80a6e2b22/core/kernel/shared/require.rb (L234-L246)

https://github.com/rubygems/rubygems/commit/b3944384f4
2020-02-06 21:57:18 +09:00
David Rodríguez c6b5881eae
[rubygems/rubygems] Make non "test_" method private
https://github.com/rubygems/rubygems/commit/912d141a35
2020-02-06 21:57:17 +09:00
Jeremy Evans ff96565686 Update tests for full keyword argument separation 2020-01-02 18:40:45 -08:00
Hiroshi SHIBATA 82cc2843a9
Prepare to release RubyGems 3.1.0 final version. 2019-12-13 20:19:33 +09:00
Kazuhiro NISHIYAMA 1ed0212bcf Do not load files in build directory
related https://bugs.ruby-lang.org/issues/16177
2019-12-11 12:35:51 +09:00
Nobuyoshi Nakada 390293525a
Remove binary data at installation
And revert "Relaxed warning assertions",
6f9be8505d.
2019-11-11 12:20:03 +09:00
Nobuyoshi Nakada 6f9be8505d
Relaxed warning assertions 2019-11-11 12:09:19 +09:00
Nobuyoshi Nakada 3e3cc0885a
Now keyword parameter warnings are suppressed by 871005bdd2
This reverts commits:

* 2a490d5660
  Suppress assert_match warnings.

* d4a86e407e
  Assert warnings message for the last argument is keyword parameter.
2019-10-05 11:30:05 +09:00
Nobuyoshi Nakada 871005bdd2
[rubygems/rubygems] Suppress keywords warning in ruby 2.7
https://github.com/rubygems/rubygems/commit/892bfc11fe
2019-10-05 10:50:02 +09:00
Hiroshi SHIBATA 2a490d5660
Suppress assert_match warnings. 2019-09-26 18:24:20 +09:00
Hiroshi SHIBATA d4a86e407e
Assert warnings message for the last argument is keyword parameter. 2019-09-26 18:07:17 +09:00
David Rodríguez a2af473018
[rubygems/rubygems] Make sure our modifications to kernel.warn work
And test the fix we're adding.

https://github.com/rubygems/rubygems/commit/6f86637b98
2019-09-26 17:48:01 +09:00
Hiroshi SHIBATA 37d0e6e471
Skip teardown with JRuby 2019-08-17 18:20:50 +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
Hiroshi SHIBATA f30d38bdd0
Move lib directory to the last of $LOAD_PATH on ruby repository.
https://github.com/rubygems/rubygems/pull/1868 changes the behavior
  of require when it used with -I options. Therefore, the options of
  ruby repository was different from rubygems/rubygems.
2019-08-17 07:47:19 +09:00
David Rodríguez 1ac6890bd0
[rubygems/rubygems] Fix removing unresolved default spec files from map
https://github.com/rubygems/rubygems/commit/7964917bbc
2019-08-17 07:35:48 +09:00
Samuel Giddins 00cd5d74ce
[rubygems/rubygems] [Require] Ensure -I beats a default gem
https://github.com/rubygems/rubygems/commit/6fbda98eb3
2019-08-17 07:35:48 +09:00
David Rodríguez d4feeb1936
[rubygems/rubygems] Make test also assert the gems that it should load
https://github.com/rubygems/rubygems/commit/a6375920bf
2019-08-17 07:35:48 +09:00
David Rodríguez bb2a65800d
[rubygems/rubygems] Use `assert_require`
For consistency with the other specs.

https://github.com/rubygems/rubygems/commit/44b93aec4c
2019-08-17 07:35:48 +09: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