summaryrefslogtreecommitdiff
path: root/spec
AgeCommit message (Collapse)Author
2022-02-01[rubygems/rubygems] Skip "seller shipped" notification after deliveryDan Jensen
If a Shipment has been delivered, there is no point in notifying the buyer that the seller shipped. Instead, we should simply notify the buyer that the shipment was delivered. This is relevant in cases where the seller is late to mark a Shipment as shipped, so the first EasyPost Tracker update marks it as delivered, or in cases where the seller fails to mark as shipped and the buyer marks it as delivered. This fixes a Shipment event handler so the buyer notification for shipment is no longer invoked if the Shipment is already delivered. https://github.com/rubygems/rubygems/commit/09c2cadc86
2022-02-01Sync latest Bundler & RubyGemsDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/5512
2022-01-28Update to ruby/spec@902ab83Benoit Daloze
2022-01-28Update to ruby/mspec@49adc2fBenoit Daloze
2022-01-26[rubygems/rubygems] Fix `force_ruby_platform` ignored when lockfile includes ↵David Rodríguez
the current specific platform https://github.com/rubygems/rubygems/commit/9ca371adf8
2022-01-26[rubygems/rubygems] Use Gem::Platform.local instead of RUBY_PLATFORMNgan Pham
In certain places, we want to display the platform name with `Gem::Platform.local` instead of `RUBY_PLATFORM`. Fixes https://github.com/rubygems/rubygems/issues/5264 https://github.com/rubygems/rubygems/commit/bdd1848ae8
2022-01-25[rubygems/rubygems] Fix spec to not touch the networkDavid Rodríguez
And not depend on the state of rack's master branch, in particular, on their Ruby support range. https://github.com/rubygems/rubygems/commit/9ea4baffac
2022-01-25[rubygems/rubygems] Remove unnecessary commentDavid Rodríguez
https://github.com/rubygems/rubygems/commit/ef4e5c6169
2022-01-23Fix a typo [ci skip]Kazuhiro NISHIYAMA
2022-01-20[rubygems/rubygems] Change generated namespaced test class name in minitestYusuke Nakamura
* `foo` => `TestFoo` * `foo_bar` => `TestFooBar` * `foo-bar` => `Foo::TestBar` https://github.com/rubygems/rubygems/commit/353cdd61c3
2022-01-20[rubygems/rubygems] Add spec to class name definition in newgem specYusuke Nakamura
https://github.com/rubygems/rubygems/commit/5f698fc4a0
2022-01-20[rubygems/rubygems] Update generated minitest file styleYusuke Nakamura
foo => test/test_foo.rb foo-bar => test/foo/test_bar.rb foo_bar => test/test_foo_bar.rb https://github.com/rubygems/rubygems/commit/c795e5d40d
2022-01-20[rubygems/rubygems] Create minitest file to underscored path in "bundle gem" ↵Yusuke Nakamura
command ...with dashed gem name In "bundle gem" command with dashed name gem (e.g. foo-bar) generates `test/test_foo/bar.rb`, but this file contains undefined class `TestFoo` and moreover, does not include in "bundle exec rake test" target. Therefore, intentially the first test after gem created is fail, but in case of gem name contains dash character is not. The change doings... (when "bundle gem foo-bar" called) * create `test/test_foo_bar.rb` * define `TestFooBar` class in `test/test_foo_bar.rb` https://github.com/rubygems/rubygems/commit/5d9a69fc0f
2022-01-19Merge rubygems/rubygems HEAD.Hiroshi SHIBATA
Picked at 12aeef6ba9a3be0022be9934c1a3e4c46a03ed3a Notes: Merged: https://github.com/ruby/ruby/pull/5462
2022-01-19[rubygems/rubygems] Fix regression with old marshaled specs having null ↵David Rodríguez
required_rubygems_version https://github.com/rubygems/rubygems/commit/91f07a0208
2022-01-19[rubygems/rubygems] Fix skipped spec on WindowsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/bf0f4b98ee
2022-01-15Fix spec failures on ruby 3.1Kazuhiro NISHIYAMA
Because Module#const_added is ruby 3.2 feature
2022-01-14Make Hash#shift return nil for empty hashJeremy Evans
Fixes [Bug #16908] Notes: Merged: https://github.com/ruby/ruby/pull/5360
2022-01-14Fix constant assignment evaluation orderJeremy Evans
Previously, the right hand side was always evaluated before the left hand side for constant assignments. For the following: ```ruby lhs::C = rhs ``` rhs was evaluated before lhs, which is inconsistant with attribute assignment (lhs.m = rhs), and apparently also does not conform to JIS 3017:2013 11.4.2.2.3. Fix this by changing evaluation order. Previously, the above compiled to: ``` 0000 putself ( 1)[Li] 0001 opt_send_without_block <calldata!mid:rhs, argc:0, FCALL|VCALL|ARGS_SIMPLE> 0003 dup 0004 putself 0005 opt_send_without_block <calldata!mid:lhs, argc:0, FCALL|VCALL|ARGS_SIMPLE> 0007 setconstant :C 0009 leave ``` After this change: ``` 0000 putself ( 1)[Li] 0001 opt_send_without_block <calldata!mid:lhs, argc:0, FCALL|VCALL|ARGS_SIMPLE> 0003 putself 0004 opt_send_without_block <calldata!mid:rhs, argc:0, FCALL|VCALL|ARGS_SIMPLE> 0006 swap 0007 topn 1 0009 swap 0010 setconstant :C 0012 leave ``` Note that if expr is not a module/class, then a TypeError is not raised until after the evaluation of rhs. This is because that error is raised by setconstant. If we wanted to raise TypeError before evaluation of rhs, we would have to add a VM instruction for calling vm_check_if_namespace. Changing assignment order for single assignments caused problems in the multiple assignment code, revealing that the issue also affected multiple assignment. Fix the multiple assignment code so left-to-right evaluation also works for constant assignments. Do some refactoring of the multiple assignment code to reduce duplication after adding support for constants. Rename struct masgn_attrasgn to masgn_lhs_node, since it now handles both constants and attributes. Add add_masgn_lhs_node static function for adding data for lhs attribute and constant setting. Fixes [Bug #15928] Notes: Merged: https://github.com/ruby/ruby/pull/4450
2022-01-14Add a Module#const_added callbackJean Boussier
[Feature #17881] Works similarly to `method_added` but for constants. ```ruby Foo::BAR = 42 # call Foo.const_added(:FOO) class Foo::Baz; end # call Foo.const_added(:Baz) Foo.autoload(:Something, "path") # call Foo.const_added(:Something) ``` Notes: Merged: https://github.com/ruby/ruby/pull/4521
2022-01-13[rubygems/rubygems] Use `Fiddle` in `bundle doctor` to check for dynamic ↵Vyacheslav Alexeev
library presence https://github.com/rubygems/rubygems/commit/ecd495ce1b
2022-01-10Update to ruby/spec@226cfdcBenoit Daloze
2022-01-10Update to ruby/mspec@3ea3d32Benoit Daloze
2022-01-06Fix spec failure on ruby 3.1Kazuhiro NISHIYAMA
Because https://github.com/ruby/ruby/pull/5148 merged after Ruby 3.1.0 released. 13241b71a50dded0a7b021ec4f2fb6a995daace9 did not fix proc spec yet. https://github.com/ruby/actions/runs/4718820699?check_suite_focus=true#step:18:173 ``` 1) Proc#parameters adds * rest arg for "star" argument FAILED Expected [[:req, :x], [:rest]] == [[:req, :x], [:rest, :*]] to be truthy but was false /home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/proc/parameters_spec.rb:85:in `block (3 levels) in <top (required)>' /home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/proc/parameters_spec.rb:3:in `<top (required)>' ```
2022-01-05Remove Refinement#{extend_object,append_features,prepend_features}Jeremy Evans
Also make include, prepend, and extend raise a TypeError if one of the modules is a refinement. Implements [Feature #18270] Notes: Merged: https://github.com/ruby/ruby/pull/5358
2022-01-05Fix failures on ruby 3.1Kazuhiro NISHIYAMA
Because https://github.com/ruby/ruby/pull/5148 merged after Ruby 3.1.0 released. https://github.com/ruby/actions/runs/4705986643?check_suite_focus=true#step:18:144 ``` 1) Method#parameters adds * rest arg for "star" argument FAILED Expected [[:rest]] == [[:rest, :*]] to be truthy but was false /home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/method/parameters_spec.rb:228:in `block (3 levels) in <top (required)>' /home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/method/parameters_spec.rb:4:in `<top (required)>' 2) Proc#parameters adds * rest arg for "star" argument FAILED Expected [[:req, :x], [:rest]] == [[:req, :x], [:rest, :*]] to be truthy but was false /home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/proc/parameters_spec.rb:85:in `block (3 levels) in <top (required)>' /home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/proc/parameters_spec.rb:3:in `<top (required)>' ```
2022-01-04[rubygems/rubygems] Test the actual checksums of the mock gemsNobuyoshi Nakada
https://github.com/rubygems/rubygems/commit/2b42630959
2022-01-04[rubygems/rubygems] Fix the test to use the mock gem pathNobuyoshi Nakada
"NUL.*" means the NUL device on Windows, as well as mere "NUL", and no data is read. https://github.com/rubygems/rubygems/commit/e2c7d22745
2022-01-04[rubygems/rubygems] Append a newline to the checksum fileNobuyoshi Nakada
https://github.com/rubygems/rubygems/commit/48ea2778e9
2022-01-04[rubygems/rubygems] Fix checksumNobuyoshi Nakada
Calculate the checksum of the content, not the given pathname at the build time itself. https://github.com/rubygems/rubygems/commit/b60ee97ee9
2022-01-03Kernel#=~: delete卜部昌平
Has been deprecated since ebff9dc10e6e72239c23e50acc7d3cbfdc659e7a.
2022-01-01Remove deprecated Random::DEFAULT [Feature #17351]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5382
2022-01-01Remove unnecessary Random::DEFAULT expectationsNobuyoshi Nakada
The respond_to expectation just suffice as duck-typing. Notes: Merged: https://github.com/ruby/ruby/pull/5382
2021-12-30Add support for anonymous rest and keyword rest argument forwardingJeremy Evans
This allows for the following syntax: ```ruby def foo(*) bar(*) end def baz(**) quux(**) end ``` This is a natural addition after the introduction of anonymous block forwarding. Anonymous rest and keyword rest arguments were already supported in method parameters, this just allows them to be used as arguments to other methods. The same advantages of anonymous block forwarding apply to rest and keyword rest argument forwarding. This has some minor changes to #parameters output. Now, instead of `[:rest], [:keyrest]`, you get `[:rest, :*], [:keyrest, :**]`. These were already used for `...` forwarding, so I think it makes it more consistent to include them in other cases. If we want to use `[:rest], [:keyrest]` in both cases, that is also possible. I don't think the previous behavior of `[:rest], [:keyrest]` in the non-... case and `[:rest, :*], [:keyrest, :**]` in the ... case makes sense, but if we did want that behavior, we'll have to make more substantial changes, such as using a different ID in the ... forwarding case. Implements [Feature #18351] Notes: Merged: https://github.com/ruby/ruby/pull/5148
2021-12-30[rubygems/rubygems] Better way to join path componentsDavid Rodríguez
The current way works, but error messages show duplicate "/" in paths, which is weird. https://github.com/rubygems/rubygems/commit/9123deb4fa
2021-12-28s/an Bignum/a Bignum/ [ci skip]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3927
2021-12-28Remove obsolete Fixnum and BignumNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3927
2021-12-27Skip testing --enable-all in MinGW for nowTakashi Kokubun
If we don't intend to support this platform, we should probably enable MJIT for MinGW. However, since the code for https://bugs.ruby-lang.org/issues/18439 is in place, I'm adjusting the test for it in the meantime. following up https://github.com/ruby/ruby/pull/5363
2021-12-28[rubygems/rubygems] Fix `bundle update --bundler` no longer updating lockfileDavid Rodríguez
https://github.com/rubygems/rubygems/commit/a053b7e4d4
2021-12-27[rubygems/rubygems] Run `bundle install` in verbose modeDavid Rodríguez
To see if we get more information when this fails. https://github.com/rubygems/rubygems/commit/853d33fdc3
2021-12-27Track RubyGems 3.4.0dev and Bundler 2.4.0devHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/5350
2021-12-27[rubygems/rubygems] Don't add verbose flag so opaquely for realworld specsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/fa8455ef7c Notes: Merged: https://github.com/ruby/ruby/pull/5350
2021-12-27[rubygems/rubygems] Move setup to the spec that uses itDavid Rodríguez
https://github.com/rubygems/rubygems/commit/7cf0a8fa8e Notes: Merged: https://github.com/ruby/ruby/pull/5350
2021-12-27[rubygems/rubygems] Remove unused includeDavid Rodríguez
https://github.com/rubygems/rubygems/commit/a581a1dd50 Notes: Merged: https://github.com/ruby/ruby/pull/5350
2021-12-27[rubygems/rubygems] Remove the rest of the `RUBY_VERSION` monkeypatchingDavid Rodríguez
Since we're at it. This generates a bunch of warnings and seems like a brittle way to test things, so let's get rid of it. https://github.com/rubygems/rubygems/commit/f5d45520e0 Notes: Merged: https://github.com/ruby/ruby/pull/5350
2021-12-27[rubygems/rubygems] Update some specs to pass ruby-head CIDavid Rodríguez
These specs were monkeypatching `RUBY_VERSION`, but that obviously doesn't change the running ruby to behave any different. The removal of some features, in particular, `String#untaint`, made these specs fail, because untaint is no longer available under ruby-core and bundler calls `untaint` when `RUBY_VERSION` is less than "2.7", which these specs were overwriting it to be. Rewrite these specs to not overwrite `RUBY_VERSION`, but still test the same things. https://github.com/rubygems/rubygems/commit/e8c7b92901 Notes: Merged: https://github.com/ruby/ruby/pull/5350
2021-12-26Postpone fix of lookbehind with ss characters tentativelyNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5348
2021-12-26Remove Refinement#include and Refinement#prependNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5348
2021-12-26Remove tainted and trusted featuresNobuyoshi Nakada
Already these had been announced to be removed in 3.2. Notes: Merged: https://github.com/ruby/ruby/pull/5348
2021-12-25Merge RubyGems-3.3.3 and Bundler-2.3.3Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/5342