exercism 0.0.23 → 0.0.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/cli.rb +7 -3
  2. data/lib/exercism/version.rb +1 -1
  3. metadata +2 -2
data/lib/cli.rb CHANGED
@@ -69,11 +69,15 @@ class Exercism
69
69
 
70
70
  begin
71
71
  response = Exercism::Api.new(options[:host], Exercism.user).submit(submission.file)
72
- say "Your assignment has been submitted."
73
72
 
74
73
  body = JSON.parse(response.body)
75
- url = "#{options[:host]}/#{Exercism.user.github_username}/#{body['language']}/#{body['exercise']}"
76
- say "For feedback on your submission visit #{url}"
74
+ if body["error"]
75
+ say body["error"]
76
+ else
77
+ say "Your assignment has been submitted."
78
+ url = "#{options[:host]}/#{Exercism.user.github_username}/#{body['language']}/#{body['exercise']}"
79
+ say "For feedback on your submission visit #{url}"
80
+ end
77
81
  rescue Exception => e
78
82
  puts "There was an issue with your submission."
79
83
  puts e.message
@@ -1,3 +1,3 @@
1
1
  class Exercism
2
- VERSION = "0.0.23"
2
+ VERSION = "0.0.24"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exercism
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.23
4
+ version: 0.0.24
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-13 00:00:00.000000000 Z
12
+ date: 2013-08-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json