pdd 0.17.4 → 0.17.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rultor.yml +2 -1
- data/features/catches_broken_puzzles.feature +4 -0
- data/lib/pdd/source.rb +4 -2
- data/lib/pdd/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2eac010a46d3fffb281c25ee03c0ae420253b8b0
|
4
|
+
data.tar.gz: 1fca8687f26d3b19a0e943cace0fcfdd1301bc1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f4036a2e93cad1448131b21994a5919054c30b0afec8c4f7321913f4fced512fed20b786d37589a7e51148c39fd42894615742e9f8be059acee023fb970df62
|
7
|
+
data.tar.gz: 872dfa74d5f2d53f8b68ffd537d0117d56aa32262a0cd1fb4cffd82815b2e5b5b69011fbbf47fe992c692c2c4d974ac6ba5324f7dc8216964557cbdcd8ff7e76
|
data/.rultor.yml
CHANGED
@@ -8,6 +8,9 @@ Feature: Catches Broken Puzzles
|
|
8
8
|
"""
|
9
9
|
public class Main {
|
10
10
|
/**
|
11
|
+
* Some other documentation
|
12
|
+
* text that is not relevant to
|
13
|
+
* the puzzle below.
|
11
14
|
* @todo #13 This puzzle has an incorrect format
|
12
15
|
* because it doesn't start with a space on
|
13
16
|
* the second and the third lines
|
@@ -18,6 +21,7 @@ Feature: Catches Broken Puzzles
|
|
18
21
|
}
|
19
22
|
"""
|
20
23
|
When I run pdd it fails with "Space expected"
|
24
|
+
When I run pdd it fails with "in line #6"
|
21
25
|
|
22
26
|
Scenario: Throwing exception on another broken puzzle
|
23
27
|
Given I have a "Sample.java" file with content:
|
data/lib/pdd/source.rb
CHANGED
@@ -47,8 +47,10 @@ module PDD
|
|
47
47
|
re.match(line) do |match|
|
48
48
|
puzzles << puzzle(lines.drop(idx + 1), match, idx)
|
49
49
|
end
|
50
|
+
rescue Error => ex
|
51
|
+
raise Error, ["in line ##{idx + 1}", ex]
|
50
52
|
rescue ArgumentError => ex
|
51
|
-
raise Error, ["in line ##{idx}", ex]
|
53
|
+
raise Error, ["in line ##{idx + 1}", ex]
|
52
54
|
end
|
53
55
|
end
|
54
56
|
lines.each_with_index do |line, idx|
|
@@ -77,7 +79,7 @@ module PDD
|
|
77
79
|
|
78
80
|
# Parse a marker.
|
79
81
|
def marker(text)
|
80
|
-
re = %r{([\w
|
82
|
+
re = %r{([\w\-\.]+)(?::(\d+)(?:(m|h)[a-z]*)?)?(?:/([A-Z]+))?}
|
81
83
|
match = re.match(text)
|
82
84
|
raise "invalid puzzle marker: #{text}" if match.nil?
|
83
85
|
{
|
data/lib/pdd/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.17.
|
4
|
+
version: 0.17.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -233,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
233
233
|
version: '0'
|
234
234
|
requirements: []
|
235
235
|
rubyforge_project:
|
236
|
-
rubygems_version: 2.
|
236
|
+
rubygems_version: 2.6.8
|
237
237
|
signing_key:
|
238
238
|
specification_version: 2
|
239
239
|
summary: Puzzle Driven Development collector
|