pdd 0.23.2 → 0.24.1
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/.0pdd.yml +3 -0
- data/.github/workflows/actionlint.yml +25 -0
- data/.github/workflows/codecov.yml +18 -9
- data/.github/workflows/copyrights.yml +19 -0
- data/.github/workflows/markdown-lint.yml +19 -0
- data/.github/workflows/pdd.yml +8 -4
- data/.github/workflows/rake.yml +13 -8
- data/.github/workflows/reuse.yml +19 -0
- data/.github/workflows/typos.yml +19 -0
- data/.github/workflows/xcop.yml +6 -2
- data/.github/workflows/yamllint.yml +19 -0
- data/.gitignore +12 -5
- data/.markdownlint.yml +6 -0
- data/.pdd +1 -1
- data/.rubocop.yml +12 -2
- data/.rultor.yml +7 -2
- data/.simplecov +16 -36
- data/Gemfile +16 -30
- data/Gemfile.lock +173 -0
- data/LICENSE.txt +1 -1
- data/LICENSES/MIT.txt +21 -0
- data/README.md +152 -57
- data/REUSE.toml +43 -0
- data/Rakefile +7 -31
- data/assets/puzzles.xsd +3 -22
- data/assets/puzzles.xsl +3 -22
- data/assets/puzzles_json.xsl +60 -0
- data/bin/pdd +17 -24
- data/cucumber.yml +4 -0
- data/features/applies_rules.feature +2 -0
- data/features/avoiding_duplicates.feature +2 -0
- data/features/catches_broken_puzzles.feature +2 -0
- data/features/cli.feature +48 -5
- data/features/gem_package.feature +2 -0
- data/features/html_output.feature +2 -0
- data/features/json_output.feature +24 -0
- data/features/parsing.feature +2 -0
- data/features/rake.feature +2 -2
- data/features/remove.feature +2 -0
- data/features/step_definitions/steps.rb +11 -20
- data/features/support/env.rb +2 -19
- data/features/unicode.feature +2 -0
- data/features/uses_config.feature +2 -1
- data/lib/pdd/puzzle.rb +2 -19
- data/lib/pdd/rake_task.rb +3 -0
- data/lib/pdd/rule/duplicates.rb +2 -19
- data/lib/pdd/rule/estimates.rb +2 -19
- data/lib/pdd/rule/roles.rb +2 -19
- data/lib/pdd/rule/text.rb +2 -19
- data/lib/pdd/source.rb +34 -35
- data/lib/pdd/sources.rb +2 -19
- data/lib/pdd/version.rb +4 -21
- data/lib/pdd.rb +3 -20
- data/pdd.gemspec +8 -24
- data/test/test__helper.rb +24 -20
- data/test/test_duplicates.rb +5 -22
- data/test/test_estimates.rb +5 -22
- data/test/test_many.rb +3 -20
- data/test/test_pdd.rb +4 -21
- data/test/test_rake_task.rb +3 -0
- data/test/test_roles.rb +6 -23
- data/test/test_source.rb +17 -34
- data/test/test_source_todo.rb +121 -20
- data/test/test_sources.rb +4 -21
- data/test/test_text.rb +4 -21
- data/test_assets/aladdin.jpg +0 -0
- data/test_assets/elegant-objects.png +0 -0
- data/test_assets/puzzles/1-04e35eb3 +1 -1
- data/test_assets/puzzles/132-bc1dfafe +1 -1
- data/test_assets/puzzles/1425-59819ae3 +5 -5
- data/test_assets/puzzles/42-0d933cc0 +1 -1
- data/test_assets/puzzles/44-660e9d6f +2 -2
- data/test_assets/puzzles/91-ecb9aa47 +1 -1
- data/test_assets/puzzles/93-641fe341 +1 -1
- data/utils/glob.rb +2 -19
- metadata +33 -11
- data/.overcommit.yml +0 -96
data/test/test_text.rb
CHANGED
@@ -1,22 +1,5 @@
|
|
1
|
-
# Copyright (c) 2014-
|
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.
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
2
|
+
# SPDX-License-Identifier: MIT
|
20
3
|
|
21
4
|
require 'minitest/autorun'
|
22
5
|
require 'nokogiri'
|
@@ -24,7 +7,7 @@ require_relative '../lib/pdd/rule/text'
|
|
24
7
|
|
25
8
|
# PDD::Rule::Text module tests.
|
26
9
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
27
|
-
# Copyright:: Copyright (c) 2014-
|
10
|
+
# Copyright:: Copyright (c) 2014-2025 Yegor Bugayenko
|
28
11
|
# License:: MIT
|
29
12
|
class TestText < Minitest::Test
|
30
13
|
def test_min_words
|
@@ -34,6 +17,6 @@ class TestText < Minitest::Test
|
|
34
17
|
<puzzle><body>body with four words</body></puzzle></puzzles>'
|
35
18
|
), 4
|
36
19
|
)
|
37
|
-
|
20
|
+
assert_equal 1, rule.errors.size
|
38
21
|
end
|
39
22
|
end
|
data/test_assets/aladdin.jpg
CHANGED
Binary file
|
Binary file
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/**
|
2
2
|
*
|
3
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
|
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
8
|
*
|
9
|
-
*/
|
9
|
+
*/
|
data/utils/glob.rb
CHANGED
@@ -1,22 +1,5 @@
|
|
1
|
-
# Copyright (c) 2014-
|
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.
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
2
|
+
# SPDX-License-Identifier: MIT
|
20
3
|
|
21
4
|
# Utility glob class
|
22
5
|
class Glob
|
metadata
CHANGED
@@ -1,15 +1,28 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.24.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
12
|
+
- !ruby/object:Gem::Dependency
|
13
|
+
name: backtrace
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - "~>"
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '0.1'
|
19
|
+
type: :runtime
|
20
|
+
prerelease: false
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
requirements:
|
23
|
+
- - "~>"
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: '0.1'
|
13
26
|
- !ruby/object:Gem::Dependency
|
14
27
|
name: nokogiri
|
15
28
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +57,14 @@ dependencies:
|
|
44
57
|
requirements:
|
45
58
|
- - "~>"
|
46
59
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.7
|
60
|
+
version: '0.7'
|
48
61
|
type: :runtime
|
49
62
|
prerelease: false
|
50
63
|
version_requirements: !ruby/object:Gem::Requirement
|
51
64
|
requirements:
|
52
65
|
- - "~>"
|
53
66
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.7
|
67
|
+
version: '0.7'
|
55
68
|
- !ruby/object:Gem::Dependency
|
56
69
|
name: slop
|
57
70
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,28 +85,38 @@ executables:
|
|
72
85
|
- pdd
|
73
86
|
extensions: []
|
74
87
|
extra_rdoc_files:
|
75
|
-
- README.md
|
76
88
|
- LICENSE.txt
|
89
|
+
- README.md
|
77
90
|
files:
|
78
91
|
- ".0pdd.yml"
|
79
92
|
- ".gitattributes"
|
93
|
+
- ".github/workflows/actionlint.yml"
|
80
94
|
- ".github/workflows/codecov.yml"
|
95
|
+
- ".github/workflows/copyrights.yml"
|
96
|
+
- ".github/workflows/markdown-lint.yml"
|
81
97
|
- ".github/workflows/pdd.yml"
|
82
98
|
- ".github/workflows/rake.yml"
|
99
|
+
- ".github/workflows/reuse.yml"
|
100
|
+
- ".github/workflows/typos.yml"
|
83
101
|
- ".github/workflows/xcop.yml"
|
102
|
+
- ".github/workflows/yamllint.yml"
|
84
103
|
- ".gitignore"
|
85
|
-
- ".
|
104
|
+
- ".markdownlint.yml"
|
86
105
|
- ".pdd"
|
87
106
|
- ".rubocop.yml"
|
88
107
|
- ".rultor.yml"
|
89
108
|
- ".simplecov"
|
90
109
|
- CITATION.cff
|
91
110
|
- Gemfile
|
111
|
+
- Gemfile.lock
|
92
112
|
- LICENSE.txt
|
113
|
+
- LICENSES/MIT.txt
|
93
114
|
- README.md
|
115
|
+
- REUSE.toml
|
94
116
|
- Rakefile
|
95
117
|
- assets/puzzles.xsd
|
96
118
|
- assets/puzzles.xsl
|
119
|
+
- assets/puzzles_json.xsl
|
97
120
|
- bin/pdd
|
98
121
|
- cucumber.yml
|
99
122
|
- features/applies_rules.feature
|
@@ -102,6 +125,7 @@ files:
|
|
102
125
|
- features/cli.feature
|
103
126
|
- features/gem_package.feature
|
104
127
|
- features/html_output.feature
|
128
|
+
- features/json_output.feature
|
105
129
|
- features/parsing.feature
|
106
130
|
- features/rake.feature
|
107
131
|
- features/remove.feature
|
@@ -146,12 +170,11 @@ files:
|
|
146
170
|
- test_assets/puzzles/91-ecb9aa47
|
147
171
|
- test_assets/puzzles/93-641fe341
|
148
172
|
- utils/glob.rb
|
149
|
-
homepage:
|
173
|
+
homepage: https://github.com/cqfn/pdd
|
150
174
|
licenses:
|
151
175
|
- MIT
|
152
176
|
metadata:
|
153
177
|
rubygems_mfa_required: 'true'
|
154
|
-
post_install_message:
|
155
178
|
rdoc_options:
|
156
179
|
- "--charset=UTF-8"
|
157
180
|
require_paths:
|
@@ -167,8 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
190
|
- !ruby/object:Gem::Version
|
168
191
|
version: '0'
|
169
192
|
requirements: []
|
170
|
-
rubygems_version: 3.
|
171
|
-
signing_key:
|
193
|
+
rubygems_version: 3.6.7
|
172
194
|
specification_version: 4
|
173
195
|
summary: Puzzle Driven Development collector
|
174
196
|
test_files: []
|
data/.overcommit.yml
DELETED
@@ -1,96 +0,0 @@
|
|
1
|
-
# Use this file to configure the Overcommit hooks you wish to use. This will
|
2
|
-
# extend the default configuration defined in:
|
3
|
-
# https://github.com/sds/overcommit/blob/master/config/default.yml
|
4
|
-
#
|
5
|
-
# At the topmost level of this YAML file is a key representing type of hook
|
6
|
-
# being run (e.g. pre-commit, commit-msg, etc.). Within each type you can
|
7
|
-
# customize each hook, such as whether to only run it on certain files (via
|
8
|
-
# `include`), whether to only display output if it fails (via `quiet`), etc.
|
9
|
-
#
|
10
|
-
# For a complete list of hooks, see:
|
11
|
-
# https://github.com/sds/overcommit/tree/master/lib/overcommit/hook
|
12
|
-
#
|
13
|
-
# For a complete list of options that you can use to customize hooks, see:
|
14
|
-
# https://github.com/sds/overcommit#configuration
|
15
|
-
|
16
|
-
PreCommit:
|
17
|
-
ALL:
|
18
|
-
problem_on_unmodified_line: report
|
19
|
-
requires_files: true
|
20
|
-
required: false
|
21
|
-
quiet: false
|
22
|
-
|
23
|
-
AuthorEmail:
|
24
|
-
enabled: true
|
25
|
-
description: 'Check author email'
|
26
|
-
requires_files: false
|
27
|
-
required: true
|
28
|
-
quiet: true
|
29
|
-
pattern: '^[^@]+@.*$'
|
30
|
-
|
31
|
-
AuthorName:
|
32
|
-
enabled: true
|
33
|
-
description: 'Check for author name'
|
34
|
-
requires_files: false
|
35
|
-
required: true
|
36
|
-
quiet: true
|
37
|
-
|
38
|
-
BundleCheck:
|
39
|
-
enabled: true
|
40
|
-
description: 'Check Gemfile dependencies'
|
41
|
-
required_executable: 'bundle'
|
42
|
-
flags: ['check']
|
43
|
-
include:
|
44
|
-
- 'Gemfile'
|
45
|
-
- 'Gemfile.lock'
|
46
|
-
- '*.gemspec'
|
47
|
-
|
48
|
-
BundleOutdated:
|
49
|
-
enabled: true
|
50
|
-
description: 'List installed gems with newer versions available'
|
51
|
-
required_executable: 'bundle'
|
52
|
-
flags: ['outdated', '--strict', '--parseable']
|
53
|
-
|
54
|
-
RuboCop:
|
55
|
-
enabled: true
|
56
|
-
description: 'Analyze with RuboCop'
|
57
|
-
required_executable: 'bundle'
|
58
|
-
flags: ['exec', 'rubocop']
|
59
|
-
|
60
|
-
# Hooks that are run against every commit message after a user has written it.
|
61
|
-
# These hooks are useful for enforcing policies on commit messages written for a
|
62
|
-
# project.
|
63
|
-
CommitMsg:
|
64
|
-
ALL:
|
65
|
-
requires_files: false
|
66
|
-
quiet: false
|
67
|
-
|
68
|
-
EmptyMessage:
|
69
|
-
enabled: true
|
70
|
-
description: 'Check for empty commit message'
|
71
|
-
quiet: true
|
72
|
-
|
73
|
-
MessageFormat:
|
74
|
-
enabled: true
|
75
|
-
description: 'Check commit message matches expected pattern'
|
76
|
-
pattern: '(\[#)(.+)(\]\s)(.+)'
|
77
|
-
expected_pattern_message: '[#<Issue Id>] <Commit Message Description>'
|
78
|
-
sample_message: '[#167] Refactored onboarding flow'
|
79
|
-
|
80
|
-
PrePush:
|
81
|
-
ALL:
|
82
|
-
requires_files: false
|
83
|
-
required: false
|
84
|
-
quiet: false
|
85
|
-
|
86
|
-
RakeTarget:
|
87
|
-
enabled: true
|
88
|
-
quite: true
|
89
|
-
description: 'Run rake targets'
|
90
|
-
targets:
|
91
|
-
- 'rubocop'
|
92
|
-
- 'test'
|
93
|
-
- 'xcop'
|
94
|
-
required_executable: 'bundle'
|
95
|
-
flags: ['exec', 'rake']
|
96
|
-
|