deepl-rb 3.7.0 → 3.8.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 (73) hide show
  1. checksums.yaml +4 -4
  2. data/.gitlab-ci.yml +3 -1
  3. data/CHANGELOG.md +17 -1
  4. data/Gemfile +0 -2
  5. data/README.md +12 -12
  6. data/VERSION +1 -1
  7. data/deepl-rb.gemspec +27 -22
  8. data/lib/deepl/requests/rephrase.rb +3 -2
  9. data/lib/deepl/requests/translate.rb +2 -2
  10. data/lib/deepl.rb +7 -4
  11. data/lib/version.rb +1 -1
  12. data/spec/api/deepl_spec.rb +134 -332
  13. data/spec/integration_tests/document_api_spec.rb +4 -18
  14. data/spec/integration_tests/document_error_paths_spec.rb +33 -0
  15. data/spec/integration_tests/glossary_api_spec.rb +114 -0
  16. data/spec/integration_tests/glossary_error_paths_spec.rb +107 -0
  17. data/spec/integration_tests/languages_api_spec.rb +54 -0
  18. data/spec/integration_tests/languages_error_paths_spec.rb +25 -0
  19. data/spec/integration_tests/rephrase_api_spec.rb +90 -0
  20. data/spec/integration_tests/rephrase_error_paths_spec.rb +53 -0
  21. data/spec/integration_tests/smoke_test_spec.rb +24 -0
  22. data/spec/integration_tests/style_rule_api_spec.rb +1 -19
  23. data/spec/integration_tests/style_rule_error_paths_spec.rb +45 -0
  24. data/spec/integration_tests/translate_api_spec.rb +98 -0
  25. data/spec/integration_tests/translate_error_paths_spec.rb +48 -0
  26. data/spec/integration_tests/translation_memory_api_spec.rb +1 -17
  27. data/spec/integration_tests/translation_memory_error_paths_spec.rb +19 -0
  28. data/spec/integration_tests/usage_api_spec.rb +29 -0
  29. data/spec/integration_tests/usage_error_paths_spec.rb +18 -0
  30. data/spec/requests/glossary/create_spec.rb +0 -21
  31. data/spec/requests/glossary/destroy_spec.rb +0 -39
  32. data/spec/requests/glossary/entries_spec.rb +0 -35
  33. data/spec/requests/glossary/find_spec.rb +0 -40
  34. data/spec/requests/glossary/language_pairs_spec.rb +0 -13
  35. data/spec/requests/glossary/list_spec.rb +0 -27
  36. data/spec/requests/languages_spec.rb +0 -41
  37. data/spec/requests/rephrase_spec.rb +13 -139
  38. data/spec/requests/style_rule/create_custom_instruction_spec.rb +0 -24
  39. data/spec/requests/style_rule/create_spec.rb +0 -16
  40. data/spec/requests/style_rule/destroy_custom_instruction_spec.rb +0 -26
  41. data/spec/requests/style_rule/destroy_spec.rb +0 -27
  42. data/spec/requests/style_rule/find_custom_instruction_spec.rb +0 -27
  43. data/spec/requests/style_rule/find_spec.rb +0 -28
  44. data/spec/requests/style_rule/list_spec.rb +0 -31
  45. data/spec/requests/style_rule/update_configured_rules_spec.rb +0 -21
  46. data/spec/requests/style_rule/update_custom_instruction_spec.rb +0 -26
  47. data/spec/requests/style_rule/update_spec.rb +0 -19
  48. data/spec/requests/translate_spec.rb +8 -217
  49. data/spec/requests/translation_memory/list_spec.rb +0 -34
  50. data/spec/requests/usage_spec.rb +0 -16
  51. data/spec/resources/custom_instruction_spec.rb +32 -0
  52. data/spec/resources/style_rule_spec.rb +68 -0
  53. data/spec/spec_helper.rb +15 -45
  54. data/spec/support/live_mock_server.rb +12 -0
  55. data/spec/support/managed_glossary.rb +17 -0
  56. data/spec/support/managed_style_rule.rb +17 -0
  57. data/spec/support/managed_translation_memory.rb +7 -0
  58. metadata +23 -21
  59. data/spec/fixtures/vcr_cassettes/deepl_document.yml +0 -95
  60. data/spec/fixtures/vcr_cassettes/deepl_document_download.yml +0 -1214
  61. data/spec/fixtures/vcr_cassettes/deepl_glossaries.yml +0 -1163
  62. data/spec/fixtures/vcr_cassettes/deepl_languages.yml +0 -54
  63. data/spec/fixtures/vcr_cassettes/deepl_rephrase.yml +0 -87
  64. data/spec/fixtures/vcr_cassettes/deepl_translate.yml +0 -358
  65. data/spec/fixtures/vcr_cassettes/deepl_usage.yml +0 -129
  66. data/spec/fixtures/vcr_cassettes/glossaries.yml +0 -1702
  67. data/spec/fixtures/vcr_cassettes/languages.yml +0 -229
  68. data/spec/fixtures/vcr_cassettes/rephrase_texts.yml +0 -401
  69. data/spec/fixtures/vcr_cassettes/style_rules.yml +0 -92
  70. data/spec/fixtures/vcr_cassettes/style_rules_crud.yml +0 -926
  71. data/spec/fixtures/vcr_cassettes/translate_texts.yml +0 -10630
  72. data/spec/fixtures/vcr_cassettes/translation_memories.yml +0 -74
  73. data/spec/fixtures/vcr_cassettes/usage.yml +0 -171
@@ -1,92 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://api.deepl.com/v3/style_rules
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Authorization:
11
- - DeepL-Auth-Key VALID_TOKEN
12
- User-Agent:
13
- - deepl-ruby/3.0.2 (darwin24) ruby/3.2.2
14
- Content-Type:
15
- - application/json
16
- Accept-Encoding:
17
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
- Accept:
19
- - "*/*"
20
- response:
21
- status:
22
- code: 200
23
- message: OK
24
- headers:
25
- Content-Type:
26
- - application/json; charset=utf-8
27
- Date:
28
- - Tue, 11 Nov 2025 21:41:34 GMT
29
- X-Trace-Id:
30
- - 91581bb49e774db3a0521e222a037333
31
- Access-Control-Expose-Headers:
32
- - Server-Timing, X-Trace-ID
33
- Server-Timing:
34
- - l7_lb_tls;dur=135, l7_lb_idle;dur=0, l7_lb_receive;dur=0, l7_lb_total;dur=880
35
- Strict-Transport-Security:
36
- - max-age=63072000; includeSubDomains; preload
37
- Transfer-Encoding:
38
- - chunked
39
- Vary:
40
- - Accept-Encoding
41
- body:
42
- encoding: ASCII-8BIT
43
- string: '{"style_rules":[{"style_id":"a4dfe768-8f34-41e3-8b22-9b832d39294c","name":"Korean
44
- style rule","creation_time":"2025-11-04T16:59:14.940077Z","updated_time":"2025-11-04T16:59:14.940077Z","language":"ko","version":1},{"style_id":"d9c60f20-3e6a-4d62-bc44-3ce89b981ebe","name":"ZH
45
- Style rule","creation_time":"2025-11-04T03:47:14.03409Z","updated_time":"2025-11-04T03:47:28.75149Z","language":"zh","version":3},{"style_id":"8e694a65-da89-4d30-911d-dcacbe7c962b","name":"Japanese
46
- style rule","creation_time":"2025-11-04T03:46:45.90662Z","updated_time":"2025-11-04T03:46:49.288723Z","language":"ja","version":2},{"style_id":"5874b9c5-e353-4576-886d-0f6af62c9f02","name":"Talk
47
- like a pirate","creation_time":"2025-10-31T12:44:26.679757Z","updated_time":"2025-10-31T12:46:20.102929Z","language":"en","version":3},{"style_id":"4f987ba6-80d1-41a3-a4aa-037c4f2a6fce","name":"My
48
- style rule","creation_time":"2025-08-28T19:42:37.841254Z","updated_time":"2025-10-31T12:39:07.919025Z","language":"en","version":8},{"style_id":"1df39d69-d278-4353-b206-9f0d347146d0","name":"Style
49
- Rule with Custom Instruction","creation_time":"2025-08-20T17:46:58.90728Z","updated_time":"2025-10-22T20:44:46.532386Z","language":"en","version":8}]}'
50
- recorded_at: Tue, 11 Nov 2025 21:41:35 GMT
51
- - request:
52
- method: get
53
- uri: https://api.deepl.com/v3/style_rules
54
- body:
55
- encoding: US-ASCII
56
- string: ''
57
- headers:
58
- Authorization:
59
- - DeepL-Auth-Key invalid
60
- User-Agent:
61
- - deepl-ruby/3.0.2 (darwin24) ruby/3.2.2
62
- Content-Type:
63
- - application/json
64
- Accept-Encoding:
65
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
66
- Accept:
67
- - "*/*"
68
- response:
69
- status:
70
- code: 403
71
- message: Forbidden
72
- headers:
73
- Content-Type:
74
- - application/json; charset=utf-8
75
- Date:
76
- - Tue, 11 Nov 2025 21:41:35 GMT
77
- X-Trace-Id:
78
- - e170bd92638c4c6db4e8c4d89fd4316d
79
- Access-Control-Expose-Headers:
80
- - Server-Timing, X-Trace-ID
81
- Server-Timing:
82
- - l7_lb_tls;dur=135, l7_lb_idle;dur=0, l7_lb_receive;dur=0, l7_lb_total;dur=136
83
- Strict-Transport-Security:
84
- - max-age=63072000; includeSubDomains; preload
85
- Transfer-Encoding:
86
- - chunked
87
- body:
88
- encoding: UTF-8
89
- string: '{"message":"Authentication failed, provided API key is invalid. You
90
- can find more info in our docs: https://developers.deepl.com/docs/getting-started/auth"}'
91
- recorded_at: Tue, 11 Nov 2025 21:41:35 GMT
92
- recorded_with: VCR 6.3.1