pdd 0.24.0 → 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.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +17 -30
  3. data/Gemfile.lock +194 -0
  4. data/LICENSE.txt +1 -1
  5. data/LICENSES/MIT.txt +21 -0
  6. data/README.md +99 -100
  7. data/REUSE.toml +41 -0
  8. data/Rakefile +4 -31
  9. data/assets/puzzles.xsd +3 -22
  10. data/assets/puzzles.xsl +3 -22
  11. data/assets/puzzles_json.xsl +4 -23
  12. data/bin/pdd +6 -22
  13. data/cucumber.yml +3 -0
  14. data/features/applies_rules.feature +2 -0
  15. data/features/avoiding_duplicates.feature +2 -0
  16. data/features/catches_broken_puzzles.feature +2 -0
  17. data/features/cli.feature +2 -0
  18. data/features/gem_package.feature +2 -0
  19. data/features/html_output.feature +2 -0
  20. data/features/json_output.feature +2 -0
  21. data/features/parsing.feature +2 -0
  22. data/features/rake.feature +2 -2
  23. data/features/remove.feature +3 -0
  24. data/features/step_definitions/steps.rb +2 -19
  25. data/features/support/env.rb +2 -19
  26. data/features/unicode.feature +2 -0
  27. data/features/uses_config.feature +2 -1
  28. data/lib/pdd/puzzle.rb +2 -19
  29. data/lib/pdd/rake_task.rb +3 -1
  30. data/lib/pdd/rule/duplicates.rb +2 -19
  31. data/lib/pdd/rule/estimates.rb +2 -19
  32. data/lib/pdd/rule/roles.rb +2 -19
  33. data/lib/pdd/rule/text.rb +2 -19
  34. data/lib/pdd/source.rb +2 -19
  35. data/lib/pdd/sources.rb +2 -19
  36. data/lib/pdd/version.rb +4 -21
  37. data/lib/pdd.rb +3 -20
  38. data/pdd.gemspec +9 -25
  39. data/test_assets/aladdin.jpg +0 -0
  40. data/test_assets/elegant-objects.png +0 -0
  41. data/test_assets/puzzles/1-04e35eb3 +1 -1
  42. data/test_assets/puzzles/132-bc1dfafe +1 -1
  43. data/test_assets/puzzles/1425-59819ae3 +5 -5
  44. data/test_assets/puzzles/42-0d933cc0 +1 -1
  45. data/test_assets/puzzles/91-ecb9aa47 +1 -1
  46. data/test_assets/puzzles/93-641fe341 +1 -1
  47. data/utils/glob.rb +2 -19
  48. metadata +24 -33
  49. data/.0pdd.yml +0 -9
  50. data/.gitattributes +0 -12
  51. data/.github/workflows/codecov.yml +0 -23
  52. data/.github/workflows/pdd.yml +0 -15
  53. data/.github/workflows/rake.yml +0 -24
  54. data/.github/workflows/xcop.yml +0 -15
  55. data/.gitignore +0 -8
  56. data/.overcommit.yml +0 -96
  57. data/.pdd +0 -27
  58. data/.rubocop.yml +0 -32
  59. data/.rultor.yml +0 -22
  60. data/.simplecov +0 -35
  61. data/test/test__helper.rb +0 -43
  62. data/test/test_duplicates.rb +0 -48
  63. data/test/test_estimates.rb +0 -47
  64. data/test/test_many.rb +0 -42
  65. data/test/test_pdd.rb +0 -111
  66. data/test/test_rake_task.rb +0 -18
  67. data/test/test_roles.rb +0 -56
  68. data/test/test_source.rb +0 -396
  69. data/test/test_source_todo.rb +0 -295
  70. data/test/test_sources.rb +0 -137
  71. data/test/test_text.rb +0 -39
data/REUSE.toml ADDED
@@ -0,0 +1,41 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
3
+
4
+ version = 1
5
+ [[annotations]]
6
+ path = [
7
+ ".DS_Store",
8
+ ".overcommit.yml",
9
+ ".pdd",
10
+ "**.ico",
11
+ "**.jpg",
12
+ "**.json",
13
+ "**.md",
14
+ "**.pdf",
15
+ "**.png",
16
+ "**.txt",
17
+ "**.woff",
18
+ "**/.DS_Store",
19
+ "**/.gitignore",
20
+ "**/.pdd",
21
+ "**/*.csv",
22
+ "**/*.jpg",
23
+ "**/*.json",
24
+ "**/*.md",
25
+ "**/*.pdf",
26
+ "**/*.png",
27
+ "**/*.svg",
28
+ "**/*.txt",
29
+ "**/*.vm",
30
+ "**/CITATION.cff",
31
+ "**/CNAME",
32
+ "**/Gemfile.lock",
33
+ "CITATION.cff",
34
+ "Gemfile.lock",
35
+ "README.md",
36
+ "renovate.json",
37
+ "test_assets/puzzles/**",
38
+ ]
39
+ precedence = "override"
40
+ SPDX-FileCopyrightText = "Copyright (c) 2025 Yegor Bugayenko"
41
+ SPDX-License-Identifier = "MIT"
data/Rakefile CHANGED
@@ -1,22 +1,5 @@
1
- # Copyright (c) 2014-2024 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 NONINFRINGEMENT. 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-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
 
21
4
  require 'rubygems'
22
5
  require 'rake'
@@ -31,7 +14,7 @@ def version
31
14
  Gem::Specification.load(Dir['*.gemspec'].first).version
32
15
  end
33
16
 
34
- task default: %i[clean test features rubocop xcop copyright]
17
+ task default: %i[clean test features rubocop xcop]
35
18
 
36
19
  require 'rake/testtask'
37
20
  desc 'Run all unit tests'
@@ -55,15 +38,13 @@ require 'rubocop/rake_task'
55
38
  desc 'Run RuboCop on all directories'
56
39
  RuboCop::RakeTask.new(:rubocop) do |task|
57
40
  task.fail_on_error = true
58
- task.requires << 'rubocop-rspec'
59
41
  end
60
42
 
61
43
  require 'xcop/rake_task'
62
44
  desc 'Validate all XML/XSL/XSD/HTML files for formatting'
63
45
  Xcop::RakeTask.new :xcop do |task|
64
- task.license = 'LICENSE.txt'
65
46
  task.includes = ['**/*.xml', '**/*.xsl', '**/*.xsd', '**/*.html']
66
- task.excludes = ['target/**/*', 'coverage/**/*']
47
+ task.excludes = ['target/**/*', 'coverage/**/*', 'vendor/**/*']
67
48
  end
68
49
 
69
50
  require 'pdd/rake_task'
@@ -83,11 +64,3 @@ end
83
64
  Cucumber::Rake::Task.new(:'features:json') do |t|
84
65
  t.profile = 'json_report'
85
66
  end
86
-
87
- task :copyright do
88
- sh "grep -q -r '2014-#{Date.today.strftime('%Y')}' \
89
- --include '*.rb' \
90
- --include '*.txt' \
91
- --include 'Rakefile' \
92
- ."
93
- end
data/assets/puzzles.xsd CHANGED
@@ -1,26 +1,7 @@
1
- <?xml version="1.0"?>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
2
  <!--
3
- (The MIT License)
4
-
5
- Copyright (c) 2014-2024 Yegor Bugayenko
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining a copy
8
- of this software and associated documentation files (the 'Software'), to deal
9
- in the Software without restriction, including without limitation the rights
10
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- copies of the Software, and to permit persons to whom the Software is
12
- furnished to do so, subject to the following conditions:
13
-
14
- The above copyright notice and this permission notice shall be included in all
15
- copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- SOFTWARE.
3
+ * SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
4
+ * SPDX-License-Identifier: MIT
24
5
  -->
25
6
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
26
7
  <xs:complexType name="puzzle">
data/assets/puzzles.xsl CHANGED
@@ -1,26 +1,7 @@
1
- <?xml version="1.0"?>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
2
  <!--
3
- (The MIT License)
4
-
5
- Copyright (c) 2014-2024 Yegor Bugayenko
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining a copy
8
- of this software and associated documentation files (the 'Software'), to deal
9
- in the Software without restriction, including without limitation the rights
10
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- copies of the Software, and to permit persons to whom the Software is
12
- furnished to do so, subject to the following conditions:
13
-
14
- The above copyright notice and this permission notice shall be included in all
15
- copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- SOFTWARE.
3
+ * SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
4
+ * SPDX-License-Identifier: MIT
24
5
  -->
25
6
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
26
7
  <xsl:template match="/">
@@ -1,26 +1,7 @@
1
- <?xml version="1.0"?>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
2
  <!--
3
- (The MIT License)
4
-
5
- Copyright (c) 2014-2024 Yegor Bugayenko
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining a copy
8
- of this software and associated documentation files (the 'Software'), to deal
9
- in the Software without restriction, including without limitation the rights
10
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- copies of the Software, and to permit persons to whom the Software is
12
- furnished to do so, subject to the following conditions:
13
-
14
- The above copyright notice and this permission notice shall be included in all
15
- copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- SOFTWARE.
3
+ * SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
4
+ * SPDX-License-Identifier: MIT
24
5
  -->
25
6
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
26
7
  <xsl:output method="text" omit-xml-declaration="yes"/>
@@ -61,7 +42,7 @@ SOFTWARE.
61
42
  <xsl:text>", </xsl:text>
62
43
  <xsl:text>
63
44
  "body": "</xsl:text>
64
- <xsl:value-of select="translate(body, '&quot;', '&#x201C;')"/>
45
+ <xsl:value-of select="translate(body, '&quot;', '')"/>
65
46
  <xsl:text>", </xsl:text>
66
47
  <xsl:text>
67
48
  "estimate": "</xsl:text>
data/bin/pdd CHANGED
@@ -1,26 +1,10 @@
1
1
  #!/usr/bin/env ruby
2
- # Copyright (c) 2014-2024 Yegor Bugayenko
3
- #
4
- # Permission is hereby granted, free of charge, to any person obtaining a copy
5
- # of this software and associated documentation files (the 'Software'), to deal
6
- # in the Software without restriction, including without limitation the rights
7
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- # copies of the Software, and to permit persons to whom the Software is
9
- # furnished to do so, subject to the following conditions:
10
- #
11
- # The above copyright notice and this permission notice shall be included in all
12
- # copies or substantial portions of the Software.
13
- #
14
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
17
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
- # SOFTWARE.
2
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
3
+ # SPDX-License-Identifier: MIT
21
4
 
22
5
  $stdout.sync = true
23
6
 
7
+ require 'backtrace'
24
8
  require 'shellwords'
25
9
  require 'English'
26
10
  require 'find'
@@ -76,8 +60,7 @@ begin
76
60
 
77
61
  if opts.help?
78
62
  puts opts
79
- puts "This is our README to learn more: \
80
- https://github.com/cqfn/pdd/blob/master/README.md"
63
+ puts "This is our README to learn more: https://github.com/cqfn/pdd/blob/master/README.md"
81
64
  exit
82
65
  end
83
66
 
@@ -132,7 +115,7 @@ https://github.com/cqfn/pdd/blob/master/README.md"
132
115
  File.write(
133
116
  f,
134
117
  File.readlines(f).reject.each_with_index do |_t, i|
135
- all.any? { |pair| i + 1 >= pair[0] && i + 1 <= pair[1] }
118
+ all.any? { |pair| (i + 1).between?(pair[0], pair[1]) }
136
119
  end.join
137
120
  )
138
121
  PDD.log.info "#{all.count} puzzles removed from #{src}"
@@ -153,6 +136,7 @@ more documentation: https://github.com/cqfn/pdd/blob/master/README.md."
153
136
  exit(1)
154
137
  rescue StandardError => e
155
138
  PDD.log.error "#{Rainbow('ERROR').red} (#{e.class.name}): #{e.message}"
139
+ PDD.log.error Backtrace.new(e).to_s
156
140
  PDD.log.info 'Exit code is 255'
157
141
  exit(255)
158
142
  end
data/cucumber.yml CHANGED
@@ -1,3 +1,6 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
3
+ ---
1
4
  default: --format pretty
2
5
  travis: --format progress
3
6
  html_report: --format progress --format html --out=features_report.html
@@ -1,3 +1,5 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
1
3
  Feature: Applies Post-Parsing Rules
2
4
  As a source code writer I want to be sure that
3
5
  certain post-parsing rules are applied
@@ -1,3 +1,5 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
1
3
  Feature: Avoiding Duplicate Puzzles
2
4
  As a source code writer I want to be sure that
3
5
  XML output doesn't contain any duplicates
@@ -1,3 +1,5 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
1
3
  Feature: Catches Broken Puzzles
2
4
  As a source code writer I want to be sure that
3
5
  broken puzzles won't be processed and will
data/features/cli.feature CHANGED
@@ -1,3 +1,5 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
1
3
  Feature: Command Line Processing
2
4
  As a source code writer I want to be able to
3
5
  call PDD as a command line tool
@@ -1,3 +1,5 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
1
3
  Feature: Gem Package
2
4
  As a source code writer I want to be able to
3
5
  package the Gem into .gem file
@@ -1,3 +1,5 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
1
3
  Feature: HTML output
2
4
  As a source code writer I want to be able to
3
5
  call PDD as a command line tool, and retrieve an
@@ -1,3 +1,5 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
1
3
  Feature: JSON output
2
4
  As a source code writer I want to be able to
3
5
  call PDD as a command line tool, and retrieve an
@@ -1,3 +1,5 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
1
3
  Feature: Parsing
2
4
  As a source code writer I want to be able to
3
5
  collect all puzzles from all my text files and
@@ -1,3 +1,5 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
1
3
  Feature: Rake Task
2
4
  As a source code writer I want to be able to
3
5
  run PDD from Rakefile
@@ -17,5 +19,3 @@ Feature: Rake Task
17
19
 
18
20
  When I run bash with "rake pdd"
19
21
  Then Exit code is zero
20
-
21
-
@@ -1,3 +1,5 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
1
3
  Feature: Removing Puzzles
2
4
  As a source code writer I want to be able to
3
5
  remove PDD puzzles from source code
@@ -13,3 +15,4 @@ Feature: Removing Puzzles
13
15
  When I run bin/pdd with "-v --remove -f /dev/null"
14
16
  Then Exit code is zero
15
17
  And Stdout contains "1 puzzles removed from a/test.txt"
18
+ And Text File "a/test.txt" contains "Hello"
@@ -1,22 +1,5 @@
1
- # Copyright (c) 2014-2024 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.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
 
21
4
  require 'nokogiri'
22
5
  require 'tmpdir'
@@ -1,22 +1,5 @@
1
- # Copyright (c) 2014-2024 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.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
 
21
4
  require 'simplecov'
22
5
  require_relative '../../lib/pdd'
@@ -1,3 +1,5 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
1
3
  Feature: Unicode
2
4
  As a source code writer I want to be able to
3
5
  work with Unicode files
@@ -1,3 +1,5 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
1
3
  Feature: Using .pdd config file
2
4
  As a source code writer I want to be able to
3
5
  call PDD as a command line tool and configure
@@ -18,4 +20,3 @@ Feature: Using .pdd config file
18
20
  Then Exit code is zero
19
21
  And Stdout contains "Reading from root dir ."
20
22
  And XML file "out.xml" matches "/puzzles[count(puzzle)=1]"
21
-
data/lib/pdd/puzzle.rb CHANGED
@@ -1,22 +1,5 @@
1
- # Copyright (c) 2014-2024 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.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
 
21
4
  module PDD
22
5
  # Puzzle.
data/lib/pdd/rake_task.rb CHANGED
@@ -1,6 +1,8 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
3
+
1
4
  require 'rake'
2
5
  require 'rake/tasklib'
3
- require 'minitest/autorun'
4
6
  require 'nokogiri'
5
7
  require 'tmpdir'
6
8
  require 'slop'
@@ -1,22 +1,5 @@
1
- # Copyright (c) 2014-2024 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.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
 
21
4
  module PDD
22
5
  module Rule
@@ -1,22 +1,5 @@
1
- # Copyright (c) 2014-2024 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.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
 
21
4
  module PDD
22
5
  module Rule
@@ -1,22 +1,5 @@
1
- # Copyright (c) 2014-2024 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.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
 
21
4
  module PDD
22
5
  module Rule
data/lib/pdd/rule/text.rb CHANGED
@@ -1,22 +1,5 @@
1
- # Copyright (c) 2014-2024 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.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
 
21
4
  module PDD
22
5
  module Rule
data/lib/pdd/source.rb CHANGED
@@ -1,22 +1,5 @@
1
- # Copyright (c) 2014-2024 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.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
 
21
4
  require 'digest/md5'
22
5
  require 'net/http'
data/lib/pdd/sources.rb CHANGED
@@ -1,22 +1,5 @@
1
- # Copyright (c) 2014-2024 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.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
 
21
4
  require 'rainbow'
22
5
  require 'English'
data/lib/pdd/version.rb CHANGED
@@ -1,27 +1,10 @@
1
- # Copyright (c) 2014-2024 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.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2014-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
 
21
4
  # PDD main module.
22
5
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
23
- # Copyright:: Copyright (c) 2014-2024 Yegor Bugayenko
6
+ # Copyright:: Copyright (c) 2014-2026 Yegor Bugayenko
24
7
  # License:: MIT
25
8
  module PDD
26
- VERSION = '0.24.0'.freeze
9
+ VERSION = '0.24.2'.freeze
27
10
  end