lib/jets/api/config.rb in jets-api-0.1.1 vs lib/jets/api/config.rb in jets-api-0.1.2
- old
+ new
@@ -32,25 +32,24 @@
end
def prompt
puts <<~EOL
You are about to configure your #{pretty_path(@config_path)}
- You can get a token from pro.rubyonjets.com
+ You can get a token from www.rubyonjets.com
EOL
print "Please provide your token: "
$stdin.gets.strip
end
# interface method: do not remove
def update_token(token=nil)
token ||= prompt
- write(token: token) # specify keys to allow
+ write(key: token) # specify keys to allow
end
def write(values={})
data = load
data.merge!(values.deep_stringify_keys)
- data.delete('key') if data.key?('key') # remove legacy key that used to store token
FileUtils.mkdir_p(File.dirname(@config_path))
IO.write(@config_path, YAML.dump(data))
puts "Updated #{pretty_path(@config_path)}"
end