Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 29 lines (21 sloc) 0.643 kB
#!/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}!"
next
end
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)
end
end
Jump to Line
Something went wrong with that request. Please try again.