lib/cli.rb in exercism-0.0.26 vs lib/cli.rb in exercism-0.0.27
- old
+ new
@@ -1,9 +1,11 @@
require 'rubygems' if RUBY_VERSION == '1.8.7'
require 'thor'
+require 'exercism/cli/stash.rb'
class Exercism
+
class CLI < Thor
desc "version", "Output current version of gem"
def version
require 'exercism'
@@ -118,10 +120,20 @@
puts Exercism.user.github_username
rescue Errno::ENOENT
puts "You are not logged in."
end
+ desc "stash [SUBCOMMAND]", "Stash or apply code that is in-progress"
+ subcommand "stash", Stash
+
+ desc "dir", "Display the project path"
+ def dir
+ require 'exercism'
+
+ puts Exercism.config.project_dir
+ end
+
private
def username
ask("Your GitHub username:")
end
@@ -153,6 +165,8 @@
say File.join(assignment.exercise, assignment.test_file)
end
end
end
end
+
+
end