jekyll-chatgpt-translate 0.0.42 → 0.0.43

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22b2e725c02a5de3447605daaad8d41fce5885908f59c8bc86cc676ac8d3a661
4
- data.tar.gz: 5cb8610b0994bab60d9bf23d3aff7888f01f7ff0520e9dddc4e487e99ca94601
3
+ metadata.gz: 282a1bba0105b06241fdc1f97d2b57884da35af5c0f582bc30aade82ce534973
4
+ data.tar.gz: 552423230bc60635277ab13b2d5d4551cbda16f1a08892aea4515a376cfb93ea
5
5
  SHA512:
6
- metadata.gz: f1bf2b84b63f9b82ce5bc28771ab52b3571a5b4d5629fe6e10038c968bad2127407a33e9d7f1d08a7b11c247f4748021695fc569794e3f9966cca3ec30f567cf
7
- data.tar.gz: b6385f234df97f3e6f5ea37e555667a59b68db7c4f7ec82ee26bd6e27a4e7cc3df759b7243f50fdcee424a7ecff785a989898ce0c050596a2c616a36f9d3ef55
6
+ metadata.gz: f82ad30f07e2a226211bd0e433883b1580f16ce2f8ddfd3bb871e40a85c27e0b8e5ec5017e5832ee262b232175e6447e002ebda58318352b5bb21310bcc27919
7
+ data.tar.gz: 691c9dc95ad30131b71325f2380b4d867fb9a510df961de7bba6ba5965c56be401d28e2460727dc6a8e6c3609b048b31d33956c14e8b3fc468bac4287a2d4496
data/.rultor.yml CHANGED
@@ -6,6 +6,7 @@ install: |
6
6
  pdd -f /dev/null
7
7
  bundle install --no-color
8
8
  release:
9
+ pre: false
9
10
  script: |-
10
11
  bundle exec rake
11
12
  rm -rf *.gem
data/Gemfile CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # (The MIT License)
4
4
  #
5
- # Copyright (c) 2023 Yegor Bugayenko
5
+ # Copyright (c) 2023-2024 Yegor Bugayenko
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the 'Software'), to deal
@@ -27,9 +27,9 @@ gemspec
27
27
 
28
28
  gem 'cucumber', '9.1.0', require: false
29
29
  gem 'kramdown-parser-gfm', '1.1.0', require: false
30
- gem 'minitest', '5.20.0', require: false
30
+ gem 'minitest', '5.21.1', require: false
31
31
  gem 'rake', '13.1.0', require: false
32
- gem 'rubocop', '1.57.2', require: false
33
- gem 'rubocop-rspec', '2.25.0', require: false
32
+ gem 'rubocop', '1.59.0', require: false
33
+ gem 'rubocop-rspec', '2.26.1', require: false
34
34
  gem 'simplecov', '0.22.0', require: false
35
35
  gem 'webmock', '3.19.1', require: false
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2023 Yegor Bugayenko
3
+ Copyright (c) 2023-2024 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/README.md CHANGED
@@ -36,13 +36,16 @@ chatgpt-translate:
36
36
  permalink: :year-:month-:day-:title-french.html
37
37
  ```
38
38
 
39
- Here, the source language is English (`en`), the target one is Chinese (`zh`),
40
- the layout is `_layout/translated.html` (you must have this file).
39
+ Here, the source language is English (`en`), the targets are Chinese (`zh`) and French (`fr`),
40
+ where the layout for Chinese is `_layout/chinese-translated.html` and for
41
+ French is `_layout/translated.html` (you must have these files).
41
42
 
42
- OpenAI API KEY must be set in `OPENAI_API_KEY` environment variable, otherwise
43
+ OpenAI API KEY must be set in the `OPENAI_API_KEY` environment variable, otherwise
43
44
  the plugin will not do any translation and won't generate translated pages.
44
45
  You can get your key [here](https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key).
45
46
 
47
+ OpenAI API BASE (optional) — the base URL for the OpenAI API. Can be customized in "OPENAI_API_BASE" environment variable. If this variable is not set, the default value is "https://api.openai.com/".
48
+
46
49
  Inside the original page you can use `{{ page.chatgpt-translate.urls[XX] }}` in order to render the URL
47
50
  of the translated page, where `XX` is the [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
48
51
  code of the target language.
data/Rakefile CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # (The MIT License)
4
4
  #
5
- # Copyright (c) 2023 Yegor Bugayenko
5
+ # Copyright (c) 2023-2024 Yegor Bugayenko
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the 'Software'), to deal
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2023 Yegor Bugayenko
3
+ # Copyright (c) 2023-2024 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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2023 Yegor Bugayenko
3
+ # Copyright (c) 2023-2024 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
@@ -2,7 +2,7 @@
2
2
 
3
3
  # (The MIT License)
4
4
  #
5
- # Copyright (c) 2023 Yegor Bugayenko
5
+ # Copyright (c) 2023-2024 Yegor Bugayenko
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the 'Software'), to deal
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
28
28
  s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
29
29
  s.required_ruby_version = '>= 3.0'
30
30
  s.name = 'jekyll-chatgpt-translate'
31
- s.version = '0.0.42'
31
+ s.version = '0.0.43'
32
32
  s.license = 'MIT'
33
33
  s.summary = 'Translate Jekyll Pages Through ChatGPT'
34
34
  s.description = [
@@ -2,7 +2,7 @@
2
2
 
3
3
  # (The MIT License)
4
4
  #
5
- # Copyright (c) 2023 Yegor Bugayenko
5
+ # Copyright (c) 2023-2024 Yegor Bugayenko
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the 'Software'), to deal
@@ -35,7 +35,7 @@ module GptTranslate; end
35
35
 
36
36
  # Abstraction of ChatGPT.
37
37
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
38
- # Copyright:: Copyright (c) 2023 Yegor Bugayenko
38
+ # Copyright:: Copyright (c) 2023-2024 Yegor Bugayenko
39
39
  # License:: MIT
40
40
  class GptTranslate::ChatGPT
41
41
  # Is TRUE if we already shown to the user the available models.
@@ -45,7 +45,7 @@ class GptTranslate::ChatGPT
45
45
  # +key+ OpenAI API Key, which can't be nil, but can be empty string, which means dry mode (no calls to OpenAI)
46
46
  # +source+ The language to translate from
47
47
  # +target+ The language to translate into
48
- def initialize(key, model, source, target, client: OpenAI::Client.new(access_token: key))
48
+ def initialize(key, model, source, target, client: OpenAI::Client.new(access_token: key, uri_base: api_base_url))
49
49
  raise 'OpenAI key cannot be nil' if key.nil?
50
50
  @key = key
51
51
  @model = model
@@ -54,6 +54,18 @@ class GptTranslate::ChatGPT
54
54
  @client = client
55
55
  end
56
56
 
57
+ def api_base_url
58
+ url = ENV.fetch('OPENAI_API_BASE', 'https://api.openai.com/')
59
+ Jekyll.logger.info("Current OpenAI API Base URL: #{url.inspect}")
60
+
61
+ warning_msg = 'Warning: You\'re using a custom endpoint for the OpenAI API. ' \
62
+ 'The provider of this endpoint may have access to all details ' \
63
+ 'of your requests. Only use a custom endpoint if you trust the provider.'
64
+ Jekyll.logger.warn(warning_msg) if url != 'https://api.openai.com/'
65
+
66
+ url
67
+ end
68
+
57
69
  def translate(markdown, min: 32, window_length: 2000)
58
70
  pars = GptTranslate::Pars.new(markdown).to_a
59
71
  ready = []
@@ -62,7 +74,7 @@ class GptTranslate::ChatGPT
62
74
  par = pa.dup
63
75
  par.strip!
64
76
  if @source == @target
65
- Jekyll.logger.debug("No need to translate from #{@source.inspect} to #{@target.inspect}: #{par.inspect}")
77
+ Jekyll.logger.debug("No need to translate from #{@source.inspect} to itself: #{par.inspect}")
66
78
  ready[i] = par
67
79
  elsif par.length < min
68
80
  Jekyll.logger.debug("Not translating this, b/c too short: #{par.inspect}")
@@ -2,7 +2,7 @@
2
2
 
3
3
  # (The MIT License)
4
4
  #
5
- # Copyright (c) 2023 Yegor Bugayenko
5
+ # Copyright (c) 2023-2024 Yegor Bugayenko
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the 'Software'), to deal
@@ -36,7 +36,7 @@ module GptTranslate; end
36
36
 
37
37
  # Pages generator.
38
38
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
39
- # Copyright:: Copyright (c) 2023 Yegor Bugayenko
39
+ # Copyright:: Copyright (c) 2023-2024 Yegor Bugayenko
40
40
  # License:: MIT
41
41
  class GptTranslate::Generator < Jekyll::Generator
42
42
  safe true
@@ -2,7 +2,7 @@
2
2
 
3
3
  # (The MIT License)
4
4
  #
5
- # Copyright (c) 2023 Yegor Bugayenko
5
+ # Copyright (c) 2023-2024 Yegor Bugayenko
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the 'Software'), to deal
@@ -27,7 +27,7 @@ module GptTranslate; end
27
27
 
28
28
  # Markdown broken down ito pars.
29
29
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
30
- # Copyright:: Copyright (c) 2023 Yegor Bugayenko
30
+ # Copyright:: Copyright (c) 2023-2024 Yegor Bugayenko
31
31
  # License:: MIT
32
32
  class GptTranslate::Pars
33
33
  # Ctor.
@@ -2,7 +2,7 @@
2
2
 
3
3
  # (The MIT License)
4
4
  #
5
- # Copyright (c) 2023 Yegor Bugayenko
5
+ # Copyright (c) 2023-2024 Yegor Bugayenko
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the 'Software'), to deal
@@ -29,7 +29,7 @@ module GptTranslate; end
29
29
 
30
30
  # Permalink.
31
31
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
32
- # Copyright:: Copyright (c) 2023 Yegor Bugayenko
32
+ # Copyright:: Copyright (c) 2023-2024 Yegor Bugayenko
33
33
  # License:: MIT
34
34
  class GptTranslate::Permalink
35
35
  def initialize(doc, template)
@@ -2,7 +2,7 @@
2
2
 
3
3
  # (The MIT License)
4
4
  #
5
- # Copyright (c) 2023 Yegor Bugayenko
5
+ # Copyright (c) 2023-2024 Yegor Bugayenko
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the 'Software'), to deal
@@ -36,7 +36,7 @@ module GptTranslate; end
36
36
 
37
37
  # Ping one page of a site.
38
38
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
39
- # Copyright:: Copyright (c) 2023 Yegor Bugayenko
39
+ # Copyright:: Copyright (c) 2023-2024 Yegor Bugayenko
40
40
  # License:: MIT
41
41
  class GptTranslate::Ping
42
42
  # Ctor.
@@ -2,7 +2,7 @@
2
2
 
3
3
  # (The MIT License)
4
4
  #
5
- # Copyright (c) 2023 Yegor Bugayenko
5
+ # Copyright (c) 2023-2024 Yegor Bugayenko
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the 'Software'), to deal
@@ -29,7 +29,7 @@ module GptTranslate; end
29
29
 
30
30
  # Markdown to plain text.
31
31
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
32
- # Copyright:: Copyright (c) 2023 Yegor Bugayenko
32
+ # Copyright:: Copyright (c) 2023-2024 Yegor Bugayenko
33
33
  # License:: MIT
34
34
  class GptTranslate::Plain
35
35
  # Ctor.
@@ -2,7 +2,7 @@
2
2
 
3
3
  # (The MIT License)
4
4
  #
5
- # Copyright (c) 2023 Yegor Bugayenko
5
+ # Copyright (c) 2023-2024 Yegor Bugayenko
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the 'Software'), to deal
@@ -30,7 +30,7 @@ module GptTranslate; end
30
30
 
31
31
  # Prompt for ChatGPT.
32
32
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
33
- # Copyright:: Copyright (c) 2023 Yegor Bugayenko
33
+ # Copyright:: Copyright (c) 2023-2024 Yegor Bugayenko
34
34
  # License:: MIT
35
35
  class GptTranslate::Prompt
36
36
  # Ctor.
@@ -2,7 +2,7 @@
2
2
 
3
3
  # (The MIT License)
4
4
  #
5
- # Copyright (c) 2023 Yegor Bugayenko
5
+ # Copyright (c) 2023-2024 Yegor Bugayenko
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the 'Software'), to deal
@@ -23,5 +23,5 @@
23
23
  # SOFTWARE.
24
24
 
25
25
  module GptTranslate
26
- VERSION = '0.0.42'
26
+ VERSION = '0.0.43'
27
27
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  # (The MIT License)
4
4
  #
5
- # Copyright (c) 2023 Yegor Bugayenko
5
+ # Copyright (c) 2023-2024 Yegor Bugayenko
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the 'Software'), to deal
data/test/test__helper.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2023 Yegor Bugayenko
3
+ # Copyright (c) 2023-2024 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
@@ -33,7 +33,7 @@ module GptTranslate; end
33
33
 
34
34
  # Fake.
35
35
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
36
- # Copyright:: Copyright (c) 2023 Yegor Bugayenko
36
+ # Copyright:: Copyright (c) 2023-2024 Yegor Bugayenko
37
37
  # License:: MIT
38
38
  class GptTranslate::FakeSite
39
39
  attr_reader :config, :pages, :static_files
@@ -81,7 +81,7 @@ end
81
81
 
82
82
  # Fake.
83
83
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
84
- # Copyright:: Copyright (c) 2023 Yegor Bugayenko
84
+ # Copyright:: Copyright (c) 2023-2024 Yegor Bugayenko
85
85
  # License:: MIT
86
86
  class GptTranslate::FakeDocument
87
87
  attr_reader :data
@@ -118,7 +118,7 @@ end
118
118
 
119
119
  # Fake.
120
120
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
121
- # Copyright:: Copyright (c) 2023 Yegor Bugayenko
121
+ # Copyright:: Copyright (c) 2023-2024 Yegor Bugayenko
122
122
  # License:: MIT
123
123
  class GptTranslate::FakePosts
124
124
  attr_reader :config
data/test/test_chatgpt.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # (The MIT License)
4
4
  #
5
- # Copyright (c) 2023 Yegor Bugayenko
5
+ # Copyright (c) 2023-2024 Yegor Bugayenko
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the 'Software'), to deal
@@ -29,11 +29,11 @@ require_relative '../lib/jekyll-chatgpt-translate/chatgpt'
29
29
 
30
30
  # ChatGPT test.
31
31
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
32
- # Copyright:: Copyright (c) 2023 Yegor Bugayenko
32
+ # Copyright:: Copyright (c) 2023-2024 Yegor Bugayenko
33
33
  # License:: MIT
34
34
  class GptTranslate::ChatGPTTest < Minitest::Test
35
35
  def test_short_text
36
- chat = GptTranslate::ChatGPT.new('fake-key', 'foo', 'xx', 'xx')
36
+ chat = GptTranslate::ChatGPT.new('fake-key', 'foo', 'xx', 'zz')
37
37
  assert_equal('Hello, world!', chat.translate('Hello, world!'))
38
38
  end
39
39
 
@@ -56,12 +56,12 @@ class GptTranslate::ChatGPTTest < Minitest::Test
56
56
  end
57
57
 
58
58
  def test_dry_mode
59
- chat = GptTranslate::ChatGPT.new('', 'foo', 'xx', 'xx')
59
+ chat = GptTranslate::ChatGPT.new('', 'foo', 'xx', 'zz')
60
60
  assert_equal(38, chat.translate('This text should not be sent to OpenAI', min: 100).length)
61
61
  end
62
62
 
63
63
  def test_no_translation
64
- chat = GptTranslate::ChatGPT.new('', 'foo', 'xx', 'xx')
64
+ chat = GptTranslate::ChatGPT.new('', 'foo', 'xx', 'zz')
65
65
  chat.translate(
66
66
  "
67
67
  How are you, my friend? This text must be translated through ChatGPT.
@@ -82,12 +82,17 @@ class GptTranslate::ChatGPTTest < Minitest::Test
82
82
  end
83
83
 
84
84
  def test_markup
85
- chat = GptTranslate::ChatGPT.new('fake-key', 'gpt-3.5-turbo', 'xx', 'xx')
86
- assert_equal('<img src="a"/>', chat.translate('<img src="a"/>'))
85
+ chat = GptTranslate::ChatGPT.new('fake-key', 'gpt-3.5-turbo', 'xx', 'zz')
86
+ assert_equal('<img src="a"/>', chat.translate('<img src="a"/>', min: 1))
87
+ end
88
+
89
+ def test_image
90
+ chat = GptTranslate::ChatGPT.new('fake-key', 'gpt-3.5-turbo', 'xx', 'zz')
91
+ assert_equal('![some image](/foo.png)', chat.translate('![some image](/foo.png)', min: 1))
87
92
  end
88
93
 
89
94
  def test_code_block
90
- chat = GptTranslate::ChatGPT.new('fake-key', '', 'xx', 'xx')
95
+ chat = GptTranslate::ChatGPT.new('fake-key', '', 'xx', 'zz')
91
96
  chat.translate("```\ntest\n```", min: 0)
92
97
  end
93
98
 
@@ -127,8 +132,21 @@ class GptTranslate::ChatGPTTest < Minitest::Test
127
132
  private
128
133
 
129
134
  def stub_it!
130
- stub_request(:any, 'https://api.openai.com/v1/chat/completions').to_return(
135
+ url = "#{api_base_url}v1/chat/completions"
136
+ stub_request(:any, url).to_return(
131
137
  body: '{"choices":[{"message":{"content": "done!"}}]}'
132
138
  )
133
139
  end
140
+
141
+ def api_base_url
142
+ url = ENV.fetch('OPENAI_API_BASE', 'https://api.openai.com/')
143
+ Jekyll.logger.info("Current OpenAI API Base URL: #{url.inspect}")
144
+
145
+ warning_msg = 'Warning: You\'re using a custom endpoint for the OpenAI API. ' \
146
+ 'The provider of this endpoint may have access to all details ' \
147
+ 'of your requests. Only use a custom endpoint if you trust the provider.'
148
+ Jekyll.logger.warn(warning_msg) if url != 'https://api.openai.com/'
149
+
150
+ url
151
+ end
134
152
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  # (The MIT License)
4
4
  #
5
- # Copyright (c) 2023 Yegor Bugayenko
5
+ # Copyright (c) 2023-2024 Yegor Bugayenko
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the 'Software'), to deal
@@ -30,7 +30,7 @@ require_relative '../lib/jekyll-chatgpt-translate/generator'
30
30
 
31
31
  # Generator test.
32
32
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
33
- # Copyright:: Copyright (c) 2023 Yegor Bugayenko
33
+ # Copyright:: Copyright (c) 2023-2024 Yegor Bugayenko
34
34
  # License:: MIT
35
35
  class GptTranslate::GeneratorTest < Minitest::Test
36
36
  def test_simple_scenario
data/test/test_pars.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # (The MIT License)
4
4
  #
5
- # Copyright (c) 2023 Yegor Bugayenko
5
+ # Copyright (c) 2023-2024 Yegor Bugayenko
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the 'Software'), to deal
@@ -28,7 +28,7 @@ require_relative '../lib/jekyll-chatgpt-translate/pars'
28
28
 
29
29
  # Test for Pars.
30
30
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
31
- # Copyright:: Copyright (c) 2023 Yegor Bugayenko
31
+ # Copyright:: Copyright (c) 2023-2024 Yegor Bugayenko
32
32
  # License:: MIT
33
33
  class GptTranslate::ParsTest < Minitest::Test
34
34
  def test_simple_cases
@@ -2,7 +2,7 @@
2
2
 
3
3
  # (The MIT License)
4
4
  #
5
- # Copyright (c) 2023 Yegor Bugayenko
5
+ # Copyright (c) 2023-2024 Yegor Bugayenko
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the 'Software'), to deal
@@ -28,7 +28,7 @@ require_relative '../lib/jekyll-chatgpt-translate/permalink'
28
28
 
29
29
  # Permalink test.
30
30
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
31
- # Copyright:: Copyright (c) 2023 Yegor Bugayenko
31
+ # Copyright:: Copyright (c) 2023-2024 Yegor Bugayenko
32
32
  # License:: MIT
33
33
  class GptTranslate::PermalinkTest < Minitest::Test
34
34
  def test_simple_link
data/test/test_ping.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # (The MIT License)
4
4
  #
5
- # Copyright (c) 2023 Yegor Bugayenko
5
+ # Copyright (c) 2023-2024 Yegor Bugayenko
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the 'Software'), to deal
@@ -31,7 +31,7 @@ require_relative '../lib/jekyll-chatgpt-translate/ping'
31
31
 
32
32
  # Ping test.
33
33
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
34
- # Copyright:: Copyright (c) 2023 Yegor Bugayenko
34
+ # Copyright:: Copyright (c) 2023-2024 Yegor Bugayenko
35
35
  # License:: MIT
36
36
  class GptTranslate::PingTest < Minitest::Test
37
37
  def test_when_exists
data/test/test_plain.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # (The MIT License)
4
4
  #
5
- # Copyright (c) 2023 Yegor Bugayenko
5
+ # Copyright (c) 2023-2024 Yegor Bugayenko
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the 'Software'), to deal
@@ -28,7 +28,7 @@ require_relative '../lib/jekyll-chatgpt-translate/plain'
28
28
 
29
29
  # Plain test.
30
30
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
31
- # Copyright:: Copyright (c) 2023 Yegor Bugayenko
31
+ # Copyright:: Copyright (c) 2023-2024 Yegor Bugayenko
32
32
  # License:: MIT
33
33
  class GptTranslate::PlainTest < Minitest::Test
34
34
  def test_simple_map
data/test/test_prompt.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # (The MIT License)
4
4
  #
5
- # Copyright (c) 2023 Yegor Bugayenko
5
+ # Copyright (c) 2023-2024 Yegor Bugayenko
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the 'Software'), to deal
@@ -28,7 +28,7 @@ require_relative '../lib/jekyll-chatgpt-translate/prompt'
28
28
 
29
29
  # Prompt test.
30
30
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
31
- # Copyright:: Copyright (c) 2023 Yegor Bugayenko
31
+ # Copyright:: Copyright (c) 2023-2024 Yegor Bugayenko
32
32
  # License:: MIT
33
33
  class GptTranslate::PromptTest < Minitest::Test
34
34
  def head(source, target)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-chatgpt-translate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.42
4
+ version: 0.0.43
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-17 00:00:00.000000000 Z
11
+ date: 2024-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: humanize