Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: create_master_key got renamed #8325

merged 3 commits into from Nov 8, 2019
Changes from all commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.


Just for now

@@ -1,8 +1,9 @@
# frozen_string_literal: true

desc "generate api key if missing, return existing if already there"
task "api_key:get" => :environment do
api_key = ApiKey.create_master_key
desc "find or generate a master api key with given description"
task "api_key:get_or_create_master", [:description] => :environment do |task, args|
raise "Supply a description for the key" if !args[:description]
api_key = ApiKey.find_or_create_by!(description: args[:description], revoked_at: nil, user_id: nil)

puts api_key.key
puts api_key.key
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.