summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fully switch to https sourceshttps_sourcesDavid Rodríguez2019-04-243-10/+2
|
* Merge #6329Bundlerbot2019-04-241-6/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6329: Stop printing “failed to update” message when changing sources r=segiddins a=segiddins ### What was the end-user problem that led to this PR? The problem was `bundle update` shows incorrect message when updating git gems Closes #6325 ### What was your diagnosis of the problem? My diagnosis was we need to check if the source has changed ### What is your fix for the problem, implemented in this PR? My fix only prints the message when the source has not changed Note that is does not yet fix the "updated the git sha" case, since the locked spec and the new spec actually share the same source object! Co-authored-by: Samuel Giddins <segiddins@segiddins.me> Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * Grab previous sources early enough (before they change)seg-no-warning-when-updating-sha-not-versionDavid Rodríguez2019-04-131-4/+12
| | | | | | | | | | And make sure the revision is actually fetched, by saving to "to_s" version, that includes it.
| * Remove unneeded checkDavid Rodríguez2019-04-131-1/+1
| | | | | | | | If it's not needed for version, it shouldn't be needed for source.
| * Early return earlier to further simplifyDavid Rodríguez2019-04-131-2/+2
| |
| * Rename variables to make code more clearDavid Rodríguez2019-04-131-6/+6
| |
| * [Update] Stop printing “failed to update” message when changing sourcesSamuel Giddins2019-04-131-0/+3
| |
* | Merge #7129Bundlerbot2019-04-241-2/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7129: Bundle env improvements r=deivid-rodriguez a=deivid-rodriguez This came from debugging #7096. ### What was the end-user problem that led to this PR? The problem was that `bundle env` is great, but could be more useful and accurate. ### What is your fix for the problem, implemented in this PR? My fix is to start improving it, by dumping more paths, and more accurate information, and getting the paths tested. ### Why did you choose this fix out of the possible options? I have a few more improvements in mind, but I want to keep my PRs small. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * | Remove unnecessary env variable checkingbundle_env_improvementsDavid Rodríguez2019-04-151-2/+2
| | | | | | | | | | | | | | | | | | Rubygems already sets these paths from the environment, and once they are set, it uses the paths and not the environment. So the check is unnecessary and potentially misleading.
| * | Add user home to `bundle env`David Rodríguez2019-04-151-0/+1
| | |
* | | Skip platform warnings in inline modeskip_platform_warnings_during_bundle_inlineDavid Rodríguez2019-04-241-1/+1
| | | | | | | | | | | | Since there's no lock file, I don't think they make sense.
* | | Merge #7125Bundlerbot2019-04-241-15/+17
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7125: Ignore `frozen` setting in inline mode r=indirect a=deivid-rodriguez Fixes #7114. ### What was the end-user problem that led to this PR? The problem was that the inline mode wouldn't work if `BUNDLE_FROZEN` is set. ### What was your diagnosis of the problem? My diagnosis was that since we're in frozen mode, the current platform doesn't get added to the definition, and thus platform validation fails. ### What is your fix for the problem, implemented in this PR? My fix is to temporary ignore `BUNDLE_FROZEN` for the inline mode. The inline mode can't really be frozen since it has no lock file. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * | | Ignore `frozen` setting in inline modeignore_frozen_setting_in_inline_modeDavid Rodríguez2019-04-121-15/+17
| | | |
* | | | Merge #7127Bundlerbot2019-04-233-2/+8
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7127: Add git and branch options to `bundle add` r=deivid-rodriguez a=tokachev Closes #6841 These changes will allow to add a gem with the git or branch options. ``` bundle add redis --git "https://github.com/redis/redis-rb" --branch "staging" ``` The result in Gemfile will be: ``` gem "redis", "~> 4.0", :git => "https://github.com/redis/redis-rb", :branch => "staging" ``` Co-authored-by: Baumgarten <baumgarten@localhost.localdomain>
| * | | | Add git and branch options to `bundle add`Baumgarten2019-04-133-2/+8
| | | | |
* | | | | Add spec for using relative requiresrequire_relativeDavid Rodríguez2019-04-221-1/+1
| | | | |
* | | | | One moreDavid Rodríguez2019-04-191-1/+1
| | | | |
* | | | | Remove dummy commentDavid Rodríguez2019-04-191-2/+0
| | | | |
* | | | | Load executable relatively in the first placeDavid Rodríguez2019-04-191-12/+4
| | | | |
* | | | | Prefer `require_relative` for internal requiresDavid Rodríguez2019-04-1949-114/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the way rubygems monkey-patched require interacts with default gems, and given that bundler is a default gem, and that bundler manipulates the LOAD_PATH in very intricated ways, we can reduce the risk of "leaking" to a different copy of `bundler` by using `require_relative` for internal requires.
* | | | | Remove unnecessary requireDavid Rodríguez2019-04-191-1/+0
| |_|/ / |/| | |
* | | | Merge #7043Bundlerbot2019-04-142-349/+117
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7043: Remove old rubygems compatibility code r=bronzdoc a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that I was unsure where I needed to add the compatibility layer to #6963, and it took me a bit to scan through the compatibility file and figure it out. ### What was your diagnosis of the problem? My diagnosis was that all this compatibility code is unused but makes this file harder to understand and scan through. ### What is your fix for the problem, implemented in this PR? My fix is to remove the code. ### Why did you choose this fix out of the possible options? I chose this fix because we can do it, I think. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * | | | Remove more unnecessary coderemove_old_rubygems_compatibility_codeDavid Rodríguez2019-04-091-2/+0
| | | | | | | | | | | | | | | | | | | | The `full_gem_path` writer has been there since rubygems 2.2
| * | | | Remove unnecessary codeDavid Rodríguez2019-04-091-10/+4
| | | | | | | | | | | | | | | | | | | | The `source` method has been there since rubygems 2.1.
| * | | | Remove unused variableDavid Rodríguez2019-04-091-2/+0
| | | | |
| * | | | Remove more unnecessary logicDavid Rodríguez2019-04-091-8/+3
| | | | |
| * | | | Remove last level of inheritanceDavid Rodríguez2019-04-091-127/+120
| | | | |
| * | | | Remove one level of inheritanceDavid Rodríguez2019-04-091-5/+2
| | | | |
| * | | | Remove more uneeded stuffDavid Rodríguez2019-04-091-62/+0
| | | | |
| * | | | Remove old rubygems compatibility codeDavid Rodríguez2019-04-091-146/+1
| | | | |
* | | | | Merge #6730Bundlerbot2019-04-143-6/+2
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6730: Print errors to stderr by default, and remove configuration option r=greysteil a=greysteil ### What was the end-user problem that led to this PR? The problem was #6729 - Bundler unexpectedly outputs error and warning messages to STDOUT. ### What was your diagnosis of the problem? My diagnosis was that whilst very minorly breaking, this is essentially a bug fix, and should be considered for inclusion for Bundler 2.0 even if very few other breaking changes are. ### What is your fix for the problem, implemented in this PR? My fix was so switch output for warning and error messages to STDERR, and remove the configuration option (as is redundant once the setup is flipped - anyone wanting to redirect those message to STDOUT could do so in their shell). ### Why did you choose this fix out of the possible options? I chose this fix because I think the new behaviour is what everyone would expect, and we should get it out from behind its feature switch sooner rather than later. Alternatively, we might want to keep the Bundler 2.0 release "purer" by only dropping Ruby versions in it - that's totally fine too, but I figured we should have the code to discus #6729, rather than doing it in abstract. Co-authored-by: Grey Baker <greysteil@gmail.com> Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * | | | Print errors to stderr by default, and remove configuration optionGrey Baker2019-04-123-6/+2
| | |_|/ | |/| |
* | | | Another tryDavid Rodríguez2019-04-121-3/+3
| | | |
* | | | Improve wordingDavid Rodríguez2019-04-121-1/+1
| | | |
* | | | Add warning about conflicting executablesDavid Rodríguez2019-04-121-8/+14
| | | |
* | | | Convert binstub conflict deprecation to a warningDavid Rodríguez2019-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And test it. I don't think it makes sense as a deprecation, since nothing is changing, and there's no alternative. This is a potentially undesired situation caused by gems shipping executables conflicting with the executables of other gems. `bundle exec` is fine in general, this is just a potentially undesired situation that can be fixed by using project specific binstubs.
* | | | Assume `exec_name` needs to be givenDavid Rodríguez2019-04-121-7/+3
|/ / /
* | | Merge #7113Bundlerbot2019-04-122-2/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7113: Make `init_gems_rb` a regular setting r=indirect a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that we have a feature flag to change the file name of the file where gems are defined from `Gemfile` to `gems.rb`, and it is unclear whether we will actually do this, and when. ### What was your diagnosis of the problem? My diagnosis was that a feature flag is not a good fit here. It's perfectly fine to configure this and allow users to use `gems.rb` by default for their gems, but we don't know when/if we will actually change the default so a plain setting feels better than a feature flag. ### What is your fix for the problem, implemented in this PR? My fix is to convert the `init_gems_rb` feature flag into a plain setting. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * | | Make `init_gems_rb` a regular settingmake_init_gems_rb_a_settingDavid Rodríguez2019-04-112-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I think it's nice that users can configure this and start using `gems.rb`. But there's no need to make this a feature flag and change its default value. Let's keep generating Gemfile's by default until we are ready, if we ever are.
* | | | Remove `prefer_gems_rb` settinginit_gems_rbDavid Rodríguez2019-04-113-13/+5
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In my opinion, it's overkill to provide a setting for how little this setting was doing. Both types of Gemfile are supported and work regardless of this setting. The only difference this setting would make is the warning message one would get when having _both_ types of Gemfiles in the same project. I changed things so that gems.rb is always looked up first, and the warning message in case you have both always tells you to remove Gemfile and Gemfile.lock.
* | | Move on to bundler 3David Rodríguez2019-04-113-23/+23
| | | | | | | | | | | | | | | | | | * Drop bundler 1 stuff from tests. * Move all feature flags to bundler 3 (like they are in 2-0-stable) and get them tested.
* | | Cherry-pick github source removal from Gemfile templateDavid Rodríguez2019-04-111-2/+0
| | |
* | | Merge #7057Bundlerbot2019-04-118-18/+15
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7057: Review multiple sources deprecation r=indirect a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that I had not yet reviewed the deprecation about multiple global sources being present on a Gemfile, and thus the specs were skipped. ### What was your diagnosis of the problem? My diagnosis was that we need to delay the removal of multiple sources support to bundler 3, so that we can show the deprecations in the 2.x series. I also noticed that part of the deprecation message was inaccurate. In order to upgrade the warning to an error, you would also need to configure the `lockfile_uses_separate_rubygems_sources` setting. Otherwise you will get an error that these two settings depend on each other and can't be enabled separatedly. ### What is your fix for the problem, implemented in this PR? My fix is to delay these feature flags to bundler 3 so that the deprecation specs pass. Also, since before giving this advice I'd like to study why we have two different settings that can't be enabled separately, and why the can't be merged to a single one, I have removed that part of the message for now. ### Why did you choose this fix out of the possible options? I chose this fix because it keeps me moving with reviewing all the deprecations for bundler 3 breaking changes, and makes sure that the deprecations for this change of behavior are tested (and passing). Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * | Move multiple global source removal to bundler 3David Rodríguez2019-04-081-1/+1
| | | | | | | | | | | | And fix specs.
| * | Merge multisource related settingsDavid Rodríguez2019-04-088-17/+12
| | |
| * | Allow running source list specs in isolationDavid Rodríguez2019-04-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currenty one gets errors like ``` Failure/Error: lock_sources.to_set == replacement_sources.to_set NoMethodError: undefined method `to_set' for #<Array:0x0000560a01cd97c0> Did you mean? to_s ```
* | | Remove ruby 1.8 compatibility codecleanup_old_rubies_stuffDavid Rodríguez2019-04-081-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | The comment about this being for rubygems 1.8 compatibility seems wrong, it was for ruby 1.8 compatibility, as can be seen by these docs: https://ruby-doc.org/core-1.8.7/Module.html#method-i-instance_methods https://ruby-doc.org/core-1.9.3/Module.html#method-i-instance_methods
* | | Remove QuickLoader mentionDavid Rodríguez2019-04-081-5/+0
| | | | | | | | | | | | No longer provided by ruby since 1.8 times.|
* | | Cleanup more stuff only needed for old rubiesDavid Rodríguez2019-04-083-10/+2
| | |
* | | Remove unused constantDavid Rodríguez2019-04-081-14/+0
| | | | | | | | | | | | Stopped being used in 8b749ee85b04307135d368f05275d50e6cbf76a0.