Pickaxe 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/pickaxe.rb +1 -1
- data/lib/pickaxe/cli.rb +2 -2
- data/lib/pickaxe/main.rb +2 -6
- data/lib/pickaxe/shell.rb +1 -1
- data/lib/pickaxe/test.rb +1 -1
- metadata +3 -3
data/lib/pickaxe.rb
CHANGED
data/lib/pickaxe/cli.rb
CHANGED
@@ -43,8 +43,8 @@ END_OF_BANNER
|
|
43
43
|
options[:syntax_check] = true
|
44
44
|
end
|
45
45
|
|
46
|
-
opts.on("--
|
47
|
-
options[:
|
46
|
+
opts.on("--clear", "Turn on shell clearing before question") do |v|
|
47
|
+
options[:clear] = true
|
48
48
|
end
|
49
49
|
|
50
50
|
opts.on("--no-color", "Turn off colors") do |v|
|
data/lib/pickaxe/main.rb
CHANGED
@@ -68,7 +68,8 @@ END_OF_TEST
|
|
68
68
|
end
|
69
69
|
rescue Interrupt
|
70
70
|
# empty
|
71
|
-
ensure
|
71
|
+
ensure
|
72
|
+
puts "#{@last_answer}\n\n"
|
72
73
|
statistics!
|
73
74
|
end
|
74
75
|
end
|
@@ -133,11 +134,6 @@ END_OF_HELP
|
|
133
134
|
@answers[@question] = convert_answers(line)
|
134
135
|
unless Main.options[:full_test]
|
135
136
|
@last_answer = @question.check?(@answers[@question])
|
136
|
-
|
137
|
-
if @current_index == (@questions.length-1)
|
138
|
-
puts @last_answer
|
139
|
-
end
|
140
|
-
|
141
137
|
if Main.options[:repeat_incorrect] and not @question.correct?(@answers[@question])
|
142
138
|
@answers.delete(@question)
|
143
139
|
@questions.insert(@current_index + 1 + rand(@questions.length - @current_index), @question)
|
data/lib/pickaxe/shell.rb
CHANGED
data/lib/pickaxe/test.rb
CHANGED
@@ -200,7 +200,7 @@ module Pickaxe
|
|
200
200
|
else
|
201
201
|
""
|
202
202
|
end
|
203
|
-
"Incorrect, should be:".color(:red) + " #{correct_answers.join}! #{[missed, incorrect].join(" ")}"
|
203
|
+
"Incorrect, should be:".color(:red) + " #{correct_answers.join.color(:green)}! #{[missed, incorrect].join(" ")}"
|
204
204
|
end
|
205
205
|
end
|
206
206
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Pickaxe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 2
|
10
|
+
version: 0.6.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dawid Fatyga
|