Skip to content

Instantly share code, notes, and snippets.

@kfarst
Created July 17, 2013 16:08
Show Gist options
  • Save kfarst/6021998 to your computer and use it in GitHub Desktop.
Save kfarst/6021998 to your computer and use it in GitHub Desktop.
target_email = '[email protected]' # Email of the person you are cloning the pitch site to
target_domain = 'crushpath' #subdomain of the user you are cloning the pitch site to
new_name = 'event-planning' #Name of the pitch site as needed by the user
copy_url = "http://crushpath.crushpath.me/djennifer/event-planning" #public url of the pitch site you are cloning from.
if target_domain.blank? || target_email.blank? || new_name.blank? || copy_url.blank?
puts "Required arguments:"
puts "\tsubdomain=acme - the subdomain for the target user"
puts "\[email protected] - the user being copied to"
puts "\tname=upside - the new vanity name"
puts "\tcopy_url=http://crushpath.crushpath.me/sam - full url of the site to copy"
else
ps = PitchSite.create_site_for(target_domain, target_email, new_name, copy_url)
puts "Created site:"
puts ps.show_url
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment