Skip to content

Commit 5fc6c38

Browse files
committed
docs: Bump version to 3.0.0
1 parent 22162a8 commit 5fc6c38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+111
-84
lines changed

.gitlab-ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,15 @@ secret_detection:
7474
rules:
7575
- if: $CI_MERGE_REQUEST_ID
7676

77+
license_check:
78+
stage: check
79+
before_script:
80+
- echo "overriding default before_script..."
81+
script:
82+
- ./license_checker.sh '*.rb' | tee license_check_output.txt
83+
- '[ ! -s license_check_output.txt ]'
84+
85+
7786
# stage: test ----------------------
7887

7988
.test_base:

LICENSE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ The MIT License (MIT)
22
=====================
33

44
Copyright © `2018` `Daniel Herzog`
5+
Copyright © `2024` `DeepL SE (https://www.deepl.com)`
56

67
Permission is hereby granted, free of charge, to any person
78
obtaining a copy of this software and associated documentation

README.md

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,14 @@
1-
# Work in progress
2-
3-
DeepL is working with the original creator of deepl-rb to take over
4-
responsibility for the project. This fork will eventually be the the basis for
5-
the gem and the place where future development will occur.
6-
7-
In the meanwhile, though, the gem still points to https://github.com/wikiti/deepl-rb.
1+
[![Gem Version](https://badge.fury.io/rb/deepl-rb.svg)](https://badge.fury.io/rb/deepl-rb)
82

9-
When the handover is complete and we consider the fork "ready for release" (and
10-
the gem has been updated to point to our fork), we'll add the Ruby library to
11-
our API documentation: https://www.deepl.com/docs-api/api-access/client-libraries/
3+
# DeepL Ruby Library
124

13-
---
5+
The [DeepL API](https://developers.deepl.com/docs/api-reference/translate) is a language translation API that allows other computer programs to send texts and documents to DeepL's servers and receive high-quality translations. This opens a whole universe of opportunities for developers: any translation product you can imagine can now be built on top of DeepL's best-in-class translation technology.
146

15-
[![Gem Version](https://badge.fury.io/rb/deepl-rb.svg)](https://badge.fury.io/rb/deepl-rb)
7+
The DeepL Ruby library offers a convenient way for applications written in Ruby to interact with the DeepL API. We intend to support all API functions with the library, though support for new features may be added to the library after they’re added to the API.
168

17-
# DeepL for ruby
9+
## Getting an authentication key
1810

19-
A simple ruby wrapper for the [DeepL translation API (v2)](https://www.deepl.com/api.html).
11+
To use the DeepL Ruby Library, you'll need an API authentication key. To get a key, [please create an account here](https://www.deepl.com/pro?utm_source=github&utm_medium=github-ruby-readme#developer). With a DeepL API Free account you can translate up to 500,000 characters/month for free.
2012

2113
## Installation
2214

@@ -411,7 +403,7 @@ bundle exec rake test
411403
### Caution: Changing VCR Tests
412404

413405
If you need to rerecord some of the VCR tests, simply setting `record: :new_episodes` and rerunning `rspec` won't be enough in some cases, specifically around document translation (due to its statefulness) and glossaries (since a glossary ID is associated with a specific API account).
414-
For example, there are document translations tests that split up the `upload`, `get_status` and `download` calls into separate test cases. You need to first rerecord the `upload` call, you can do execute a single test like this:
406+
For example, there are document translations tests that split up the `upload`, `get_status` and `download` calls into separate test cases. You need to first rerecord the `upload` call, you can do execute a single test like this (the line should be where the `it` block of the test starts):
415407

416408
```sh
417409
rspec ./spec/api/deepl_spec.rb:152

Rakefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@ require 'juwelier'
1616

1717
Juwelier::Tasks.new do |gem|
1818
gem.name = 'deepl-rb'
19-
gem.homepage = 'http://github.com/wikiti/deepl-rb'
19+
gem.homepage = 'https://github.com/DeepLcom/deepl-rb'
2020
gem.license = 'MIT'
21-
gem.summary = 'A simple ruby wrapper for the DeepL API'
21+
gem.summary = 'Official Ruby library for the DeepL language translation API.'
2222
gem.description =
23-
'A simple ruby wrapper for the DeepL translation API (v1). ' \
23+
'Official Ruby library for the DeepL language translation API (v2). ' \
2424
'For more information, check this: https://www.deepl.com/docs/api-reference.html'
2525

26-
gem.email = 'info@danielherzog.es'
27-
gem.authors = ['Daniel Herzog']
26+
gem.email = 'open-source@deepl.com'
27+
gem.authors = ['DeepL SE']
28+
gem.files.exclude '.github'
29+
gem.files.exclude '.circleci'
2830
end
2931

3032
Juwelier::RubygemsDotOrgTasks.new

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.5.3
1+
3.0.0

deepl-rb.gemspec

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,59 @@
22
# DO NOT EDIT THIS FILE DIRECTLY
33
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
44
# -*- encoding: utf-8 -*-
5-
# stub: deepl-rb 2.5.3 ruby lib
5+
# stub: deepl-rb 3.0.0 ruby lib
66

77
Gem::Specification.new do |s|
88
s.name = "deepl-rb".freeze
9-
s.version = "2.5.3"
9+
s.version = "3.0.0"
1010

1111
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
1212
s.require_paths = ["lib".freeze]
13-
s.authors = ["Daniel Herzog".freeze]
14-
s.date = "2022-09-26"
15-
s.description = "A simple ruby wrapper for the DeepL translation API (v1). For more information, check this: https://www.deepl.com/docs/api-reference.html".freeze
16-
s.email = "info@danielherzog.es".freeze
13+
s.authors = ["DeepL SE".freeze]
14+
s.date = "2024-09-20"
15+
s.description = "Official Ruby library for the DeepL language translation API (v2). For more information, check this: https://www.deepl.com/docs/api-reference.html".freeze
16+
s.email = "open-source@deepl.com".freeze
1717
s.extra_rdoc_files = [
18+
"CHANGELOG.md",
1819
"LICENSE.md",
19-
"README.md"
20+
"README.md",
21+
"license_checker.sh"
2022
]
2123
s.files = [
2224
".circleci/config.yml",
25+
".github/workflows/add_issues_to_kanban.yml",
26+
".gitlab-ci.yml",
2327
".rubocop.yml",
28+
"CHANGELOG.md",
29+
"CODE_OF_CONDUCT.md",
30+
"CONTRIBUTING.md",
2431
"Gemfile",
2532
"LICENSE.md",
2633
"README.md",
2734
"Rakefile",
35+
"SECURITY.md",
2836
"VERSION",
2937
"deepl-rb.gemspec",
3038
"lib/deepl.rb",
3139
"lib/deepl/api.rb",
3240
"lib/deepl/configuration.rb",
41+
"lib/deepl/document_api.rb",
3342
"lib/deepl/exceptions/authorization_failed.rb",
3443
"lib/deepl/exceptions/bad_request.rb",
35-
"lib/deepl/exceptions/document_translation.rb",
44+
"lib/deepl/exceptions/document_translation_error.rb",
3645
"lib/deepl/exceptions/error.rb",
3746
"lib/deepl/exceptions/limit_exceeded.rb",
3847
"lib/deepl/exceptions/not_found.rb",
3948
"lib/deepl/exceptions/not_supported.rb",
4049
"lib/deepl/exceptions/quota_exceeded.rb",
4150
"lib/deepl/exceptions/request_entity_too_large.rb",
4251
"lib/deepl/exceptions/request_error.rb",
52+
"lib/deepl/exceptions/server_error.rb",
4353
"lib/deepl/glossary_api.rb",
4454
"lib/deepl/requests/base.rb",
55+
"lib/deepl/requests/document/download.rb",
56+
"lib/deepl/requests/document/get_status.rb",
57+
"lib/deepl/requests/document/upload.rb",
4558
"lib/deepl/requests/glossary/create.rb",
4659
"lib/deepl/requests/glossary/destroy.rb",
4760
"lib/deepl/requests/glossary/entries.rb",
@@ -52,15 +65,22 @@ Gem::Specification.new do |s|
5265
"lib/deepl/requests/translate.rb",
5366
"lib/deepl/requests/usage.rb",
5467
"lib/deepl/resources/base.rb",
68+
"lib/deepl/resources/document_handle.rb",
69+
"lib/deepl/resources/document_translation_status.rb",
5570
"lib/deepl/resources/glossary.rb",
5671
"lib/deepl/resources/language.rb",
5772
"lib/deepl/resources/language_pair.rb",
5873
"lib/deepl/resources/text.rb",
5974
"lib/deepl/resources/usage.rb",
75+
"lib/deepl/utils/backoff_timer.rb",
6076
"lib/deepl/utils/exception_builder.rb",
77+
"lib/http_client_options.rb",
78+
"license_checker.sh",
6179
"spec/api/api_spec.rb",
6280
"spec/api/configuration_spec.rb",
6381
"spec/api/deepl_spec.rb",
82+
"spec/fixtures/vcr_cassettes/deepl_document.yml",
83+
"spec/fixtures/vcr_cassettes/deepl_document_download.yml",
6484
"spec/fixtures/vcr_cassettes/deepl_glossaries.yml",
6585
"spec/fixtures/vcr_cassettes/deepl_languages.yml",
6686
"spec/fixtures/vcr_cassettes/deepl_translate.yml",
@@ -69,6 +89,8 @@ Gem::Specification.new do |s|
6989
"spec/fixtures/vcr_cassettes/languages.yml",
7090
"spec/fixtures/vcr_cassettes/translate_texts.yml",
7191
"spec/fixtures/vcr_cassettes/usage.yml",
92+
"spec/integration_tests/document_api_spec.rb",
93+
"spec/integration_tests/integration_test_utils.rb",
7294
"spec/requests/glossary/create_spec.rb",
7395
"spec/requests/glossary/destroy_spec.rb",
7496
"spec/requests/glossary/entries_spec.rb",
@@ -85,21 +107,14 @@ Gem::Specification.new do |s|
85107
"spec/resources/usage_spec.rb",
86108
"spec/spec_helper.rb"
87109
]
88-
s.homepage = "http://github.com/wikiti/deepl-rb".freeze
110+
s.homepage = "https://github.com/DeepLcom/deepl-rb".freeze
89111
s.licenses = ["MIT".freeze]
90-
s.rubygems_version = "3.3.7".freeze
91-
s.summary = "A simple ruby wrapper for the DeepL API".freeze
112+
s.rubygems_version = "3.4.6".freeze
113+
s.summary = "Official Ruby library for the DeepL language translation API.".freeze
92114

93-
if s.respond_to? :specification_version then
94-
s.specification_version = 4
95-
end
115+
s.specification_version = 4
96116

97-
if s.respond_to? :add_runtime_dependency then
98-
s.add_development_dependency(%q<juwelier>.freeze, [">= 0"])
99-
s.add_development_dependency(%q<byebug>.freeze, [">= 0"])
100-
else
101-
s.add_dependency(%q<juwelier>.freeze, [">= 0"])
102-
s.add_dependency(%q<byebug>.freeze, [">= 0"])
103-
end
117+
s.add_development_dependency(%q<juwelier>.freeze, [">= 0"])
118+
s.add_development_dependency(%q<byebug>.freeze, [">= 0"])
104119
end
105120

lib/deepl.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 DeepL SE
1+
# Copyright 2018 Daniel Herzog
22
# Use of this source code is governed by an MIT
33
# license that can be found in the LICENSE.md file.
44
# frozen_string_literal: true

lib/deepl/api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 DeepL SE
1+
# Copyright 2018 Daniel Herzog
22
# Use of this source code is governed by an MIT
33
# license that can be found in the LICENSE.md file.
44
# frozen_string_literal: true

lib/deepl/configuration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 DeepL SE
1+
# Copyright 2018 Daniel Herzog
22
# Use of this source code is governed by an MIT
33
# license that can be found in the LICENSE.md file.
44
# frozen_string_literal: true

lib/deepl/exceptions/authorization_failed.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 DeepL SE
1+
# Copyright 2018 Daniel Herzog
22
# Use of this source code is governed by an MIT
33
# license that can be found in the LICENSE.md file.
44
# frozen_string_literal: true

0 commit comments

Comments
 (0)