summaryrefslogtreecommitdiff
path: root/spec
AgeCommit message (Collapse)Author
2021-08-31[rubygems/rubygems] Remove `syck` traces from `bundler`David Rodríguez
Same reason as in the previous commit. https://github.com/rubygems/rubygems/commit/f00a6c8516 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Fix `bundle plugin install` misdetection of installed ↵David Rodríguez
versions https://github.com/rubygems/rubygems/commit/9c88db949d Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Normalize setting `GEM_PATH`David Rodríguez
https://github.com/rubygems/rubygems/commit/4188ebd568 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Make plugin installation idempotentDavid Rodríguez
The error had not be caught be specs because `bundle install` was returning a zero exit code when plugin installation errors happened. So I fixed that issue too. https://github.com/rubygems/rubygems/commit/90cde87856 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Correctly redact credentials when using x-oauth-basicMatt Larraz
https://github.com/rubygems/rubygems/commit/290b6ab078 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Fix `bundle check` showing duplicated gemsDavid Rodríguez
If the lockfile contains multiple platforms, `bundle check` would show duplicated missing gems. https://github.com/rubygems/rubygems/commit/6ac5931783 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Restore working `bundle check` behaviourDavid Rodríguez
As part of a recent bug fix where bundler was accidentally hitting the network when not supposed to, I made some refactoring, and the commit I'm reverting here (https://github.com/rubygems/rubygems/commit/d74830d00bb541883377992f56818620a78930b0) was some cleanup that those refactorings allowed according to "past me". That was completely wrong, `bundle check` should never consider cached gems, only installed gems, so the code that was removed was necessary. https://github.com/rubygems/rubygems/commit/5483e98305 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Fix some failing Bundler tests with old Git.Jun Aruga
Use the `git branch --list` rather than the `git branch -l` for better compatibility. Because the `git branch -l` is used to create a new branch in Git version < 2.20.0. https://github.com/rubygems/rubygems/commit/eac5be7d06 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Respect `BUNDLE_USER_HOME` for global config locationDavid Rodríguez
https://github.com/rubygems/rubygems/commit/58fc31442f Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Disable `RUBYGEMS_GEMDEPS` for bundler spec runDavid Rodríguez
Running `bundler` specs using `bundler` is not supported. https://github.com/rubygems/rubygems/commit/cc97b6773d Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Remove `RUBYGEMS_GEMDEPS` warningDavid Rodríguez
When setting the `RUBYGEMS_GEMDEPS` environment variable to allow skipping `bundle exec`, `bundler` will print a warning about potential incompatibility. Initially the `RUBYGEMS_GEMDEPS` variable used a completely different (re)implementation of `bundler` functionality. That implementation was not battle tested and could potentially differ in behaviour from what `bundler` does. That's why print a warning. However, these days, all `rubygems` does when `RUBYGEMS_GEMDEPS` is set is to require `bundler/setup`, so there's no risk of any incompatibility, since that's just plain `bundler`. https://github.com/rubygems/rubygems/commit/bbddc27016 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Expect the right permissions on WindowsDavid Rodríguez
Given Windows doesn't have executable bit. https://github.com/rubygems/rubygems/commit/35dc3fa845 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Fix git repo initialization on a path with spacesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/a2d6e10192 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Simplify overkill usage of shared examplesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/36a00144b9 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Deprecate `bundle exec --no-keep-file-descriptors`David Rodríguez
https://github.com/rubygems/rubygems/commit/591466d512 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Exclude gemspec file itself from gemNobuyoshi Nakada
The processed YML data is included as metadata, the source gemspec file is unused and just confusing. https://github.com/rubygems/rubygems/commit/f444478eac Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] typos in UI messages: fix a couple missing spaces ↵Tim Sutton
between sentence breaks https://github.com/rubygems/rubygems/commit/5cdda53382 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] The `--local` flag to `bundle install` shouldn't hit the ↵David Rodríguez
network If the cache was missing, `bundler` would try to re-fetch it. With the `--local` flag, it should just look at installed gems. https://github.com/rubygems/rubygems/commit/630d29c69e Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Requiring `bundler/setup` shouldn't try to hit the networkDavid Rodríguez
https://github.com/rubygems/rubygems/commit/06f5efce02 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Improve "gem not found in source" errorsDavid Rodríguez
When printing sources inside these error messages, it's useful to only consider the current state of the source. For example, when requiring `bundler/setup`, the source shouldn't be configured to be able to hit the network, so the error message should only mention "locally installed gems" to make that more clear. https://github.com/rubygems/rubygems/commit/30eb14f853 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Remove redundant part of error messageDavid Rodríguez
It doesn't really add much, in my opinion. We want to be helpful, but also concise when possible. https://github.com/rubygems/rubygems/commit/9d56009cf7 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Fix standalone generated script to deal with path sourcesDavid Rodríguez
In the case of path sources, the path the source is pointing to should be added directly to the `$LOAD_PATH` without any modifications. https://github.com/rubygems/rubygems/commit/d3bba936f0 Co-authored-by: Daniel Niknam <mhmd.niknam@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Remove unnecessary `ruby_version` local variableDavid Rodríguez
Under some case, this variable might not end up being used, in which case running the script would print unused variable warnings. https://github.com/rubygems/rubygems/commit/bf96030362 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Remove unnecessary `ruby_engine` local variableDavid Rodríguez
Under some case, this variable might not end up being used, in which case running the script would print unused variable warnings. https://github.com/rubygems/rubygems/commit/a2d6392ada Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Remove unnecessary `path` local variableDavid Rodríguez
We can use `__dir__` directly. https://github.com/rubygems/rubygems/commit/0e6083ca94 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Respect `BUNDLE_USER_CONFIG` if setDavid Rodríguez
https://github.com/rubygems/rubygems/commit/f28ab141af Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Fix standalone install of default gemsDavid Rodríguez
Rubygems source replacement was broken. https://github.com/rubygems/rubygems/commit/3549c122f6 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] This spec can pass now on ruby 3David Rodríguez
TSort was released as a library so we can install it, and also other gems that are loaded by the spec. Also, Ruby on Windows apparently loads fiddle 1.0.6, so we need to also install that to make that not fail. https://github.com/rubygems/rubygems/commit/2b8dcab99e Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Remove unnecessary test repositoryDavid Rodríguez
These gems are built and installed to system directly as default gems. There's no need to also build a remote repo. https://github.com/rubygems/rubygems/commit/ad9dad4c22 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Give a `bundle install` hint when `bundle list` failsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/98f5087e34 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Remove unnecessary escape sequencesDavid Rodríguez
Bundler formatters already take care of this. https://github.com/rubygems/rubygems/commit/c24415fdd5 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Show all missing gems when using a bundle before ↵David Rodríguez
installing it Not only the first one that's missing. This also allows us to simplify things. https://github.com/rubygems/rubygems/commit/69718a9509 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-30Fix rubyspec_capiext dependency and flagsNobuyoshi Nakada
- The file needed to link may be the import library. - Remove duplicate flags.
2021-08-30Fix dllimport attributeNobuyoshi Nakada
2021-08-22Fix failures on non-UTF-8 environment [Bug #18077]Nobuyoshi Nakada
Call `IOSpecs.io_fixture` with the default encoding explicitly. `IOSpecs.closed_io` calls the method without optional `mode` which is set to UTF-8 by default, while the default external encoding depends on the locale environment variables.
2021-08-22Fix Marshal.dump(closed_io) to raise TypeError and allow encoding on closed IOLars Kanis
Mashalling a closed IO object raised "closed stream (IOError)" before instead of TypeError. This changes IO#(in|ex)ternal_encoding to still return the encoding even if the underlying FD is closed. Fixes bug #18077 Notes: Merged: https://github.com/ruby/ruby/pull/4758
2021-08-21Allow tracing of optimized methodsJeremy Evans
This updates the trace instructions to directly dispatch to opt_send_without_block. So this should cause no slowdown in non-trace mode. To enable the tracing of the optimized methods, RUBY_EVENT_C_CALL and RUBY_EVENT_C_RETURN are added as events to the specialized instructions. Fixes [Bug #14870] Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/4739 Merged-By: jeremyevans <code@jeremyevans.net>
2021-08-19Fix test failure on spec/ruby/language/pattern_matching_spec.rbKazuki Tsujimoto
https://github.com/ruby/ruby/runs/3369486308
2021-08-19Allow omission of parentheses in one line pattern matching [Feature #16182]Kazuki Tsujimoto
2021-08-13Update to ruby/spec@330c641Benoit Daloze
2021-08-07Suppress unused-result warningsS.H
* Hide read function warning in string_spec_RSTRING_PTR_read function * The type of `read` may be `ssize_t` Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/4703 Merged-By: nobu <nobu@ruby-lang.org>
2021-07-30Tweak rb_str_modify_expand() + read() spec to try to find out why it fails ↵Benoit Daloze
on some platforms * Use a longer string as <= 23 characters it's embedded on CRuby and the value of rb_str_capacity() is implementation-specific.
2021-07-29Make RubyVM::AbstractSyntaxTree.of raise for method/proc created in evalJeremy Evans
This changes Thread::Location::Backtrace#absolute_path to return nil for methods/procs defined in eval. If the realpath of an iseq is nil, that indicates it was defined in eval, in which case you cannot use RubyVM::AbstractSyntaxTree.of. Fixes [Bug #16983] Co-authored-by: Koichi Sasada <ko1@atdot.net> Notes: Merged: https://github.com/ruby/ruby/pull/4519
2021-07-29Update to ruby/spec@b65d01fBenoit Daloze
2021-07-29Update to ruby/mspec@9542a88Benoit Daloze
2021-07-27Bump unicode version for Ruby 3.1Hiroshi SHIBATA
2021-07-27[rubygems/rubygems] Remove the warning for not defining a gem server sourceDaniel Niknam
Bundler has deprecated gemfiles without a global source and this feature is now obsolete. `Bundler::Definition#has_rubygems_remotes?` is removed because it's not used anymore. https://github.com/rubygems/rubygems/commit/d29dd2cb7b
2021-07-27[rubygems/rubygems] Refactor Bundler::Dsl#check_rubygems_source_safety to ↵Daniel Niknam
improve readability `check_rubygems_source_safety` is responsible for: 1. if there are multiple global sources - for bundle 3.x raise an error - for bundle 2.x print a warning 2. print a warning if there is no explicit global source The second responsibility was added recently and now the logic could be extracted to improve readability. Conditions are still live in the `check_rubygems_source_safety` method since we don't want to call both functions always and that would help us achieve that. https://github.com/rubygems/rubygems/commit/f3d7e946ee
2021-07-27[rubygems/rubygems] Deprecate Gemfile without an explicit global sourceDaniel Niknam
Raise a warning when parsing a Gemfile and it doesn't have a global source. Gemfiles like this, specially now that rubygems sources are are no longer merged into a single source for security, are very confusing because they generate a different lockfile depending on the gems you have locally installed. This is because bundler always use an implicit global source that defaults to locally installed gems. https://github.com/rubygems/rubygems/commit/b7523ad21c
2021-07-27[rubygems/rubygems] Explicitly define a global source for testsDaniel Niknam
This is in preparation for deprecating source-less gemfiles. https://github.com/rubygems/rubygems/commit/d6493fa3e2