deepl-rb 2.1.0 → 2.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7c3fdd20441317600a911a02659531c6595949ac
4
- data.tar.gz: 54818a5de28df31e33f2cf8434834177fbe71989
2
+ SHA256:
3
+ metadata.gz: cf8ebdcd8a45fe7ad967c6b029c25bbfb434fb084248f4857af3a951ac796d2f
4
+ data.tar.gz: fbc03bfcbb0e0da19a0c0b13f6362fda347bf8827f06621938504276b498f5b3
5
5
  SHA512:
6
- metadata.gz: e389b2270f9cc4584bbe5e77cf6d1f7f6aa087d23a4aa649afe8507c3f0be484685813c161e72d9b30acba49a67277e116ec141b7943216cc1eef399d703edd6
7
- data.tar.gz: 1dc00e5ba9ab6622f1bcd0fad1b4df2eef7258dcf1ee667ad6c9b7d647975c4eced8f4a37db192c96df020a395124bc48ab599f5dd2a05da23fa8452907bf12f
6
+ metadata.gz: 43f953deb1764db33e4c184af1f2456ec2f0eeccb4eeb4be1487dd4f84929b557f2e5cb81c9e258fb97caf5ab3adc2e28b7c850e8eed744d865f12c10abbc680
7
+ data.tar.gz: dcbf37fa50d6219ff68f6c77684414f9d7b1e32c102654e98e4e550af38f6f2923dd796563f15a35fb0fe87891a49d88b804f229e632de45407811f12db6e2ea
data/.circleci/config.yml CHANGED
@@ -3,26 +3,14 @@ jobs:
3
3
  build:
4
4
  working_directory: ~/deepl-rb
5
5
  docker:
6
- - image: circleci/ruby:2.1
6
+ - image: circleci/ruby:2.7
7
7
  steps:
8
8
  - checkout
9
9
 
10
- # Restore bundle cache
11
- - type: cache-restore
12
- name: Restore bundle cache
13
- key: deepl-rb-bundle-{{ checksum "Gemfile.lock" }}
14
-
15
10
  - run:
16
11
  name: Bundle Install
17
12
  command: bundle install --path vendor/bundle
18
13
 
19
- # Store bundle cache
20
- - type: cache-save
21
- name: Store bundle cache
22
- key: deepl-rb-bundle-{{ checksum "Gemfile.lock" }}
23
- paths:
24
- - vendor/bundle
25
-
26
14
  # Run rspec
27
15
  - type: shell
28
16
  command: |
data/.rubocop.yml CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  AllCops:
4
4
  DisplayCopNames: true
5
+ NewCops: enable
5
6
  Exclude:
6
7
  - deepl-rb.gemspec
7
8
  - vendor/**/*
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  group :development do
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # DeepL for ruby
4
4
 
5
- A simple ruby wrapper for the [DeepL translation API (v1)](https://www.deepl.com/api.html).
5
+ A simple ruby wrapper for the [DeepL translation API (v2)](https://www.deepl.com/api.html).
6
6
 
7
7
  ## Installation
8
8
 
@@ -35,12 +35,13 @@ DeepL.configure do |config|
35
35
  end
36
36
  ```
37
37
 
38
- You can also configure the api host:
38
+ You can also configure the API host and the API version:
39
39
 
40
40
  ```rb
41
41
  DeepL.configure do |config|
42
42
  config.auth_key = 'your-api-token'
43
43
  config.host = 'https://test-api.deepl.com' # Default value is 'https://api.deepl.com'
44
+ config.version = 'v1' # Default value is 'v2'
44
45
  end
45
46
  ```
46
47
 
@@ -86,9 +87,11 @@ Here's a list of available language codes:
86
87
  | `DE` | German
87
88
  | `FR` | French
88
89
  | `ES` | Spanish
90
+ | `PT` | Portuguese
89
91
  | `IT` | Italian
90
92
  | `NL` | Dutch
91
93
  | `PL` | Polish
94
+ | `RU` | Russian
92
95
 
93
96
  You can also use custom query parameters, like `tag_handling`, `split_sentences`, `non_splitting_tags` or `ignore_tags`:
94
97
 
@@ -127,11 +130,12 @@ puts usage.character_limit
127
130
 
128
131
  You can capture and process exceptions that may be raised during API calls. These are all the possible exceptions:
129
132
 
130
- | Exception class | Descripcion |
133
+ | Exception class | Description |
131
134
  | --------------- | ----------- |
132
- | `DeepL::Exceptions::AuthorizationFailed` | The authorization process has failed. Check your auth_key value. |
135
+ | `DeepL::Exceptions::AuthorizationFailed` | The authorization process has failed. Check your `auth_key` value. |
133
136
  | `DeepL::Exceptions::BadRequest` | Something is wrong in your request. Check `exception.message` for more information. |
134
137
  | `DeepL::Exceptions::LimitExceeded` | You've reached the API's call limit. |
138
+ | `DeepL::Exceptions::QuotaExceeded` | You've reached the API's character limit. |
135
139
  | `DeepL::Exceptions::RequestError` | An unkown request error. Check `exception.response` and `exception.request` for more information. |
136
140
 
137
141
  An exampling of handling a generic exception:
@@ -145,9 +149,31 @@ rescue DeepL::Exceptions::RequestError => e
145
149
  puts "Response body: #{e.response.body}"
146
150
  puts "Request body: #{e.request.body}"
147
151
  end
152
+ ```
153
+
154
+ ## Integrations
155
+
156
+ ### Ruby on Rails
157
+
158
+ You may use this gem as a standalone service by creating an initializer on your
159
+ `config/initializers` folder with your DeepL configuration. For example:
148
160
 
161
+ ```rb
162
+ # config/initializers/deepl.rb
163
+ DeepL.configure do |config|
164
+ # Your configuration goes here
165
+ end
149
166
  ```
150
167
 
168
+ Since the DeepL service is defined globally, you can use service anywhere in your code
169
+ (controllers, models, views, jobs, plain ruby objects… you name it).
170
+
171
+ ### i18n-tasks
172
+
173
+ You may also take a look at [`i18n-tasks`](https://github.com/glebm/i18n-tasks), which is a gem
174
+ that helps you find and manage missing and unused translations. `deepl-rb` is used as one of the
175
+ backend services to translate content.
176
+
151
177
  ## Development
152
178
 
153
179
  Clone the repository, and install its dependencies:
@@ -163,11 +189,3 @@ To run tests (rspec and rubocop), use
163
189
  ```
164
190
  bundle exec rake test
165
191
  ```
166
-
167
- ## Contributors
168
-
169
- This project has been developed by:
170
-
171
- | Avatar | Name | Nickname | Email |
172
- | ------ | ---- | -------- | ----- |
173
- | ![](http://www.gravatar.com/avatar/2ae6d81e0605177ba9e17b19f54e6b6c.jpg?s=64) | Daniel Herzog | Wikiti | [info@danielherzog.es](mailto:info@danielherzog.es)
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rubygems'
2
4
  require 'bundler'
3
5
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.0
1
+ 2.2.4
data/deepl-rb.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: deepl-rb 2.1.0 ruby lib
5
+ # stub: deepl-rb 2.2.4 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "deepl-rb".freeze
9
- s.version = "2.1.0"
9
+ s.version = "2.2.4"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Daniel Herzog".freeze]
14
- s.date = "2018-07-24"
14
+ s.date = "2021-02-28"
15
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
16
  s.email = "info@danielherzog.es".freeze
17
17
  s.extra_rdoc_files = [
@@ -22,7 +22,6 @@ Gem::Specification.new do |s|
22
22
  ".circleci/config.yml",
23
23
  ".rubocop.yml",
24
24
  "Gemfile",
25
- "Gemfile.lock",
26
25
  "LICENSE.md",
27
26
  "README.md",
28
27
  "Rakefile",
@@ -35,6 +34,7 @@ Gem::Specification.new do |s|
35
34
  "lib/deepl/exceptions/bad_request.rb",
36
35
  "lib/deepl/exceptions/error.rb",
37
36
  "lib/deepl/exceptions/limit_exceeded.rb",
37
+ "lib/deepl/exceptions/quota_exceeded.rb",
38
38
  "lib/deepl/exceptions/request_error.rb",
39
39
  "lib/deepl/requests/base.rb",
40
40
  "lib/deepl/requests/translate.rb",
@@ -57,17 +57,15 @@ Gem::Specification.new do |s|
57
57
  ]
58
58
  s.homepage = "http://github.com/wikiti/deepl-rb".freeze
59
59
  s.licenses = ["MIT".freeze]
60
- s.rubygems_version = "2.6.14".freeze
60
+ s.rubygems_version = "3.1.2".freeze
61
61
  s.summary = "A simple ruby wrapper for the DeepL API".freeze
62
62
 
63
63
  if s.respond_to? :specification_version then
64
64
  s.specification_version = 4
65
+ end
65
66
 
66
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
67
- s.add_development_dependency(%q<juwelier>.freeze, [">= 0"])
68
- else
69
- s.add_dependency(%q<juwelier>.freeze, [">= 0"])
70
- end
67
+ if s.respond_to? :add_runtime_dependency then
68
+ s.add_development_dependency(%q<juwelier>.freeze, [">= 0"])
71
69
  else
72
70
  s.add_dependency(%q<juwelier>.freeze, [">= 0"])
73
71
  end
data/lib/deepl.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # -- Dependencies
2
4
  require 'json'
3
5
  require 'net/http'
@@ -8,6 +10,7 @@ require 'deepl/exceptions/request_error'
8
10
  require 'deepl/exceptions/authorization_failed'
9
11
  require 'deepl/exceptions/bad_request'
10
12
  require 'deepl/exceptions/limit_exceeded'
13
+ require 'deepl/exceptions/quota_exceeded'
11
14
 
12
15
  # -- Requests
13
16
  require 'deepl/requests/base'
data/lib/deepl/api.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DeepL
2
4
  class API
3
5
  attr_reader :configuration
@@ -1,6 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DeepL
2
4
  class Configuration
3
- ATTRIBUTES = %i[auth_key host].freeze
5
+ ATTRIBUTES = %i[auth_key host version].freeze
4
6
 
5
7
  attr_accessor(*ATTRIBUTES)
6
8
 
@@ -8,6 +10,7 @@ module DeepL
8
10
  data.each { |key, value| send("#{key}=", value) }
9
11
  @auth_key ||= ENV['DEEPL_AUTH_KEY']
10
12
  @host ||= 'https://api.deepl.com'
13
+ @version ||= 'v2'
11
14
  end
12
15
 
13
16
  def validate!
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DeepL
2
4
  module Exceptions
3
5
  class AuthorizationFailed < RequestError
@@ -1,8 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DeepL
2
4
  module Exceptions
3
5
  class BadRequest < RequestError
4
6
  def message
5
7
  JSON.parse(response.body)['message']
8
+ rescue JSON::ParserError
9
+ response.body
6
10
  end
7
11
  end
8
12
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DeepL
2
4
  module Exceptions
3
5
  class Error < StandardError
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DeepL
2
4
  module Exceptions
3
5
  class LimitExceeded < RequestError
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DeepL
4
+ module Exceptions
5
+ class QuotaExceeded < RequestError
6
+ def message
7
+ 'Quota exceeded. The character limit has been reached.'
8
+ end
9
+ end
10
+ end
11
+ end
@@ -1,15 +1,18 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DeepL
2
4
  module Exceptions
3
5
  class RequestError < Error
4
6
  attr_reader :request, :response
5
7
 
6
8
  def initialize(request, response)
9
+ super()
7
10
  @request = request
8
11
  @response = response
9
12
  end
10
13
 
11
14
  def message
12
- 'Unkown error.'
15
+ 'Unknown error.'
13
16
  end
14
17
  end
15
18
  end
@@ -1,8 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DeepL
2
4
  module Requests
3
5
  class Base
4
- API_VERSION = 'v1'.freeze
5
-
6
6
  attr_reader :api, :response, :options
7
7
 
8
8
  def initialize(api, options = {})
@@ -34,7 +34,7 @@ module DeepL
34
34
 
35
35
  def post(payload)
36
36
  request = Net::HTTP::Post.new(uri.request_uri)
37
- request.set_form_data(payload.reject { |_, v| v.nil? })
37
+ request.set_form_data(payload.compact)
38
38
  response = http.request(request)
39
39
 
40
40
  validate_response!(request, response)
@@ -64,6 +64,7 @@ module DeepL
64
64
  when '400' then raise Exceptions::BadRequest.new(request, response)
65
65
  when '403' then raise Exceptions::AuthorizationFailed.new(request, response)
66
66
  when '429' then raise Exceptions::LimitExceeded.new(request, response)
67
+ when '456' then raise Exceptions::QuotaExceeded.new(request, response)
67
68
  else raise Exceptions::RequestError.new(request, response)
68
69
  end
69
70
  end
@@ -73,7 +74,7 @@ module DeepL
73
74
  end
74
75
 
75
76
  def url
76
- "#{host}/#{API_VERSION}/#{path}"
77
+ "#{host}/#{api.configuration.version}/#{path}"
77
78
  end
78
79
 
79
80
  def uri
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DeepL
2
4
  module Requests
3
5
  class Translate < Base
@@ -31,6 +33,7 @@ module DeepL
31
33
  def tweak_parameters!
32
34
  OPTIONS_CONVERSIONS.each do |param, converter|
33
35
  next unless option?(param) && converter[option(param)]
36
+
34
37
  set_option(param, converter[option(param)])
35
38
  end
36
39
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DeepL
2
4
  module Requests
3
5
  class Usage < Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DeepL
2
4
  module Resources
3
5
  class Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DeepL
2
4
  module Resources
3
5
  class Text < Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DeepL
2
4
  module Resources
3
5
  class Usage < Base
data/spec/api/api_spec.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe DeepL::API do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe DeepL::Configuration do
@@ -9,15 +11,17 @@ describe DeepL::Configuration do
9
11
  it 'should use default attributes' do
10
12
  expect(subject.auth_key).to eq(ENV['DEEPL_AUTH_KEY'])
11
13
  expect(subject.host).to eq('https://api.deepl.com')
14
+ expect(subject.version).to eq('v2')
12
15
  end
13
16
  end
14
17
 
15
18
  context 'When using custom configuration attributes' do
16
- let(:attributes) { { auth_key: 'SAMPLE', host: 'http://www.example.org' } }
19
+ let(:attributes) { { auth_key: 'SAMPLE', host: 'http://www.example.org', version: 'v1' } }
17
20
 
18
21
  it 'should use custom attributes' do
19
22
  expect(subject.auth_key).to eq(attributes[:auth_key])
20
23
  expect(subject.host).to eq(attributes[:host])
24
+ expect(subject.version).to eq(attributes[:version])
21
25
  end
22
26
  end
23
27
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe DeepL do
@@ -15,12 +17,13 @@ describe DeepL do
15
17
 
16
18
  context 'When providing a valid configuration' do
17
19
  let(:configuration) do
18
- DeepL::Configuration.new(auth_key: 'VALID', host: 'http://www.example.org')
20
+ DeepL::Configuration.new(auth_key: 'VALID', host: 'http://www.example.org', version: 'v1')
19
21
  end
20
22
  before do
21
23
  subject.configure do |config|
22
24
  config.auth_key = configuration.auth_key
23
25
  config.host = configuration.host
26
+ config.version = configuration.version
24
27
  end
25
28
  end
26
29
 
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://api.deepl.com/v1/translate?auth_key=VALID_TOKEN&param=fake
5
+ uri: https://api.deepl.com/v2/translate?auth_key=VALID_TOKEN&param=fake
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: text=Sample&source_lang=EN&target_lang=ES
@@ -35,6 +35,6 @@ http_interactions:
35
35
  body:
36
36
  encoding: UTF-8
37
37
  string: '{"translations":[{"detected_source_language":"EN","text":"Muestra"}]}'
38
- http_version:
38
+ http_version:
39
39
  recorded_at: Tue, 08 May 2018 16:31:33 GMT
40
40
  recorded_with: VCR 4.0.0
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.deepl.com/v1/usage?auth_key=VALID_TOKEN
5
+ uri: https://api.deepl.com/v2/usage?auth_key=VALID_TOKEN
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://api.deepl.com/v1/translate?auth_key=VALID_TOKEN
5
+ uri: https://api.deepl.com/v2/translate?auth_key=VALID_TOKEN
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: text=Sample+text&source_lang=EN&target_lang=ES
@@ -40,7 +40,7 @@ http_interactions:
40
40
  recorded_at: Tue, 08 May 2018 16:31:34 GMT
41
41
  - request:
42
42
  method: post
43
- uri: https://api.deepl.com/v1/translate?auth_key=VALID_TOKEN
43
+ uri: https://api.deepl.com/v2/translate?auth_key=VALID_TOKEN
44
44
  body:
45
45
  encoding: US-ASCII
46
46
  string: text=Sample&text=Word&source_lang=EN&target_lang=ES
@@ -77,7 +77,7 @@ http_interactions:
77
77
  recorded_at: Tue, 08 May 2018 16:31:35 GMT
78
78
  - request:
79
79
  method: post
80
- uri: https://api.deepl.com/v1/translate?auth_key=VALID_TOKEN
80
+ uri: https://api.deepl.com/v2/translate?auth_key=VALID_TOKEN
81
81
  body:
82
82
  encoding: US-ASCII
83
83
  string: text=%3Cp%3ESample+text%3C%2Fp%3E&source_lang=EN&target_lang=ES
@@ -115,7 +115,7 @@ http_interactions:
115
115
  recorded_at: Tue, 08 May 2018 16:31:36 GMT
116
116
  - request:
117
117
  method: post
118
- uri: https://api.deepl.com/v1/translate?auth_key=invalid
118
+ uri: https://api.deepl.com/v2/translate?auth_key=invalid
119
119
  body:
120
120
  encoding: US-ASCII
121
121
  string: text=Sample+text&source_lang=EN&target_lang=ES
@@ -148,7 +148,7 @@ http_interactions:
148
148
  recorded_at: Tue, 08 May 2018 16:31:37 GMT
149
149
  - request:
150
150
  method: post
151
- uri: https://api.deepl.com/v1/translate?auth_key=VALID_TOKEN
151
+ uri: https://api.deepl.com/v2/translate?auth_key=VALID_TOKEN
152
152
  body:
153
153
  encoding: US-ASCII
154
154
  string: source_lang=EN&target_lang=ES
@@ -181,7 +181,7 @@ http_interactions:
181
181
  recorded_at: Tue, 08 May 2018 16:31:37 GMT
182
182
  - request:
183
183
  method: post
184
- uri: https://api.deepl.com/v1/translate?auth_key=VALID_TOKEN
184
+ uri: https://api.deepl.com/v2/translate?auth_key=VALID_TOKEN
185
185
  body:
186
186
  encoding: US-ASCII
187
187
  string: text=Sample+text&source_lang=EN
@@ -214,7 +214,7 @@ http_interactions:
214
214
  recorded_at: Tue, 08 May 2018 16:31:37 GMT
215
215
  - request:
216
216
  method: post
217
- uri: https://api.deepl.com/v1/translate?auth_key=VALID_TOKEN&ignore_tags=code,%20span
217
+ uri: https://api.deepl.com/v2/translate?auth_key=VALID_TOKEN&ignore_tags=code,%20span
218
218
  body:
219
219
  encoding: US-ASCII
220
220
  string: text=Welcome+and+%3Ccode%3EHello+great+World%3C%2Fcode%3E+Good+Morning%21&source_lang=EN&target_lang=ES
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.deepl.com/v1/usage?auth_key=VALID_TOKEN
5
+ uri: https://api.deepl.com/v2/usage?auth_key=VALID_TOKEN
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe DeepL::Requests::Translate do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe DeepL::Requests::Usage do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe DeepL::Resources::Text do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe DeepL::Resources::Usage do
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Coverage
2
4
  require 'simplecov'
3
5
  SimpleCov.start
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: 2.1.0
4
+ version: 2.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Herzog
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-24 00:00:00.000000000 Z
11
+ date: 2021-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: juwelier
@@ -36,7 +36,6 @@ files:
36
36
  - ".circleci/config.yml"
37
37
  - ".rubocop.yml"
38
38
  - Gemfile
39
- - Gemfile.lock
40
39
  - LICENSE.md
41
40
  - README.md
42
41
  - Rakefile
@@ -49,6 +48,7 @@ files:
49
48
  - lib/deepl/exceptions/bad_request.rb
50
49
  - lib/deepl/exceptions/error.rb
51
50
  - lib/deepl/exceptions/limit_exceeded.rb
51
+ - lib/deepl/exceptions/quota_exceeded.rb
52
52
  - lib/deepl/exceptions/request_error.rb
53
53
  - lib/deepl/requests/base.rb
54
54
  - lib/deepl/requests/translate.rb
@@ -72,7 +72,7 @@ homepage: http://github.com/wikiti/deepl-rb
72
72
  licenses:
73
73
  - MIT
74
74
  metadata: {}
75
- post_install_message:
75
+ post_install_message:
76
76
  rdoc_options: []
77
77
  require_paths:
78
78
  - lib
@@ -87,9 +87,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  requirements: []
90
- rubyforge_project:
91
- rubygems_version: 2.6.14
92
- signing_key:
90
+ rubygems_version: 3.1.2
91
+ signing_key:
93
92
  specification_version: 4
94
93
  summary: A simple ruby wrapper for the DeepL API
95
94
  test_files: []
data/Gemfile.lock DELETED
@@ -1,113 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- addressable (2.5.2)
5
- public_suffix (>= 2.0.2, < 4.0)
6
- ast (2.3.0)
7
- builder (3.2.3)
8
- codecov (0.1.10)
9
- json
10
- simplecov
11
- url
12
- crack (0.4.3)
13
- safe_yaml (~> 1.0.0)
14
- descendants_tracker (0.0.4)
15
- thread_safe (~> 0.3, >= 0.3.1)
16
- diff-lcs (1.3)
17
- docile (1.1.5)
18
- faraday (0.12.2)
19
- multipart-post (>= 1.2, < 3)
20
- git (1.3.0)
21
- github_api (0.18.2)
22
- addressable (~> 2.4)
23
- descendants_tracker (~> 0.0.4)
24
- faraday (~> 0.8)
25
- hashie (~> 3.5, >= 3.5.2)
26
- oauth2 (~> 1.0)
27
- hashdiff (0.3.7)
28
- hashie (3.5.7)
29
- highline (1.7.10)
30
- json (2.1.0)
31
- juwelier (2.1.3)
32
- builder
33
- bundler (>= 1.13)
34
- git (>= 1.2.5)
35
- github_api
36
- highline (>= 1.6.15)
37
- nokogiri (>= 1.5.10)
38
- rake
39
- rdoc
40
- semver
41
- jwt (1.5.6)
42
- mini_portile2 (2.3.0)
43
- multi_json (1.12.2)
44
- multi_xml (0.6.0)
45
- multipart-post (2.0.0)
46
- nokogiri (1.8.1)
47
- mini_portile2 (~> 2.3.0)
48
- oauth2 (1.4.0)
49
- faraday (>= 0.8, < 0.13)
50
- jwt (~> 1.0)
51
- multi_json (~> 1.3)
52
- multi_xml (~> 0.5)
53
- rack (>= 1.2, < 3)
54
- parallel (1.12.1)
55
- parser (2.4.0.2)
56
- ast (~> 2.3)
57
- powerpack (0.1.1)
58
- public_suffix (3.0.1)
59
- rack (1.6.8)
60
- rainbow (3.0.0)
61
- rake (12.3.0)
62
- rdoc (5.1.0)
63
- rspec (3.7.0)
64
- rspec-core (~> 3.7.0)
65
- rspec-expectations (~> 3.7.0)
66
- rspec-mocks (~> 3.7.0)
67
- rspec-core (3.7.1)
68
- rspec-support (~> 3.7.0)
69
- rspec-expectations (3.7.0)
70
- diff-lcs (>= 1.2.0, < 2.0)
71
- rspec-support (~> 3.7.0)
72
- rspec-mocks (3.7.0)
73
- diff-lcs (>= 1.2.0, < 2.0)
74
- rspec-support (~> 3.7.0)
75
- rspec-support (3.7.0)
76
- rubocop (0.52.1)
77
- parallel (~> 1.10)
78
- parser (>= 2.4.0.2, < 3.0)
79
- powerpack (~> 0.1)
80
- rainbow (>= 2.2.2, < 4.0)
81
- ruby-progressbar (~> 1.7)
82
- unicode-display_width (~> 1.0, >= 1.0.1)
83
- ruby-progressbar (1.9.0)
84
- safe_yaml (1.0.4)
85
- semver (1.0.1)
86
- simplecov (0.15.1)
87
- docile (~> 1.1.0)
88
- json (>= 1.8, < 3)
89
- simplecov-html (~> 0.10.0)
90
- simplecov-html (0.10.2)
91
- thread_safe (0.3.6)
92
- unicode-display_width (1.3.0)
93
- url (0.3.2)
94
- vcr (4.0.0)
95
- webmock (3.2.1)
96
- addressable (>= 2.3.6)
97
- crack (>= 0.3.2)
98
- hashdiff
99
-
100
- PLATFORMS
101
- ruby
102
-
103
- DEPENDENCIES
104
- codecov
105
- juwelier
106
- rspec
107
- rubocop
108
- simplecov
109
- vcr
110
- webmock
111
-
112
- BUNDLED WITH
113
- 1.16.0.pre.2