Pickaxe 0.5.4 → 0.5.5

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/pickaxe.rb +1 -1
  2. data/lib/pickaxe/test.rb +5 -5
  3. metadata +3 -3
@@ -5,7 +5,7 @@ require "active_support/all"
5
5
  $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__)))
6
6
 
7
7
  module Pickaxe
8
- VERSION = "0.5.4"
8
+ VERSION = "0.5.5"
9
9
 
10
10
  class PickaxeError < StandardError; end
11
11
 
@@ -15,7 +15,7 @@ module Pickaxe
15
15
  include Enumerable
16
16
 
17
17
  # Ruby-comments and C-comments
18
- COMMENTS_RE = /^\s*#.*|^\/\/.*|;.*/
18
+ COMMENTS_RE = /^\s*#.*|^\/\/.*|^;.*/
19
19
 
20
20
  def initialize(*files)
21
21
  @files = files.collect do |file_or_directory|
@@ -108,7 +108,7 @@ module Pickaxe
108
108
  content << answers.shift
109
109
  end
110
110
 
111
- raise MissingAnswers.new(file, answers.first.index) if content.blank?
111
+ raise MissingContent.new(answers.first.index) if content.blank?
112
112
  raise BadQuestion.new(content.first) unless m = RE.match(content.first)
113
113
  raise MissingAnswers.new(content.first) if answers.blank?
114
114
 
@@ -180,9 +180,9 @@ module Pickaxe
180
180
  if correct?(given)
181
181
  "Correct!".color(:green)
182
182
  else
183
- hit = "OK [#{(given & correct_answers).join}]".color(:green)
184
- missed = "Missed [#{(correct_answers - given).join}]".color(:yellow)
185
- incorrect = "Failed [#{(given - correct_answers).join}]".color(:red)
183
+ hit = "#{(given & correct_answers).join}".color(:green)
184
+ missed = "#{(correct_answers - given).join}".color(:yellow)
185
+ incorrect = "#{(given - correct_answers).join}".color(:red)
186
186
  "Incorrect, should be: #{correct_answers.join}! #{hit} #{missed} #{incorrect}"
187
187
  end
188
188
  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: 3
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 4
10
- version: 0.5.4
9
+ - 5
10
+ version: 0.5.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dawid Fatyga