pdd 0.24.1 → 0.24.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/Gemfile +4 -2
- data/Gemfile.lock +75 -54
- data/LICENSE.txt +1 -1
- data/LICENSES/MIT.txt +1 -1
- data/README.md +46 -61
- data/REUSE.toml +0 -2
- data/Rakefile +1 -1
- data/assets/puzzles.xsd +1 -1
- data/assets/puzzles.xsl +1 -1
- data/assets/puzzles_json.xsl +1 -1
- data/bin/pdd +3 -4
- data/cucumber.yml +1 -1
- data/features/applies_rules.feature +1 -1
- data/features/avoiding_duplicates.feature +1 -1
- data/features/catches_broken_puzzles.feature +1 -1
- data/features/cli.feature +1 -1
- data/features/gem_package.feature +1 -1
- data/features/html_output.feature +1 -1
- data/features/json_output.feature +1 -1
- data/features/parsing.feature +1 -1
- data/features/rake.feature +1 -1
- data/features/remove.feature +2 -1
- data/features/step_definitions/steps.rb +1 -1
- data/features/support/env.rb +1 -1
- data/features/unicode.feature +1 -1
- data/features/uses_config.feature +1 -1
- data/lib/pdd/puzzle.rb +1 -1
- data/lib/pdd/rake_task.rb +1 -2
- data/lib/pdd/rule/duplicates.rb +1 -1
- data/lib/pdd/rule/estimates.rb +1 -1
- data/lib/pdd/rule/roles.rb +1 -1
- data/lib/pdd/rule/text.rb +1 -1
- data/lib/pdd/source.rb +1 -1
- data/lib/pdd/sources.rb +1 -1
- data/lib/pdd/version.rb +3 -3
- data/lib/pdd.rb +2 -2
- data/pdd.gemspec +2 -2
- data/utils/glob.rb +1 -1
- metadata +2 -31
- data/.0pdd.yml +0 -12
- data/.gitattributes +0 -12
- data/.github/workflows/actionlint.yml +0 -25
- data/.github/workflows/codecov.yml +0 -29
- data/.github/workflows/copyrights.yml +0 -19
- data/.github/workflows/markdown-lint.yml +0 -19
- data/.github/workflows/pdd.yml +0 -19
- data/.github/workflows/rake.yml +0 -29
- data/.github/workflows/reuse.yml +0 -19
- data/.github/workflows/typos.yml +0 -19
- data/.github/workflows/xcop.yml +0 -19
- data/.github/workflows/yamllint.yml +0 -19
- data/.gitignore +0 -15
- data/.markdownlint.yml +0 -6
- data/.pdd +0 -26
- data/.rubocop.yml +0 -42
- data/.rultor.yml +0 -26
- data/.simplecov +0 -18
- data/test/test__helper.rb +0 -44
- data/test/test_duplicates.rb +0 -31
- data/test/test_estimates.rb +0 -30
- data/test/test_many.rb +0 -25
- data/test/test_pdd.rb +0 -94
- data/test/test_rake_task.rb +0 -21
- data/test/test_roles.rb +0 -39
- data/test/test_source.rb +0 -379
- data/test/test_source_todo.rb +0 -278
- data/test/test_sources.rb +0 -120
- data/test/test_text.rb +0 -22
data/lib/pdd/rake_task.rb
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2014-
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
|
|
4
4
|
require 'rake'
|
|
5
5
|
require 'rake/tasklib'
|
|
6
|
-
require 'minitest/autorun'
|
|
7
6
|
require 'nokogiri'
|
|
8
7
|
require 'tmpdir'
|
|
9
8
|
require 'slop'
|
data/lib/pdd/rule/duplicates.rb
CHANGED
data/lib/pdd/rule/estimates.rb
CHANGED
data/lib/pdd/rule/roles.rb
CHANGED
data/lib/pdd/rule/text.rb
CHANGED
data/lib/pdd/source.rb
CHANGED
data/lib/pdd/sources.rb
CHANGED
data/lib/pdd/version.rb
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2014-
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
|
|
4
4
|
# PDD main module.
|
|
5
5
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
6
|
-
# Copyright:: Copyright (c) 2014-
|
|
6
|
+
# Copyright:: Copyright (c) 2014-2026 Yegor Bugayenko
|
|
7
7
|
# License:: MIT
|
|
8
8
|
module PDD
|
|
9
|
-
VERSION = '0.24.
|
|
9
|
+
VERSION = '0.24.2'.freeze
|
|
10
10
|
end
|
data/lib/pdd.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2014-
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
|
|
4
4
|
require 'nokogiri'
|
|
@@ -13,7 +13,7 @@ require_relative 'pdd/rule/roles'
|
|
|
13
13
|
|
|
14
14
|
# PDD main module.
|
|
15
15
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
16
|
-
# Copyright:: Copyright (c) 2014-
|
|
16
|
+
# Copyright:: Copyright (c) 2014-2026 Yegor Bugayenko
|
|
17
17
|
# License:: MIT
|
|
18
18
|
module PDD
|
|
19
19
|
# If it breaks.
|
data/pdd.gemspec
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2014-
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
|
|
4
4
|
require 'English'
|
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
|
21
21
|
s.authors = ['Yegor Bugayenko']
|
|
22
22
|
s.email = 'yegor256@gmail.com'
|
|
23
23
|
s.homepage = 'https://github.com/cqfn/pdd'
|
|
24
|
-
s.files = `git ls-files`.split($RS)
|
|
24
|
+
s.files = `git ls-files | grep -v -E '^(test/|\\.|renovate)'`.split($RS)
|
|
25
25
|
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
26
26
|
s.rdoc_options = ['--charset=UTF-8']
|
|
27
27
|
s.extra_rdoc_files = ['README.md', 'LICENSE.txt']
|
data/utils/glob.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pdd
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.24.
|
|
4
|
+
version: 0.24.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yegor Bugayenko
|
|
@@ -88,24 +88,6 @@ extra_rdoc_files:
|
|
|
88
88
|
- LICENSE.txt
|
|
89
89
|
- README.md
|
|
90
90
|
files:
|
|
91
|
-
- ".0pdd.yml"
|
|
92
|
-
- ".gitattributes"
|
|
93
|
-
- ".github/workflows/actionlint.yml"
|
|
94
|
-
- ".github/workflows/codecov.yml"
|
|
95
|
-
- ".github/workflows/copyrights.yml"
|
|
96
|
-
- ".github/workflows/markdown-lint.yml"
|
|
97
|
-
- ".github/workflows/pdd.yml"
|
|
98
|
-
- ".github/workflows/rake.yml"
|
|
99
|
-
- ".github/workflows/reuse.yml"
|
|
100
|
-
- ".github/workflows/typos.yml"
|
|
101
|
-
- ".github/workflows/xcop.yml"
|
|
102
|
-
- ".github/workflows/yamllint.yml"
|
|
103
|
-
- ".gitignore"
|
|
104
|
-
- ".markdownlint.yml"
|
|
105
|
-
- ".pdd"
|
|
106
|
-
- ".rubocop.yml"
|
|
107
|
-
- ".rultor.yml"
|
|
108
|
-
- ".simplecov"
|
|
109
91
|
- CITATION.cff
|
|
110
92
|
- Gemfile
|
|
111
93
|
- Gemfile.lock
|
|
@@ -144,17 +126,6 @@ files:
|
|
|
144
126
|
- lib/pdd/sources.rb
|
|
145
127
|
- lib/pdd/version.rb
|
|
146
128
|
- pdd.gemspec
|
|
147
|
-
- test/test__helper.rb
|
|
148
|
-
- test/test_duplicates.rb
|
|
149
|
-
- test/test_estimates.rb
|
|
150
|
-
- test/test_many.rb
|
|
151
|
-
- test/test_pdd.rb
|
|
152
|
-
- test/test_rake_task.rb
|
|
153
|
-
- test/test_roles.rb
|
|
154
|
-
- test/test_source.rb
|
|
155
|
-
- test/test_source_todo.rb
|
|
156
|
-
- test/test_sources.rb
|
|
157
|
-
- test/test_text.rb
|
|
158
129
|
- test_assets/aladdin.jpg
|
|
159
130
|
- test_assets/article.pdf
|
|
160
131
|
- test_assets/cambria.woff
|
|
@@ -190,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
190
161
|
- !ruby/object:Gem::Version
|
|
191
162
|
version: '0'
|
|
192
163
|
requirements: []
|
|
193
|
-
rubygems_version: 3.6.
|
|
164
|
+
rubygems_version: 3.6.9
|
|
194
165
|
specification_version: 4
|
|
195
166
|
summary: Puzzle Driven Development collector
|
|
196
167
|
test_files: []
|
data/.0pdd.yml
DELETED
data/.gitattributes
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# Check out all text files in UNIX format, with LF as end of line
|
|
2
|
-
# Don't change this file. If you have any ideas about it, please
|
|
3
|
-
# submit a separate issue about it and we'll discuss.
|
|
4
|
-
|
|
5
|
-
* text=auto eol=lf
|
|
6
|
-
*.java ident
|
|
7
|
-
*.xml ident
|
|
8
|
-
*.jpg binary
|
|
9
|
-
*.png binary
|
|
10
|
-
*.pdf binary
|
|
11
|
-
*.woff binary
|
|
12
|
-
*.ico binary
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
---
|
|
4
|
-
# yamllint disable rule:line-length
|
|
5
|
-
name: actionlint
|
|
6
|
-
'on':
|
|
7
|
-
push:
|
|
8
|
-
branches:
|
|
9
|
-
- master
|
|
10
|
-
pull_request:
|
|
11
|
-
branches:
|
|
12
|
-
- master
|
|
13
|
-
jobs:
|
|
14
|
-
actionlint:
|
|
15
|
-
timeout-minutes: 15
|
|
16
|
-
runs-on: ubuntu-24.04
|
|
17
|
-
steps:
|
|
18
|
-
- uses: actions/checkout@v4
|
|
19
|
-
- name: Download actionlint
|
|
20
|
-
id: get_actionlint
|
|
21
|
-
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
|
|
22
|
-
shell: bash
|
|
23
|
-
- name: Check workflow files
|
|
24
|
-
run: ${{ steps.get_actionlint.outputs.executable }} -color
|
|
25
|
-
shell: bash
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
---
|
|
4
|
-
# yamllint disable rule:line-length
|
|
5
|
-
name: codecov
|
|
6
|
-
'on':
|
|
7
|
-
push:
|
|
8
|
-
branches:
|
|
9
|
-
- master
|
|
10
|
-
pull_request:
|
|
11
|
-
branches:
|
|
12
|
-
- master
|
|
13
|
-
jobs:
|
|
14
|
-
codecov:
|
|
15
|
-
timeout-minutes: 15
|
|
16
|
-
runs-on: ubuntu-24.04
|
|
17
|
-
steps:
|
|
18
|
-
- uses: actions/checkout@v4
|
|
19
|
-
- run: sudo apt-get install --yes libmagic-dev
|
|
20
|
-
- uses: ruby/setup-ruby@v1
|
|
21
|
-
with:
|
|
22
|
-
ruby-version: 3.3
|
|
23
|
-
bundler-cache: true
|
|
24
|
-
- run: bundle config set --global path "$(pwd)/vendor/bundle"
|
|
25
|
-
- run: bundle install --no-color
|
|
26
|
-
- run: bundle exec rake
|
|
27
|
-
- uses: codecov/codecov-action@v5
|
|
28
|
-
with:
|
|
29
|
-
token: ${{ secrets.CODECOV_TOKEN }}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
---
|
|
4
|
-
# yamllint disable rule:line-length
|
|
5
|
-
name: copyrights
|
|
6
|
-
'on':
|
|
7
|
-
push:
|
|
8
|
-
branches:
|
|
9
|
-
- master
|
|
10
|
-
pull_request:
|
|
11
|
-
branches:
|
|
12
|
-
- master
|
|
13
|
-
jobs:
|
|
14
|
-
copyrights:
|
|
15
|
-
timeout-minutes: 15
|
|
16
|
-
runs-on: ubuntu-24.04
|
|
17
|
-
steps:
|
|
18
|
-
- uses: actions/checkout@v4
|
|
19
|
-
- uses: yegor256/copyrights-action@0.0.8
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
---
|
|
4
|
-
# yamllint disable rule:line-length
|
|
5
|
-
name: markdown-lint
|
|
6
|
-
'on':
|
|
7
|
-
push:
|
|
8
|
-
branches:
|
|
9
|
-
- master
|
|
10
|
-
pull_request:
|
|
11
|
-
branches:
|
|
12
|
-
- master
|
|
13
|
-
jobs:
|
|
14
|
-
markdown-lint:
|
|
15
|
-
timeout-minutes: 15
|
|
16
|
-
runs-on: ubuntu-24.04
|
|
17
|
-
steps:
|
|
18
|
-
- uses: actions/checkout@v4
|
|
19
|
-
- uses: DavidAnson/markdownlint-cli2-action@v20.0.0
|
data/.github/workflows/pdd.yml
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
---
|
|
4
|
-
# yamllint disable rule:line-length
|
|
5
|
-
name: pdd
|
|
6
|
-
'on':
|
|
7
|
-
push:
|
|
8
|
-
branches:
|
|
9
|
-
- master
|
|
10
|
-
pull_request:
|
|
11
|
-
branches:
|
|
12
|
-
- master
|
|
13
|
-
jobs:
|
|
14
|
-
pdd:
|
|
15
|
-
timeout-minutes: 15
|
|
16
|
-
runs-on: ubuntu-24.04
|
|
17
|
-
steps:
|
|
18
|
-
- uses: actions/checkout@v4
|
|
19
|
-
- uses: volodya-lombrozo/pdd-action@master
|
data/.github/workflows/rake.yml
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
---
|
|
4
|
-
# yamllint disable rule:line-length
|
|
5
|
-
name: rake
|
|
6
|
-
'on':
|
|
7
|
-
push:
|
|
8
|
-
branches:
|
|
9
|
-
- master
|
|
10
|
-
pull_request:
|
|
11
|
-
branches:
|
|
12
|
-
- master
|
|
13
|
-
jobs:
|
|
14
|
-
rake:
|
|
15
|
-
strategy:
|
|
16
|
-
matrix:
|
|
17
|
-
os: [ubuntu-24.04]
|
|
18
|
-
ruby: [3.3]
|
|
19
|
-
runs-on: ${{ matrix.os }}
|
|
20
|
-
steps:
|
|
21
|
-
- uses: actions/checkout@v4
|
|
22
|
-
- run: sudo apt-get install --yes libmagic-dev
|
|
23
|
-
- uses: ruby/setup-ruby@v1
|
|
24
|
-
with:
|
|
25
|
-
ruby-version: ${{ matrix.ruby }}
|
|
26
|
-
bundler-cache: true
|
|
27
|
-
- run: bundle config set --global path "$(pwd)/vendor/bundle"
|
|
28
|
-
- run: bundle install --no-color
|
|
29
|
-
- run: bundle exec rake
|
data/.github/workflows/reuse.yml
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
---
|
|
4
|
-
# yamllint disable rule:line-length
|
|
5
|
-
name: reuse
|
|
6
|
-
'on':
|
|
7
|
-
push:
|
|
8
|
-
branches:
|
|
9
|
-
- master
|
|
10
|
-
pull_request:
|
|
11
|
-
branches:
|
|
12
|
-
- master
|
|
13
|
-
jobs:
|
|
14
|
-
reuse:
|
|
15
|
-
timeout-minutes: 15
|
|
16
|
-
runs-on: ubuntu-24.04
|
|
17
|
-
steps:
|
|
18
|
-
- uses: actions/checkout@v4
|
|
19
|
-
- uses: fsfe/reuse-action@v5
|
data/.github/workflows/typos.yml
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
---
|
|
4
|
-
# yamllint disable rule:line-length
|
|
5
|
-
name: typos
|
|
6
|
-
'on':
|
|
7
|
-
push:
|
|
8
|
-
branches:
|
|
9
|
-
- master
|
|
10
|
-
pull_request:
|
|
11
|
-
branches:
|
|
12
|
-
- master
|
|
13
|
-
jobs:
|
|
14
|
-
typos:
|
|
15
|
-
timeout-minutes: 15
|
|
16
|
-
runs-on: ubuntu-24.04
|
|
17
|
-
steps:
|
|
18
|
-
- uses: actions/checkout@v4
|
|
19
|
-
- uses: crate-ci/typos@v1.32.0
|
data/.github/workflows/xcop.yml
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
---
|
|
4
|
-
# yamllint disable rule:line-length
|
|
5
|
-
name: xcop
|
|
6
|
-
"on":
|
|
7
|
-
push:
|
|
8
|
-
branches:
|
|
9
|
-
- master
|
|
10
|
-
pull_request:
|
|
11
|
-
branches:
|
|
12
|
-
- master
|
|
13
|
-
jobs:
|
|
14
|
-
xcop:
|
|
15
|
-
timeout-minutes: 15
|
|
16
|
-
runs-on: ubuntu-24.04
|
|
17
|
-
steps:
|
|
18
|
-
- uses: actions/checkout@v4
|
|
19
|
-
- uses: g4s8/xcop-action@master
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
---
|
|
4
|
-
# yamllint disable rule:line-length
|
|
5
|
-
name: yamllint
|
|
6
|
-
'on':
|
|
7
|
-
push:
|
|
8
|
-
branches:
|
|
9
|
-
- master
|
|
10
|
-
pull_request:
|
|
11
|
-
branches:
|
|
12
|
-
- master
|
|
13
|
-
jobs:
|
|
14
|
-
yamllint:
|
|
15
|
-
timeout-minutes: 15
|
|
16
|
-
runs-on: ubuntu-24.04
|
|
17
|
-
steps:
|
|
18
|
-
- uses: actions/checkout@v4
|
|
19
|
-
- uses: ibiqlik/action-yamllint@v3
|
data/.gitignore
DELETED
data/.markdownlint.yml
DELETED
data/.pdd
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
--source=.
|
|
2
|
-
--verbose
|
|
3
|
-
--exclude .idea/**/*
|
|
4
|
-
--exclude .bundle/**/*
|
|
5
|
-
--exclude target/**/*
|
|
6
|
-
--exclude coverage/**/*
|
|
7
|
-
--exclude test_assets/**/*
|
|
8
|
-
--exclude README.md
|
|
9
|
-
--exclude features/cli.feature
|
|
10
|
-
--exclude features/parsing.feature
|
|
11
|
-
--exclude features/catches_broken_puzzles.feature
|
|
12
|
-
--exclude features/remove.feature
|
|
13
|
-
--exclude features/uses_config.feature
|
|
14
|
-
--exclude features/html_output.feature
|
|
15
|
-
--exclude features/json_output.feature
|
|
16
|
-
--exclude features/avoiding_duplicates.feature
|
|
17
|
-
--exclude features/applies_rules.feature
|
|
18
|
-
--exclude features/unicode.feature
|
|
19
|
-
--exclude lib/pdd/source.rb
|
|
20
|
-
--exclude test/test_source.rb
|
|
21
|
-
--exclude test/test_source_todo.rb
|
|
22
|
-
--exclude test/test_pdd.rb
|
|
23
|
-
--exclude src/main/resources/images/**/*
|
|
24
|
-
--rule min-words:20
|
|
25
|
-
--rule min-estimate:15
|
|
26
|
-
--rule max-estimate:90
|
data/.rubocop.yml
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
---
|
|
4
|
-
AllCops:
|
|
5
|
-
Exclude:
|
|
6
|
-
- 'bin/**/*'
|
|
7
|
-
- 'assets/**/*'
|
|
8
|
-
- 'vendor/**/**'
|
|
9
|
-
DisplayCopNames: true
|
|
10
|
-
TargetRubyVersion: 2.3
|
|
11
|
-
NewCops: enable
|
|
12
|
-
SuggestExtensions: false
|
|
13
|
-
plugins:
|
|
14
|
-
- rubocop-rake
|
|
15
|
-
- rubocop-minitest
|
|
16
|
-
- rubocop-performance
|
|
17
|
-
Minitest/EmptyLineBeforeAssertionMethods:
|
|
18
|
-
Enabled: false
|
|
19
|
-
Gemspec/RequiredRubyVersion:
|
|
20
|
-
Enabled: false
|
|
21
|
-
Layout/EmptyLineAfterGuardClause:
|
|
22
|
-
Enabled: false
|
|
23
|
-
Metrics/CyclomaticComplexity:
|
|
24
|
-
Max: 10
|
|
25
|
-
Metrics/PerceivedComplexity:
|
|
26
|
-
Max: 15
|
|
27
|
-
Layout/EndOfLine:
|
|
28
|
-
EnforcedStyle: lf
|
|
29
|
-
Metrics/ClassLength:
|
|
30
|
-
Max: 360
|
|
31
|
-
Layout/LineLength:
|
|
32
|
-
Max: 90
|
|
33
|
-
Metrics/MethodLength:
|
|
34
|
-
Max: 35
|
|
35
|
-
Metrics/AbcSize:
|
|
36
|
-
Max: 40
|
|
37
|
-
Style/MultilineBlockChain:
|
|
38
|
-
Enabled: false
|
|
39
|
-
Metrics/BlockLength:
|
|
40
|
-
Max: 50
|
|
41
|
-
Style/FrozenStringLiteralComment:
|
|
42
|
-
Enabled: false
|
data/.rultor.yml
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
---
|
|
4
|
-
# yamllint disable rule:line-length
|
|
5
|
-
docker:
|
|
6
|
-
image: yegor256/ruby
|
|
7
|
-
assets:
|
|
8
|
-
rubygems.yml: yegor256/home#assets/rubygems.yml
|
|
9
|
-
install: |
|
|
10
|
-
pdd -f /dev/null
|
|
11
|
-
bundle install --no-color
|
|
12
|
-
release:
|
|
13
|
-
pre: false
|
|
14
|
-
script: |-
|
|
15
|
-
[[ "${tag}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || exit -1
|
|
16
|
-
bundle exec rake
|
|
17
|
-
rm -rf *.gem
|
|
18
|
-
sed -i "s/0\.0\.0/${tag}/g" lib/pdd/version.rb
|
|
19
|
-
git add lib/pdd/version.rb
|
|
20
|
-
git commit -m "version set to ${tag}"
|
|
21
|
-
gem build pdd.gemspec
|
|
22
|
-
chmod 0600 ../rubygems.yml
|
|
23
|
-
gem push *.gem --config-file ../rubygems.yml
|
|
24
|
-
merge:
|
|
25
|
-
script: |-
|
|
26
|
-
LC_ALL=US-ASCII bundle exec rake
|
data/.simplecov
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
|
|
4
|
-
SimpleCov.formatter = if Gem.win_platform?
|
|
5
|
-
SimpleCov::Formatter::MultiFormatter[
|
|
6
|
-
SimpleCov::Formatter::HTMLFormatter
|
|
7
|
-
]
|
|
8
|
-
else
|
|
9
|
-
SimpleCov::Formatter::MultiFormatter.new(
|
|
10
|
-
SimpleCov::Formatter::HTMLFormatter
|
|
11
|
-
)
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
SimpleCov.start do
|
|
15
|
-
add_filter '/test/'
|
|
16
|
-
add_filter '/features/'
|
|
17
|
-
minimum_coverage 90
|
|
18
|
-
end
|
data/test/test__helper.rb
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
|
|
4
|
-
$stdout.sync = true
|
|
5
|
-
|
|
6
|
-
require 'simplecov'
|
|
7
|
-
require 'simplecov-cobertura'
|
|
8
|
-
unless SimpleCov.running
|
|
9
|
-
SimpleCov.command_name('test')
|
|
10
|
-
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
|
|
11
|
-
[
|
|
12
|
-
SimpleCov::Formatter::HTMLFormatter,
|
|
13
|
-
SimpleCov::Formatter::CoberturaFormatter
|
|
14
|
-
]
|
|
15
|
-
)
|
|
16
|
-
SimpleCov.minimum_coverage 100
|
|
17
|
-
SimpleCov.minimum_coverage_by_file 100
|
|
18
|
-
SimpleCov.start do
|
|
19
|
-
add_filter 'test/'
|
|
20
|
-
add_filter 'vendor/'
|
|
21
|
-
add_filter 'target/'
|
|
22
|
-
track_files 'lib/**/*.rb'
|
|
23
|
-
track_files '*.rb'
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
require 'minitest/autorun'
|
|
28
|
-
require 'minitest/reporters'
|
|
29
|
-
Minitest::Reporters.use! [Minitest::Reporters::SpecReporter.new]
|
|
30
|
-
|
|
31
|
-
require_relative '../lib/pdd'
|
|
32
|
-
|
|
33
|
-
def stub_source_find_github_user(file, path = '')
|
|
34
|
-
source = PDD::Source.new(file, path)
|
|
35
|
-
verbose_source = PDD::VerboseSource.new(file, source)
|
|
36
|
-
fake = proc do |info = {}|
|
|
37
|
-
email, author = info.values_at(:email, :author)
|
|
38
|
-
{ 'login' => 'yegor256' } if email == 'yegor256@gmail.com' ||
|
|
39
|
-
author == 'Yegor Bugayenko'
|
|
40
|
-
end
|
|
41
|
-
source.stub :find_github_user, fake do
|
|
42
|
-
yield verbose_source
|
|
43
|
-
end
|
|
44
|
-
end
|
data/test/test_duplicates.rb
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
|
|
4
|
-
require 'minitest/autorun'
|
|
5
|
-
require 'nokogiri'
|
|
6
|
-
require_relative '../lib/pdd/rule/duplicates'
|
|
7
|
-
|
|
8
|
-
# PDD::Rule::MaxDuplicates class test.
|
|
9
|
-
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
10
|
-
# Copyright:: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
11
|
-
# License:: MIT
|
|
12
|
-
class TestMaxDuplicates < Minitest::Test
|
|
13
|
-
def test_max_duplicates
|
|
14
|
-
rule = PDD::Rule::MaxDuplicates.new(
|
|
15
|
-
Nokogiri::XML::Document.parse(
|
|
16
|
-
'<puzzles><puzzle><body>test</body></puzzle>
|
|
17
|
-
<puzzle><body>test</body></puzzle></puzzles>'
|
|
18
|
-
), 1
|
|
19
|
-
)
|
|
20
|
-
refute_empty rule.errors, 'why it is empty?'
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def test_max_duplicates_without_errors
|
|
24
|
-
rule = PDD::Rule::MaxDuplicates.new(
|
|
25
|
-
Nokogiri::XML::Document.parse(
|
|
26
|
-
'<puzzles><puzzle><body>hello</body></puzzle></puzzles>'
|
|
27
|
-
), 1
|
|
28
|
-
)
|
|
29
|
-
assert_empty rule.errors, 'it has to be empty!'
|
|
30
|
-
end
|
|
31
|
-
end
|
data/test/test_estimates.rb
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
|
|
4
|
-
require 'minitest/autorun'
|
|
5
|
-
require 'nokogiri'
|
|
6
|
-
require_relative '../lib/pdd/rule/estimates'
|
|
7
|
-
|
|
8
|
-
# PDD::Rule::Estimate module tests.
|
|
9
|
-
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
10
|
-
# Copyright:: Copyright (c) 2014-2025 Yegor Bugayenko
|
|
11
|
-
# License:: MIT
|
|
12
|
-
class TestEstimates < Minitest::Test
|
|
13
|
-
def test_min
|
|
14
|
-
rule = PDD::Rule::Estimate::Min.new(
|
|
15
|
-
Nokogiri::XML::Document.parse(
|
|
16
|
-
'<puzzles><puzzle><estimate>15</estimate></puzzle></puzzles>'
|
|
17
|
-
), 30
|
|
18
|
-
)
|
|
19
|
-
refute_empty rule.errors, 'why it is empty?'
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
def test_max
|
|
23
|
-
rule = PDD::Rule::Estimate::Max.new(
|
|
24
|
-
Nokogiri::XML::Document.parse(
|
|
25
|
-
'<puzzles><puzzle><estimate>30</estimate></puzzle></puzzles>'
|
|
26
|
-
), 15
|
|
27
|
-
)
|
|
28
|
-
refute_empty rule.errors, 'why it is empty?'
|
|
29
|
-
end
|
|
30
|
-
end
|