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

Fix gemcutter:import:process #5198

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Earlopain
Copy link
Contributor

It creates a Pusher with the first argument being a user but it expects an API key.
Similarly, the api key/user must be present in the database for validations.

Broken since #4213. With this change, I was able to import from a fresh install.

It creates a `Pusher` with the first argument being a user
but it expects an API key.
Similarly, the api key/user must be present in the database for validations.
@simi
Copy link
Member

simi commented Nov 4, 2024

well spotted 💪

Any particular reason to use import task even with advanced seed we have today? I had no need to use import task in last month since I'm happy seed user.

Copy link

codecov bot commented Nov 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.22%. Comparing base (4c88dd6) to head (39bf502).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5198      +/-   ##
==========================================
- Coverage   96.06%   93.22%   -2.84%     
==========================================
  Files         430      430              
  Lines        9120     9179      +59     
==========================================
- Hits         8761     8557     -204     
- Misses        359      622     +263     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Earlopain
Copy link
Contributor Author

I'm trying to understand why https://rubygems.org/gems/pry/reverse_dependencies (not the only one) shows dependencies multiple times. I can download a bunch of versions, put them in a directory to import and see what happens.

@yob
Copy link

yob commented Jan 30, 2025

I ran into this error while following CONTRIBUTING.md to set up a local rubygems.org dev environment for the first time today.

I hadn't seen this PR yet, so my workaround looked like this:

diff --git a/lib/tasks/gemcutter.rake b/lib/tasks/gemcutter.rake
index c2e0c6193..6ee138d8f 100644
--- a/lib/tasks/gemcutter.rake
+++ b/lib/tasks/gemcutter.rake
@@ -16,7 +16,7 @@ namespace :gemcutter do
       puts "Processing #{gems.size} gems..."
       gems.each do |path|
         puts "Processing #{path}"
-        cutter = Pusher.new(User.new, File.open(path))
+        cutter = Pusher.new(User.find_by!(email: "[email protected]").api_keys.last, File.open(path))
 
         cutter.process
         puts cutter.message unless cutter.code == 200

Any particular reason to use import task even with advanced seed we have today? I had no need to use import task in last month since I'm happy seed user.

If the import is no longer required, maybe an alternative path would be to remove it as a setup step in CONTRIBUTING.md?

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

Successfully merging this pull request may close these issues.

3 participants