Method: Spaceship::Client#store_cookie

Defined in:
spaceship/lib/spaceship/client.rb


275
276
277
278
279
280
281
282
283
# File 'spaceship/lib/spaceship/client.rb', line 275

def store_cookie(path: nil)
  path ||= persistent_cookie_path
  FileUtils.mkdir_p(File.expand_path("..", path))

  # really important to specify the session to true
  # otherwise myacinfo and more won't be stored
  @cookie.save(path, :yaml, session: true)
  return File.read(path)
end