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

377 Коммитов

Автор SHA1 Сообщение Дата
David Rodríguez 61b61f426a [rubygems/rubygems] Reword specs to not mention deprecated flags
https://github.com/rubygems/rubygems/commit/f878a81f22
2020-06-05 07:32:42 +09:00
David Rodríguez f02f19d62f [rubygems/rubygems] Rewrite dependency API specs to use new deployment mode
Some of them were passing "by chance" because they used a `bundle
install` command that failed, but the assertion was using the result of
the previous. Others were skipped on bundler 3. Now they all pass in all
versions.

https://github.com/rubygems/rubygems/commit/cedf611e11
2020-06-05 07:32:42 +09:00
David Rodríguez 5c924f597f [rubygems/rubygems] Make `forgotten_command_line_options` always "forget" options
https://github.com/rubygems/rubygems/commit/4d39338670
2020-06-05 07:32:42 +09:00
David Rodríguez 99dc55987d [rubygems/rubygems] Improve specs testing option remembering behavior
By making them more explicit.

https://github.com/rubygems/rubygems/commit/9979c5a811
2020-06-05 07:32:42 +09:00
David Rodríguez 332ecb0ad1 [rubygems/rubygems] Fix `bundle install` unintentionally saving configuration
Even if no explicit flags were passed to it.

https://github.com/rubygems/rubygems/commit/0598cbb68c
2020-06-05 07:32:42 +09:00
David Rodríguez 052d66050a [rubygems/rubygems] Change descriptions to not mention deprecated flags
https://github.com/rubygems/rubygems/commit/731b3783f1
2020-06-05 07:32:42 +09:00
David Rodríguez fed9419e55 [rubygems/rubygems] Fix flag name in spec descriptions
https://github.com/rubygems/rubygems/commit/6395392b83
2020-06-05 07:32:42 +09:00
David Rodríguez 5989827dc7 [rubygems/rubygems] Improve wording of some specs
https://github.com/rubygems/rubygems/commit/3372b21553
2020-06-05 07:32:42 +09:00
David Rodríguez ff74725dc3 [rubygems/rubygems] Remove old no longer meaningful spec
This spec was originally written many years ago to verity gems were
properly "remembered" in the lock file. At this point, the test feels a
bit dummy since the first `bundle install` already runs on a "clean
machine".

https://github.com/rubygems/rubygems/commit/dbfefb3f5a
2020-06-05 07:32:42 +09:00
David Rodríguez 09602f4301 [rubygems/rubygems] Revert multi ruby{,gems} version requirement fix
This reverts commit 20f06d9e178211a3016133852b72d21ac7bb93ad, reversing
changes made to f2b30cb70df8a518bef0e8a64bbceb86234d922d.

https://github.com/rubygems/rubygems/commit/40802bdb18
2020-06-05 07:32:42 +09:00
David Rodríguez 592762069d [rubygems/rubygems] Support running specs against a tarball
When bundler specs are run from a ruby tarball (ruby-core does this),
there's no git folder, so `git ls-files` fails.

Support this case by making specs rely on the list of files from the
bundler gemspec instead, and invert the spec that makes sure we ship the
right set of files.

As per the other quality specs, skip them in this case.

https://github.com/rubygems/rubygems/commit/b28d5ec931
2020-06-05 07:32:42 +09:00
David Rodríguez bd9a6ba4ef [rubygems/rubygems] Remove unintended extra space
https://github.com/rubygems/rubygems/commit/1cc02930f3
2020-06-05 07:32:42 +09:00
Hiroshi SHIBATA 9f7bfba54f Revert "Fix a error in a `before(:suite)` hook"
This reverts commit 67d2a715ca.
2020-06-05 07:32:42 +09:00
Hiroshi SHIBATA 1ab410caf8 Revert "Fix a failure in bundle version with version outputs the version with build metadata"
This reverts commit fcc8be0198.
2020-06-05 07:32:42 +09:00
David Rodríguez d52b1b0705 [rubygems/rubygems] Deprecate the `--no-deployment` flag
And never recommend it inside CLI messages.

This flag represents the default behaviour of `bundle install`, and the
only reason it exists is to "override" previous `--deployment` flag
usages which were silently remembered. So it should be deprecated just
like all the other flags the rely on remembering their values across
invocations.

https://github.com/rubygems/rubygems/commit/40e50b7190
2020-06-05 07:32:42 +09:00
David Rodríguez 1914c4e9b1 [rubygems/rubygems] Pass `--deployment` flag directly
This spec is run only in bundler 2 mode, and it's testing the
`--deployment` flag specifically.

https://github.com/rubygems/rubygems/commit/a5d91c68b6
2020-06-05 07:32:42 +09:00
David Rodríguez 5a12fc7c7f [rubygems/rubygems] Unskip "monorepo issues"
They seem to be passing?

https://github.com/rubygems/rubygems/commit/a00d1e6896
2020-06-05 07:32:42 +09:00
Kazuhiro NISHIYAMA b10b37924a
Fix failures in ./spec/bundler/quality_spec.rb
```
Failures:

  1) The library itself does not contain any warnings
     Failure/Error: raise "Invoking #{method}!(#{args.map(&:inspect).join(", ")}) failed:\n#{last_command.stdboth}"

     RuntimeError:
       Invoking sys_exec!("ruby -w") failed:
       /home/user/snapshot-master/lib/bundler/cli/add.rb:4:in `<module:Bundler>': uninitialized constant Bundler::CLI (NameError)
        from /home/user/snapshot-master/lib/bundler/cli/add.rb:3:in `<top (required)>'
        from /home/user/snapshot-master/lib/rubygems/core_ext/kernel_require.rb:91:in `require'
        from /home/user/snapshot-master/lib/rubygems/core_ext/kernel_require.rb:91:in `require'
        from -:2:in `<main>'

       Commands:
       $ ruby -w
       /home/user/snapshot-master/lib/bundler/cli/add.rb:4:in `<module:Bundler>': uninitialized constant Bundler::CLI (NameError)
        from /home/user/snapshot-master/lib/bundler/cli/add.rb:3:in `<top (required)>'
        from /home/user/snapshot-master/lib/rubygems/core_ext/kernel_require.rb:91:in `require'
        from /home/user/snapshot-master/lib/rubygems/core_ext/kernel_require.rb:91:in `require'
        from -:2:in `<main>'
       # $? => 1
```
2020-05-25 20:12:41 +09:00
Kazuhiro NISHIYAMA fcc8be0198
Fix a failure in bundle version with version outputs the version with build metadata
```
  1) bundle version with version outputs the version with build metadata
     Failure/Error: expect(out).to match(/\ABundler version #{Regexp.escape(Bundler::VERSION)} \(\d{4}-\d{2}-\d{2} commit #{COMMIT_HASH}\)\z/)

       expected "Bundler version 2.2.0.dev (2020-05-25 commit )" to match /\ABundler version 2\.2\.0\.dev \(\d{4}-\d{2}-\d{2} commit (?-mix:unknown|[a-fA-F0-9]{7,})\)\z/
       Diff:
       @@ -1,2 +1,2 @@
       -/\ABundler version 2\.2\.0\.dev \(\d{4}-\d{2}-\d{2} commit (?-mix:unknown|[a-fA-F0-9]{7,})\)\z/
       +"Bundler version 2.2.0.dev (2020-05-25 commit )"

       Commands:
       $ /home/user/snapshot-master/ruby -I/home/user/snapshot-master/spec/bundler -r/home/user/snapshot-master/spec/bundler/support/artifice/fail.rb -r/home/user/snapshot-master/spec/bundler/support/hax.rb /home/user/snapshot-master/tmp/1/gems/system/bin/bundle version
       Bundler version 2.2.0.dev (2020-05-25 commit )
       # $? => 0
```
2020-05-25 20:08:30 +09:00
Kazuhiro NISHIYAMA 67d2a715ca
Fix a error in a `before(:suite)` hook
https://github.com/ruby/actions/runs/703745101?check_suite_focus=true#step:16:27
```
An error occurred in a `before(:suite)` hook.
Failure/Error: contents = File.read(version_file)

Errno::ENOENT:
  No such file or directory @ rb_sysopen - /home/runner/work/actions/actions/snapshot-master/tmp/1/bundler-2.2.0.dev/lib/bundler/version.rb
```
2020-05-25 20:08:30 +09:00
Hiroshi SHIBATA df5fd1d09c Fixup 1d079a0c5d4d80860a4d6d692344124fe5c562b5 2020-05-22 20:32:30 +09:00
Hiroshi SHIBATA 1d889c9656 Sync Bundler PR #3624 with HEAD commits 2020-05-22 20:32:30 +09:00
Hiroshi SHIBATA 93ebf9643d Revert 1f011cccb1 2020-05-22 20:32:30 +09:00
Hiroshi SHIBATA 26367367ec Marked the failing examples with the current master branch on ruby repository 2020-05-22 20:32:30 +09:00
Hiroshi SHIBATA c7ebeb7eda Sync Bundler PR #3624 2020-05-22 20:32:30 +09:00
Kazuhiro NISHIYAMA 6c1a51dae8
Skip some tests if extracted from tarball (again)
Fix up previous commit

ref
9aa75795f9,
38002a8adb, and
0e60b59d58
2020-05-19 00:58:33 +09:00
Kazuhiro NISHIYAMA 1f011cccb1
Skip some tests if extracted from tarball (again)
ref 9aa75795f9
2020-05-18 23:18:44 +09:00
Hiroshi SHIBATA 35bbbc751d clean-up .bundle directory in bundled_app 2020-05-14 09:11:28 +09:00
Hiroshi SHIBATA d4acf254e3 Use the gemspec in build_dir directly 2020-05-14 09:11:28 +09:00
Hiroshi SHIBATA cecd343336 Skip the examples for bundle exec with gem installation 2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA f61dbb921e Marked the some examples that are not working with the ruby repository 2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA aecbb78517 Use relative path in ruby core repository 2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA 143872bf98 Unmask the some of examples with ruby_repo label 2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA ca892e6902 Skip the example to use rake command 2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA ea517cfe23 skip lockfile_spec.rb:33 because it cleanup the .bundle repo 2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA fcb5a9ee46 Resolved the file path of gemspec for ruby core repository 2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA 5b634afe4c Added test_gems.rb for setup dependencies 2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA 0e60b59d58 Update the bundler version with master branch 2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA 7df6eaf29e
Addeed missing RSpec namespace 2020-05-09 16:58:21 +09:00
Hiroshi SHIBATA b9031b1043 [rubygems/rubygems] Restore the old .gemrc example for compatible tests
https://github.com/rubygems/rubygems/commit/c45d65a06d
2020-05-08 14:13:29 +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
Yusuke Endoh 6379c6af4d spec/bundler/other/platform_spec.rb: skip an attempt to simulate JRuby 2020-03-29 09:09:46 +09:00
Hiroshi SHIBATA 13f4f07f21 Merge bundler-2.1.4 2020-01-08 18:00:32 +09:00
Sutou Kouhei e1c363f847
[bundler/bundler] Add ruby2_keywords
https://github.com/bundler/bundler/commit/29d932d72d
2020-01-01 07:41:37 +09:00
Hiroshi SHIBATA 1857b44278
Merge Bundler 2.1.2 from bundler/bundler.
[Misc #16449][ruby-core:96458]
2019-12-25 07:28:02 +09:00
Hiroshi SHIBATA efbc0d499c
Merge bundler-2.1.1 from bundler/bundler 2019-12-18 14:53:19 +09:00
David Rodríguez 9f43160014 Delegate should be supported now
Since `did_you_mean` dropped its dependency on it.
2019-12-15 16:41:10 +09:00
Hiroshi SHIBATA 286cb3395f Fixed test failures with gem command path on ruby core repo. 2019-12-15 16:41:10 +09:00
Hiroshi SHIBATA 38002a8adb Prepare to release bundler-2.1.0 2019-12-15 16:41:10 +09:00
Kazuhiro NISHIYAMA fea24bbfdb Fix glob base in bundler.gemspec 2019-11-19 00:29:10 +09:00
Kazuhiro NISHIYAMA 9aa75795f9 Skip some tests if extracted from tarball 2019-11-19 00:29:10 +09:00
Kazuhiro NISHIYAMA e9992bcab0 Allow unknown if ruby core 2019-11-19 00:29:10 +09:00
Hiroshi SHIBATA bb9ecd026a Merge Bundler 2.1.0.pre3 released version 2019-11-13 10:19:51 +09:00
Hiroshi SHIBATA 7585bc3187 Merge Bundler 2.1.0.pre.3
Features:
    - Add caller information to some deprecation messages to make them easier to fix [#7361](https://github.com/bundler/bundler/pull/7361)
    - Reconcile `bundle cache` vs `bundle package` everywhere. Now in docs, CLI help and everywhere else `bundle cache` is the preferred version and `bundle package` remains as an alias [#7389](https://github.com/bundler/bundler/pull/7389)
    - Display some basic `bundler` documentation together with ruby's RDoc based documentation [#7394](https://github.com/bundler/bundler/pull/7394)

  Bugfixes:
    - Fix typos deprecation message and upgrading docs [#7374](https://github.com/bundler/bundler/pull/7374)
    - Deprecation warnings about `taint` usage on ruby 2.7 [#7385](https://github.com/bundler/bundler/pull/7385)
    - Fix `--help` flag not correctly delegating to `man` when used with command aliases [#7388](https://github.com/bundler/bundler/pull/7388)
    - `bundle add` should cache newly added gems if an application cache exists [#7393](https://github.com/bundler/bundler/pull/7393)
    - Stop using an insecure folder as a "fallback home" when user home is not defined [#7416](https://github.com/bundler/bundler/pull/7416)
    - Fix `bundler/inline` warning about `Bundler.root` redefinition [#7417](https://github.com/bundler/bundler/pull/7417)
2019-11-11 18:56:25 +09:00
Hiroshi SHIBATA 7d354175d7
Fixed up ccbfb054b1 2019-09-18 18:26:33 +09:00
Hiroshi SHIBATA 2da8574930
Fixed the rubocop warnings 2019-09-18 18:26:33 +09:00
David Rodríguez effacde2c0
[bundler/bundler] Merge all `bundle check --path` specs
And skip them all for bundler 3.

https://github.com/bundler/bundler/commit/b88936cdc2
2019-09-18 18:26:33 +09:00
Bundlerbot 434af7303c
[bundler/bundler] Merge #7340
7340: Fix bundle clean issue r=deivid-rodriguez a=deivid-rodriguez

### What was the end-user problem that led to this PR?

The problem was that `bundle clean` is crashing under some conditions.

### What was your diagnosis of the problem?

My diagnosis was that sometimes (when the bundle includes git sourced gems with extensions), it assumes that some paths exist, but they don't.

### What is your fix for the problem, implemented in this PR?

My fix is to ignore those paths.

### Why did you choose this fix out of the possible options?

I chose this fix because it fixes the issue.

Fixes #7338.

Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
(cherry picked from commit b007fde67c77c1f15f13b97eda186644c2a2be04)

https://github.com/bundler/bundler/commit/3766053507
2019-09-18 18:26:33 +09:00
David Rodríguez e6ad9452b6
[bundler/bundler] Fix remembered flag deprecation message
It was suggested a deprecated command as a fix.

https://github.com/bundler/bundler/commit/e330a9a34f
2019-09-18 18:26:33 +09:00
Samuel Giddins 4f2f6aeb5f
[bundler/bundler] Add a spec for installing git deps after packaging w/o git
https://github.com/bundler/bundler/commit/65351c58b8
2019-09-18 18:26:32 +09:00
David Rodríguez 0c6529bac2
[bundler/bundler] Revert "Add all platforms to lockfile by default"
This reverts commit 3dc509e645abb497e4dc92a7c42be471ff87db0b.

https://github.com/bundler/bundler/commit/b5766564fb
2019-09-18 18:26:32 +09:00
David Rodríguez 6f16ededdd
[bundler/bundler] Revert "Remove now meaningless warning"
This reverts commit 00b095b98fe4bd44950beaf3bc9f1d91eac7b69e.

https://github.com/bundler/bundler/commit/e93bce3b20
2019-09-18 18:26:32 +09:00
Takayuki Nakata c27aaf1a8f
[bundler/bundler] Fix comments and messages to refer to https url
https://github.com/bundler/bundler/commit/a86b49f1b9
2019-09-18 18:26:32 +09:00
David Rodríguez b9996803f7
[bundler/bundler] Remove duplicated spec filter
https://github.com/bundler/bundler/commit/b7fc6f4187
2019-09-18 18:26:32 +09:00
David Rodríguez a29ead52e1
[bundler/bundler] Deprecate `--path` flag to `bundle check`
https://github.com/bundler/bundler/commit/0a0e7cf5ec
2019-09-18 18:26:32 +09:00
Hiroshi SHIBATA 1756ec2065
Ignore the all of warnings with inline_spec.rb of bundler examples. 2019-09-01 08:56:00 +09:00
Jeremy Evans b5b3afadfa Fix a couple of bundler issues with keyword argument separation
There are more issues than this, but hopefully this is enough
to get make test-bundler passing in CI.
2019-08-30 12:39:31 -07:00
Hiroshi SHIBATA d9b73dcc0d Remove github_action_linux tag from bundler examples.
Maybe it has fixed at 5a384e2c08
2019-08-23 19:05:45 +10:00
Nobuyoshi Nakada 4419b5dbc2
The investigation is going on... 2019-08-21 13:31:22 +09:00
lolwut a230e65e8b
[bundler/bundler] Freeze time to avoid failures at midnight
Specify just a string

set @built_at as nil before testing

https://github.com/bundler/bundler/commit/578ec96c9c
2019-08-21 08:10:49 +09:00
Hiroshi SHIBATA 1c2774526e
[bundler/bundler] Share test fixtures with parallel_tests
https://github.com/bundler/bundler/commit/a38161c5be
2019-08-21 08:10:49 +09:00
Hiroshi SHIBATA 10011f4371
[bundler/bundler] Try to use RunTimeLogger for parallel_tests
https://github.com/bundler/bundler/commit/faccc522d1
2019-08-21 08:10:48 +09:00
David Rodríguez ace88852f2
[bundler/bundler] Parallelize test suite
https://github.com/bundler/bundler/commit/23007cb107
2019-08-21 08:10:48 +09:00
David Rodríguez ede77d82e7
[bundler/bundler] Fix a couple of typos
https://github.com/bundler/bundler/commit/52b6b94068
2019-08-21 07:58:46 +09:00
David Rodríguez 1120bacd8b
[bundler/bundler] Remove the :ruby exclusion tag
Our current set of specs is the same for all supported rubies, and we
should keep it that way.

https://github.com/bundler/bundler/commit/c9dc0f6f2c
2019-08-21 07:58:46 +09:00
David Rodríguez bcc4ac924d
[bundler/bundler] Remove another 1.8.7 specific bit
https://github.com/bundler/bundler/commit/8c7942d2c6
2019-08-21 07:58:46 +09:00
David Rodríguez 5ea08883cf
[bundler/bundler] Remove old rubies stuff no longer needed
https://github.com/bundler/bundler/commit/36fb3287f4
2019-08-21 07:58:46 +09:00
Nobuyoshi Nakada dd58c4ba35
Investigation of a sporadic error at Github Actions 2019-08-20 16:07:43 +09:00
David Rodríguez 5a384e2c08 Fix some bundler specs (#2380)
* These seem to consistenly pass already

* Show actual command when running `make test-bundler`

Current the setup command that installs the necessary gems for testing
bundler was printed, but not the actual command that runs the tests.
That was a bit confusing.

* Borrow trick from setproctitle specs

* A title that long doesn't get set sometimes

No idea why, but the test doesn't need that the title is that long.

* Fix most gem helper spec ruby-core failures

* Fix the rest of the gem helper failures

* Fix version spec by improving the assertion

* Remove unnecessary `BUNDLE_RUBY` environment var

We can use `RUBY` when necessary, and `BUNDLE_RUBY` is not a good name
because bundler considers `BUNDLE_*` variables as settings.

* Rename `BUNDLE_GEM` to `GEM_COMMAND`

This is more descriptive I think, and also friendlier for bundler
because `BUNDLE_` env variables are interpreted by bundler as settings,
and this is not a bundler setting.

This fixes one bundler spec failure in config specs against ruby-core.

* Fix quality spec when run in core

Use the proper path helper.

* Fix dummy lib builder to never load default gems

If a dummy library is named as a default gem, when requiring the library
from its executable, the default gem would be loaded when running from
core, because in core all default gems share path with bundler, and thus
they are always in the $LOAD_PATH. We fix the issue by loading lib
relatively inside dummy lib executables.

* More exact assertions

Sometimes I have the problem that I do some "print debugging" inside
specs, and suddently the spec passes. This happens when the assertion is
too relaxed, and the things I print make it match, specially when they
are simple strings like "1.0" than can be easily be part of gem paths
that I print for debugging.

I fix this by making a more exact assertion.

* Detect the correct shebang when ENV["RUBY"] is set

* Relax assertion

So that the spec passes even if another paths containing "ext" are in
the load path. This works to fix a ruby-core issue, but it's a better
assertion in general. We just want to know that the extension path was
added.

* Use folder structure independent path helper

It should fix this spec for ruby-core.

* Fix the last failing spec on ruby-core

* Skip `bundle open <default_gem>` spec when no default gems
2019-08-20 09:46:31 +09:00
Hiroshi SHIBATA d3da1d57d3
Skip open_spec.rb:L95 because ruby repo doesn't have json as default gems. 2019-08-18 15:02:21 +09:00
David Rodríguez a77b3b4476 [bundler/bundler] Remove unnecessary require
https://github.com/bundler/bundler/commit/8ef571ed4e
2019-08-18 13:45:57 +09:00
David Rodríguez 683f9e1dbf [bundler/bundler] No need to activate the `fileutils` default gem
The version we're vendoring actually relaxed this restriction back to
2.3.0+, so we can always use the vendored version.

https://github.com/bundler/bundler/commit/d366cbfe5d
2019-08-18 13:45:45 +09:00
David Rodríguez 4756c5f7e7 [bundler/bundler] Remove unnecessary rubygems monkeypatch
Instead, make sure we always load the local copy of bundler during
specs, and never end up using the default copy.

https://github.com/bundler/bundler/commit/ac655ffeda
2019-08-18 13:45:35 +09:00
David Rodríguez 5a69a23afc [bundler/bundler] Don't use system bundler on this spec
If we use system bundler, when booting the "outermost" bundler process,
bundler will save the path to the system bundler in BUNDLE_BIN_PATH, and
use it again when booting the "innermost" bundler process (`bundle exec
echo foo`).

That means that second process will use the system bundler path again.
However, we have `-rsupport/hax` in RUBYOPT, so that file will load from
the local copy of bundler, and that file will load `bundler/version`
from the project (not from system), because -Ilib is in the LOAD_PATH.

That will end up causing redefinition errors because the same constant
will be loaded from two different locations.

In general, this is expected behavior, normally you will wrap the
process with `Bundler.with_original_env` to reset the environment.
However, the easiest fix here is to not use system bundler, because it's
not really necessary and thus doesn't help the readability of the spec.

https://github.com/bundler/bundler/commit/a3d72a34ab
2019-08-18 13:45:25 +09:00
David Rodríguez 0653d8c601 [bundler/bundler] Fix spec using the deprecated `bundle config` mode
https://github.com/bundler/bundler/commit/789dd1864f
2019-08-18 13:45:15 +09:00
David Rodríguez f753961611 [bundler/bundler] Remove a bunch of unneeded rubygems requires
https://github.com/bundler/bundler/commit/f9cb39e614
2019-08-18 13:44:46 +09:00
Zehan Zhao d80f5399ad [bundler/bundler] Fix open default gem error
https://github.com/bundler/bundler/commit/792d724752
2019-08-18 13:44:26 +09:00
David Rodríguez 98841b2b19 [bundler/bundler] Wrap `open` specs with a context
So I can add another context that doesn't run the `before` block.

https://github.com/bundler/bundler/commit/06d0acc45a
2019-08-18 13:44:22 +09:00
David Rodríguez e6e8d2d8c0 [bundler/bundler] Prefer `before` to `before :each`
https://github.com/bundler/bundler/commit/6678747fae
2019-08-18 13:44:13 +09:00
David Rodríguez cc644c7116 [bundler/bundler] Fix `bundle doctor` command
Previously `bundle doctor` would fail on any bundle that does not
include git gems or plugins. This is because the previously used
`Bundler.home` does not exist unless the bundle includes git gems or
plugins. For example, with `bundle config set path .bundle`, it points
to which does not exist unless this kind of gems exist in the Gemfile.

The name `Bundler.home` is really unfortunate, it should probably be
have more descriptive name, and be private. But for now I just want to
make `bundle doctor` usable.

https://github.com/bundler/bundler/commit/5531a18c1e
2019-08-18 13:44:03 +09:00
David Stosik a02dbcecb1 [bundler/bundler] Bundler displays a duplicate gem entries warning even if gems only appear once per group
https://github.com/bundler/bundler/commit/d18a83109e
2019-08-18 13:43:59 +09:00
David Rodríguez 08c58e3c0d
[bundler/bundler] Extract a `gemspec_dir` helper
https://github.com/bundler/bundler/commit/71a29e286a
2019-08-17 17:08:51 +09:00
David Rodríguez a2d7c97a91
[bundler/bundler] Extract yet another helper method
https://github.com/bundler/bundler/commit/948a863bd8
2019-08-17 17:08:51 +09:00
David Rodríguez 4318405609
[bundler/bundler] Extract a `root_gemspec` local variable
https://github.com/bundler/bundler/commit/a4beba4cbf
2019-08-17 17:08:51 +09:00
David Rodríguez 09455301ef
[bundler/bundler] Extract a `with_root_gemspec` helper
https://github.com/bundler/bundler/commit/f20c2bdf6a
2019-08-17 17:08:51 +09:00
David Rodríguez 20c5154f0b
[bundler/bundler] Only chdir when necessary
https://github.com/bundler/bundler/commit/07161ebc1a
2019-08-17 17:08:51 +09:00
David Rodríguez 580e093fdd
[bundler/bundler] Make sure gem has been built before deleteng it
https://github.com/bundler/bundler/commit/32520c7020
2019-08-17 17:08:51 +09:00
David Rodríguez a56bf5bfde
[bundler/bundler] Cleanup in a location independent way
https://github.com/bundler/bundler/commit/5b503a4bf1
2019-08-17 17:08:51 +09:00
David Rodríguez 9c0fcd1d0f
[bundler/bundler] Remove obvious comment
https://github.com/bundler/bundler/commit/91e7fe1b2f
2019-08-17 17:08:51 +09:00
David Rodríguez adfca752d6
[bundler/bundler] Remve another unneeded `to_s`
`FileUtils.rm` supports a `Pathname` argument.

https://github.com/bundler/bundler/commit/7d982a5be9
2019-08-17 17:08:51 +09:00
David Rodríguez 9925e1a10f
[bundler/bundler] Remove unneeded `to_s` calls
They are implicit inside `gem_command!`.

https://github.com/bundler/bundler/commit/6bdb13c899
2019-08-17 17:08:51 +09:00
David Rodríguez f88237623f
[bundler/bundler] Consistently use `Path` over `Spec::Path`
https://github.com/bundler/bundler/commit/a4cca66b79
2019-08-17 17:08:51 +09:00
David Rodríguez aef5509139
[bundler/bundler] Extract single gem installation logic
https://github.com/bundler/bundler/commit/7888d621c8
2019-08-17 17:08:51 +09:00
David Rodríguez 20af44c277
[bundler/bundler] Unalias `install_gem`
Since I plan to reuse it for something else.

https://github.com/bundler/bundler/commit/5379382198
2019-08-17 17:08:50 +09:00
David Rodríguez 6506993462
[bundler/bundler] Use `join` consistently
https://github.com/bundler/bundler/commit/096e53dfe6
2019-08-17 17:08:50 +09:00
David Rodríguez 6a299906b4
[bundler/bundler] Extract a `lib_tracked_files` path helper
https://github.com/bundler/bundler/commit/028dc46f5a
2019-08-17 17:08:50 +09:00
David Rodríguez 19dabfbe57
[bundler/bundler] Rename a variable
Otherwise I get conflicts when extracting the helper.

https://github.com/bundler/bundler/commit/314c64cd07
2019-08-17 17:08:50 +09:00
David Rodríguez c896f71577
[bundler/bundler] Extract a `tracked_files` path helper
https://github.com/bundler/bundler/commit/d35e31d2e0
2019-08-17 17:08:50 +09:00
David Rodríguez b43f4bd218
[bundler/bundler] Rename some variables
I want to extract these to path helper methods, but the name `files`
conflict with some builder methods that are also available at the same
level.

https://github.com/bundler/bundler/commit/7844096af0
2019-08-17 17:08:50 +09:00
David Rodríguez 334e615022
[bundler/bundler] Reconcile test
The `:bundler` gem is not needed in the regular repo either.

https://github.com/bundler/bundler/commit/ca5ce01a9b
2019-08-17 17:08:50 +09:00
David Rodríguez 122bc65042
[bundler/bundler] Reuse `gem_bin` helper inside `gem_command`
The logic for choosing `gem_bin` should work here too even if it's not
identical.

https://github.com/bundler/bundler/commit/6ca0271b27
2019-08-17 17:08:50 +09:00
David Rodríguez 30a4ec1fee
[bundler/bundler] Always use `--backtrace` when invoking `gem` CLI
For debuggability.

https://github.com/bundler/bundler/commit/ac3e8db658
2019-08-17 17:08:50 +09:00
David Rodríguez 91c63828f7
[bundler/bundler] Extract a `gem_bin` path helper
https://github.com/bundler/bundler/commit/8eedbecac0
2019-08-17 17:08:50 +09:00
David Rodríguez e38994d2f7
[bundler/bundler] Reuse `gem_command!` helper
https://github.com/bundler/bundler/commit/37d5dedffe
2019-08-17 17:08:50 +09:00
David Rodríguez 63d78afc2d
[bundler/bundler] Remove more dead code
https://github.com/bundler/bundler/commit/17d4d0de8e
2019-08-17 17:08:50 +09:00
David Rodríguez 2e6509498c
[bundler/bundler] Remove dead code
https://github.com/bundler/bundler/commit/cae948f514
2019-08-17 17:08:50 +09:00
David Rodríguez 3bebdda649
[bundler/bundler] Remove unnecessary rubygems require
https://github.com/bundler/bundler/commit/039604ff95
2019-08-17 17:08:50 +09:00
David Rodríguez 7af12a92c8
[bundler/bundler] Use path helpers to find bundle bin
https://github.com/bundler/bundler/commit/7985bb8e92
2019-08-17 17:08:50 +09:00
David Rodríguez 6357540945
[bundler/bundler] Fix bundle bin location in core repo
https://github.com/bundler/bundler/commit/9437568ab4
2019-08-17 17:08:49 +09:00
David Rodríguez 7551117c70
[bundler/bundler] Reuse more shared path helpers
https://github.com/bundler/bundler/commit/79fdebd868
2019-08-17 17:08:49 +09:00
David Rodríguez 9995ce64a2
[bundler/bundler] Remove unnecessary assignment
https://github.com/bundler/bundler/commit/e483322519
2019-08-17 17:08:49 +09:00
David Rodríguez a2ca3a12ba
[bundler/bundler] Remove unnecessary `let`
Use shared helper instead.

https://github.com/bundler/bundler/commit/ef55470cc6
2019-08-17 17:08:49 +09:00
David Rodríguez 745b286161
[bundler/bundler] Move `lib` helper together with path helpers
https://github.com/bundler/bundler/commit/f2df73bdb4
2019-08-17 17:08:49 +09:00
David Rodríguez 50a91fcd10
[bundler/bundler] Reuse `lib` method
https://github.com/bundler/bundler/commit/4589a57852
2019-08-17 17:08:49 +09:00
David Rodríguez ef2d415802
[bundler/bundler] Remove duplicated method
https://github.com/bundler/bundler/commit/afdacd62ac
2019-08-17 17:08:49 +09:00
Kazuhiro NISHIYAMA ccbfb054b1
Fix typos 2019-08-17 13:57:12 +09:00
Hiroshi SHIBATA 02d0d424be
Revert "[bundler/bundler] Fixup #7297"
This reverts commit b8d759806f.

  It's accidentally picked from the upstream repository.
2019-08-16 14:52:03 +09:00
Hiroshi SHIBATA b8d759806f [bundler/bundler] Fixup #7297
https://github.com/bundler/bundler/commit/1a0161b970
2019-08-16 14:30:23 +09:00
Hiroshi SHIBATA 8cf90a2f80 [bundler/bundler] Fixed rubocop error
https://github.com/bundler/bundler/commit/9256177446
2019-08-16 14:30:23 +09:00
tommy 3b61019a89 [bundler/bundler] Add initial Bundler::BuildMetadata Spec
https://github.com/bundler/bundler/commit/c6458b2727
2019-08-16 14:30:23 +09:00
David Rodríguez b587e8c7f1 [bundler/bundler] Add `--[no-]git` option to `bundle gem`
I think using `--no-git` can be useful when creating gems inside
monorepos.

https://github.com/bundler/bundler/commit/154c687310
2019-08-16 14:30:23 +09:00
David Rodríguez cb71930351 [bundler/bundler] Remove unexistent folder from exemptions
https://github.com/bundler/bundler/commit/0b6d973543
2019-08-16 14:30:23 +09:00
David Rodríguez f48a61fb46 [bundler/bundler] Commit man pages to source control
This has the benefit that:

* Allows the installation of bundler as a default gem from rubygems to
include man pages.
* Removes the need to build man pages during our tests.
* Makes working with the manifest easier, because we only have source
controlled files, and not a mix of source control and generated files.

To make sure they never fall out of sync, we replace the previous
`man:build` CI task with a `man:check` task that makes sure the
generated man pages are up to date.

https://github.com/bundler/bundler/commit/23de1d0177
2019-08-16 14:30:23 +09:00
David Rodríguez 4913c9b6bf [bundler/bundler] Remove unexistent file from exemptions
https://github.com/bundler/bundler/commit/8601575490
2019-08-16 14:30:23 +09:00
David Rodríguez 94e26a97a1 [bundler/bundler] Bump rspec dependency to 3.8
Because we're using `config.bisect_runner` which is only available from
3.8.

https://github.com/bundler/bundler/commit/304a187f72
2019-08-16 14:30:23 +09:00
David Rodríguez 521a2d2beb [bundler/bundler] Revert "make system_bundle_bin_path helper and resolve failing tests for ruby < 2.6"
This reverts commit e63e844bc7444c6a489fcde0dc7011c6c4807edd.

It was introduced to resolve some failing tests at the cost of making
the intention of the spec much less clear.

Thanks to the previous fixes we have added to this spec, we can revert
that patch now.

https://github.com/bundler/bundler/commit/b29a40820f
2019-08-16 14:30:23 +09:00
David Rodríguez 5bff72c912 [bundler/bundler] Make sure spec fails if `bundle install` fails
https://github.com/bundler/bundler/commit/2ed2bbfdec
2019-08-16 14:30:23 +09:00
David Rodríguez 7ff0b4fec4 [bundler/bundler] Fix installation of system bundler
Previously it was being installed to the :bundle_path
(`/tmp/bundled_app/.bundle`), but the `bundle` helper uses the
`system_gem_path("bin/bundle")`. That means the first `bundle install`in
the spec was actually failing, but not affecting the test status because
of not being called as `bundle!`.

https://github.com/bundler/bundler/commit/ad75f75539
2019-08-16 14:30:23 +09:00
David Rodríguez 6c6c4c7388 [bundler/bundler] Use non deprecated way of setting bundler path
https://github.com/bundler/bundler/commit/6013c93e81
2019-08-16 14:30:23 +09:00
David Rodríguez ee1f3038f1 [bundler/bundler] Clarify spec description
https://github.com/bundler/bundler/commit/b2abde04aa
2019-08-16 14:30:23 +09:00
David Rodríguez 0aed0bd9ed [bundler/bundler] Bump rack and sinatra to latest versions
https://github.com/bundler/bundler/commit/09ecaf04fa
2019-08-16 14:30:23 +09:00
David Rodríguez 129657ab6a [bundler/bundler] Normalize style with other artifice files
https://github.com/bundler/bundler/commit/f11c9a2b3f
2019-08-16 14:30:23 +09:00
David Rodríguez 41534ce327 [bundler/bundler] Make spec pass more resiliently
Previously, if bundler-2.1.0.pre.1 would be installed globally, it would
fail. Now we force that a locally installed version of bundler is used,
so it always passed regardless of which bundler is installed globally.

https://github.com/bundler/bundler/commit/764d8e8fd1
2019-08-16 14:30:23 +09:00
David Rodríguez 3c23bb29ec [bundler/bundler] Remove unnecessary exclusions
https://github.com/bundler/bundler/commit/c189dfdde0
2019-08-16 14:30:23 +09:00
David Rodríguez 3f0e19c9fa [bundler/bundler] Enable retries on flaky spec
https://github.com/bundler/bundler/commit/da360659f7
2019-08-16 14:30:23 +09:00
Benoit Daloze 2b0f3aa095 [bundler/bundler] Use the standard RUBY_ENGINE_VERSION instead of JRUBY_VERSION
* RUBY_ENGINE and RUBY_ENGINE_VERSION are defined on every modern Ruby.
* There is no such constant as TRUFFLERUBY_VERSION or RBX_VERSION.

https://github.com/bundler/bundler/commit/f9d910403b
2019-08-16 14:30:23 +09:00
David Rodríguez 6711343d5a [bundler/bundler] Fix inconsistent lockfile order
When Gemfile would specify path sources as relative paths starting with
"./", the lockfile would have inconsistent order on `bundle install` and
`bundle update`.

https://github.com/bundler/bundler/commit/c7532ced89
2019-08-16 14:30:23 +09:00
David Rodríguez c11c8b69ea [bundler/bundler] Indentation tweak
https://github.com/bundler/bundler/commit/5978a88f33
2019-08-16 14:30:23 +09:00
Hiroshi SHIBATA ed9d59afc8
Added example filter for Linux of GitHub Actions. 2019-08-12 12:14:39 +09:00
Hiroshi SHIBATA 8a8f680f01
Re-use GITHUB_ACTION variables for filtering bundler examples. 2019-08-12 12:14:39 +09:00