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.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +27 -0
  3. data/.github/workflows/add_issues_to_kanban.yml +16 -0
  4. data/.gitlab-ci.yml +177 -0
  5. data/.rubocop.yml +51 -0
  6. data/CHANGELOG.md +40 -3
  7. data/CODE_OF_CONDUCT.md +132 -0
  8. data/CONTRIBUTING.md +37 -0
  9. data/Gemfile +24 -0
  10. data/README.md +153 -22
  11. data/Rakefile +58 -0
  12. data/SECURITY.md +58 -0
  13. data/VERSION +1 -0
  14. data/deepl-rb.gemspec +167 -0
  15. data/lib/deepl/api.rb +22 -0
  16. data/lib/deepl/configuration.rb +59 -0
  17. data/lib/deepl/constants/base_constant.rb +18 -0
  18. data/lib/deepl/constants/formality.rb +16 -0
  19. data/lib/deepl/constants/model_type.rb +14 -0
  20. data/lib/deepl/constants/split_sentences.rb +14 -0
  21. data/lib/deepl/constants/tag_handling.rb +13 -0
  22. data/lib/deepl/constants/tone.rb +20 -0
  23. data/lib/deepl/constants/writing_style.rb +20 -0
  24. data/lib/deepl/document_api.rb +121 -0
  25. data/lib/deepl/exceptions/authorization_failed.rb +14 -0
  26. data/lib/deepl/exceptions/bad_request.rb +16 -0
  27. data/lib/deepl/exceptions/document_translation_error.rb +15 -0
  28. data/lib/deepl/exceptions/error.rb +14 -0
  29. data/lib/deepl/exceptions/limit_exceeded.rb +18 -0
  30. data/lib/deepl/exceptions/not_found.rb +16 -0
  31. data/lib/deepl/exceptions/not_supported.rb +14 -0
  32. data/lib/deepl/exceptions/quota_exceeded.rb +14 -0
  33. data/lib/deepl/exceptions/request_entity_too_large.rb +15 -0
  34. data/lib/deepl/exceptions/request_error.rb +21 -0
  35. data/lib/deepl/exceptions/server_error.rb +18 -0
  36. data/lib/deepl/glossary_api.rb +38 -0
  37. data/lib/deepl/requests/base.rb +212 -0
  38. data/lib/deepl/requests/document/download.rb +44 -0
  39. data/lib/deepl/requests/document/get_status.rb +44 -0
  40. data/lib/deepl/requests/document/upload.rb +75 -0
  41. data/lib/deepl/requests/glossary/create.rb +59 -0
  42. data/lib/deepl/requests/glossary/destroy.rb +37 -0
  43. data/lib/deepl/requests/glossary/entries.rb +37 -0
  44. data/lib/deepl/requests/glossary/find.rb +38 -0
  45. data/lib/deepl/requests/glossary/language_pairs.rb +38 -0
  46. data/lib/deepl/requests/glossary/list.rb +37 -0
  47. data/lib/deepl/requests/languages.rb +37 -0
  48. data/lib/deepl/requests/rephrase.rb +55 -0
  49. data/lib/deepl/requests/style_rule/create.rb +46 -0
  50. data/lib/deepl/requests/style_rule/create_custom_instruction.rb +45 -0
  51. data/lib/deepl/requests/style_rule/destroy.rb +39 -0
  52. data/lib/deepl/requests/style_rule/destroy_custom_instruction.rb +40 -0
  53. data/lib/deepl/requests/style_rule/find.rb +40 -0
  54. data/lib/deepl/requests/style_rule/find_custom_instruction.rb +41 -0
  55. data/lib/deepl/requests/style_rule/list.rb +59 -0
  56. data/lib/deepl/requests/style_rule/update.rb +42 -0
  57. data/lib/deepl/requests/style_rule/update_configured_rules.rb +41 -0
  58. data/lib/deepl/requests/style_rule/update_custom_instruction.rb +47 -0
  59. data/lib/deepl/requests/translate.rb +106 -0
  60. data/lib/deepl/requests/translation_memory/list.rb +58 -0
  61. data/lib/deepl/requests/usage.rb +33 -0
  62. data/lib/deepl/resources/base.rb +17 -0
  63. data/lib/deepl/resources/document_handle.rb +57 -0
  64. data/lib/deepl/resources/document_translation_status.rb +54 -0
  65. data/lib/deepl/resources/glossary.rb +28 -0
  66. data/lib/deepl/resources/language.rb +30 -0
  67. data/lib/deepl/resources/language_pair.rb +23 -0
  68. data/lib/deepl/resources/style_rule.rb +86 -0
  69. data/lib/deepl/resources/text.rb +24 -0
  70. data/lib/deepl/resources/translation_memory.rb +25 -0
  71. data/lib/deepl/resources/usage.rb +27 -0
  72. data/lib/deepl/style_rule_api.rb +61 -0
  73. data/lib/deepl/translation_memory_api.rb +17 -0
  74. data/lib/deepl/utils/backoff_timer.rb +46 -0
  75. data/lib/deepl/utils/exception_builder.rb +34 -0
  76. data/lib/deepl.rb +175 -0
  77. data/lib/http_client_options.rb +22 -0
  78. data/lib/version.rb +8 -0
  79. data/spec/api/api_spec.rb +20 -0
  80. data/spec/api/configuration_spec.rb +122 -0
  81. data/spec/api/deepl_spec.rb +460 -0
  82. data/spec/constants/constants_spec.rb +158 -0
  83. data/spec/fixtures/vcr_cassettes/deepl_document.yml +95 -0
  84. data/spec/fixtures/vcr_cassettes/deepl_document_download.yml +1214 -0
  85. data/spec/fixtures/vcr_cassettes/deepl_glossaries.yml +1163 -0
  86. data/spec/fixtures/vcr_cassettes/deepl_languages.yml +54 -0
  87. data/spec/fixtures/vcr_cassettes/deepl_rephrase.yml +87 -0
  88. data/spec/fixtures/vcr_cassettes/deepl_translate.yml +358 -0
  89. data/spec/fixtures/vcr_cassettes/deepl_usage.yml +129 -0
  90. data/spec/fixtures/vcr_cassettes/glossaries.yml +1702 -0
  91. data/spec/fixtures/vcr_cassettes/languages.yml +229 -0
  92. data/spec/fixtures/vcr_cassettes/rephrase_texts.yml +401 -0
  93. data/spec/fixtures/vcr_cassettes/style_rules.yml +92 -0
  94. data/spec/fixtures/vcr_cassettes/style_rules_crud.yml +926 -0
  95. data/spec/fixtures/vcr_cassettes/translate_texts.yml +10630 -0
  96. data/spec/fixtures/vcr_cassettes/translation_memories.yml +74 -0
  97. data/spec/fixtures/vcr_cassettes/usage.yml +171 -0
  98. data/spec/integration_tests/document_api_spec.rb +178 -0
  99. data/spec/integration_tests/integration_test_utils.rb +170 -0
  100. data/spec/integration_tests/style_rule_api_spec.rb +135 -0
  101. data/spec/integration_tests/translation_memory_api_spec.rb +70 -0
  102. data/spec/requests/extra_body_parameters_types_spec.rb +82 -0
  103. data/spec/requests/glossary/create_spec.rb +65 -0
  104. data/spec/requests/glossary/destroy_spec.rb +66 -0
  105. data/spec/requests/glossary/entries_spec.rb +62 -0
  106. data/spec/requests/glossary/find_spec.rb +68 -0
  107. data/spec/requests/glossary/language_pairs_spec.rb +40 -0
  108. data/spec/requests/glossary/list_spec.rb +54 -0
  109. data/spec/requests/languages_spec.rb +68 -0
  110. data/spec/requests/rephrase_spec.rb +172 -0
  111. data/spec/requests/style_rule/create_custom_instruction_spec.rb +54 -0
  112. data/spec/requests/style_rule/create_spec.rb +45 -0
  113. data/spec/requests/style_rule/destroy_custom_instruction_spec.rb +54 -0
  114. data/spec/requests/style_rule/destroy_spec.rb +54 -0
  115. data/spec/requests/style_rule/find_custom_instruction_spec.rb +56 -0
  116. data/spec/requests/style_rule/find_spec.rb +56 -0
  117. data/spec/requests/style_rule/list_spec.rb +58 -0
  118. data/spec/requests/style_rule/update_configured_rules_spec.rb +52 -0
  119. data/spec/requests/style_rule/update_custom_instruction_spec.rb +58 -0
  120. data/spec/requests/style_rule/update_spec.rb +48 -0
  121. data/spec/requests/translate_spec.rb +492 -0
  122. data/spec/requests/translation_memory/list_spec.rb +61 -0
  123. data/spec/requests/usage_spec.rb +43 -0
  124. data/spec/resources/glossary_spec.rb +38 -0
  125. data/spec/resources/language_pair_spec.rb +23 -0
  126. data/spec/resources/language_spec.rb +45 -0
  127. data/spec/resources/text_spec.rb +23 -0
  128. data/spec/resources/translation_memory_spec.rb +35 -0
  129. data/spec/resources/usage_spec.rb +35 -0
  130. data/spec/spec_helper.rb +92 -0
  131. metadata +130 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5778d1b4102e5d798b157de8dcaeecd069d55f0f333eb190e510eb6b0593df9f
4
- data.tar.gz: 117d03157edd90e2da5e6064f5d9c4b8c0ede6beddd009b7016b48d0e2673e19
3
+ metadata.gz: ac9df781efec35e22812fb7d998386c19dd2f51afeb020d1850c4b2091e5ba20
4
+ data.tar.gz: 70db2ae1bd08aa8e1dffb01198225ad29fc5c2514cf4f1a38da948bbe97c51f3
5
5
  SHA512:
6
- metadata.gz: e0b437203711dabb1b30f20a04964d940f17b5e85e41559436ea46dea5a2e093600122c58b15b486e81062831bb12534a146820b8cca69fd262710b8757caab1
7
- data.tar.gz: c581a473d282486dcd516eacb8a20996302806bf0a40cf4e34467e11ea0f4445660a938addd64f60be5e01b05e32e17d54e3fdea542c14f23ee6b203fd789391
6
+ metadata.gz: 5c55b0eb6a6ef528eb14f78acfb89591fa99de7c7d8a82fb322e5b189c6663ff5f5f915d46ac4e93fcebc5a1d1f71bcef3d94fb1cac36d5e5fcabec9eb656cb5
7
+ data.tar.gz: a606b2405448a3598faf0d38e51830437d14019ab6b2cec4a794f93bc47f8329612fc524b1f2d5c71e48063ef4682a12831cada04d8b5c2a9f8ffd1f2012c3e6
@@ -0,0 +1,27 @@
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
@@ -0,0 +1,16 @@
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 ADDED
@@ -0,0 +1,177 @@
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
+ variables:
61
+ HOME: /tmp
62
+ script: bundle exec rubocop
63
+
64
+ rubocop_scheduled:
65
+ extends: .rubocop_base
66
+ rules:
67
+ - if: $CI_PIPELINE_SOURCE == "schedule"
68
+ retry: 2
69
+
70
+ rubocop_manual:
71
+ extends: .rubocop_base
72
+ rules:
73
+ - if: $CI_PIPELINE_SOURCE != "schedule"
74
+
75
+ secret_detection:
76
+ extends: .secret-detection
77
+ stage: check
78
+ image: !reference [.secret-detection, image]
79
+ before_script:
80
+ - echo "overriding default before_script..."
81
+ rules:
82
+ - if: $CI_MERGE_REQUEST_ID
83
+
84
+ license_check:
85
+ stage: check
86
+ before_script:
87
+ - echo "overriding default before_script..."
88
+ script:
89
+ - ./license_checker.sh '*.rb' | tee license_check_output.txt
90
+ - '[ ! -s license_check_output.txt ]'
91
+
92
+ gitlab-advanced-sast:
93
+ stage: check
94
+ before_script:
95
+ - ''
96
+ rules:
97
+ - when: always
98
+ variables:
99
+ SAST_EXCLUDED_PATHS: '$DEFAULT_SAST_EXCLUDED_PATHS,/spec'
100
+ GIT_STRATEGY: clone
101
+ KUBERNETES_HELPER_MEMORY_LIMIT: 8Gi
102
+ SAST_SCANNER_ALLOWED_CLI_OPTS: --multi-core 8
103
+
104
+ semgrep-sast:
105
+ stage: check
106
+ before_script:
107
+ - ''
108
+ rules:
109
+ - when: always
110
+ variables:
111
+ SAST_EXCLUDED_PATHS: '$DEFAULT_SAST_EXCLUDED_PATHS,/spec'
112
+ GIT_STRATEGY: clone
113
+ KUBERNETES_MEMORY_LIMIT: 8Gi
114
+
115
+
116
+ # stage: test ----------------------
117
+
118
+ .test_base:
119
+ stage: test
120
+ extends: .test
121
+ parallel:
122
+ matrix:
123
+ - DOCKER_IMAGE: 'ruby:2.7'
124
+ - DOCKER_IMAGE: 'ruby:3.2'
125
+ - DOCKER_IMAGE: 'ruby:3.3'
126
+ - DOCKER_IMAGE: 'ruby:2.7'
127
+ USE_MOCK_SERVER: "use mock server"
128
+ - DOCKER_IMAGE: 'ruby:3.2'
129
+ USE_MOCK_SERVER: "use mock server"
130
+ - DOCKER_IMAGE: 'ruby:3.3'
131
+ USE_MOCK_SERVER: "use mock server"
132
+ image:
133
+ name: ${DOCKER_IMAGE}
134
+ entrypoint: ['/builds/deepl/backend/oss-client-libs/deepl-ruby']
135
+ script:
136
+ - >
137
+ if [[ ! -z "${USE_MOCK_SERVER}" ]]; then
138
+ echo "Using mock server"
139
+ export DEEPL_SERVER_URL=http://deepl-mock:3000
140
+ export DEEPL_MOCK_SERVER_PORT=3000
141
+ export DEEPL_PROXY_URL=http://deepl-mock:3001
142
+ export DEEPL_MOCK_PROXY_SERVER_PORT=3001
143
+ fi
144
+ - bundle exec rake test
145
+ - bundle exec rspec --format RspecJunitFormatter --out rspec.xml
146
+ artifacts:
147
+ reports:
148
+ coverage_report:
149
+ coverage_format: cobertura
150
+ path: coverage/coverage.xml
151
+ junit:
152
+ - rspec.xml
153
+ when: always
154
+
155
+ test_scheduled:
156
+ extends: .test_base
157
+ rules:
158
+ - if: $CI_PIPELINE_SOURCE == "schedule"
159
+ retry: 2
160
+
161
+ test_manual:
162
+ stage: test
163
+ extends: .test_base
164
+ rules:
165
+ - if: $CI_PIPELINE_SOURCE != "schedule"
166
+
167
+
168
+ # stage: publish ----------------------
169
+
170
+ gitlab release:
171
+ stage: publish
172
+ image: registry.gitlab.com/gitlab-org/release-cli:latest
173
+ extends: .create_gitlab_release
174
+ before_script:
175
+ - echo "overriding default before_script..."
176
+ rules:
177
+ - if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/'
data/.rubocop.yml ADDED
@@ -0,0 +1,51 @@
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/CHANGELOG.md CHANGED
@@ -6,10 +6,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [3.7.0] - 2026-05-14
10
+ ### Added
11
+ - Added support for listing translation memories via `DeepL.translation_memories.list`.
12
+ - Added `translation_memory` and `translation_memory_threshold` parameters to `translate()`
13
+ to use a translation memory during text translation. The `translation_memory` parameter
14
+ accepts a string ID or a `TranslationMemory` object.
15
+ - Added support for style rules CRUD operations via `DeepL.style_rules`:
16
+ `create()`, `find()`, `update_name()`, `update_configured_rules()`, and `destroy()`.
17
+ - Added support for style rule custom instruction CRUD operations via `DeepL.style_rules`:
18
+ `create_custom_instruction()`, `find_custom_instruction()`,
19
+ `update_custom_instruction()`, and `destroy_custom_instruction()`.
20
+ Please refer to the README for usage instructions.
21
+
22
+ ### Changed
23
+ - Updated unit test to expect the `model_type_used` to now be `quality_optimized`
24
+ - Set explicit `image` for `gitlab release` CI job to avoid missing `$HOME` issues
25
+
26
+ ## [3.6.1] - 2025-12-19
27
+ ### Fixed
28
+ - Fixed broken 3.6.0 release
29
+
9
30
  ## [3.6.0] - 2025-12-10
10
31
  ### Added
11
32
  - Added `tag_handling_version` parameter to `translate()` to specify which version of the tag handling algorithm to use. Options are `v1` and `v2`.
12
33
 
34
+ ### Fixed
35
+ - `extra_body_parameters` will no longer cast values to string, as this library sends JSON-encoded requests
36
+ (allows e.g. sending booleans)
37
+
38
+ ## [3.5.1] - 2025-12-19
39
+ ### Fixed
40
+ - Fixed broken 3.5.0 release
41
+
13
42
  ## [3.5.0] - 2025-12-03
14
43
  ### Added
15
44
  - Added `custom_instructions` parameter to `translate()` to customize translation
@@ -19,6 +48,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
48
  model type as the default. Requests combining `custom_instructions` and the
20
49
  `latency_optimized` model type will be rejected.
21
50
 
51
+ ## [3.4.1] - 2025-12-19
52
+ ### Fixed
53
+ - Fixed broken 3.4.0 release
54
+
22
55
  ## [3.4.0] - 2025-11-17
23
56
  ### Added
24
57
  - Added support for the `GET /v3/style_rules` endpoint in the client library, the
@@ -86,9 +119,13 @@ The change in major version is only due to the change in maintainership, there i
86
119
  ### Fixed
87
120
  - Make RequestEntityTooLarge error message more clear
88
121
 
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
91
- [3.5.0]: https://github.com/DeepLcom/deepl-rb/compare/v3.4.0...v3.5.0
122
+ [Unreleased]: https://github.com/DeepLcom/deepl-rb/compare/v3.7.0...HEAD
123
+ [3.7.0]: https://github.com/DeepLcom/deepl-rb/compare/v3.6.1...v3.7.0
124
+ [3.6.1]: https://github.com/DeepLcom/deepl-rb/compare/v3.6.0...v3.6.1
125
+ [3.6.0]: https://github.com/DeepLcom/deepl-rb/compare/v3.5.1...v3.6.0
126
+ [3.5.1]: https://github.com/DeepLcom/deepl-rb/compare/v3.5.0...v3.5.1
127
+ [3.5.0]: https://github.com/DeepLcom/deepl-rb/compare/v3.4.1...v3.5.0
128
+ [3.4.1]: https://github.com/DeepLcom/deepl-rb/compare/v3.4.0...v3.4.1
92
129
  [3.4.0]: https://github.com/DeepLcom/deepl-rb/compare/v3.3.0...v3.4.0
93
130
  [3.3.0]: https://github.com/DeepLcom/deepl-rb/compare/v3.2.0...v3.3.0
94
131
  [3.2.0]: https://github.com/DeepLcom/deepl-rb/compare/v3.1.0...v3.2.0
@@ -0,0 +1,132 @@
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 ADDED
@@ -0,0 +1,37 @@
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 ADDED
@@ -0,0 +1,24 @@
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