2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-12-12 06:45:00 -05:00
|
|
|
desc "generate a master api key with given description"
|
|
|
|
task "api_key:create_master", [:description] => :environment do |task, args|
|
2019-11-08 18:34:15 -05:00
|
|
|
raise "Supply a description for the key" if !args[:description]
|
2019-12-12 06:45:00 -05:00
|
|
|
api_key = ApiKey.create!(description: args[:description])
|
2013-09-10 02:02:26 -04:00
|
|
|
|
2019-11-08 18:34:15 -05:00
|
|
|
puts api_key.key
|
2013-09-10 02:02:26 -04:00
|
|
|
end
|