jekyll-chatgpt-translate 0.0.34 → 0.0.35

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: f382405857f236d2b59e129760b41f49efd2815b8ebcffab87bf8d92f89c40a6
4
- data.tar.gz: 65897a2650943260e087213ae42baaee18cf34d6a163d90e7ba5348dd3c46a78
3
+ metadata.gz: 841ab37ebdb5e4049f301883bd5d3c411dbf7719824c52f8fa3f3604aebb0109
4
+ data.tar.gz: e553ef7cdf4564adba5128bf9bb7eea90c59f7724fa72986427a5e31e7bf2bb2
5
5
  SHA512:
6
- metadata.gz: ebbc5c28294a0a69b9a0cf3ee08ee7cf84ff9eb609e8efde9549b02f11e653236deebe371e6506fefa78156a229c8deeaab7f0af13e4caa0f1e108205971ec51
7
- data.tar.gz: 7de6d8bd8e966b3b0a4c322092dbaf0e38620e56d89ff1400f48f7a2199475133f095d18bec467bbe01c8fb12b63f13f982cc86d0376fe458631db22a82c6ecf
6
+ metadata.gz: a9a6c85190c260ba4770691f4810cbe775f6ae3b2aafba67f5f0081fb540e2a86dc817ae65fccb857643e39d446e4c62b2a98dabe8ce43a46df8a6786ac59b1b
7
+ data.tar.gz: dba3c7a5bd214a8f970fa623d7dc46779928ddf334fa10f3ca42cfafb61f9a7fae580cd86ed0f11d55f1a08082e0f04eead95ab098481231940e94216cdacaa0
@@ -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 = '>= 2.6'
30
30
  s.name = 'jekyll-chatgpt-translate'
31
- s.version = '0.0.34'
31
+ s.version = '0.0.35'
32
32
  s.license = 'MIT'
33
33
  s.summary = 'Translate Jekyll Pages Through ChatGPT'
34
34
  s.description = [
@@ -52,7 +52,8 @@ class GptTranslate::ChatGPT
52
52
  end
53
53
 
54
54
  def translate(markdown, min: 32)
55
- GptTranslate::Pars.new(markdown).to_a.map do |par|
55
+ GptTranslate::Pars.new(markdown).to_a.map do |pa|
56
+ par = pa.dup
56
57
  par.strip!
57
58
  if @source == @target
58
59
  Jekyll.logger.debug("No need to translate from #{@source.inspect} to #{@target.inspect}: #{par.inspect}")
@@ -23,5 +23,5 @@
23
23
  # SOFTWARE.
24
24
 
25
25
  module GptTranslate
26
- VERSION = '0.0.34'
26
+ VERSION = '0.0.35'
27
27
  end
data/test/test_pars.rb CHANGED
@@ -37,6 +37,10 @@ class GptTranslate::ParsTest < Minitest::Test
37
37
  assert_equal(2, GptTranslate::Pars.new("\n\n\nHello,\n\n**world**\n!\n\n").to_a.size)
38
38
  end
39
39
 
40
+ def test_returns_unfrozen_strings
41
+ GptTranslate::Pars.new("Hi, world!\n\n```\ntest\n```\n\nBye\n").to_a.map(&:strip!)
42
+ end
43
+
40
44
  def test_understands_code_block
41
45
  pars = GptTranslate::Pars.new("Hello:\n\n```java\na\n\nb\n\nc\n```\n\nz").to_a
42
46
  assert_equal(3, pars.size)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-chatgpt-translate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.34
4
+ version: 0.0.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko