14 lines
366 B
Ruby
Executable File
14 lines
366 B
Ruby
Executable File
#!/usr/bin/env ruby
|
|
require File.expand_path("../../config/environment", File.dirname(__FILE__))
|
|
|
|
abort "Usage: #{$0} <email-address> <password>" unless ARGV.length == 2
|
|
|
|
email_address, password = ARGV
|
|
if user = User.find_by(email_address: email_address)
|
|
user.update!(password: password)
|
|
puts "Password has been reset"
|
|
else
|
|
puts "User not found"
|
|
exit -1
|
|
end
|