Commit graph

34 commits

Author SHA1 Message Date
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
David Rodríguez
a2d7c97a91
[bundler/bundler] Extract yet another helper method
948a863bd8
2019-08-17 17:08:51 +09:00
David Rodríguez
09455301ef
[bundler/bundler] Extract a with_root_gemspec helper
f20c2bdf6a
2019-08-17 17:08:51 +09:00
David Rodríguez
20c5154f0b
[bundler/bundler] Only chdir when necessary
07161ebc1a
2019-08-17 17:08:51 +09:00
David Rodríguez
580e093fdd
[bundler/bundler] Make sure gem has been built before deleteng it
32520c7020
2019-08-17 17:08:51 +09:00
David Rodríguez
a56bf5bfde
[bundler/bundler] Cleanup in a location independent way
5b503a4bf1
2019-08-17 17:08:51 +09:00
David Rodríguez
9c0fcd1d0f
[bundler/bundler] Remove obvious comment
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.

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!`.

6bdb13c899
2019-08-17 17:08:51 +09:00
David Rodríguez
6a299906b4
[bundler/bundler] Extract a lib_tracked_files path helper
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.

314c64cd07
2019-08-17 17:08:50 +09:00
David Rodríguez
c896f71577
[bundler/bundler] Extract a tracked_files path helper
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.

7844096af0
2019-08-17 17:08:50 +09:00
David Rodríguez
cb71930351 [bundler/bundler] Remove unexistent folder from exemptions
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.

23de1d0177
2019-08-16 14:30:23 +09:00
David Rodríguez
4913c9b6bf [bundler/bundler] Remove unexistent file from exemptions
8601575490
2019-08-16 14:30:23 +09:00
David Rodríguez
e84e63230b
[bundler/bundler] Check for straneous quotes
And use single quotes consistenly.

8b9fbbb2df
2019-08-03 09:30:00 +09:00
David Rodríguez
4f5e1b6ebf
[bundler/bundler] Remove cache_command_is_package feature flag
So that we handle the removal of `bundle cache` just like we'll handle
the removal of `bundle show` and `bundle console`.

ff1a669efb
2019-08-03 09:29:58 +09:00
David Rodríguez
f399a2b796
[bundler/bundler] Remove unnecessary line
It contains a typo, so it can't be needed.

ef38c97fbf
2019-08-03 09:29:58 +09:00
David Rodríguez
56fd027aa6
[bundler/bundler] Tweak some quality specs to check more files
98023e25de
2019-08-03 09:29:58 +09:00
David Rodríguez
812dfa44f0
[bundler/bundler] Refactor setting the encoding in quality specs
Instead of setting the encoding globally, set it when reading the files.

e2a5c45e4d
2019-08-03 09:29:57 +09:00
David Rodríguez
6cbe818c66
[bundler/bundler] This seems to pass for me
e31880b1ea
2019-08-03 09:29:57 +09:00
Hiroshi SHIBATA
8f37629519 Merge bundler master from upstream.
Pick from 8dd59e3ba97eb80a599f8149f31bf40773b69dc0
2019-06-09 12:44:10 +09:00
hsbt
2e8b9aba9b Skip to failing examples on ruby core repository.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-14 06:03:58 +00:00
hsbt
68ddd4d300 Merge Bundler 2.1.0.pre.1 as developed version from upstream.
a53709556b

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-14 06:01:35 +00:00
hsbt
7c2bbd1c7d Adjust the rubycop rules of Bundler upstream repository.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-20 10:43:23 +00:00
hsbt
3661d0521f The ruby core applied the difference structure from bundler upstream repository. We need to modify a configuration for test-bundler.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-18 09:46:25 +00:00
hsbt
e97741e12a Merge Bundler 2.0.1 from upstream.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-04 13:10:58 +00:00
hsbt
91533d9ab1 Downgrade Bundler 1.17.x from 2.0.0.
We have the platform issue on heroku:
    * https://gist.github.com/schneems/26452540f6e2bbbcf2ea144f45f6b305
    * https://github.com/heroku/heroku-buildpack-ruby/issues/833

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-11 03:07:37 +00:00
hsbt
8f4aa4fd2a Merge Bundler-2.0.0.pre1 from upstream.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-12 00:53:15 +00:00
hsbt
59c8d50653 Added bundler as default gems. Revisit [Feature #12733]
* bin/*, lib/bundler/*, lib/bundler.rb, spec/bundler, man/*:
    Merge from latest stable branch of bundler/bundler repository and
    added workaround patches. I will backport them into upstream.
  * common.mk, defs/gmake.mk: Added `test-bundler` task for test suite
    of bundler.
  * tool/sync_default_gems.rb: Added sync task for bundler.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-02 23:07:56 +00:00
hsbt
7825e8363d Postponing the Bundler merge.
I faced a big issue about Bundler with ruby core.
  I have no time to resolve it issue before 2.5 final release.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 23:08:05 +00:00
hsbt
be7b592912 Update bundled bundler to 1.16.0.
* lib/bundler, spec/bundler: Merge bundler-1.16.0.
  * common.mk: rspec examples of bundler-1.16.0 needs require option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-01 23:29:38 +00:00
hsbt
8598f8c2dc Merge bundler to standard libraries.
rubygems 2.7.x depends bundler-1.15.x. This is preparation for
  rubygems and bundler migration.

  * lib/bundler.rb, lib/bundler/*: files of bundler-1.15.4
  * spec/bundler/*: rspec examples of bundler-1.15.4. I applied patches.
    * https://github.com/bundler/bundler/pull/6007
    * Exclude not working examples on ruby repository.
    * Fake ruby interpriter instead of installed ruby.
  * Makefile.in: Added test task named `test-bundler`. This task is only
    working macOS/linux yet. I'm going to support Windows environment later.
  * tool/sync_default_gems.rb: Added sync task for bundler.

  [Feature #12733][ruby-core:77172]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-08 08:45:41 +00:00