jekyll-chatgpt-translate 0.0.44 → 0.1.0

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 (43) hide show
  1. checksums.yaml +4 -4
  2. data/.0pdd.yml +2 -21
  3. data/.github/workflows/actionlint.yml +25 -0
  4. data/.github/workflows/copyrights.yml +19 -0
  5. data/.github/workflows/markdown-lint.yml +6 -23
  6. data/.github/workflows/pdd.yml +19 -0
  7. data/.github/workflows/rake.yml +9 -26
  8. data/.github/workflows/reuse.yml +19 -0
  9. data/.github/workflows/xcop.yml +19 -0
  10. data/.github/workflows/yamllint.yml +5 -22
  11. data/.gitignore +9 -3
  12. data/.rubocop.yml +11 -22
  13. data/.rultor.yml +4 -22
  14. data/Gemfile +14 -29
  15. data/LICENSE.txt +1 -1
  16. data/LICENSES/MIT.txt +21 -0
  17. data/README.md +10 -6
  18. data/REUSE.toml +35 -0
  19. data/Rakefile +3 -31
  20. data/features/cli.feature +2 -0
  21. data/features/gem_package.feature +2 -0
  22. data/features/step_definitions/steps.rb +2 -19
  23. data/features/support/env.rb +2 -19
  24. data/jekyll-chatgpt-translate.gemspec +11 -30
  25. data/lib/jekyll-chatgpt-translate/chatgpt.rb +5 -24
  26. data/lib/jekyll-chatgpt-translate/generator.rb +8 -23
  27. data/lib/jekyll-chatgpt-translate/pars.rb +3 -22
  28. data/lib/jekyll-chatgpt-translate/permalink.rb +3 -22
  29. data/lib/jekyll-chatgpt-translate/ping.rb +3 -22
  30. data/lib/jekyll-chatgpt-translate/plain.rb +3 -22
  31. data/lib/jekyll-chatgpt-translate/prompt.rb +3 -22
  32. data/lib/jekyll-chatgpt-translate/version.rb +3 -22
  33. data/lib/jekyll-chatgpt-translate.rb +2 -21
  34. data/logo.png +0 -0
  35. data/test/test__helper.rb +30 -24
  36. data/test/test_chatgpt.rb +4 -24
  37. data/test/test_generator.rb +3 -23
  38. data/test/test_pars.rb +3 -23
  39. data/test/test_permalink.rb +3 -23
  40. data/test/test_ping.rb +7 -27
  41. data/test/test_plain.rb +4 -24
  42. data/test/test_prompt.rb +5 -25
  43. metadata +9 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac33cf289fbc970376efe2e1b6af0693db8a2c8875d059dec1d228c89baee96b
4
- data.tar.gz: 3baa2cb4e88e93f3fe26cfb253b7ca939269d351930ba56f10c10aa6f5766c67
3
+ metadata.gz: 1af86cfed83e4dc57c410b6cab0826e2025b9ad3dee77ef6aa6469322ee9c09a
4
+ data.tar.gz: 2d8c75e9d8c4a4951dd2804e729cee5f64758772849953f05d1a0e83ff487e51
5
5
  SHA512:
6
- metadata.gz: 629df2b5bbdaf7f51a562d5e941c93e9a18d07dbd868694010076c8657896e7827123b71478d60d903b645dc722e81bd274478de80b68b87bbfe78316cea69ea
7
- data.tar.gz: a8099c472aeb3e73f71b94a8221f2bbd549571f1d9414e8b9d787b66823f3d1db9b5411a1a7047376684925c457110e62b1578af463857c3b95d7ab02271ec2d
6
+ metadata.gz: c0bb602c3b3c6d3132f0b6261996f295dad4acec631ccd89c4a19f69115a1639ae9944ce19bd2f257265cdd301786da74bb57c25f5fdcb62c13383108c750ebd
7
+ data.tar.gz: 28ccf65532f29f122c162033623b6bd56be44e9f44e3f088220bcb0f65603de5af1a7701955a309cf12622d23de492ff3381676d172212e26329dae64bf87c9c
data/.0pdd.yml CHANGED
@@ -1,24 +1,5 @@
1
- # (The MIT License)
2
- #
3
- # Copyright (c) 2023-2024 Yegor Bugayenko
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the 'Software'), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in all
13
- # copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2023-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
22
3
  ---
23
4
  errors:
24
5
  - yegor256@gmail.com
@@ -0,0 +1,25 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2023-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
@@ -0,0 +1,19 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2023-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,25 +1,7 @@
1
- # The MIT License (MIT)
2
- #
3
- # Copyright (c) 2023-2024 Yegor Bugayenko
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included
13
- # in all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2023-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
22
3
  ---
4
+ # yamllint disable rule:line-length
23
5
  name: markdown-lint
24
6
  'on':
25
7
  push:
@@ -34,7 +16,8 @@ concurrency:
34
16
  cancel-in-progress: true
35
17
  jobs:
36
18
  markdown-lint:
37
- runs-on: ubuntu-22.04
19
+ timeout-minutes: 15
20
+ runs-on: ubuntu-24.04
38
21
  steps:
39
- - uses: actions/checkout@cd7d8d697e10461458bc61a30d094dc601a8b017
22
+ - uses: actions/checkout@v4
40
23
  - uses: articulate/actions-markdownlint@v1
@@ -0,0 +1,19 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2023-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
@@ -1,27 +1,9 @@
1
- # (The MIT License)
2
- #
3
- # Copyright (c) 2023-2024 Yegor Bugayenko
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the 'Software'), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in all
13
- # copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2023-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
22
3
  ---
4
+ # yamllint disable rule:line-length
23
5
  name: rake
24
- on:
6
+ 'on':
25
7
  push:
26
8
  branches:
27
9
  - master
@@ -30,16 +12,17 @@ on:
30
12
  - master
31
13
  jobs:
32
14
  test:
33
- name: test
34
15
  strategy:
35
16
  matrix:
36
- os: [ubuntu-20.04, macos-12, windows-2022]
37
- ruby: [3.1]
17
+ os: [ubuntu-24.04, macos-15, windows-2022]
18
+ ruby: [3.3]
38
19
  runs-on: ${{ matrix.os }}
39
20
  steps:
40
21
  - uses: actions/checkout@v4
41
22
  - uses: ruby/setup-ruby@v1
42
23
  with:
43
24
  ruby-version: ${{ matrix.ruby }}
44
- - run: bundle update
25
+ bundler-cache: true
26
+ - run: bundle config set --global path "$(pwd)/vendor/bundle"
27
+ - run: bundle install --no-color
45
28
  - run: bundle exec rake
@@ -0,0 +1,19 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2023-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
@@ -0,0 +1,19 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2023-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,25 +1,7 @@
1
- # The MIT License (MIT)
2
- #
3
- # Copyright (c) 2023-2024 Yegor Bugayenko
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included
13
- # in all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2023-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
22
3
  ---
4
+ # yamllint disable rule:line-length
23
5
  name: yamllint
24
6
  'on':
25
7
  push:
@@ -30,7 +12,8 @@ name: yamllint
30
12
  - master
31
13
  jobs:
32
14
  yamllint:
33
- runs-on: ubuntu-22.04
15
+ timeout-minutes: 15
16
+ runs-on: ubuntu-24.04
34
17
  steps:
35
18
  - uses: actions/checkout@v4
36
19
  - uses: ibiqlik/action-yamllint@v3
data/.gitignore CHANGED
@@ -1,6 +1,12 @@
1
- Gemfile.lock
2
1
  *.gem
3
- .bundle/
4
2
  .DS_Store
3
+ .bundle/
4
+ .idea/
5
+ .yardoc/
6
+ Gemfile.lock
7
+ _chatgpt-translate/
5
8
  coverage/
6
- _chatgpt-translate/
9
+ doc/
10
+ node_modules/
11
+ rdoc/
12
+ vendor/
data/.rubocop.yml CHANGED
@@ -1,44 +1,33 @@
1
- # (The MIT License)
2
- #
3
- # Copyright (c) 2023-2024 Yegor Bugayenko
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the 'Software'), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in all
13
- # copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2023-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
22
3
  ---
23
4
  AllCops:
24
5
  Exclude:
25
6
  - 'bin/**/*'
26
7
  - 'assets/**/*'
8
+ - 'vendor/**/*'
27
9
  DisplayCopNames: true
28
10
  TargetRubyVersion: 2.7
29
11
  SuggestExtensions: false
30
12
  NewCops: enable
31
-
13
+ plugins:
14
+ - rubocop-rake
15
+ - rubocop-minitest
16
+ - rubocop-performance
32
17
  Gemspec/RequiredRubyVersion:
33
18
  Enabled: false
34
19
  Metrics/MethodLength:
35
20
  Enabled: false
36
21
  Style/ClassAndModuleChildren:
37
22
  Enabled: false
23
+ Minitest/EmptyLineBeforeAssertionMethods:
24
+ Enabled: false
38
25
  Layout/MultilineMethodCallIndentation:
39
26
  Enabled: false
40
27
  Metrics/AbcSize:
41
28
  Enabled: false
29
+ Minitest/MultipleAssertions:
30
+ Max: 5
42
31
  Metrics/BlockLength:
43
32
  Max: 100
44
33
  Metrics/CyclomaticComplexity:
data/.rultor.yml CHANGED
@@ -1,27 +1,9 @@
1
- # (The MIT License)
2
- #
3
- # Copyright (c) 2023-2024 Yegor Bugayenko
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the 'Software'), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in all
13
- # copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2023-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
22
3
  ---
4
+ # yamllint disable rule:line-length
23
5
  docker:
24
- image: yegor256/rultor-image:1.23.1
6
+ image: yegor256/rultor-image:1.24.0
25
7
  assets:
26
8
  rubygems.yml: yegor256/home#assets/rubygems.yml
27
9
  install: |
data/Gemfile CHANGED
@@ -1,35 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # (The MIT License)
4
- #
5
- # Copyright (c) 2023-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) 2023-2025 Yegor Bugayenko
4
+ # SPDX-License-Identifier: MIT
24
5
 
25
6
  source 'https://rubygems.org'
26
7
  gemspec
27
8
 
28
- gem 'cucumber', '9.2.0', require: false
29
- gem 'kramdown-parser-gfm', '1.1.0', require: false
30
- gem 'minitest', '5.22.3', require: false
31
- gem 'rake', '13.2.1', require: false
32
- gem 'rubocop', '1.63.2', require: false
33
- gem 'rubocop-rspec', '2.29.1', require: false
34
- gem 'simplecov', '0.22.0', require: false
35
- gem 'webmock', '3.23.0', require: false
9
+ gem 'cucumber', '~>9.2', require: false
10
+ gem 'kramdown-parser-gfm', '~>1.1', require: false
11
+ gem 'minitest', '~>5.25', require: false
12
+ gem 'minitest-reporters', '~>1.7', require: false
13
+ gem 'rake', '~>13.2', require: false
14
+ gem 'rubocop', '~>1.64', require: false
15
+ gem 'rubocop-minitest', '>0', require: false
16
+ gem 'rubocop-performance', '>0', require: false
17
+ gem 'rubocop-rake', '>0', require: false
18
+ gem 'simplecov', '~>0.22', require: false
19
+ gem 'simplecov-cobertura', '~>2.1', require: false
20
+ gem 'webmock', '~>3.24', require: false
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2023-2024 Yegor Bugayenko
3
+ Copyright (c) 2023-2025 Yegor Bugayenko
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the 'Software'), to deal
data/LICENSES/MIT.txt ADDED
@@ -0,0 +1,21 @@
1
+ (The MIT License)
2
+
3
+ Copyright (c) 2023-2025 Yegor Bugayenko
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the 'Software'), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ![logo](logo.png)
4
4
 
5
5
  [![rake](https://github.com/yegor256/jekyll-chatgpt-translate/actions/workflows/rake.yml/badge.svg)](https://github.com/yegor256/jekyll-chatgpt-translate/actions/workflows/rake.yml)
6
- [![Gem Version](https://badge.fury.io/rb/jekyll-chatgpt-translate.svg)](http://badge.fury.io/rb/jekyll-chatgpt-translate)
6
+ [![Gem Version](https://badge.fury.io/rb/jekyll-chatgpt-translate.svg)](https://badge.fury.io/rb/jekyll-chatgpt-translate)
7
7
 
8
8
  If you have a [Jekyll](https://jekyllrb.com/) static site,
9
9
  this plugin may help you automatically
@@ -12,7 +12,7 @@ translate its pages to another language, through
12
12
  works for [my blog](https://github.com/yegor256/ru.yegor256.com),
13
13
  for example [this page](https://ru.yegor256.com/2023-08-13-dictators.html)
14
14
  is translated to
15
- [English](https://ru.yegor256.com/english/2023-08-13-dictators.html).
15
+ [English](https://www.yegor256.com/en/2023/08/13/dictators.html).
16
16
 
17
17
  Install it first (you need
18
18
  [Ruby 3+](https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/)
@@ -32,12 +32,12 @@ chatgpt-translate:
32
32
  model: gpt-3.5-turbo
33
33
  source: en
34
34
  layout: translated
35
- targets:
36
- -
35
+ targets:
36
+ -
37
37
  language: zh
38
38
  permalink: :year-:month-:day-:slug-chinese.html
39
39
  layout: chinese-translated
40
- -
40
+ -
41
41
  only: ru-post
42
42
  language: fr
43
43
  permalink: :year-:month-:day-:title-french.html
@@ -78,7 +78,7 @@ and placed into the `_site` directory.
78
78
  Full list of options available to specify in `_config.yml`:
79
79
 
80
80
  * `api_key_file` (optional) — the file with OpenAI API key.
81
- If this option is not specified,
81
+ If this option is not specified,
82
82
  it is expected to have the key in the `OPENAI_API_KEY` environment variable.
83
83
 
84
84
  * `api_key` (optional) — the OpenAI API key itself. This is a very bad idea to
@@ -120,6 +120,10 @@ If this option is not specified,
120
120
  * `language` (mandatory) —
121
121
  [ISO-639-1][iso-639] code of the target language
122
122
 
123
+ * `source` (optional) —
124
+ [ISO-639-1][iso-639] code of the source language (overwrites the
125
+ value of the `source` defined above)
126
+
123
127
  * `permalink` (mandatory) — template to use for newly generated pages
124
128
 
125
129
  * `layout` (optional) — the name of the file in the `_layouts` directory
data/REUSE.toml ADDED
@@ -0,0 +1,35 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
3
+
4
+ version = 1
5
+ [[annotations]]
6
+ path = [
7
+ "**.json",
8
+ "**.md",
9
+ "**.png",
10
+ "**.txt",
11
+ "**/*.csv",
12
+ "**/*.jpg",
13
+ "**/*.json",
14
+ "**/*.md",
15
+ "**/*.pdf",
16
+ "**/*.png",
17
+ "**/*.svg",
18
+ "**/*.txt",
19
+ "**/*.vm",
20
+ "**/.DS_Store",
21
+ "**/.gitignore",
22
+ "**/.pdd",
23
+ "**/CNAME",
24
+ "**/Gemfile.lock",
25
+ ".DS_Store",
26
+ ".gitattributes",
27
+ ".gitignore",
28
+ ".pdd",
29
+ "Gemfile.lock",
30
+ "README.md",
31
+ "renovate.json",
32
+ ]
33
+ precedence = "override"
34
+ SPDX-FileCopyrightText = "Copyright (c) 2025 Yegor Bugayenko"
35
+ SPDX-License-Identifier = "MIT"
data/Rakefile CHANGED
@@ -1,26 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # (The MIT License)
4
- #
5
- # Copyright (c) 2023-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) 2023-2025 Yegor Bugayenko
4
+ # SPDX-License-Identifier: MIT
24
5
 
25
6
  require 'rubygems'
26
7
  require 'rake'
@@ -34,7 +15,7 @@ def version
34
15
  end
35
16
 
36
17
  require 'rake/clean'
37
- task default: %i[clean test features rubocop copyright]
18
+ task default: %i[clean test features rubocop]
38
19
 
39
20
  require 'rake/testtask'
40
21
  desc 'Run all unit tests'
@@ -60,7 +41,6 @@ require 'rubocop/rake_task'
60
41
  desc 'Run RuboCop on all directories'
61
42
  RuboCop::RakeTask.new(:rubocop) do |task|
62
43
  task.fail_on_error = true
63
- task.requires << 'rubocop-rspec'
64
44
  end
65
45
 
66
46
  require 'cucumber/rake/task'
@@ -70,11 +50,3 @@ end
70
50
  Cucumber::Rake::Task.new(:'features:html') do |t|
71
51
  t.profile = 'html_report'
72
52
  end
73
-
74
- task :copyright do
75
- sh "grep -q -r '#{Date.today.strftime('%Y')}' \
76
- --include '*.rb' \
77
- --include '*.txt' \
78
- --include 'Rakefile' \
79
- ."
80
- end
data/features/cli.feature CHANGED
@@ -1,3 +1,5 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2023-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
1
3
  Feature: Simple site building
2
4
  I want to be able to build a site
3
5
 
@@ -1,3 +1,5 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2023-2025 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,24 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2023-2024 Yegor Bugayenko
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the 'Software'), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in all
13
- # copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
3
+ # SPDX-FileCopyrightText: Copyright (c) 2023-2025 Yegor Bugayenko
4
+ # SPDX-License-Identifier: MIT
22
5
 
23
6
  require 'tmpdir'
24
7
  require 'English'