Skip to content
This repository has been archived by the owner. It is now read-only.

`bundle pristine` command to revert bundle to original state #5

Closed
xaviershay opened this issue Aug 10, 2013 · 35 comments
Closed

`bundle pristine` command to revert bundle to original state #5

xaviershay opened this issue Aug 10, 2013 · 35 comments

Comments

@xaviershay
Copy link
Contributor

@xaviershay xaviershay commented Aug 10, 2013

from @railsjedi: "While debugging something in a rails project, thanks to the awesomeness of bundle open I tend to litter my dependencies with logging and debugger statements so I can trace things. At the end, I run gem pristine --all to take care of gems I may have hacked up to do. Would be very awesome if bundler also provided a pristine command that would revert the bundle to its original state."

From rubygems/bundler#524, wide agreement that this would be useful and shouldn't be too difficult to implement.

@sheerun
Copy link

@sheerun sheerun commented Oct 17, 2013

It would helpful few times at least for me.

@hoverlover
Copy link

@hoverlover hoverlover commented Nov 7, 2013

👍

5 similar comments
@zerobearing2
Copy link

@zerobearing2 zerobearing2 commented Dec 2, 2013

👍

@alexandru-calinoiu
Copy link

@alexandru-calinoiu alexandru-calinoiu commented May 20, 2014

👍

@chibicode
Copy link

@chibicode chibicode commented May 23, 2014

👍

@Bastes
Copy link

@Bastes Bastes commented Jul 24, 2014

👍

@shicholas
Copy link

@shicholas shicholas commented Aug 15, 2014

👍

@zabolotnov87
Copy link

@zabolotnov87 zabolotnov87 commented Oct 10, 2014

👍

1 similar comment
@jcreixell
Copy link

@jcreixell jcreixell commented Oct 10, 2014

👍

@indirect
Copy link
Member

@indirect indirect commented Oct 10, 2014

You can just run bundle exec gem pristine [GEM] for now.

@jasonkarns
Copy link

@jasonkarns jasonkarns commented Oct 10, 2014

Must be executed for each gem in the bundle, right?

On Fri, Oct 10, 2014 at 12:33 PM, André Arko notifications@github.com
wrote:

You can just run bundle exec gem pristine [GEM] for now.


Reply to this email directly or view it on GitHub
#5 (comment)
.

@indirect
Copy link
Member

@indirect indirect commented Oct 10, 2014

You can pristine an entire bundle with bundle exec gem pristine --all (doesn't apply to git and path gems, which are managed separately).

@Bastes
Copy link

@Bastes Bastes commented Oct 14, 2014

Thanks @indirect that was just the command I was missing ^^d

@sandiritter
Copy link

@sandiritter sandiritter commented Oct 16, 2014

👍

1 similar comment
@Intrepidd
Copy link

@Intrepidd Intrepidd commented Oct 28, 2014

👍

@nilbus
Copy link

@nilbus nilbus commented Dec 31, 2014

Running bundle exec gem pristine works fine. I don't think this is necessary.

@eliotsykes
Copy link

@eliotsykes eliotsykes commented Jan 1, 2015

How about if bundle pristine outputted help to the user to consider trying bundle exec gem pristine?

@indirect
Copy link
Member

@indirect indirect commented Jan 4, 2015

bundle exec gem pristine does not work on git gems. this is a feature.

On Thu, Jan 1, 2015 at 6:48 AM, Eliot Sykes notifications@github.com
wrote:

How about if bundle pristine outputted help to the user to consider trying bundle exec gem pristine?

Reply to this email directly or view it on GitHub:
#5 (comment)

@brunowego
Copy link

@brunowego brunowego commented Jan 6, 2015

👍

1 similar comment
@mgenereu
Copy link

@mgenereu mgenereu commented Apr 8, 2015

👍

@sheerun
Copy link

@sheerun sheerun commented Jun 3, 2015

@indirect Isn't this already implemented in 1.10 with bundle install --force?

@indirect
Copy link
Member

@indirect indirect commented Jun 3, 2015

@sheerun the pristine command just unpacks the .gem file again from the disk, while --force downloads the gem again and then installs it.

@segiddins this actually makes me realize that we might not be deleting existing files before force installing... are we?

@segiddins
Copy link
Member

@segiddins segiddins commented Jun 3, 2015

@indirect no, we just make the source #install the spec again

@indirect
Copy link
Member

@indirect indirect commented Jun 4, 2015

@segiddins that's a bug in force, then. we need to nuke the directory, since it's possible that a malicious gem could install files that don't get overwritten when the non-malicious gem is installed. :/

@segiddins
Copy link
Member

@segiddins segiddins commented Jun 4, 2015

Make an issue on bundler/bundler for me?

-Samuel E. Giddins

On Jun 3, 2015, at 5:10 PM, André Arko notifications@github.com wrote:

@segiddins that's a bug in force, then. we need to nuke the directory, since it's possible that a malicious gem could install files that don't get overwritten when the non-malicious gem is installed. :/


Reply to this email directly or view it on GitHub.

@hackervera
Copy link

@hackervera hackervera commented Aug 11, 2015

👍

@segiddins
Copy link
Member

@segiddins segiddins commented Aug 11, 2015

Instead of a bunch of 👍's, it would be much appreciated if someone made a PR to bundler implementing the feature :)

@arthurnn arthurnn self-assigned this Aug 12, 2015
@razorcd
Copy link

@razorcd razorcd commented Jan 27, 2016

+1

@indirect
Copy link
Member

@indirect indirect commented Jan 27, 2016

@razorcd where's that pull request? :P

@akhramov
Copy link

@akhramov akhramov commented Feb 13, 2016

@indirect

Shouldn't --force switch be aware of --local switch? If both --force and --local are set then bundle install --force --local should do the "pristine thing" (and already does).

Just a reminder if you're going to change the --force behaviour.

@indirect
Copy link
Member

@indirect indirect commented Feb 13, 2016

@akhramov this change has nothing to do with the --force option, they are completely separate things

@schneems
Copy link

@schneems schneems commented Feb 19, 2016

Dropped in to say, I would use this feature if it existed.

@xander-miller
Copy link

@xander-miller xander-miller commented Apr 21, 2016

👍

@segiddins
Copy link
Member

@segiddins segiddins commented Apr 21, 2016

Everyone, please stop adding thumbs up -- either use GitHub's emoji reactions on the original issue, or even better send a pull request to bundler implementing the feature.

@rubygems rubygems locked and limited conversation to collaborators May 3, 2016
@lynncyrin
Copy link
Member

@lynncyrin lynncyrin commented May 3, 2016

Locked, no more thumbs up to be had here. Also closing in favor of rubygems/bundler#4509

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.