Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b1b4e26a89
Fetching contributors…

Cannot retrieve contributors at this time

executable file 17 lines (11 sloc) 0.365 kb
#!/usr/bin/env ruby
name, email = *ARGV
if name.nil? || email.nil?
abort "Usage: script/add_owner [GEM_NAME] [USER_EMAIL]"
end
ENV['RAILS_ENV'] ||= 'production'
require_relative '../config/environment'
user = User.find_by_email!(email)
rubygem = Rubygem.find_by_name!(name)
rubygem.ownerships.create(:user_id => user.id)
puts "#{email} added to #{name}."
Jump to Line
Something went wrong with that request. Please try again.