gemstash icon indicating copy to clipboard operation
gemstash copied to clipboard

Import command

Open smellsblue opened this issue 8 years ago • 4 comments

For users that have gem servers with a ton of private gems, it might be nice to import the gems as private gems in Gemstash.

Perhaps something like gemstash import <url>? Maybe an option to only import specific gems and/or versions?

It would also be possible to simply have the existing server be an upstream in Gemstash, but then again it might be nice to get rid of the other server and only maintain 1.

smellsblue avatar Oct 28 '15 17:10 smellsblue

If you have a non-gemstash server, I think a directory full of .gem files is the way to go. You could run it like rake import[<path to directory of gems>], and it would parse the gemspec out of each .gem file and put it in the database.

indirect avatar Oct 28 '15 17:10 indirect

Or just call the task that adds the gem through the API, so we only have one entry point and how the database is handled is a black box from outside the gemstash server. Which is probably what you mean.

On Wed, Oct 28, 2015, 17:58 André Arko [email protected] wrote:

If you have a non-gemstash server, I think a directory full of .gem files is the way to go. You could run it like rake import[], and it would parse the gemspec out of each .gem file and put it in the database.

— Reply to this email directly or view it on GitHub https://github.com/bundler/gemstash/issues/41#issuecomment-151932960.

pcarranza avatar Oct 28 '15 18:10 pcarranza

Yeah, I think it would be a simple iteration over all the gem files and call GemPusher.new(...).push for each one, maybe with a way to ignore authorization since you are running it from the command line.

smellsblue avatar Oct 28 '15 18:10 smellsblue

I wouldn't create an exceptional case for this. I would rather add an initial automated authorization before starting the pushing. I prefer to not have exceptions like "oh, this is a local process, ergo I trust it and will not check authorization"

On Wed, Oct 28, 2015, 18:37 Mike Virata-Stone [email protected] wrote:

Yeah, I think it would be a simple iteration over all the gem files and call GemPusher.new(...).push for each one, maybe with a way to ignore authorization since you are running it from the command line.

— Reply to this email directly or view it on GitHub https://github.com/bundler/gemstash/issues/41#issuecomment-151945257.

pcarranza avatar Oct 28 '15 19:10 pcarranza