Skip to content

Instantly share code, notes, and snippets.

@tacitphoenix
Created January 15, 2014 23:55
Show Gist options
  • Save tacitphoenix/8447193 to your computer and use it in GitHub Desktop.
Save tacitphoenix/8447193 to your computer and use it in GitHub Desktop.
A Ruby rake task snippet that has arguments where on is a space delimited array while pulling in the environment
desc 'create basic template e.g. kms:create_template["my template", blog fragment]'
task :create, [:name, :content_type_names] => :environment do |t,args|
unless args[:name] && args[:content_type_names]
puts "Usage: kms:create_template[<name>, <space seperated list of content types>]
exit
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment