deepl-rb 3.6.0 → 3.7.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.
- checksums.yaml +4 -4
- data/.circleci/config.yml +27 -0
- data/.github/workflows/add_issues_to_kanban.yml +16 -0
- data/.gitlab-ci.yml +177 -0
- data/.rubocop.yml +51 -0
- data/CHANGELOG.md +40 -3
- data/CODE_OF_CONDUCT.md +132 -0
- data/CONTRIBUTING.md +37 -0
- data/Gemfile +24 -0
- data/README.md +153 -22
- data/Rakefile +58 -0
- data/SECURITY.md +58 -0
- data/VERSION +1 -0
- data/deepl-rb.gemspec +167 -0
- data/lib/deepl/api.rb +22 -0
- data/lib/deepl/configuration.rb +59 -0
- data/lib/deepl/constants/base_constant.rb +18 -0
- data/lib/deepl/constants/formality.rb +16 -0
- data/lib/deepl/constants/model_type.rb +14 -0
- data/lib/deepl/constants/split_sentences.rb +14 -0
- data/lib/deepl/constants/tag_handling.rb +13 -0
- data/lib/deepl/constants/tone.rb +20 -0
- data/lib/deepl/constants/writing_style.rb +20 -0
- data/lib/deepl/document_api.rb +121 -0
- data/lib/deepl/exceptions/authorization_failed.rb +14 -0
- data/lib/deepl/exceptions/bad_request.rb +16 -0
- data/lib/deepl/exceptions/document_translation_error.rb +15 -0
- data/lib/deepl/exceptions/error.rb +14 -0
- data/lib/deepl/exceptions/limit_exceeded.rb +18 -0
- data/lib/deepl/exceptions/not_found.rb +16 -0
- data/lib/deepl/exceptions/not_supported.rb +14 -0
- data/lib/deepl/exceptions/quota_exceeded.rb +14 -0
- data/lib/deepl/exceptions/request_entity_too_large.rb +15 -0
- data/lib/deepl/exceptions/request_error.rb +21 -0
- data/lib/deepl/exceptions/server_error.rb +18 -0
- data/lib/deepl/glossary_api.rb +38 -0
- data/lib/deepl/requests/base.rb +212 -0
- data/lib/deepl/requests/document/download.rb +44 -0
- data/lib/deepl/requests/document/get_status.rb +44 -0
- data/lib/deepl/requests/document/upload.rb +75 -0
- data/lib/deepl/requests/glossary/create.rb +59 -0
- data/lib/deepl/requests/glossary/destroy.rb +37 -0
- data/lib/deepl/requests/glossary/entries.rb +37 -0
- data/lib/deepl/requests/glossary/find.rb +38 -0
- data/lib/deepl/requests/glossary/language_pairs.rb +38 -0
- data/lib/deepl/requests/glossary/list.rb +37 -0
- data/lib/deepl/requests/languages.rb +37 -0
- data/lib/deepl/requests/rephrase.rb +55 -0
- data/lib/deepl/requests/style_rule/create.rb +46 -0
- data/lib/deepl/requests/style_rule/create_custom_instruction.rb +45 -0
- data/lib/deepl/requests/style_rule/destroy.rb +39 -0
- data/lib/deepl/requests/style_rule/destroy_custom_instruction.rb +40 -0
- data/lib/deepl/requests/style_rule/find.rb +40 -0
- data/lib/deepl/requests/style_rule/find_custom_instruction.rb +41 -0
- data/lib/deepl/requests/style_rule/list.rb +59 -0
- data/lib/deepl/requests/style_rule/update.rb +42 -0
- data/lib/deepl/requests/style_rule/update_configured_rules.rb +41 -0
- data/lib/deepl/requests/style_rule/update_custom_instruction.rb +47 -0
- data/lib/deepl/requests/translate.rb +106 -0
- data/lib/deepl/requests/translation_memory/list.rb +58 -0
- data/lib/deepl/requests/usage.rb +33 -0
- data/lib/deepl/resources/base.rb +17 -0
- data/lib/deepl/resources/document_handle.rb +57 -0
- data/lib/deepl/resources/document_translation_status.rb +54 -0
- data/lib/deepl/resources/glossary.rb +28 -0
- data/lib/deepl/resources/language.rb +30 -0
- data/lib/deepl/resources/language_pair.rb +23 -0
- data/lib/deepl/resources/style_rule.rb +86 -0
- data/lib/deepl/resources/text.rb +24 -0
- data/lib/deepl/resources/translation_memory.rb +25 -0
- data/lib/deepl/resources/usage.rb +27 -0
- data/lib/deepl/style_rule_api.rb +61 -0
- data/lib/deepl/translation_memory_api.rb +17 -0
- data/lib/deepl/utils/backoff_timer.rb +46 -0
- data/lib/deepl/utils/exception_builder.rb +34 -0
- data/lib/deepl.rb +175 -0
- data/lib/http_client_options.rb +22 -0
- data/lib/version.rb +8 -0
- data/spec/api/api_spec.rb +20 -0
- data/spec/api/configuration_spec.rb +122 -0
- data/spec/api/deepl_spec.rb +460 -0
- data/spec/constants/constants_spec.rb +158 -0
- data/spec/fixtures/vcr_cassettes/deepl_document.yml +95 -0
- data/spec/fixtures/vcr_cassettes/deepl_document_download.yml +1214 -0
- data/spec/fixtures/vcr_cassettes/deepl_glossaries.yml +1163 -0
- data/spec/fixtures/vcr_cassettes/deepl_languages.yml +54 -0
- data/spec/fixtures/vcr_cassettes/deepl_rephrase.yml +87 -0
- data/spec/fixtures/vcr_cassettes/deepl_translate.yml +358 -0
- data/spec/fixtures/vcr_cassettes/deepl_usage.yml +129 -0
- data/spec/fixtures/vcr_cassettes/glossaries.yml +1702 -0
- data/spec/fixtures/vcr_cassettes/languages.yml +229 -0
- data/spec/fixtures/vcr_cassettes/rephrase_texts.yml +401 -0
- data/spec/fixtures/vcr_cassettes/style_rules.yml +92 -0
- data/spec/fixtures/vcr_cassettes/style_rules_crud.yml +926 -0
- data/spec/fixtures/vcr_cassettes/translate_texts.yml +10630 -0
- data/spec/fixtures/vcr_cassettes/translation_memories.yml +74 -0
- data/spec/fixtures/vcr_cassettes/usage.yml +171 -0
- data/spec/integration_tests/document_api_spec.rb +178 -0
- data/spec/integration_tests/integration_test_utils.rb +170 -0
- data/spec/integration_tests/style_rule_api_spec.rb +135 -0
- data/spec/integration_tests/translation_memory_api_spec.rb +70 -0
- data/spec/requests/extra_body_parameters_types_spec.rb +82 -0
- data/spec/requests/glossary/create_spec.rb +65 -0
- data/spec/requests/glossary/destroy_spec.rb +66 -0
- data/spec/requests/glossary/entries_spec.rb +62 -0
- data/spec/requests/glossary/find_spec.rb +68 -0
- data/spec/requests/glossary/language_pairs_spec.rb +40 -0
- data/spec/requests/glossary/list_spec.rb +54 -0
- data/spec/requests/languages_spec.rb +68 -0
- data/spec/requests/rephrase_spec.rb +172 -0
- data/spec/requests/style_rule/create_custom_instruction_spec.rb +54 -0
- data/spec/requests/style_rule/create_spec.rb +45 -0
- data/spec/requests/style_rule/destroy_custom_instruction_spec.rb +54 -0
- data/spec/requests/style_rule/destroy_spec.rb +54 -0
- data/spec/requests/style_rule/find_custom_instruction_spec.rb +56 -0
- data/spec/requests/style_rule/find_spec.rb +56 -0
- data/spec/requests/style_rule/list_spec.rb +58 -0
- data/spec/requests/style_rule/update_configured_rules_spec.rb +52 -0
- data/spec/requests/style_rule/update_custom_instruction_spec.rb +58 -0
- data/spec/requests/style_rule/update_spec.rb +48 -0
- data/spec/requests/translate_spec.rb +492 -0
- data/spec/requests/translation_memory/list_spec.rb +61 -0
- data/spec/requests/usage_spec.rb +43 -0
- data/spec/resources/glossary_spec.rb +38 -0
- data/spec/resources/language_pair_spec.rb +23 -0
- data/spec/resources/language_spec.rb +45 -0
- data/spec/resources/text_spec.rb +23 -0
- data/spec/resources/translation_memory_spec.rb +35 -0
- data/spec/resources/usage_spec.rb +35 -0
- data/spec/spec_helper.rb +92 -0
- metadata +130 -3
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Copyright 2022 Daniel Herzog
|
|
2
|
+
# Use of this source code is governed by an MIT
|
|
3
|
+
# license that can be found in the LICENSE.md file.
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
require 'spec_helper'
|
|
7
|
+
|
|
8
|
+
describe DeepL::Resources::Glossary do
|
|
9
|
+
subject(:glossary) do
|
|
10
|
+
described_class.new({
|
|
11
|
+
'glossary_id' => 'def3a26b-3e84-45b3-84ae-0c0aaf3525f7',
|
|
12
|
+
'name' => 'Mein Glossar',
|
|
13
|
+
'ready' => true,
|
|
14
|
+
'source_lang' => 'EN',
|
|
15
|
+
'target_lang' => 'DE',
|
|
16
|
+
'creation_time' => '2021-08-03T14:16:18.329Z',
|
|
17
|
+
'entry_count' => 1
|
|
18
|
+
}, nil, nil)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
describe '#initialize' do
|
|
22
|
+
context 'when building a basic object' do
|
|
23
|
+
it 'creates a resource' do
|
|
24
|
+
expect(glossary).to be_a(described_class)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
it 'assigns the attributes' do
|
|
28
|
+
expect(glossary.id).to eq('def3a26b-3e84-45b3-84ae-0c0aaf3525f7')
|
|
29
|
+
expect(glossary.name).to eq('Mein Glossar')
|
|
30
|
+
expect(glossary.ready).to be(true)
|
|
31
|
+
expect(glossary.source_lang).to eq('EN')
|
|
32
|
+
expect(glossary.target_lang).to eq('DE')
|
|
33
|
+
expect(glossary.creation_time).to eq('2021-08-03T14:16:18.329Z')
|
|
34
|
+
expect(glossary.entry_count).to eq(1)
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Copyright 2022 Daniel Herzog
|
|
2
|
+
# Use of this source code is governed by an MIT
|
|
3
|
+
# license that can be found in the LICENSE.md file.
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
require 'spec_helper'
|
|
7
|
+
|
|
8
|
+
describe DeepL::Resources::LanguagePair do
|
|
9
|
+
subject(:language_pair) { described_class.new('en', 'de', nil, nil) }
|
|
10
|
+
|
|
11
|
+
describe '#initialize' do
|
|
12
|
+
context 'when building a basic object' do
|
|
13
|
+
it 'creates a resource' do
|
|
14
|
+
expect(language_pair).to be_a(described_class)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
it 'assigns the attributes' do
|
|
18
|
+
expect(language_pair.source_lang).to eq('en')
|
|
19
|
+
expect(language_pair.target_lang).to eq('de')
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Copyright 2021 Daniel Herzog
|
|
2
|
+
# Use of this source code is governed by an MIT
|
|
3
|
+
# license that can be found in the LICENSE.md file.
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
require 'spec_helper'
|
|
7
|
+
|
|
8
|
+
describe DeepL::Resources::Language do
|
|
9
|
+
subject(:language) { described_class.new('EN', 'English', nil, nil, nil) }
|
|
10
|
+
|
|
11
|
+
describe '#initialize' do
|
|
12
|
+
context 'when building a basic object' do
|
|
13
|
+
it 'creates a resource' do
|
|
14
|
+
expect(language).to be_a(described_class)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
it 'assigns the attributes' do
|
|
18
|
+
expect(language.code).to eq('EN')
|
|
19
|
+
expect(language.name).to eq('English')
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
it 'does not define the supports formality method' do
|
|
23
|
+
expect { language.supports_formality? }.to raise_error(DeepL::Exceptions::NotSupported)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
context 'when building a target language object' do
|
|
28
|
+
subject(:language) { described_class.new('EN', 'English', true, nil, nil) }
|
|
29
|
+
|
|
30
|
+
it 'creates a resource' do
|
|
31
|
+
expect(language).to be_a(described_class)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
it 'assigns the attributes' do
|
|
35
|
+
expect(language.code).to eq('EN')
|
|
36
|
+
expect(language.name).to eq('English')
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
it 'includes the supports formality method' do
|
|
40
|
+
expect { language.supports_formality? }.not_to raise_error
|
|
41
|
+
expect(language).to be_supports_formality
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Copyright 2018 Daniel Herzog
|
|
2
|
+
# Use of this source code is governed by an MIT
|
|
3
|
+
# license that can be found in the LICENSE.md file.
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
require 'spec_helper'
|
|
7
|
+
|
|
8
|
+
describe DeepL::Resources::Text do
|
|
9
|
+
subject(:text) { described_class.new('Target', 'es', nil, nil, nil) }
|
|
10
|
+
|
|
11
|
+
describe '#initialize' do
|
|
12
|
+
context 'when building a basic object' do
|
|
13
|
+
it 'creates a resource' do
|
|
14
|
+
expect(text).to be_a(described_class)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
it 'assigns the attributes' do
|
|
18
|
+
expect(text.text).to eq('Target')
|
|
19
|
+
expect(text.detected_source_language).to eq('es')
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Copyright 2026 DeepL SE (https://www.deepl.com)
|
|
2
|
+
# Use of this source code is governed by an MIT
|
|
3
|
+
# license that can be found in the LICENSE.md file.
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
require 'spec_helper'
|
|
7
|
+
|
|
8
|
+
describe DeepL::Resources::TranslationMemory do
|
|
9
|
+
subject(:translation_memory) do
|
|
10
|
+
described_class.new({
|
|
11
|
+
'translation_memory_id' => 'a74d88fb-ed2a-4943-a664-a4512398b994',
|
|
12
|
+
'name' => 'Legal',
|
|
13
|
+
'source_language' => 'en',
|
|
14
|
+
'target_languages' => %w[es de],
|
|
15
|
+
'segment_count' => 3542
|
|
16
|
+
}, nil, nil)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
describe '#initialize' do
|
|
20
|
+
context 'when building a basic object' do
|
|
21
|
+
it 'creates a resource' do
|
|
22
|
+
expect(translation_memory).to be_a(described_class)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
it 'assigns the attributes' do
|
|
26
|
+
expect(translation_memory.translation_memory_id)
|
|
27
|
+
.to eq('a74d88fb-ed2a-4943-a664-a4512398b994')
|
|
28
|
+
expect(translation_memory.name).to eq('Legal')
|
|
29
|
+
expect(translation_memory.source_language).to eq('en')
|
|
30
|
+
expect(translation_memory.target_languages).to eq(%w[es de])
|
|
31
|
+
expect(translation_memory.segment_count).to eq(3542)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Copyright 2018 Daniel Herzog
|
|
2
|
+
# Use of this source code is governed by an MIT
|
|
3
|
+
# license that can be found in the LICENSE.md file.
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
require 'spec_helper'
|
|
7
|
+
|
|
8
|
+
describe DeepL::Resources::Usage do
|
|
9
|
+
subject(:usage) { described_class.new(3, 5, nil, nil) }
|
|
10
|
+
|
|
11
|
+
describe '#initialize' do
|
|
12
|
+
context 'when building a basic object' do
|
|
13
|
+
it 'creates a resource' do
|
|
14
|
+
expect(usage).to be_a(described_class)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
it 'assigns the attributes' do
|
|
18
|
+
expect(usage.character_count).to eq(3)
|
|
19
|
+
expect(usage.character_limit).to eq(5)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
it 'does not exceed the quota' do
|
|
23
|
+
expect(usage).not_to be_quota_exceeded
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
context 'when building a quota exceeded object' do
|
|
28
|
+
subject(:usage) { described_class.new(5, 5, nil, nil) }
|
|
29
|
+
|
|
30
|
+
it 'exceeds the quota' do
|
|
31
|
+
expect(usage).to be_quota_exceeded
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Copyright 2018 Daniel Herzog
|
|
2
|
+
# Use of this source code is governed by an MIT
|
|
3
|
+
# license that can be found in the LICENSE.md file.
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
# Coverage
|
|
7
|
+
require 'simplecov'
|
|
8
|
+
SimpleCov.start
|
|
9
|
+
|
|
10
|
+
require 'simplecov-cobertura'
|
|
11
|
+
SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
|
|
12
|
+
|
|
13
|
+
# Load lib
|
|
14
|
+
require_relative '../lib/deepl'
|
|
15
|
+
require_relative 'integration_tests/integration_test_utils'
|
|
16
|
+
|
|
17
|
+
# Lib config
|
|
18
|
+
ENV['DEEPL_AUTH_KEY'] ||= 'TEST-TOKEN'
|
|
19
|
+
|
|
20
|
+
# General helpers
|
|
21
|
+
def build_deepl_api
|
|
22
|
+
DeepL::API.new(DeepL::Configuration.new)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
uri_ignoring_deepl_api_subdomain = lambda do |request1, request2|
|
|
26
|
+
deepl_api_regexp = %r{https?://api.*\.deepl\.com/}
|
|
27
|
+
uri1 = request1.uri
|
|
28
|
+
uri2 = request2.uri
|
|
29
|
+
uri1_match = uri1.match(deepl_api_regexp)
|
|
30
|
+
uri2_match = uri2.match(deepl_api_regexp)
|
|
31
|
+
if uri1_match && uri2_match
|
|
32
|
+
uri1_without_deepl_domain = uri1.gsub(uri1_match[0], '')
|
|
33
|
+
uri2_without_deepl_domain = uri2.gsub(uri2_match[0], '')
|
|
34
|
+
uri1_without_deepl_domain == uri2_without_deepl_domain
|
|
35
|
+
else
|
|
36
|
+
uri1 == uri2
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
headers_ignoring_user_agent = lambda do |request1, request2|
|
|
41
|
+
user_agent_key = 'User-Agent'
|
|
42
|
+
# Pass by reference, so we need to use a copy of the headers
|
|
43
|
+
headers1 = request1.headers.dup
|
|
44
|
+
headers2 = request2.headers.dup
|
|
45
|
+
headers1_has_user_agent = headers1.key?(user_agent_key)
|
|
46
|
+
headers2_has_user_agent = headers2.key?(user_agent_key)
|
|
47
|
+
return false if headers1_has_user_agent != headers2_has_user_agent
|
|
48
|
+
|
|
49
|
+
headers1.delete(user_agent_key)
|
|
50
|
+
headers2.delete(user_agent_key)
|
|
51
|
+
headers1 == headers2
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# VCR tapes configuration
|
|
55
|
+
require 'vcr'
|
|
56
|
+
VCR.configure do |config|
|
|
57
|
+
config.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
|
|
58
|
+
config.hook_into :webmock
|
|
59
|
+
config.filter_sensitive_data('VALID_TOKEN') { ENV.fetch('DEEPL_AUTH_KEY', nil) }
|
|
60
|
+
|
|
61
|
+
# to record new or missing VCR cassettes, call rspec like this:
|
|
62
|
+
# $ VCR_RECORD_MODE=new_episodes bundle exec rspec
|
|
63
|
+
|
|
64
|
+
record_mode = ENV['VCR_RECORD_MODE'] ? ENV['VCR_RECORD_MODE'].to_sym : :none
|
|
65
|
+
config.default_cassette_options = {
|
|
66
|
+
record: record_mode,
|
|
67
|
+
match_requests_on: [:method, uri_ignoring_deepl_api_subdomain, :body,
|
|
68
|
+
headers_ignoring_user_agent]
|
|
69
|
+
}
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Test helpers
|
|
73
|
+
|
|
74
|
+
def replace_env_preserving_deepl_vars
|
|
75
|
+
env_auth_key = ENV.fetch('DEEPL_AUTH_KEY', false)
|
|
76
|
+
env_server_url = ENV.fetch('DEEPL_SERVER_URL', false)
|
|
77
|
+
env_mock_server_port = ENV.fetch('DEEPL_MOCK_SERVER_PORT', false)
|
|
78
|
+
tmp_env = ENV.to_hash
|
|
79
|
+
ENV.clear
|
|
80
|
+
ENV['DEEPL_AUTH_KEY'] = (env_auth_key || 'VALID')
|
|
81
|
+
ENV['DEEPL_SERVER_URL'] = (env_server_url || '')
|
|
82
|
+
ENV['DEEPL_MOCK_SERVER_PORT'] = (env_mock_server_port || '')
|
|
83
|
+
tmp_env
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def replace_env_preserving_deepl_vars_except_mock_server
|
|
87
|
+
env_auth_key = ENV.fetch('DEEPL_AUTH_KEY', false)
|
|
88
|
+
tmp_env = ENV.to_hash
|
|
89
|
+
ENV.clear
|
|
90
|
+
ENV['DEEPL_AUTH_KEY'] = (env_auth_key || 'VALID')
|
|
91
|
+
tmp_env
|
|
92
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: deepl-rb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- DeepL SE
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-05-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: juwelier
|
|
@@ -49,10 +49,137 @@ extra_rdoc_files:
|
|
|
49
49
|
- README.md
|
|
50
50
|
- license_checker.sh
|
|
51
51
|
files:
|
|
52
|
+
- ".circleci/config.yml"
|
|
53
|
+
- ".github/workflows/add_issues_to_kanban.yml"
|
|
54
|
+
- ".gitlab-ci.yml"
|
|
55
|
+
- ".rubocop.yml"
|
|
52
56
|
- CHANGELOG.md
|
|
57
|
+
- CODE_OF_CONDUCT.md
|
|
58
|
+
- CONTRIBUTING.md
|
|
59
|
+
- Gemfile
|
|
53
60
|
- LICENSE.md
|
|
54
61
|
- README.md
|
|
62
|
+
- Rakefile
|
|
63
|
+
- SECURITY.md
|
|
64
|
+
- VERSION
|
|
65
|
+
- deepl-rb.gemspec
|
|
66
|
+
- lib/deepl.rb
|
|
67
|
+
- lib/deepl/api.rb
|
|
68
|
+
- lib/deepl/configuration.rb
|
|
69
|
+
- lib/deepl/constants/base_constant.rb
|
|
70
|
+
- lib/deepl/constants/formality.rb
|
|
71
|
+
- lib/deepl/constants/model_type.rb
|
|
72
|
+
- lib/deepl/constants/split_sentences.rb
|
|
73
|
+
- lib/deepl/constants/tag_handling.rb
|
|
74
|
+
- lib/deepl/constants/tone.rb
|
|
75
|
+
- lib/deepl/constants/writing_style.rb
|
|
76
|
+
- lib/deepl/document_api.rb
|
|
77
|
+
- lib/deepl/exceptions/authorization_failed.rb
|
|
78
|
+
- lib/deepl/exceptions/bad_request.rb
|
|
79
|
+
- lib/deepl/exceptions/document_translation_error.rb
|
|
80
|
+
- lib/deepl/exceptions/error.rb
|
|
81
|
+
- lib/deepl/exceptions/limit_exceeded.rb
|
|
82
|
+
- lib/deepl/exceptions/not_found.rb
|
|
83
|
+
- lib/deepl/exceptions/not_supported.rb
|
|
84
|
+
- lib/deepl/exceptions/quota_exceeded.rb
|
|
85
|
+
- lib/deepl/exceptions/request_entity_too_large.rb
|
|
86
|
+
- lib/deepl/exceptions/request_error.rb
|
|
87
|
+
- lib/deepl/exceptions/server_error.rb
|
|
88
|
+
- lib/deepl/glossary_api.rb
|
|
89
|
+
- lib/deepl/requests/base.rb
|
|
90
|
+
- lib/deepl/requests/document/download.rb
|
|
91
|
+
- lib/deepl/requests/document/get_status.rb
|
|
92
|
+
- lib/deepl/requests/document/upload.rb
|
|
93
|
+
- lib/deepl/requests/glossary/create.rb
|
|
94
|
+
- lib/deepl/requests/glossary/destroy.rb
|
|
95
|
+
- lib/deepl/requests/glossary/entries.rb
|
|
96
|
+
- lib/deepl/requests/glossary/find.rb
|
|
97
|
+
- lib/deepl/requests/glossary/language_pairs.rb
|
|
98
|
+
- lib/deepl/requests/glossary/list.rb
|
|
99
|
+
- lib/deepl/requests/languages.rb
|
|
100
|
+
- lib/deepl/requests/rephrase.rb
|
|
101
|
+
- lib/deepl/requests/style_rule/create.rb
|
|
102
|
+
- lib/deepl/requests/style_rule/create_custom_instruction.rb
|
|
103
|
+
- lib/deepl/requests/style_rule/destroy.rb
|
|
104
|
+
- lib/deepl/requests/style_rule/destroy_custom_instruction.rb
|
|
105
|
+
- lib/deepl/requests/style_rule/find.rb
|
|
106
|
+
- lib/deepl/requests/style_rule/find_custom_instruction.rb
|
|
107
|
+
- lib/deepl/requests/style_rule/list.rb
|
|
108
|
+
- lib/deepl/requests/style_rule/update.rb
|
|
109
|
+
- lib/deepl/requests/style_rule/update_configured_rules.rb
|
|
110
|
+
- lib/deepl/requests/style_rule/update_custom_instruction.rb
|
|
111
|
+
- lib/deepl/requests/translate.rb
|
|
112
|
+
- lib/deepl/requests/translation_memory/list.rb
|
|
113
|
+
- lib/deepl/requests/usage.rb
|
|
114
|
+
- lib/deepl/resources/base.rb
|
|
115
|
+
- lib/deepl/resources/document_handle.rb
|
|
116
|
+
- lib/deepl/resources/document_translation_status.rb
|
|
117
|
+
- lib/deepl/resources/glossary.rb
|
|
118
|
+
- lib/deepl/resources/language.rb
|
|
119
|
+
- lib/deepl/resources/language_pair.rb
|
|
120
|
+
- lib/deepl/resources/style_rule.rb
|
|
121
|
+
- lib/deepl/resources/text.rb
|
|
122
|
+
- lib/deepl/resources/translation_memory.rb
|
|
123
|
+
- lib/deepl/resources/usage.rb
|
|
124
|
+
- lib/deepl/style_rule_api.rb
|
|
125
|
+
- lib/deepl/translation_memory_api.rb
|
|
126
|
+
- lib/deepl/utils/backoff_timer.rb
|
|
127
|
+
- lib/deepl/utils/exception_builder.rb
|
|
128
|
+
- lib/http_client_options.rb
|
|
129
|
+
- lib/version.rb
|
|
55
130
|
- license_checker.sh
|
|
131
|
+
- spec/api/api_spec.rb
|
|
132
|
+
- spec/api/configuration_spec.rb
|
|
133
|
+
- spec/api/deepl_spec.rb
|
|
134
|
+
- spec/constants/constants_spec.rb
|
|
135
|
+
- spec/fixtures/vcr_cassettes/deepl_document.yml
|
|
136
|
+
- spec/fixtures/vcr_cassettes/deepl_document_download.yml
|
|
137
|
+
- spec/fixtures/vcr_cassettes/deepl_glossaries.yml
|
|
138
|
+
- spec/fixtures/vcr_cassettes/deepl_languages.yml
|
|
139
|
+
- spec/fixtures/vcr_cassettes/deepl_rephrase.yml
|
|
140
|
+
- spec/fixtures/vcr_cassettes/deepl_translate.yml
|
|
141
|
+
- spec/fixtures/vcr_cassettes/deepl_usage.yml
|
|
142
|
+
- spec/fixtures/vcr_cassettes/glossaries.yml
|
|
143
|
+
- spec/fixtures/vcr_cassettes/languages.yml
|
|
144
|
+
- spec/fixtures/vcr_cassettes/rephrase_texts.yml
|
|
145
|
+
- spec/fixtures/vcr_cassettes/style_rules.yml
|
|
146
|
+
- spec/fixtures/vcr_cassettes/style_rules_crud.yml
|
|
147
|
+
- spec/fixtures/vcr_cassettes/translate_texts.yml
|
|
148
|
+
- spec/fixtures/vcr_cassettes/translation_memories.yml
|
|
149
|
+
- spec/fixtures/vcr_cassettes/usage.yml
|
|
150
|
+
- spec/integration_tests/document_api_spec.rb
|
|
151
|
+
- spec/integration_tests/integration_test_utils.rb
|
|
152
|
+
- spec/integration_tests/style_rule_api_spec.rb
|
|
153
|
+
- spec/integration_tests/translation_memory_api_spec.rb
|
|
154
|
+
- spec/requests/extra_body_parameters_types_spec.rb
|
|
155
|
+
- spec/requests/glossary/create_spec.rb
|
|
156
|
+
- spec/requests/glossary/destroy_spec.rb
|
|
157
|
+
- spec/requests/glossary/entries_spec.rb
|
|
158
|
+
- spec/requests/glossary/find_spec.rb
|
|
159
|
+
- spec/requests/glossary/language_pairs_spec.rb
|
|
160
|
+
- spec/requests/glossary/list_spec.rb
|
|
161
|
+
- spec/requests/languages_spec.rb
|
|
162
|
+
- spec/requests/rephrase_spec.rb
|
|
163
|
+
- spec/requests/style_rule/create_custom_instruction_spec.rb
|
|
164
|
+
- spec/requests/style_rule/create_spec.rb
|
|
165
|
+
- spec/requests/style_rule/destroy_custom_instruction_spec.rb
|
|
166
|
+
- spec/requests/style_rule/destroy_spec.rb
|
|
167
|
+
- spec/requests/style_rule/find_custom_instruction_spec.rb
|
|
168
|
+
- spec/requests/style_rule/find_spec.rb
|
|
169
|
+
- spec/requests/style_rule/list_spec.rb
|
|
170
|
+
- spec/requests/style_rule/update_configured_rules_spec.rb
|
|
171
|
+
- spec/requests/style_rule/update_custom_instruction_spec.rb
|
|
172
|
+
- spec/requests/style_rule/update_spec.rb
|
|
173
|
+
- spec/requests/translate_spec.rb
|
|
174
|
+
- spec/requests/translation_memory/list_spec.rb
|
|
175
|
+
- spec/requests/usage_spec.rb
|
|
176
|
+
- spec/resources/glossary_spec.rb
|
|
177
|
+
- spec/resources/language_pair_spec.rb
|
|
178
|
+
- spec/resources/language_spec.rb
|
|
179
|
+
- spec/resources/text_spec.rb
|
|
180
|
+
- spec/resources/translation_memory_spec.rb
|
|
181
|
+
- spec/resources/usage_spec.rb
|
|
182
|
+
- spec/spec_helper.rb
|
|
56
183
|
homepage: https://github.com/DeepLcom/deepl-rb
|
|
57
184
|
licenses:
|
|
58
185
|
- MIT
|
|
@@ -76,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
76
203
|
- !ruby/object:Gem::Version
|
|
77
204
|
version: '0'
|
|
78
205
|
requirements: []
|
|
79
|
-
rubygems_version: 3.4.
|
|
206
|
+
rubygems_version: 3.4.10
|
|
80
207
|
signing_key:
|
|
81
208
|
specification_version: 4
|
|
82
209
|
summary: Official Ruby library for the DeepL language translation API.
|