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

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

Comments

Projects
None yet
@xaviershay
Contributor

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 bundler/bundler#524, wide agreement that this would be useful and shouldn't be too difficult to implement.

@xaviershay xaviershay referenced this issue in bundler/bundler Aug 10, 2013

Closed

Feature request: bundle pristine #524

@sheerun

This comment has been minimized.

Show comment
Hide comment
@sheerun

sheerun Oct 17, 2013

It would helpful few times at least for me.

sheerun commented Oct 17, 2013

It would helpful few times at least for me.

@hoverlover

This comment has been minimized.

Show comment
Hide comment

👍

@zerobearing2

This comment has been minimized.

Show comment
Hide comment

👍

@alexandru-calinoiu

This comment has been minimized.

Show comment
Hide comment
@chibicode

This comment has been minimized.

Show comment
Hide comment

👍

@Bastes

This comment has been minimized.

Show comment
Hide comment

Bastes commented Jul 24, 2014

👍

@shicholas

This comment has been minimized.

Show comment
Hide comment

👍

@zabolotnov87

This comment has been minimized.

Show comment
Hide comment

👍

@jcreixell

This comment has been minimized.

Show comment
Hide comment

👍

@indirect

This comment has been minimized.

Show comment
Hide comment
@indirect

indirect Oct 10, 2014

Member

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

Member

indirect commented Oct 10, 2014

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

@jasonkarns

This comment has been minimized.

Show comment
Hide comment
@jasonkarns

jasonkarns 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)
.

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

This comment has been minimized.

Show comment
Hide comment
@indirect

indirect Oct 10, 2014

Member

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

Member

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

This comment has been minimized.

Show comment
Hide comment
@Bastes

Bastes Oct 14, 2014

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

Bastes commented Oct 14, 2014

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

@sandiritter

This comment has been minimized.

Show comment
Hide comment

👍

@Intrepidd

This comment has been minimized.

Show comment
Hide comment

👍

@nilbus

This comment has been minimized.

Show comment
Hide comment
@nilbus

nilbus Dec 31, 2014

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

nilbus commented Dec 31, 2014

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

@eliotsykes

This comment has been minimized.

Show comment
Hide comment
@eliotsykes

eliotsykes Jan 1, 2015

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

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

@indirect

This comment has been minimized.

Show comment
Hide comment
@indirect

indirect Jan 4, 2015

Member

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)

Member

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

This comment has been minimized.

Show comment
Hide comment

👍

@mgenereu

This comment has been minimized.

Show comment
Hide comment

mgenereu commented Apr 8, 2015

👍

@sheerun

This comment has been minimized.

Show comment
Hide comment
@sheerun

sheerun Jun 3, 2015

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

sheerun commented Jun 3, 2015

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

@indirect

This comment has been minimized.

Show comment
Hide comment
@indirect

indirect Jun 3, 2015

Member

@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?

Member

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

This comment has been minimized.

Show comment
Hide comment
@segiddins

segiddins Jun 3, 2015

Member

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

Member

segiddins commented Jun 3, 2015

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

@indirect

This comment has been minimized.

Show comment
Hide comment
@indirect

indirect Jun 4, 2015

Member

@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. :/

Member

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

This comment has been minimized.

Show comment
Hide comment
@segiddins

segiddins Jun 4, 2015

Member

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.

Member

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.

@tjgillies

This comment has been minimized.

Show comment
Hide comment

👍

@segiddins

This comment has been minimized.

Show comment
Hide comment
@segiddins

segiddins Aug 11, 2015

Member

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

Member

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 :)

@razorcd

This comment has been minimized.

Show comment
Hide comment

razorcd commented Jan 27, 2016

+1

@indirect

This comment has been minimized.

Show comment
Hide comment
@indirect

indirect Jan 27, 2016

Member

@razorcd where's that pull request? :P

Member

indirect commented Jan 27, 2016

@razorcd where's that pull request? :P

@akhramov

This comment has been minimized.

Show comment
Hide comment
@akhramov

akhramov 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

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

This comment has been minimized.

Show comment
Hide comment
@indirect

indirect Feb 13, 2016

Member

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

Member

indirect commented Feb 13, 2016

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

@schneems

This comment has been minimized.

Show comment
Hide comment
@schneems

schneems Feb 19, 2016

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

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

@xander-miller

This comment has been minimized.

Show comment
Hide comment

👍

@segiddins

This comment has been minimized.

Show comment
Hide comment
@segiddins

segiddins Apr 21, 2016

Member

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.

Member

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.

@bundler bundler locked and limited conversation to collaborators May 3, 2016

@lynncyrin

This comment has been minimized.

Show comment
Hide comment
@lynncyrin

lynncyrin May 3, 2016

Member

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

Member

lynncyrin commented May 3, 2016

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

@lynncyrin lynncyrin closed this May 3, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.