pdd 0.21.2 → 0.21.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/codecov.yml +1 -1
- data/.github/workflows/rake.yml +1 -1
- data/.rubocop.yml +9 -1
- data/.rultor.yml +0 -4
- data/README.md +8 -1
- data/features/step_definitions/steps.rb +2 -2
- data/lib/pdd/rake_task.rb +1 -0
- data/lib/pdd/rule/estimates.rb +6 -6
- data/lib/pdd/rule/roles.rb +4 -4
- data/lib/pdd/rule/text.rb +3 -3
- data/lib/pdd/source.rb +32 -38
- data/lib/pdd/sources.rb +4 -4
- data/lib/pdd/version.rb +1 -1
- data/lib/pdd.rb +2 -2
- data/pdd.gemspec +11 -13
- data/test/test_many.rb +42 -0
- data/test_assets/puzzles/1-04e35eb3 +3 -0
- data/test_assets/puzzles/132-bc1dfafe +8 -0
- data/test_assets/puzzles/1425-59819ae3 +9 -0
- data/test_assets/puzzles/42-0d933cc0 +7 -0
- data/test_assets/puzzles/44-660e9d6f +9 -0
- data/test_assets/puzzles/55-947a180a +9 -0
- data/test_assets/puzzles/71-8097fa26 +6 -0
- data/test_assets/puzzles/91-ecb9aa47 +9 -0
- data/test_assets/puzzles/93-641fe341 +4 -0
- data/utils/glob.rb +1 -1
- metadata +36 -47
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1f5d5ae8d72ca3e758c6757c3a18daacf4f24f841561ab0dc75ba5b0e14893a
|
4
|
+
data.tar.gz: 5325be41bd8e0b42a67fb235172a87dbd1f00492dd8311ec684806f5710c2465
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a09ef466837dd362e530c354ab21ee5e7c26b349cefaebc4ebfb8d47e8c81a12d0ea0252244133e596847a34837238eeeb2478ad956f9eb81dcf09535f31b167
|
7
|
+
data.tar.gz: cf8f5a5748f822b69e46a08bd344370f2918127ec9e69050550907a6f5aa5efd8fd34405d5c6e203ef71080e4897d95d8e831e5a62bd0339cbcca2b1ff5e2c43
|
data/.github/workflows/rake.yml
CHANGED
data/.rubocop.yml
CHANGED
@@ -3,12 +3,20 @@ AllCops:
|
|
3
3
|
- "assets/**/*"
|
4
4
|
DisplayCopNames: true
|
5
5
|
TargetRubyVersion: 2.3
|
6
|
+
NewCops: enable
|
7
|
+
SuggestExtensions: false
|
6
8
|
|
9
|
+
Layout/EmptyLineAfterGuardClause:
|
10
|
+
Enabled: false
|
11
|
+
Metrics/CyclomaticComplexity:
|
12
|
+
Max: 10
|
13
|
+
Metrics/PerceivedComplexity:
|
14
|
+
Max: 15
|
7
15
|
Layout/EndOfLine:
|
8
16
|
EnforcedStyle: lf
|
9
17
|
Metrics/ClassLength:
|
10
18
|
Max: 360
|
11
|
-
|
19
|
+
Layout/LineLength:
|
12
20
|
Max: 90
|
13
21
|
Metrics/MethodLength:
|
14
22
|
Max: 35
|
data/.rultor.yml
CHANGED
data/README.md
CHANGED
@@ -4,15 +4,16 @@
|
|
4
4
|
[![DevOps By Rultor.com](http://www.rultor.com/b/cqfn/pdd)](http://www.rultor.com/p/cqfn/pdd)
|
5
5
|
[![We recommend RubyMine](https://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)
|
6
6
|
|
7
|
+
[![rake](https://github.com/cqfn/pdd/actions/workflows/rake.yml/badge.svg)](https://github.com/cqfn/pdd/actions/workflows/rake.yml)
|
7
8
|
[![PDD status](http://www.0pdd.com/svg?name=cqfn/pdd)](http://www.0pdd.com/p?name=cqfn/pdd)
|
8
9
|
[![codecov](https://codecov.io/gh/cqfn/pdd/branch/master/graph/badge.svg)](https://codecov.io/gh/cqfn/pdd)
|
9
10
|
![Lines of code](https://img.shields.io/tokei/lines/github/cqfn/pdd)
|
10
11
|
[![Hits-of-Code](https://hitsofcode.com/github/cqfn/pdd)](https://hitsofcode.com/view/github/cqfn/pdd)
|
11
12
|
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/cqfn/pdd/blob/master/LICENSE.txt)
|
12
|
-
|
13
13
|
[![Gem Version](https://badge.fury.io/rb/pdd.svg)](http://badge.fury.io/rb/pdd)
|
14
14
|
[![Maintainability](https://api.codeclimate.com/v1/badges/c8e46256fdd8ddc817e5/maintainability)](https://codeclimate.com/github/cqfn/pdd/maintainability)
|
15
15
|
[![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/github/cqfn/pdd/master/frames)
|
16
|
+
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/1792d42f96fb45448e8d495ebc4348aa)](https://www.codacy.com/gh/cqfn/pdd/dashboard?utm_source=github.com&utm_medium=referral&utm_content=cqfn/pdd&utm_campaign=Badge_Grade)
|
16
17
|
|
17
18
|
Read this article about
|
18
19
|
[_Puzzle Driven Development_](http://www.yegor256.com/2009/03/04/pdd.html).
|
@@ -235,3 +236,9 @@ This is how you run the tool locally to test how it works:
|
|
235
236
|
```bash
|
236
237
|
$ ./bin/pdd --help
|
237
238
|
```
|
239
|
+
|
240
|
+
To run a single unit test:
|
241
|
+
|
242
|
+
```bash
|
243
|
+
$ bundle exec ruby test/test_many.rb
|
244
|
+
```
|
@@ -27,7 +27,7 @@ require_relative '../../lib/pdd'
|
|
27
27
|
Before do
|
28
28
|
@cwd = Dir.pwd
|
29
29
|
@dir = Dir.mktmpdir('test')
|
30
|
-
FileUtils.mkdir_p(@dir)
|
30
|
+
FileUtils.mkdir_p(@dir)
|
31
31
|
Dir.chdir(@dir)
|
32
32
|
@opts = Slop.parse ['-q', '-s', @dir] do |o|
|
33
33
|
o.bool '-v', '--verbose'
|
@@ -38,7 +38,7 @@ end
|
|
38
38
|
|
39
39
|
After do
|
40
40
|
Dir.chdir(@cwd)
|
41
|
-
FileUtils.rm_rf(@dir)
|
41
|
+
FileUtils.rm_rf(@dir)
|
42
42
|
end
|
43
43
|
|
44
44
|
Given(/skip/) do
|
data/lib/pdd/rake_task.rb
CHANGED
data/lib/pdd/rule/estimates.rb
CHANGED
@@ -32,9 +32,9 @@ module PDD
|
|
32
32
|
|
33
33
|
def errors
|
34
34
|
@xml.xpath("//puzzle[number(estimate) < #{@min}]").map do |p|
|
35
|
-
"Puzzle #{p.xpath('file/text()')}:#{p.xpath('lines/text()')}"\
|
36
|
-
|
37
|
-
|
35
|
+
"Puzzle #{p.xpath('file/text()')}:#{p.xpath('lines/text()')} " \
|
36
|
+
"has an estimate of #{p.xpath('estimate/text()')} minutes, " \
|
37
|
+
"which is lower than #{@min} minutes"
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|
@@ -50,9 +50,9 @@ module PDD
|
|
50
50
|
|
51
51
|
def errors
|
52
52
|
@xml.xpath("//puzzle[number(estimate) > #{@min}]").map do |p|
|
53
|
-
"Puzzle #{p.xpath('file/text()')}:#{p.xpath('lines/text()')}"\
|
54
|
-
|
55
|
-
|
53
|
+
"Puzzle #{p.xpath('file/text()')}:#{p.xpath('lines/text()')} " \
|
54
|
+
"has an estimate of #{p.xpath('estimate/text()')} minutes, " \
|
55
|
+
"which is bigger than #{@min} minutes"
|
56
56
|
end
|
57
57
|
end
|
58
58
|
end
|
data/lib/pdd/rule/roles.rb
CHANGED
@@ -37,11 +37,11 @@ module PDD
|
|
37
37
|
|
38
38
|
"puzzle #{p.xpath('file/text()')}:#{p.xpath('lines/text()')}" +
|
39
39
|
if role.empty?
|
40
|
-
" doesn't define any role"\
|
41
|
-
|
40
|
+
" doesn't define any role" \
|
41
|
+
", while one of these roles is required: #{@roles}"
|
42
42
|
else
|
43
|
-
" defines role #{role}"\
|
44
|
-
|
43
|
+
" defines role #{role}" \
|
44
|
+
", while only these roles are allowed: #{@roles}"
|
45
45
|
end
|
46
46
|
end.compact
|
47
47
|
end
|
data/lib/pdd/rule/text.rb
CHANGED
@@ -35,9 +35,9 @@ module PDD
|
|
35
35
|
words = p.xpath('body/text()').to_s.split.size
|
36
36
|
next nil if words >= @min
|
37
37
|
|
38
|
-
"Puzzle #{p.xpath('file/text()')}:#{p.xpath('lines/text()')}"\
|
39
|
-
|
40
|
-
|
38
|
+
"Puzzle #{p.xpath('file/text()')}:#{p.xpath('lines/text()')} " \
|
39
|
+
"has a very short description of just #{words} words while " \
|
40
|
+
"a minimum of #{@min} is required"
|
41
41
|
end.compact
|
42
42
|
end
|
43
43
|
end
|
data/lib/pdd/source.rb
CHANGED
@@ -37,27 +37,27 @@ module PDD
|
|
37
37
|
@path = path
|
38
38
|
end
|
39
39
|
|
40
|
-
def match_markers(
|
41
|
-
if
|
42
|
-
/[^\s]\x40todo/.match(
|
40
|
+
def match_markers(line)
|
41
|
+
if line.downcase.include? 'todo'
|
42
|
+
/[^\s]\x40todo/.match(line) do |_|
|
43
43
|
raise Error, get_no_leading_space_error("\x40todo")
|
44
44
|
end
|
45
|
-
/\x40todo(?!\s+#)/.match(
|
45
|
+
/\x40todo(?!\s+#)/.match(line) do |_|
|
46
46
|
raise Error, get_no_puzzle_marker_error("\x40todo")
|
47
47
|
end
|
48
|
-
/\x40todo\s+#\s/.match(
|
48
|
+
/\x40todo\s+#\s/.match(line) do |_|
|
49
49
|
raise Error, get_space_after_hash_error("\x40todo")
|
50
50
|
end
|
51
|
-
/[^\s]TODO:?/.match(
|
51
|
+
/[^\s]TODO:?/.match(line) do |_|
|
52
52
|
raise Error, get_no_leading_space_error('TODO')
|
53
53
|
end
|
54
|
-
/TODO(?!:?\s+#)/.match(
|
54
|
+
/TODO(?!:?\s+#)/.match(line) do |_|
|
55
55
|
raise Error, get_no_puzzle_marker_error('TODO')
|
56
56
|
end
|
57
|
-
/TODO:?\s+#\s/.match(
|
57
|
+
/TODO:?\s+#\s/.match(line) do |_|
|
58
58
|
raise Error, get_space_after_hash_error('TODO')
|
59
59
|
end
|
60
|
-
a = [%r{(.*(?:^|\s))(?:\x40todo|TODO:|TODO)\s+#([\w\-.:/]+)\s+(.+)}.match(
|
60
|
+
a = [%r{(.*(?:^|\s))(?:\x40todo|TODO:|TODO)\s+#([\w\-.:/]+)\s+(.+)}.match(line)]
|
61
61
|
a.compact
|
62
62
|
else
|
63
63
|
[]
|
@@ -74,10 +74,9 @@ module PDD
|
|
74
74
|
match_markers(line).each do |m|
|
75
75
|
puzzles << puzzle(lines.drop(idx + 1), m, idx)
|
76
76
|
end
|
77
|
-
rescue Error, ArgumentError =>
|
78
|
-
message = "#{@path}:#{idx + 1} #{
|
77
|
+
rescue Error, ArgumentError => e
|
78
|
+
message = "#{e.class} at #{@path}:#{idx + 1}: #{e.message}"
|
79
79
|
raise Error, message unless PDD.opts && PDD.opts['skip-errors']
|
80
|
-
PDD.log.warn message
|
81
80
|
end
|
82
81
|
end
|
83
82
|
puzzles
|
@@ -147,22 +146,18 @@ against the rules explained here: https://github.com/cqfn/pdd#how-to-format"
|
|
147
146
|
#
|
148
147
|
# Fetch puzzle tail (all lines after the first one)
|
149
148
|
def tail(lines, prefix, start)
|
150
|
-
prefix = prefix.rstrip
|
151
149
|
prefix = " #{' ' * start}" if prefix.empty? # fallback to space indentation
|
152
|
-
line = lines[0][prefix.length
|
150
|
+
line = lines[0][prefix.length, lines[0].length] if lines[0]
|
153
151
|
is_indented = line&.start_with?(' ')
|
154
152
|
lines
|
155
|
-
.take_while { |t| match_markers(t).none? && t.start_with?(prefix) }
|
156
153
|
.take_while do |t|
|
157
|
-
|
154
|
+
start = t.length > prefix.length ? prefix : prefix.rstrip
|
155
|
+
match_markers(t).none? && t.start_with?(start)
|
158
156
|
end
|
159
157
|
.take_while do |t|
|
160
|
-
|
161
|
-
t_len = t.length - 1
|
162
|
-
t_len <= prefix.length || t_len > prefix.length + 2
|
158
|
+
!is_indented || t[prefix.length, t.length].start_with?(' ')
|
163
159
|
end
|
164
|
-
.map { |t| t[prefix.length, t.length] }
|
165
|
-
.map { |t| t.start_with?(' ') ? t[1, t.length] : t }
|
160
|
+
.map { |t| t[prefix.length, t.length]&.lstrip }
|
166
161
|
end
|
167
162
|
# rubocop:enable Metrics/CyclomaticComplexity
|
168
163
|
|
@@ -177,23 +172,22 @@ against the rules explained here: https://github.com/cqfn/pdd#how-to-format"
|
|
177
172
|
git = "cd #{dir} && git"
|
178
173
|
if `#{git} rev-parse --is-inside-work-tree 2>/dev/null`.strip == 'true'
|
179
174
|
cmd = "#{git} blame -L #{pos},#{pos} --porcelain #{name}"
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
])
|
175
|
+
login = `#{cmd}`.split("\n").map do |line|
|
176
|
+
case line
|
177
|
+
when /^author /
|
178
|
+
[:author, line.sub(/^author /, '')]
|
179
|
+
when /^author-mail [^@]+@[^.]+\..+/
|
180
|
+
[:email, line.sub(/^author-mail <(.+)>$/, '\1')]
|
181
|
+
when /^author-time /
|
182
|
+
[
|
183
|
+
:time,
|
184
|
+
Time.at(
|
185
|
+
line.sub(/^author-time ([0-9]+)$/, '\1').to_i
|
186
|
+
).utc.iso8601
|
187
|
+
]
|
188
|
+
end
|
189
|
+
end.compact.to_h
|
190
|
+
add_github_login(login)
|
197
191
|
else
|
198
192
|
{}
|
199
193
|
end
|
data/lib/pdd/sources.rb
CHANGED
@@ -56,8 +56,8 @@ module PDD
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def exclude(paths)
|
59
|
-
paths =
|
60
|
-
paths = paths.is_a?(Array)
|
59
|
+
paths = [] if paths.nil?
|
60
|
+
paths = [paths] unless paths.is_a?(Array)
|
61
61
|
@exclude.push(*paths)
|
62
62
|
paths&.each do |path|
|
63
63
|
PDD.log.info "#{Rainbow('Excluding').orange} #{path}"
|
@@ -66,8 +66,8 @@ module PDD
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def include(paths)
|
69
|
-
paths =
|
70
|
-
paths = paths.is_a?(Array)
|
69
|
+
paths = [] if paths.nil?
|
70
|
+
paths = [paths] unless paths.is_a?(Array)
|
71
71
|
@include.push(*paths)
|
72
72
|
paths&.each do |path|
|
73
73
|
PDD.log.info "#{Rainbow('Including').blue} #{path}"
|
data/lib/pdd/version.rb
CHANGED
data/lib/pdd.rb
CHANGED
@@ -102,8 +102,8 @@ module PDD
|
|
102
102
|
sources.fetch.each do |source|
|
103
103
|
source.puzzles.each do |puzzle|
|
104
104
|
PDD.log.info "Puzzle #{puzzle.props[:id]} " \
|
105
|
-
|
106
|
-
|
105
|
+
"#{puzzle.props[:estimate]}/#{puzzle.props[:role]} " \
|
106
|
+
"at #{puzzle.props[:file]}"
|
107
107
|
render puzzle, xml
|
108
108
|
end
|
109
109
|
end
|
data/pdd.gemspec
CHANGED
@@ -25,12 +25,10 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
25
25
|
require_relative 'lib/pdd/version'
|
26
26
|
|
27
27
|
Gem::Specification.new do |s|
|
28
|
-
s.specification_version = 2 if s.respond_to? :specification_version=
|
29
28
|
if s.respond_to? :required_rubygems_version=
|
30
29
|
s.required_rubygems_version =
|
31
30
|
Gem::Requirement.new('>= 0')
|
32
31
|
end
|
33
|
-
s.rubygems_version = '2.3'
|
34
32
|
s.required_ruby_version = '~> 2.3'
|
35
33
|
s.name = 'pdd'
|
36
34
|
s.version = PDD::VERSION
|
@@ -42,7 +40,6 @@ Gem::Specification.new do |s|
|
|
42
40
|
s.homepage = 'http://github.com/cqfn/pdd'
|
43
41
|
s.files = `git ls-files`.split($RS)
|
44
42
|
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
45
|
-
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
46
43
|
s.rdoc_options = ['--charset=UTF-8']
|
47
44
|
s.extra_rdoc_files = ['README.md', 'LICENSE.txt']
|
48
45
|
s.add_runtime_dependency 'nokogiri', '~> 1.10'
|
@@ -50,14 +47,15 @@ Gem::Specification.new do |s|
|
|
50
47
|
s.add_runtime_dependency 'ruby-filemagic', '~> 0.7.2'
|
51
48
|
s.add_runtime_dependency 'slop', '~> 4.6'
|
52
49
|
s.add_development_dependency 'aruba', '~> 0.14.1'
|
53
|
-
s.add_development_dependency 'codecov', '0.
|
54
|
-
s.add_development_dependency 'cucumber', '
|
55
|
-
s.add_development_dependency 'minitest', '5.
|
56
|
-
s.add_development_dependency 'rake', '
|
57
|
-
s.add_development_dependency 'rdoc', '4.
|
58
|
-
s.add_development_dependency 'rspec-rails', '
|
59
|
-
s.add_development_dependency 'rubocop', '
|
60
|
-
s.add_development_dependency 'rubocop-rspec', '
|
61
|
-
s.add_development_dependency 'slop', '4.9.
|
62
|
-
s.add_development_dependency 'xcop', '0.
|
50
|
+
s.add_development_dependency 'codecov', '0.6.0'
|
51
|
+
s.add_development_dependency 'cucumber', '8.0.0'
|
52
|
+
s.add_development_dependency 'minitest', '5.16.2'
|
53
|
+
s.add_development_dependency 'rake', '13.0.6'
|
54
|
+
s.add_development_dependency 'rdoc', '6.4.0'
|
55
|
+
s.add_development_dependency 'rspec-rails', '5.1.2'
|
56
|
+
s.add_development_dependency 'rubocop', '1.32.0'
|
57
|
+
s.add_development_dependency 'rubocop-rspec', '2.12.1'
|
58
|
+
s.add_development_dependency 'slop', '4.9.2'
|
59
|
+
s.add_development_dependency 'xcop', '0.7.1'
|
60
|
+
s.metadata['rubygems_mfa_required'] = 'true'
|
63
61
|
end
|
data/test/test_many.rb
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# Copyright (c) 2014-2022 Yegor Bugayenko
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
5
|
+
# in the Software without restriction, including without limitation the rights
|
6
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
# copies of the Software, and to permit persons to whom the Software is
|
8
|
+
# furnished to do so, subject to the following conditions:
|
9
|
+
#
|
10
|
+
# The above copyright notice and this permission notice shall be included in all
|
11
|
+
# copies or substantial portions of the Software.
|
12
|
+
#
|
13
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19
|
+
# SOFTWARE.
|
20
|
+
|
21
|
+
require 'minitest/autorun'
|
22
|
+
require 'tmpdir'
|
23
|
+
require_relative '../lib/pdd'
|
24
|
+
require_relative '../lib/pdd/sources'
|
25
|
+
|
26
|
+
# Test many puzzles to make sure their IDs are correct.
|
27
|
+
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
28
|
+
# Copyright:: Copyright (c) 2014-2022 Yegor Bugayenko
|
29
|
+
# License:: MIT
|
30
|
+
class TestMany < Minitest::Test
|
31
|
+
def test_parsing
|
32
|
+
Dir['./test_assets/puzzles/**'].each do |p|
|
33
|
+
name = File.basename(p)
|
34
|
+
list = PDD::Source.new("./test_assets/puzzles/#{name}", 'hey').puzzles
|
35
|
+
assert_equal 1, list.size
|
36
|
+
puzzle = list.first
|
37
|
+
puts "#{name}: \"#{puzzle.props[:body]}\""
|
38
|
+
next if name.start_with?('_')
|
39
|
+
assert_equal name, puzzle.props[:id]
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/**
|
2
|
+
*
|
3
|
+
*
|
4
|
+
* @todo #1425:30min Continue replacing usage of MatcherAssert.assertThat with
|
5
|
+
* Assertion from cactoos-matchers. Keep PR short and limit the changes to
|
6
|
+
* single package. Update this puzzle for the next package.
|
7
|
+
* After all packages are done, add MatcherAssert to forbidden-apis.txt
|
8
|
+
*
|
9
|
+
*/
|
data/utils/glob.rb
CHANGED
@@ -28,7 +28,7 @@ class Glob
|
|
28
28
|
|
29
29
|
# rubocop:disable Metrics/CyclomaticComplexity
|
30
30
|
def to_regexp
|
31
|
-
chars = @glob_string.gsub(%r{(
|
31
|
+
chars = @glob_string.gsub(%r{(\*\*/\*)|(\*\*)}, '*').chars
|
32
32
|
in_curlies = 0, escaping = false
|
33
33
|
chars.map do |char|
|
34
34
|
if escaping
|
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.21.
|
4
|
+
version: 0.21.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -86,140 +86,140 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: 0.6.0
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.
|
96
|
+
version: 0.6.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: cucumber
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - '='
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 8.0.0
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - '='
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 8.0.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: minitest
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - '='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 5.
|
117
|
+
version: 5.16.2
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - '='
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 5.
|
124
|
+
version: 5.16.2
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rake
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - '='
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
131
|
+
version: 13.0.6
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - '='
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
138
|
+
version: 13.0.6
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: rdoc
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - '='
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 4.
|
145
|
+
version: 6.4.0
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - '='
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 4.
|
152
|
+
version: 6.4.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: rspec-rails
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - '='
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
159
|
+
version: 5.1.2
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - '='
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
166
|
+
version: 5.1.2
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: rubocop
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
171
|
- - '='
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version:
|
173
|
+
version: 1.32.0
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - '='
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version:
|
180
|
+
version: 1.32.0
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: rubocop-rspec
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
185
|
- - '='
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version:
|
187
|
+
version: 2.12.1
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - '='
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version:
|
194
|
+
version: 2.12.1
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: slop
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
198
198
|
requirements:
|
199
199
|
- - '='
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version: 4.9.
|
201
|
+
version: 4.9.2
|
202
202
|
type: :development
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
206
|
- - '='
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version: 4.9.
|
208
|
+
version: 4.9.2
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
210
|
name: xcop
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
213
|
- - '='
|
214
214
|
- !ruby/object:Gem::Version
|
215
|
-
version: 0.
|
215
|
+
version: 0.7.1
|
216
216
|
type: :development
|
217
217
|
prerelease: false
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
220
|
- - '='
|
221
221
|
- !ruby/object:Gem::Version
|
222
|
-
version: 0.
|
222
|
+
version: 0.7.1
|
223
223
|
description: Collects PDD puzzles from a source code base
|
224
224
|
email: yegor256@gmail.com
|
225
225
|
executables:
|
@@ -276,6 +276,7 @@ files:
|
|
276
276
|
- test/test__helper.rb
|
277
277
|
- test/test_duplicates.rb
|
278
278
|
- test/test_estimates.rb
|
279
|
+
- test/test_many.rb
|
279
280
|
- test/test_pdd.rb
|
280
281
|
- test/test_rake_task.rb
|
281
282
|
- test/test_roles.rb
|
@@ -288,11 +289,21 @@ files:
|
|
288
289
|
- test_assets/cambria.woff
|
289
290
|
- test_assets/elegant-objects.png
|
290
291
|
- test_assets/favicon.ico
|
292
|
+
- test_assets/puzzles/1-04e35eb3
|
293
|
+
- test_assets/puzzles/132-bc1dfafe
|
294
|
+
- test_assets/puzzles/1425-59819ae3
|
295
|
+
- test_assets/puzzles/42-0d933cc0
|
296
|
+
- test_assets/puzzles/44-660e9d6f
|
297
|
+
- test_assets/puzzles/55-947a180a
|
298
|
+
- test_assets/puzzles/71-8097fa26
|
299
|
+
- test_assets/puzzles/91-ecb9aa47
|
300
|
+
- test_assets/puzzles/93-641fe341
|
291
301
|
- utils/glob.rb
|
292
302
|
homepage: http://github.com/cqfn/pdd
|
293
303
|
licenses:
|
294
304
|
- MIT
|
295
|
-
metadata:
|
305
|
+
metadata:
|
306
|
+
rubygems_mfa_required: 'true'
|
296
307
|
post_install_message:
|
297
308
|
rdoc_options:
|
298
309
|
- "--charset=UTF-8"
|
@@ -311,28 +322,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
311
322
|
requirements: []
|
312
323
|
rubygems_version: 3.1.2
|
313
324
|
signing_key:
|
314
|
-
specification_version:
|
325
|
+
specification_version: 4
|
315
326
|
summary: Puzzle Driven Development collector
|
316
|
-
test_files:
|
317
|
-
- features/applies_rules.feature
|
318
|
-
- features/avoiding_duplicates.feature
|
319
|
-
- features/catches_broken_puzzles.feature
|
320
|
-
- features/cli.feature
|
321
|
-
- features/gem_package.feature
|
322
|
-
- features/html_output.feature
|
323
|
-
- features/parsing.feature
|
324
|
-
- features/rake.feature
|
325
|
-
- features/step_definitions/steps.rb
|
326
|
-
- features/support/env.rb
|
327
|
-
- features/unicode.feature
|
328
|
-
- features/uses_config.feature
|
329
|
-
- test/test__helper.rb
|
330
|
-
- test/test_duplicates.rb
|
331
|
-
- test/test_estimates.rb
|
332
|
-
- test/test_pdd.rb
|
333
|
-
- test/test_rake_task.rb
|
334
|
-
- test/test_roles.rb
|
335
|
-
- test/test_source.rb
|
336
|
-
- test/test_source_todo.rb
|
337
|
-
- test/test_sources.rb
|
338
|
-
- test/test_text.rb
|
327
|
+
test_files: []
|