lib/cli.rb in exercism-0.0.10 vs lib/cli.rb in exercism-0.0.11
- old
+ new
@@ -23,10 +23,17 @@
method_option :host, aliases: '-h', default: 'http://exercism.io', desc: 'the url of the exercism application'
def submit(file)
require 'exercism'
path = File.join(FileUtils.pwd, file)
- Exercism::Api.new(options[:host], Exercism.user).submit(file)
+ begin
+ Exercism::Api.new(options[:host], Exercism.user).submit(file)
+ puts "Your assignment has been submitted."
+ puts "Check the website for feedback in a bit."
+ rescue Exception => e
+ puts "There was an issue with your submission."
+ puts e.message
+ end
end
desc "login", "Save exercism.io api credentials"
def login
require 'exercism'