pdd 0.18.1 → 0.18.2
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.
- checksums.yaml +4 -4
- data/lib/pdd/source.rb +2 -2
- data/lib/pdd/version.rb +1 -1
- data/test/test_source.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75e1dcf1681942ce2bcda84b4ed4191fc226bcb6
|
4
|
+
data.tar.gz: 95b68f2752049d070ed7481e419d1b0c9d2afc95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0ee9dbc20b7c1bed5822a6fae482d900a591d2070477a76c5e6c44dda7bf482fd47dfcf5ba96898c0f9af9da66204115d5885f91e89296da378687630ede98f
|
7
|
+
data.tar.gz: 15c79073ac5ae20ddd42739a841c95865a69f9e5ef8ff87e0378f60506dd66a7e090dd60118c10518d311aa0fde1d3dc4326b45f84acaf46d7df63031da418b4
|
data/lib/pdd/source.rb
CHANGED
@@ -41,12 +41,12 @@ module PDD
|
|
41
41
|
lines.each_with_index do |line, idx|
|
42
42
|
begin
|
43
43
|
/[^\s]@todo/.match(line) do |_|
|
44
|
-
raise Error, '
|
44
|
+
raise Error, 'TODO must have a leading space to become a puzzle,
|
45
45
|
as this page explains: https://github.com/yegor256/pdd#how-to-format'
|
46
46
|
end
|
47
47
|
/@todo(?!\s+#)/.match(line) do |_|
|
48
48
|
raise Error, "@todo found, but puzzle can't be parsed, \
|
49
|
-
most probably because
|
49
|
+
most probably because TODO is not followed by a puzzle marker, as this page \
|
50
50
|
explains: https://github.com/yegor256/pdd#how-to-format"
|
51
51
|
end
|
52
52
|
%r{(.*(?:^|\s))@todo\s+#([\w\-\.:/]+)\s+(.+)}.match(line) do |match|
|
data/lib/pdd/version.rb
CHANGED
data/test/test_source.rb
CHANGED
@@ -83,7 +83,7 @@ class TestSource < Minitest::Test
|
|
83
83
|
error = assert_raises PDD::Error do
|
84
84
|
PDD::VerboseSource.new(file, PDD::Source.new(file, 'ff')).puzzles
|
85
85
|
end
|
86
|
-
assert !error.to_s.index('
|
86
|
+
assert !error.to_s.index('TODO is not followed by a puzzle marker').nil?
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
@@ -127,7 +127,7 @@ class TestSource < Minitest::Test
|
|
127
127
|
error = assert_raises PDD::Error do
|
128
128
|
PDD::VerboseSource.new(file, PDD::Source.new(file, 'x')).puzzles
|
129
129
|
end
|
130
|
-
assert !error.message.index('
|
130
|
+
assert !error.message.index('TODO must have a leading space').nil?
|
131
131
|
end
|
132
132
|
end
|
133
133
|
|