deepl-rb 3.5.1 → 3.6.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 (103) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -4
  3. data/README.md +13 -0
  4. metadata +2 -101
  5. data/.circleci/config.yml +0 -27
  6. data/.github/workflows/add_issues_to_kanban.yml +0 -16
  7. data/.gitlab-ci.yml +0 -172
  8. data/.rubocop.yml +0 -51
  9. data/CODE_OF_CONDUCT.md +0 -132
  10. data/CONTRIBUTING.md +0 -37
  11. data/Gemfile +0 -24
  12. data/Rakefile +0 -56
  13. data/SECURITY.md +0 -58
  14. data/VERSION +0 -1
  15. data/deepl-rb.gemspec +0 -139
  16. data/lib/deepl/api.rb +0 -22
  17. data/lib/deepl/configuration.rb +0 -59
  18. data/lib/deepl/constants/base_constant.rb +0 -18
  19. data/lib/deepl/constants/formality.rb +0 -16
  20. data/lib/deepl/constants/model_type.rb +0 -14
  21. data/lib/deepl/constants/split_sentences.rb +0 -14
  22. data/lib/deepl/constants/tag_handling.rb +0 -13
  23. data/lib/deepl/constants/tone.rb +0 -20
  24. data/lib/deepl/constants/writing_style.rb +0 -20
  25. data/lib/deepl/document_api.rb +0 -121
  26. data/lib/deepl/exceptions/authorization_failed.rb +0 -14
  27. data/lib/deepl/exceptions/bad_request.rb +0 -16
  28. data/lib/deepl/exceptions/document_translation_error.rb +0 -15
  29. data/lib/deepl/exceptions/error.rb +0 -14
  30. data/lib/deepl/exceptions/limit_exceeded.rb +0 -18
  31. data/lib/deepl/exceptions/not_found.rb +0 -16
  32. data/lib/deepl/exceptions/not_supported.rb +0 -14
  33. data/lib/deepl/exceptions/quota_exceeded.rb +0 -14
  34. data/lib/deepl/exceptions/request_entity_too_large.rb +0 -15
  35. data/lib/deepl/exceptions/request_error.rb +0 -21
  36. data/lib/deepl/exceptions/server_error.rb +0 -18
  37. data/lib/deepl/glossary_api.rb +0 -38
  38. data/lib/deepl/requests/base.rb +0 -196
  39. data/lib/deepl/requests/document/download.rb +0 -44
  40. data/lib/deepl/requests/document/get_status.rb +0 -44
  41. data/lib/deepl/requests/document/upload.rb +0 -74
  42. data/lib/deepl/requests/glossary/create.rb +0 -59
  43. data/lib/deepl/requests/glossary/destroy.rb +0 -37
  44. data/lib/deepl/requests/glossary/entries.rb +0 -37
  45. data/lib/deepl/requests/glossary/find.rb +0 -38
  46. data/lib/deepl/requests/glossary/language_pairs.rb +0 -38
  47. data/lib/deepl/requests/glossary/list.rb +0 -37
  48. data/lib/deepl/requests/languages.rb +0 -37
  49. data/lib/deepl/requests/rephrase.rb +0 -55
  50. data/lib/deepl/requests/style_rule/list.rb +0 -59
  51. data/lib/deepl/requests/translate.rb +0 -93
  52. data/lib/deepl/requests/usage.rb +0 -33
  53. data/lib/deepl/resources/base.rb +0 -17
  54. data/lib/deepl/resources/document_handle.rb +0 -57
  55. data/lib/deepl/resources/document_translation_status.rb +0 -54
  56. data/lib/deepl/resources/glossary.rb +0 -28
  57. data/lib/deepl/resources/language.rb +0 -30
  58. data/lib/deepl/resources/language_pair.rb +0 -23
  59. data/lib/deepl/resources/style_rule.rb +0 -85
  60. data/lib/deepl/resources/text.rb +0 -24
  61. data/lib/deepl/resources/usage.rb +0 -27
  62. data/lib/deepl/style_rule_api.rb +0 -17
  63. data/lib/deepl/utils/backoff_timer.rb +0 -46
  64. data/lib/deepl/utils/exception_builder.rb +0 -34
  65. data/lib/deepl.rb +0 -158
  66. data/lib/http_client_options.rb +0 -22
  67. data/lib/version.rb +0 -8
  68. data/spec/api/api_spec.rb +0 -20
  69. data/spec/api/configuration_spec.rb +0 -122
  70. data/spec/api/deepl_spec.rb +0 -460
  71. data/spec/constants/constants_spec.rb +0 -158
  72. data/spec/fixtures/vcr_cassettes/deepl_document.yml +0 -95
  73. data/spec/fixtures/vcr_cassettes/deepl_document_download.yml +0 -1214
  74. data/spec/fixtures/vcr_cassettes/deepl_glossaries.yml +0 -1163
  75. data/spec/fixtures/vcr_cassettes/deepl_languages.yml +0 -54
  76. data/spec/fixtures/vcr_cassettes/deepl_rephrase.yml +0 -87
  77. data/spec/fixtures/vcr_cassettes/deepl_translate.yml +0 -358
  78. data/spec/fixtures/vcr_cassettes/deepl_usage.yml +0 -129
  79. data/spec/fixtures/vcr_cassettes/glossaries.yml +0 -1702
  80. data/spec/fixtures/vcr_cassettes/languages.yml +0 -229
  81. data/spec/fixtures/vcr_cassettes/rephrase_texts.yml +0 -401
  82. data/spec/fixtures/vcr_cassettes/style_rules.yml +0 -92
  83. data/spec/fixtures/vcr_cassettes/translate_texts.yml +0 -10458
  84. data/spec/fixtures/vcr_cassettes/usage.yml +0 -171
  85. data/spec/integration_tests/document_api_spec.rb +0 -178
  86. data/spec/integration_tests/integration_test_utils.rb +0 -170
  87. data/spec/integration_tests/style_rule_api_spec.rb +0 -79
  88. data/spec/requests/glossary/create_spec.rb +0 -65
  89. data/spec/requests/glossary/destroy_spec.rb +0 -66
  90. data/spec/requests/glossary/entries_spec.rb +0 -62
  91. data/spec/requests/glossary/find_spec.rb +0 -68
  92. data/spec/requests/glossary/language_pairs_spec.rb +0 -40
  93. data/spec/requests/glossary/list_spec.rb +0 -54
  94. data/spec/requests/languages_spec.rb +0 -68
  95. data/spec/requests/rephrase_spec.rb +0 -172
  96. data/spec/requests/translate_spec.rb +0 -459
  97. data/spec/requests/usage_spec.rb +0 -43
  98. data/spec/resources/glossary_spec.rb +0 -38
  99. data/spec/resources/language_pair_spec.rb +0 -23
  100. data/spec/resources/language_spec.rb +0 -45
  101. data/spec/resources/text_spec.rb +0 -23
  102. data/spec/resources/usage_spec.rb +0 -35
  103. data/spec/spec_helper.rb +0 -92
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a72aff32a39743d19e811efa5a3e9d5687b90c0f3f06e1545b3746143a7478b7
4
- data.tar.gz: 02b0f280c59a81c24771a2c2d4248d9fb4d32bcb3a635dc9e8a0a8cf6ce8db71
3
+ metadata.gz: 5778d1b4102e5d798b157de8dcaeecd069d55f0f333eb190e510eb6b0593df9f
4
+ data.tar.gz: 117d03157edd90e2da5e6064f5d9c4b8c0ede6beddd009b7016b48d0e2673e19
5
5
  SHA512:
6
- metadata.gz: c292502b6e5c35a73f79ddacbe7f44ea2c1ba51d12eb137a795e44f6f10c56f397277eea272faf193a4fb14c6f639fe597c0c066feca1cce03ad5584cf2d3224
7
- data.tar.gz: 31f9cfdd8e9f762f30ff37e5de3aa3466527330e14aa6378d0c1bc2454c9f78249a74546998bfbf90ba56ef46e77fe4c09885cc82d489db615ab7a2ff89f3f7e
6
+ metadata.gz: e0b437203711dabb1b30f20a04964d940f17b5e85e41559436ea46dea5a2e093600122c58b15b486e81062831bb12534a146820b8cca69fd262710b8757caab1
7
+ data.tar.gz: c581a473d282486dcd516eacb8a20996302806bf0a40cf4e34467e11ea0f4445660a938addd64f60be5e01b05e32e17d54e3fdea542c14f23ee6b203fd789391
data/CHANGELOG.md CHANGED
@@ -4,9 +4,11 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
- ## [3.5.1] - 2025-12-19
8
- ### Fixed
9
- - Fixed broken 3.5.0 release
7
+ ## [Unreleased]
8
+
9
+ ## [3.6.0] - 2025-12-10
10
+ ### Added
11
+ - Added `tag_handling_version` parameter to `translate()` to specify which version of the tag handling algorithm to use. Options are `v1` and `v2`.
10
12
 
11
13
  ## [3.5.0] - 2025-12-03
12
14
  ### Added
@@ -84,7 +86,8 @@ The change in major version is only due to the change in maintainership, there i
84
86
  ### Fixed
85
87
  - Make RequestEntityTooLarge error message more clear
86
88
 
87
- [3.5.1]: https://github.com/DeepLcom/deepl-rb/compare/v3.5.0...v3.5.1
89
+ [Unreleased]: https://github.com/DeepLcom/deepl-rb/compare/v3.6.0...HEAD
90
+ [3.6.0]: https://github.com/DeepLcom/deepl-rb/compare/v3.5.0...v3.6.0
88
91
  [3.5.0]: https://github.com/DeepLcom/deepl-rb/compare/v3.4.0...v3.5.0
89
92
  [3.4.0]: https://github.com/DeepLcom/deepl-rb/compare/v3.3.0...v3.4.0
90
93
  [3.3.0]: https://github.com/DeepLcom/deepl-rb/compare/v3.2.0...v3.3.0
data/README.md CHANGED
@@ -127,6 +127,18 @@ puts translation.text
127
127
  # => "<p>Una muestra</p>"
128
128
  ```
129
129
 
130
+ To specify which version of the tag handling algorithm to use, you can use the `tag_handling_version` parameter:
131
+
132
+ ```rb
133
+ translation = DeepL.translate '<p>A sample</p>', 'EN', 'ES',
134
+ tag_handling: 'xml', tag_handling_version: 'v2'
135
+
136
+ puts translation.text
137
+ # => "<p>Una muestra</p>"
138
+ ```
139
+
140
+ The available values are `'v1'` and `'v2'`.
141
+
130
142
  To translate with context, simply supply the `context` parameter:
131
143
 
132
144
  ```rb
@@ -183,6 +195,7 @@ The following parameters will be automatically converted:
183
195
  | `style_rule` | No conversion applied (can be a string ID or a StyleRule object)
184
196
  | `context` | No conversion applied
185
197
  | `custom_instructions` | No conversion applied
198
+ | `tag_handling_version` | No conversion applied
186
199
  | `extra_body_parameters` | Hash of extra parameters to pass in the body of the HTTP request. Can be used to access beta features, or to override built-in parameters for testing purposes. Extra parameters can override keys explicitly set by the client.
187
200
 
188
201
  ### Rephrase Text
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.5.1
4
+ version: 3.6.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: 2025-12-19 00:00:00.000000000 Z
11
+ date: 2025-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: juwelier
@@ -49,109 +49,10 @@ 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"
56
52
  - CHANGELOG.md
57
- - CODE_OF_CONDUCT.md
58
- - CONTRIBUTING.md
59
- - Gemfile
60
53
  - LICENSE.md
61
54
  - 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/list.rb
102
- - lib/deepl/requests/translate.rb
103
- - lib/deepl/requests/usage.rb
104
- - lib/deepl/resources/base.rb
105
- - lib/deepl/resources/document_handle.rb
106
- - lib/deepl/resources/document_translation_status.rb
107
- - lib/deepl/resources/glossary.rb
108
- - lib/deepl/resources/language.rb
109
- - lib/deepl/resources/language_pair.rb
110
- - lib/deepl/resources/style_rule.rb
111
- - lib/deepl/resources/text.rb
112
- - lib/deepl/resources/usage.rb
113
- - lib/deepl/style_rule_api.rb
114
- - lib/deepl/utils/backoff_timer.rb
115
- - lib/deepl/utils/exception_builder.rb
116
- - lib/http_client_options.rb
117
- - lib/version.rb
118
55
  - license_checker.sh
119
- - spec/api/api_spec.rb
120
- - spec/api/configuration_spec.rb
121
- - spec/api/deepl_spec.rb
122
- - spec/constants/constants_spec.rb
123
- - spec/fixtures/vcr_cassettes/deepl_document.yml
124
- - spec/fixtures/vcr_cassettes/deepl_document_download.yml
125
- - spec/fixtures/vcr_cassettes/deepl_glossaries.yml
126
- - spec/fixtures/vcr_cassettes/deepl_languages.yml
127
- - spec/fixtures/vcr_cassettes/deepl_rephrase.yml
128
- - spec/fixtures/vcr_cassettes/deepl_translate.yml
129
- - spec/fixtures/vcr_cassettes/deepl_usage.yml
130
- - spec/fixtures/vcr_cassettes/glossaries.yml
131
- - spec/fixtures/vcr_cassettes/languages.yml
132
- - spec/fixtures/vcr_cassettes/rephrase_texts.yml
133
- - spec/fixtures/vcr_cassettes/style_rules.yml
134
- - spec/fixtures/vcr_cassettes/translate_texts.yml
135
- - spec/fixtures/vcr_cassettes/usage.yml
136
- - spec/integration_tests/document_api_spec.rb
137
- - spec/integration_tests/integration_test_utils.rb
138
- - spec/integration_tests/style_rule_api_spec.rb
139
- - spec/requests/glossary/create_spec.rb
140
- - spec/requests/glossary/destroy_spec.rb
141
- - spec/requests/glossary/entries_spec.rb
142
- - spec/requests/glossary/find_spec.rb
143
- - spec/requests/glossary/language_pairs_spec.rb
144
- - spec/requests/glossary/list_spec.rb
145
- - spec/requests/languages_spec.rb
146
- - spec/requests/rephrase_spec.rb
147
- - spec/requests/translate_spec.rb
148
- - spec/requests/usage_spec.rb
149
- - spec/resources/glossary_spec.rb
150
- - spec/resources/language_pair_spec.rb
151
- - spec/resources/language_spec.rb
152
- - spec/resources/text_spec.rb
153
- - spec/resources/usage_spec.rb
154
- - spec/spec_helper.rb
155
56
  homepage: https://github.com/DeepLcom/deepl-rb
156
57
  licenses:
157
58
  - MIT
data/.circleci/config.yml DELETED
@@ -1,27 +0,0 @@
1
- version: 2
2
- jobs:
3
- build:
4
- working_directory: ~/deepl-rb
5
- docker:
6
- - image: circleci/ruby:2.7
7
- steps:
8
- - checkout
9
-
10
- - run:
11
- name: Bundle Install
12
- command: bundle install --path vendor/bundle
13
-
14
- # Run rspec
15
- - type: shell
16
- command: |
17
- bundle exec rspec $(circleci tests glob "spec/**/*_spec.rb" |
18
- circleci tests split --split-by=timings)
19
-
20
- # Run rubocop
21
- - type: shell
22
- command: |
23
- bundle exec rubocop
24
-
25
- # Save test results for timing analysis
26
- - store_test_results:
27
- path: test_results
@@ -1,16 +0,0 @@
1
- name: Add bugs to bugs project
2
-
3
- on:
4
- issues:
5
- types:
6
- - opened
7
-
8
- jobs:
9
- add-to-project:
10
- name: Add issue to project
11
- runs-on: ubuntu-latest
12
- steps:
13
- - uses: actions/add-to-project@v0.5.0
14
- with:
15
- project-url: https://github.com/orgs/DeepLcom/projects/1
16
- github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
data/.gitlab-ci.yml DELETED
@@ -1,172 +0,0 @@
1
- # Note: This GitLab CI configuration is used for internal testing, users can ignore it.
2
- include:
3
- - template: Security/SAST.gitlab-ci.yml
4
- - project: '${CI_PROJECT_NAMESPACE}/ci-libs-for-client-libraries'
5
- file:
6
- - '/${CI_PROJECT_NAME}/.gitlab-ci.yml'
7
- - project: 'deepl/ops/ci-cd-infrastructure/gitlab-ci-lib'
8
- file:
9
- - '/templates/.buildkit.yml'
10
- - '/templates/.secret-detection.yml'
11
- - '/templates/.gitlab-release.yml'
12
-
13
- # Global --------------------------
14
-
15
- workflow:
16
- rules:
17
- - if: $CI_PIPELINE_SOURCE == "merge_request_event"
18
- - if: $CI_COMMIT_TAG
19
- - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
20
-
21
- variables:
22
- GITLAB_ADVANCED_SAST_ENABLED: 'true'
23
-
24
- stages:
25
- - install
26
- - check
27
- - test
28
- - publish # Only for internal tracking
29
-
30
-
31
- before_script:
32
- - ruby --version
33
- - bundle install
34
-
35
- # stage: install ----------------------
36
-
37
- package:
38
- stage: install
39
- parallel:
40
- matrix:
41
- - DOCKER_IMAGE: 'ruby:2.7'
42
- - DOCKER_IMAGE: 'ruby:3.2'
43
- - DOCKER_IMAGE: 'ruby:3.3'
44
- image:
45
- name: ${DOCKER_IMAGE}
46
- entrypoint: ['/builds/deepl/backend/oss-client-libs/deepl-ruby']
47
- script:
48
- - bundle exec rake build
49
- artifacts:
50
- paths:
51
- - pkg/
52
-
53
- # stage: check ----------------------
54
-
55
- .rubocop_base:
56
- stage: check
57
- image:
58
- name: ruby:2.7
59
- entrypoint: ['/builds/deepl/backend/oss-client-libs/deepl-ruby']
60
- script: bundle exec rubocop
61
-
62
- rubocop_scheduled:
63
- extends: .rubocop_base
64
- rules:
65
- - if: $CI_PIPELINE_SOURCE == "schedule"
66
- retry: 2
67
-
68
- rubocop_manual:
69
- extends: .rubocop_base
70
- rules:
71
- - if: $CI_PIPELINE_SOURCE != "schedule"
72
-
73
- secret_detection:
74
- extends: .secret-detection
75
- stage: check
76
- image: !reference [.secret-detection, image]
77
- before_script:
78
- - echo "overriding default before_script..."
79
- rules:
80
- - if: $CI_MERGE_REQUEST_ID
81
-
82
- license_check:
83
- stage: check
84
- before_script:
85
- - echo "overriding default before_script..."
86
- script:
87
- - ./license_checker.sh '*.rb' | tee license_check_output.txt
88
- - '[ ! -s license_check_output.txt ]'
89
-
90
- gitlab-advanced-sast:
91
- stage: check
92
- before_script:
93
- - ''
94
- rules:
95
- - when: always
96
- variables:
97
- SAST_EXCLUDED_PATHS: '$DEFAULT_SAST_EXCLUDED_PATHS,/spec'
98
- GIT_STRATEGY: clone
99
- KUBERNETES_HELPER_MEMORY_LIMIT: 8Gi
100
- SAST_SCANNER_ALLOWED_CLI_OPTS: --multi-core 8
101
-
102
- semgrep-sast:
103
- stage: check
104
- before_script:
105
- - ''
106
- rules:
107
- - when: always
108
- variables:
109
- SAST_EXCLUDED_PATHS: '$DEFAULT_SAST_EXCLUDED_PATHS,/spec'
110
- GIT_STRATEGY: clone
111
- KUBERNETES_MEMORY_LIMIT: 8Gi
112
-
113
-
114
- # stage: test ----------------------
115
-
116
- .test_base:
117
- stage: test
118
- extends: .test
119
- parallel:
120
- matrix:
121
- - DOCKER_IMAGE: 'ruby:2.7'
122
- - DOCKER_IMAGE: 'ruby:3.2'
123
- - DOCKER_IMAGE: 'ruby:3.3'
124
- - DOCKER_IMAGE: 'ruby:2.7'
125
- USE_MOCK_SERVER: "use mock server"
126
- - DOCKER_IMAGE: 'ruby:3.2'
127
- USE_MOCK_SERVER: "use mock server"
128
- - DOCKER_IMAGE: 'ruby:3.3'
129
- USE_MOCK_SERVER: "use mock server"
130
- image:
131
- name: ${DOCKER_IMAGE}
132
- entrypoint: ['/builds/deepl/backend/oss-client-libs/deepl-ruby']
133
- script:
134
- - >
135
- if [[ ! -z "${USE_MOCK_SERVER}" ]]; then
136
- echo "Using mock server"
137
- export DEEPL_SERVER_URL=http://deepl-mock:3000
138
- export DEEPL_MOCK_SERVER_PORT=3000
139
- export DEEPL_PROXY_URL=http://deepl-mock:3001
140
- export DEEPL_MOCK_PROXY_SERVER_PORT=3001
141
- fi
142
- - bundle exec rake test
143
- - bundle exec rspec --format RspecJunitFormatter --out rspec.xml
144
- artifacts:
145
- reports:
146
- coverage_report:
147
- coverage_format: cobertura
148
- path: coverage/coverage.xml
149
- junit:
150
- - rspec.xml
151
- when: always
152
-
153
- test_scheduled:
154
- extends: .test_base
155
- rules:
156
- - if: $CI_PIPELINE_SOURCE == "schedule"
157
- retry: 2
158
-
159
- test_manual:
160
- stage: test
161
- extends: .test_base
162
- rules:
163
- - if: $CI_PIPELINE_SOURCE != "schedule"
164
-
165
-
166
- # stage: publish ----------------------
167
-
168
- gitlab release:
169
- stage: publish
170
- extends: .create_gitlab_release
171
- rules:
172
- - if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/'
data/.rubocop.yml DELETED
@@ -1,51 +0,0 @@
1
- # Custom rubocop configuration
2
-
3
- require:
4
- - rubocop-rspec
5
-
6
- AllCops:
7
- DisplayCopNames: true
8
- NewCops: enable
9
- Exclude:
10
- - deepl-rb.gemspec
11
- - vendor/**/*
12
- TargetRubyVersion: 2.7.5
13
-
14
- Metrics/BlockLength:
15
- Exclude:
16
- - "**/*_spec.rb"
17
-
18
- Metrics/ParameterLists:
19
- Max: 6
20
-
21
- Layout/LineLength:
22
- Max: 100
23
-
24
- RSpec/ExampleLength:
25
- Max: 10
26
- CountAsOne: ['heredoc']
27
-
28
- RSpec/MessageSpies:
29
- EnforcedStyle: 'receive'
30
-
31
- RSpec/MultipleExpectations:
32
- Max: 8
33
-
34
- RSpec/MultipleMemoizedHelpers:
35
- Max: 7
36
-
37
- RSpec/NestedGroups:
38
- Max: 4
39
-
40
- RSpec/SpecFilePathSuffix:
41
- Enabled: false
42
-
43
- RSpec/SpecFilePathFormat:
44
- CustomTransform:
45
- DeepL: ''
46
-
47
- Style/Documentation:
48
- Enabled: false
49
-
50
- Style/ModuleFunction:
51
- EnforcedStyle: extend_self
data/CODE_OF_CONDUCT.md DELETED
@@ -1,132 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our
6
- community a harassment-free experience for everyone, regardless of age, body
7
- size, visible or invisible disability, ethnicity, sex characteristics, gender
8
- identity and expression, level of experience, education, socio-economic status,
9
- nationality, personal appearance, race, caste, color, religion, or sexual
10
- identity and orientation.
11
-
12
- We pledge to act and interact in ways that contribute to an open, welcoming,
13
- diverse, inclusive, and healthy community.
14
-
15
- ## Our Standards
16
-
17
- Examples of behavior that contributes to a positive environment for our
18
- community include:
19
-
20
- * Demonstrating empathy and kindness toward other people
21
- * Being respectful of differing opinions, viewpoints, and experiences
22
- * Giving and gracefully accepting constructive feedback
23
- * Accepting responsibility and apologizing to those affected by our mistakes,
24
- and learning from the experience
25
- * Focusing on what is best not just for us as individuals, but for the overall
26
- community
27
-
28
- Examples of unacceptable behavior include:
29
-
30
- * The use of sexualized language or imagery, and sexual attention or advances of
31
- any kind
32
- * Trolling, insulting or derogatory comments, and personal or political attacks
33
- * Public or private harassment
34
- * Publishing others' private information, such as a physical or email address,
35
- without their explicit permission
36
- * Other conduct which could reasonably be considered inappropriate in a
37
- professional setting
38
-
39
- ## Enforcement Responsibilities
40
-
41
- Community leaders are responsible for clarifying and enforcing our standards of
42
- acceptable behavior and will take appropriate and fair corrective action in
43
- response to any behavior that they deem inappropriate, threatening, offensive,
44
- or harmful.
45
-
46
- Community leaders have the right and responsibility to remove, edit, or reject
47
- comments, commits, code, wiki edits, issues, and other contributions that are
48
- not aligned to this Code of Conduct, and will communicate reasons for moderation
49
- decisions when appropriate.
50
-
51
- ## Scope
52
-
53
- This Code of Conduct applies within all community spaces, and also applies when
54
- an individual is officially representing the community in public spaces.
55
- Examples of representing our community include using an official e-mail address,
56
- posting via an official social media account, or acting as an appointed
57
- representative at an online or offline event.
58
-
59
- ## Enforcement
60
-
61
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
- reported to the community leaders responsible for enforcement at
63
- [open-source@deepl.com](mailto:open-source@deepl.com).
64
- All complaints will be reviewed and investigated promptly and fairly.
65
-
66
- All community leaders are obligated to respect the privacy and security of the
67
- reporter of any incident.
68
-
69
- ## Enforcement Guidelines
70
-
71
- Community leaders will follow these Community Impact Guidelines in determining
72
- the consequences for any action they deem in violation of this Code of Conduct:
73
-
74
- ### 1. Correction
75
-
76
- **Community Impact**: Use of inappropriate language or other behavior deemed
77
- unprofessional or unwelcome in the community.
78
-
79
- **Consequence**: A private, written warning from community leaders, providing
80
- clarity around the nature of the violation and an explanation of why the
81
- behavior was inappropriate. A public apology may be requested.
82
-
83
- ### 2. Warning
84
-
85
- **Community Impact**: A violation through a single incident or series of
86
- actions.
87
-
88
- **Consequence**: A warning with consequences for continued behavior. No
89
- interaction with the people involved, including unsolicited interaction with
90
- those enforcing the Code of Conduct, for a specified period of time. This
91
- includes avoiding interactions in community spaces as well as external channels
92
- like social media. Violating these terms may lead to a temporary or permanent
93
- ban.
94
-
95
- ### 3. Temporary Ban
96
-
97
- **Community Impact**: A serious violation of community standards, including
98
- sustained inappropriate behavior.
99
-
100
- **Consequence**: A temporary ban from any sort of interaction or public
101
- communication with the community for a specified period of time. No public or
102
- private interaction with the people involved, including unsolicited interaction
103
- with those enforcing the Code of Conduct, is allowed during this period.
104
- Violating these terms may lead to a permanent ban.
105
-
106
- ### 4. Permanent Ban
107
-
108
- **Community Impact**: Demonstrating a pattern of violation of community
109
- standards, including sustained inappropriate behavior, harassment of an
110
- individual, or aggression toward or disparagement of classes of individuals.
111
-
112
- **Consequence**: A permanent ban from any sort of public interaction within the
113
- community.
114
-
115
- ## Attribution
116
-
117
- This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
- version 2.1, available at
119
- [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120
-
121
- Community Impact Guidelines were inspired by
122
- [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123
-
124
- For answers to common questions about this code of conduct, see the FAQ at
125
- [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126
- [https://www.contributor-covenant.org/translations][translations].
127
-
128
- [homepage]: https://www.contributor-covenant.org
129
- [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130
- [Mozilla CoC]: https://github.com/mozilla/diversity
131
- [FAQ]: https://www.contributor-covenant.org/faq
132
- [translations]: https://www.contributor-covenant.org/translations
data/CONTRIBUTING.md DELETED
@@ -1,37 +0,0 @@
1
- # Contributing guidelines
2
-
3
- * [Code of Conduct](#code-of-conduct)
4
- * [Issues](#issues)
5
- * [Pull Requests](#pull-requests)
6
-
7
- ## Code of Conduct
8
-
9
- This project has a [Code of Conduct](CODE_OF_CONDUCT.md) to which all
10
- contributors must adhere when participating in the project. Instances of
11
- abusive, harassing, or otherwise unacceptable behavior may be reported by
12
- contacting [open-source@deepl.com](mailto:open-source@deepl.com) and/or a
13
- project maintainer.
14
-
15
- ## Issues
16
-
17
- If you experience problems using the library, or would like to request a new
18
- feature, please open an [issue][issues].
19
-
20
- Please provide as much context as possible when you open an issue. The
21
- information you provide must be comprehensive enough for us to reproduce the
22
- issue.
23
-
24
- ## Pull Requests
25
-
26
- You are welcome to contribute code and/or documentation in order to fix a bug or
27
- to implement a new feature. Before beginning work, you should create an issue
28
- describing the changes you plan to contribute, to avoid wasting or duplicating
29
- effort. We will then let you know whether we would accept the changes.
30
-
31
- Contributions must be licensed under the same license as the project:
32
- [MIT License](LICENSE.md).
33
-
34
- Currently automated testing is implemented internally at DeepL, however we plan
35
- to implement publicly visible testing soon.
36
-
37
- [issues]: https://www.github.com/DeepLcom/deepl-rb/issues
data/Gemfile DELETED
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- group :development do
6
- # Gem management
7
- gem 'juwelier'
8
- end
9
-
10
- group :test, :development do
11
- gem 'byebug', require: 'byebug'
12
- end
13
-
14
- group :test do
15
- # Test
16
- gem 'rspec'
17
- gem 'rspec_junit_formatter'
18
- gem 'rubocop'
19
- gem 'rubocop-rspec'
20
- gem 'simplecov'
21
- gem 'simplecov-cobertura'
22
- gem 'vcr'
23
- gem 'webmock'
24
- end