Sha256: e11204cb337d0882427e0e2fd11c0bf54d6fefcfd1255a82043c37001034bbcf
Contents?: true
Size: 685 Bytes
Versions: 9
Compression:
Stored size: 685 Bytes
Contents
require 'etc' require 'json' require 'yaml' require 'fileutils' require 'faraday' require 'exercism/version' require 'exercism/config' require 'exercism/user' require 'exercism/assignment' require 'exercism/api' class Exercism def self.home Dir.home(Etc.getlogin) end def self.login(github_username, key, dir) data = { 'github_username' => github_username, 'key' => key, 'project_dir' => dir } Config.write(home, data) User.new(github_username, key) end def self.config Config.read(home) end def self.user c = config User.new(c.github_username, c.key) end def self.project_dir config.project_dir end end
Version data entries
9 entries across 9 versions & 1 rubygems