lib/exercism.rb in exercism-0.0.4 vs lib/exercism.rb in exercism-0.0.5
- old
+ new
@@ -21,12 +21,16 @@
def self.home
Dir.home(Etc.getlogin)
end
- def self.login(github_username, key)
- data = {'github_username' => github_username, 'key' => key}
+ 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
@@ -34,8 +38,12 @@
end
def self.user
c = config
User.new(c.github_username, c.key)
+ end
+
+ def self.project_dir
+ config.project_dir
end
end