Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
executable file 29 lines (21 sloc) 643 Bytes
#!/usr/bin/env ruby
# Create Gemcutter ownerships from YAML file of RubyForge ownerships
# Run this from inside a live production-environment application
# directory on Gemcutter.
require 'yaml'
require 'config/environment'
ownerships = YAML.load_file("ownerships.yml")
ownerships.each do |gemname,rf_owners|
rubygem = Rubygem.find_by_name(gemname)
if rubygem.nil?
puts "Couldn't find #{gemname}!"
gc_owners = rubygem.owners
diff = rf_owners - gc_owners
diff.each do |email|
gc_user = User.find_by_email(email)
Ownership.create(:rubygem => rubygem, :user => gc_user, :approved => true)
Jump to Line
Something went wrong with that request. Please try again.