exercism 0.0.22 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/cli.rb +7 -0
- data/lib/exercism/api.rb +1 -1
- data/lib/exercism/version.rb +1 -1
- metadata +2 -2
data/lib/cli.rb
CHANGED
@@ -48,6 +48,7 @@ class Exercism
|
|
48
48
|
|
49
49
|
desc "submit FILE", "Submit code to exercism.io on your current assignment"
|
50
50
|
method_option :host, :aliases => '-h', :default => 'http://exercism.io', :desc => 'the url of the exercism application'
|
51
|
+
method_option :ask, :aliases => '-a', :default => false, :type => :boolean, :desc => 'ask before submitting assignment'
|
51
52
|
def submit(file)
|
52
53
|
require 'exercism'
|
53
54
|
|
@@ -60,6 +61,12 @@ class Exercism
|
|
60
61
|
end
|
61
62
|
end
|
62
63
|
|
64
|
+
if options[:ask]
|
65
|
+
if no?("Are you sure you want to submit this assignment? [y/n]")
|
66
|
+
return
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
63
70
|
begin
|
64
71
|
response = Exercism::Api.new(options[:host], Exercism.user).submit(submission.file)
|
65
72
|
say "Your assignment has been submitted."
|
data/lib/exercism/api.rb
CHANGED
data/lib/exercism/version.rb
CHANGED
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.
|
4
|
+
version: 0.0.23
|
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-
|
12
|
+
date: 2013-08-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|