-
-
Notifications
You must be signed in to change notification settings - Fork 122
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
Full index bundling #45
Conversation
I may need to also implement |
spec = gem.spec | ||
spec = Marshal.dump(spec) | ||
spec = Zlib::Deflate.deflate(spec) | ||
spec_storage.resource(full_name).save(spec) | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh, are we reaching the same concerns in 2 different branches? => https://github.com/bundler/gemstash/blob/pull-all-the-gems/lib/gemstash/preload.rb#L64-L85
Should we extract something that knows how to read/write gemspecs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite on this particular block of code. This block is about storing the Gem::Specification
instance so it can be retrieved when /quick/Marshal.4.8/gemname-0.1.0.gemspec.rz
is called. There is a different class that I am using that is similar concern to yours, and that would be Gemstash::SpecsBuilder
which I put in lib/gemstash/secs_builder.rb
. The difference is that the specs.4.8.gz is a Marshalled and Gzipped array of arrays, where each array has [String, Gem::Version, String], this is storing a Marshalled Zlib::Deflated instance of the Gem::Specification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you are right, that other one seems to be a bit more common, but I still cannot point at anything that can be extracted. Let's move forward for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I think we can take a more careful look at refactoring once both our branches are in :-)
Invalidate cached specs.4.8.gz when a gem is pushed/yanked/unyanked Logging#log_error for consistent backtrace logging (include indentation in backtrace)
This finishes bundling with --full-index for private gems
20f8d36
to
6117f2f
Compare
Update speaker gem to have a prerelease version that behaves differently Update SimpleServer to allow mounting prerelease specs endpoint
Build example gem with a prerelease version Refactor common bundling specs as shared_examples
Thanks @pcarranza!
This fixes #15 and fixes #16.
Bundling with
--full-index
involves implementing/private/specs.4.8.gz
and/private/quick/Marshal.4.8/<gem>-<version>.gemspec.rz
. Upstreams already work, though perhaps we want to cache some results? Maybe that's unnecessary though.