Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add redownload command #226

Closed
wants to merge 1 commit into from
Closed

Conversation

faqndo97
Copy link
Contributor

@faqndo97 faqndo97 commented Jan 4, 2024

Description

Now that pin always downloads, I believe there should be a command to re-download existing packages. This command would be particularly useful in scenarios like the one I recently encountered. In such cases, projects that previously used dependencies from a CDN, and have updated the gem, might want to transfer everything to a local folder. This new command could facilitate this process.

However, I'm still uncertain about one aspect: the pin command accepts env and from parameters, and I'm not sure if the env is represented in some way in the URL. This might require additional coding. Rather than using packages_with_versions, it may be more effective to pull the package name and URL and download from there, or to retrieve the package, version, and provider, and install from that source.

The purpose of this PR is to initiate a discussion on whether this feature is valuable. If changes are needed, I am ready to continue working on it.

@dhh
Copy link
Member

dhh commented Jan 23, 2024

Hmm, I think I'd rather just document this. But also, you don't actually have to convert from the CDNs. It still works to point directly a CDN, it's just that we no longer offer lookups for new pins.

@faqndo97
Copy link
Contributor Author

faqndo97 commented Jan 23, 2024

I agree it's not a extremely necessary thing. I was mostly thinking about the people that moved to 2.x that now want to install all dependencies they have locally to not pin one by one again and have one shortcut that will do it by themselves, and the "redownload" idea came from bundler "bundle install --redownload".

So, I don't have a strong opinion about this, it's just a proposal of a helper. I'm open to continue with it or close it, whatever makes more sense to the gem.

@dhh
Copy link
Member

dhh commented Jan 23, 2024

I think we're better off with a note in the documentation. Every line of code is one we have to maintain until the end of time 😄.

@dhh dhh closed this Jan 23, 2024
@faqndo97
Copy link
Contributor Author

Sounds good, thanks for the discussion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants