yandex-translator 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/lib/yandex/translator.rb +14 -8
- data/lib/yandex/translator/version.rb +1 -1
- data/spec/lib/yandex/translator_spec.rb +1 -0
- data/spec/lib/yandex/translator_vcr_spec.rb +90 -0
- data/spec/spec_helper.rb +13 -1
- data/spec/vcr/_detect.yml +42 -0
- data/spec/vcr/_langs.yml +40 -0
- data/spec/vcr/accepts_options.yml +43 -0
- data/spec/vcr/get_translated_pl_text.yml +43 -0
- data/spec/vcr/get_translated_ru_text.yml +43 -0
- data/spec/vcr/wrong_api_key.yml +42 -0
- data/yandex-translator.gemspec +1 -0
- metadata +31 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 33dd6ce30ad7100ad136fcf7f8f2e049a400c16cdd9da103079eb38f06a3cd0a
|
4
|
+
data.tar.gz: ee468daf5fd2cceee8df1a5321c01a4bd10ae756cc57a7c39d35591e41af57ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09e0b903459da0b4e3874ea73aae1e7fab313a58a7e1762a03dfa8204de1b149d8707584d35c1097c2fe60a5d7c64fc0615e8b4c37d8d4e452560913f0444b9d'
|
7
|
+
data.tar.gz: 8dcf303d9806fee8b8605e54f0bb6f6930559faae150a895eb8d15e87c5d02d997a2e3b1e265f509362a32624e3cfad6fec93db237c3a79c84bb1a6879c39d5e
|
data/.gitignore
CHANGED
data/lib/yandex/translator.rb
CHANGED
@@ -1,6 +1,15 @@
|
|
1
|
+
|
1
2
|
module Yandex
|
3
|
+
|
4
|
+
class JsonParser < HTTParty::Parser
|
5
|
+
def json
|
6
|
+
::JSON.parse(body)
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
2
10
|
class Translator
|
3
11
|
include HTTParty
|
12
|
+
parser JsonParser
|
4
13
|
base_uri 'https://translate.yandex.net/api/v1.5/tr.json'
|
5
14
|
|
6
15
|
attr_reader :api_key
|
@@ -17,8 +26,8 @@ module Yandex
|
|
17
26
|
translator.get_langs
|
18
27
|
end
|
19
28
|
|
20
|
-
def translate(text,
|
21
|
-
translator.translate(text,
|
29
|
+
def translate(text, from: nil, to: nil)
|
30
|
+
translator.translate(text, from: from, to: to)
|
22
31
|
end
|
23
32
|
|
24
33
|
def detect(text)
|
@@ -42,13 +51,10 @@ module Yandex
|
|
42
51
|
lang == '' ? nil : lang
|
43
52
|
end
|
44
53
|
|
45
|
-
def translate(text,
|
46
|
-
|
47
|
-
lang_options = lang.last
|
48
|
-
lang = [lang_options[:to], lang_options[:from]].compact
|
49
|
-
end
|
54
|
+
def translate(text, from: nil, to: nil, format: 'plain')
|
55
|
+
lang = (to.nil? && from.nil?) ? [] : [to, from].compact
|
50
56
|
|
51
|
-
options = { text: text, lang: lang.reverse.join('-') }
|
57
|
+
options = { text: text, lang: lang.reverse.join('-'), format: format }
|
52
58
|
|
53
59
|
result = visit('/translate', options)['text']
|
54
60
|
|
@@ -0,0 +1,90 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'vcr'
|
3
|
+
|
4
|
+
describe Yandex::Translator do
|
5
|
+
let(:api_key) { RSpec.configuration.yandex_api_key }
|
6
|
+
subject(:translator) { Yandex::Translator.new(api_key) }
|
7
|
+
|
8
|
+
describe '::translate' do
|
9
|
+
before do
|
10
|
+
expect_any_instance_of(Yandex::Translator).to receive(:translate)
|
11
|
+
Yandex::Translator.api_key = api_key
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe '#translate' do
|
16
|
+
it 'returns ru translalation ' do
|
17
|
+
VCR.use_cassette('get_translated_ru_text') do
|
18
|
+
response = translator.translate('Car', 'ru')
|
19
|
+
expect(response).to eq("Автомобиль")
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'returns pl translalation' do
|
24
|
+
VCR.use_cassette('get_translated_pl_text') do
|
25
|
+
response = translator.translate('Car', 'pl')
|
26
|
+
expect(response).to eq("Samochód")
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'accepts options' do
|
31
|
+
VCR.use_cassette('accepts options') do
|
32
|
+
response = translator.translate('Car', from: :ru)
|
33
|
+
expect(response).to eq("Автомобиль")
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
context 'with two languages' do
|
38
|
+
it 'accepts options' do
|
39
|
+
VCR.use_cassette('accepts options') do
|
40
|
+
response = translator.translate('Samochód', from: :pl, to: :ru)
|
41
|
+
expect(response).to eq("Автомобиль")
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'accepts languages list' do
|
46
|
+
VCR.use_cassette('accepts options') do
|
47
|
+
response = translator.translate('Car', :ru, :en)
|
48
|
+
expect(response).to eq("Автомобиль")
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
context 'with wrong api key' do
|
54
|
+
let(:wrong_translator) { Yandex::Translator.new('wrong_api_key') }
|
55
|
+
|
56
|
+
it 'returns translation error' do
|
57
|
+
expect{
|
58
|
+
VCR.use_cassette('wrong_api_key') do
|
59
|
+
wrong_translator.translate('Car', :ru, :en)
|
60
|
+
end
|
61
|
+
}.to raise_error(Yandex::ApiError, "API key is invalid")
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
describe '#detect' do
|
67
|
+
let(:detected_translation) {
|
68
|
+
VCR.use_cassette('#detect') do
|
69
|
+
translator.detect('Car')
|
70
|
+
end
|
71
|
+
}
|
72
|
+
|
73
|
+
it 'returns detected language' do
|
74
|
+
expect(detected_translation).to eq 'en'
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
describe '#langs' do
|
79
|
+
let(:list_of_langs) {
|
80
|
+
VCR.use_cassette('#langs') do
|
81
|
+
translator.langs
|
82
|
+
end
|
83
|
+
}
|
84
|
+
|
85
|
+
it 'returns array of dirs' do
|
86
|
+
expect(list_of_langs).to include 'en-ru', 'uk-pl', 'pl-ru'
|
87
|
+
end
|
88
|
+
|
89
|
+
end
|
90
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,8 +1,20 @@
|
|
1
1
|
require 'rspec'
|
2
2
|
require 'yandex-translator'
|
3
3
|
require 'webmock/rspec'
|
4
|
-
|
4
|
+
require 'vcr'
|
5
|
+
include WebMock::API
|
5
6
|
|
6
7
|
RSpec.configure do |config|
|
8
|
+
if File.exists? ('spec/secrets.yml')
|
9
|
+
YANDEX_API_KEY = YAML.load_file('spec/secrets.yml')
|
10
|
+
else
|
11
|
+
YANDEX_API_KEY = {}
|
12
|
+
end
|
13
|
+
config.add_setting :yandex_api_key, :default => YANDEX_API_KEY['yandex_translator_api_key']
|
14
|
+
end
|
7
15
|
|
16
|
+
VCR.configure do |c|
|
17
|
+
c.cassette_library_dir = 'spec/vcr'
|
18
|
+
c.hook_into :webmock
|
19
|
+
c.filter_sensitive_data('<YANDEX_API_KEY>') { RSpec.configuration.yandex_api_key }
|
8
20
|
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://translate.yandex.net/api/v1.5/tr.json/detect
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: text=Car&key=<YANDEX_API_KEY>
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- nginx/1.6.2
|
23
|
+
Date:
|
24
|
+
- Fri, 19 May 2017 10:25:21 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Content-Length:
|
28
|
+
- '24'
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Keep-Alive:
|
32
|
+
- timeout=120
|
33
|
+
Cache-Control:
|
34
|
+
- no-store
|
35
|
+
X-Content-Type-Options:
|
36
|
+
- nosniff
|
37
|
+
body:
|
38
|
+
encoding: UTF-8
|
39
|
+
string: '{"code":200,"lang":"en"}'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Fri, 19 May 2017 10:25:21 GMT
|
42
|
+
recorded_with: VCR 3.0.3
|
data/spec/vcr/_langs.yml
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://translate.yandex.net/api/v1.5/tr.json/getLangs
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: key=<YANDEX_API_KEY>
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- nginx/1.6.2
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
Transfer-Encoding:
|
26
|
+
- chunked
|
27
|
+
Connection:
|
28
|
+
- keep-alive
|
29
|
+
Keep-Alive:
|
30
|
+
- timeout=120
|
31
|
+
Date:
|
32
|
+
- Fri, 19 May 2017 10:25:21 GMT
|
33
|
+
X-Content-Type-Options:
|
34
|
+
- nosniff
|
35
|
+
body:
|
36
|
+
encoding: ASCII-8BIT
|
37
|
+
string: '{"dirs":["az-ru","be-bg","be-cs","be-de","be-en","be-es","be-fr","be-it","be-pl","be-ro","be-ru","be-sr","be-tr","bg-be","bg-ru","bg-uk","ca-en","ca-ru","cs-be","cs-en","cs-ru","cs-uk","da-en","da-ru","de-be","de-en","de-es","de-fr","de-it","de-ru","de-tr","de-uk","el-en","el-ru","en-be","en-ca","en-cs","en-da","en-de","en-el","en-es","en-et","en-fi","en-fr","en-hu","en-it","en-lt","en-lv","en-mk","en-nl","en-no","en-pt","en-ru","en-sk","en-sl","en-sq","en-sv","en-tr","en-uk","es-be","es-de","es-en","es-ru","es-uk","et-en","et-ru","fi-en","fi-ru","fr-be","fr-de","fr-en","fr-ru","fr-uk","hr-ru","hu-en","hu-ru","hy-ru","it-be","it-de","it-en","it-ru","it-uk","lt-en","lt-ru","lv-en","lv-ru","mk-en","mk-ru","nl-en","nl-ru","no-en","no-ru","pl-be","pl-ru","pl-uk","pt-en","pt-ru","ro-be","ro-ru","ro-uk","ru-az","ru-be","ru-bg","ru-ca","ru-cs","ru-da","ru-de","ru-el","ru-en","ru-es","ru-et","ru-fi","ru-fr","ru-hr","ru-hu","ru-hy","ru-it","ru-lt","ru-lv","ru-mk","ru-nl","ru-no","ru-pl","ru-pt","ru-ro","ru-sk","ru-sl","ru-sq","ru-sr","ru-sv","ru-tr","ru-uk","sk-en","sk-ru","sl-en","sl-ru","sq-en","sq-ru","sr-be","sr-ru","sr-uk","sv-en","sv-ru","tr-be","tr-de","tr-en","tr-ru","tr-uk","uk-bg","uk-cs","uk-de","uk-en","uk-es","uk-fr","uk-it","uk-pl","uk-ro","uk-ru","uk-sr","uk-tr"]}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Fri, 19 May 2017 10:25:21 GMT
|
40
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,43 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://translate.yandex.net/api/v1.5/tr.json/translate
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: text=Car&lang=ru&key=<YANDEX_API_KEY>
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- nginx/1.6.2
|
23
|
+
Date:
|
24
|
+
- Fri, 19 May 2017 10:25:20 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Content-Length:
|
28
|
+
- '59'
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Keep-Alive:
|
32
|
+
- timeout=120
|
33
|
+
X-Content-Type-Options:
|
34
|
+
- nosniff
|
35
|
+
Cache-Control:
|
36
|
+
- no-store
|
37
|
+
body:
|
38
|
+
encoding: ASCII-8BIT
|
39
|
+
string: !binary |-
|
40
|
+
eyJjb2RlIjoyMDAsImxhbmciOiJlbi1ydSIsInRleHQiOlsi0JDQstGC0L7QvNC+0LHQuNC70YwiXX0=
|
41
|
+
http_version:
|
42
|
+
recorded_at: Fri, 19 May 2017 10:25:20 GMT
|
43
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,43 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://translate.yandex.net/api/v1.5/tr.json/translate
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: text=Car&lang=pl&key=<YANDEX_API_KEY>
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- nginx/1.6.2
|
23
|
+
Date:
|
24
|
+
- Fri, 19 May 2017 10:25:19 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Content-Length:
|
28
|
+
- '48'
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Keep-Alive:
|
32
|
+
- timeout=120
|
33
|
+
X-Content-Type-Options:
|
34
|
+
- nosniff
|
35
|
+
Cache-Control:
|
36
|
+
- no-store
|
37
|
+
body:
|
38
|
+
encoding: ASCII-8BIT
|
39
|
+
string: !binary |-
|
40
|
+
eyJjb2RlIjoyMDAsImxhbmciOiJlbi1wbCIsInRleHQiOlsiU2Ftb2Now7NkIl19
|
41
|
+
http_version:
|
42
|
+
recorded_at: Fri, 19 May 2017 10:25:19 GMT
|
43
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,43 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://translate.yandex.net/api/v1.5/tr.json/translate
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: text=Car&lang=ru&key=<YANDEX_API_KEY>
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- nginx/1.6.2
|
23
|
+
Date:
|
24
|
+
- Fri, 19 May 2017 10:25:18 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Content-Length:
|
28
|
+
- '59'
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Keep-Alive:
|
32
|
+
- timeout=120
|
33
|
+
X-Content-Type-Options:
|
34
|
+
- nosniff
|
35
|
+
Cache-Control:
|
36
|
+
- no-store
|
37
|
+
body:
|
38
|
+
encoding: ASCII-8BIT
|
39
|
+
string: !binary |-
|
40
|
+
eyJjb2RlIjoyMDAsImxhbmciOiJlbi1ydSIsInRleHQiOlsi0JDQstGC0L7QvNC+0LHQuNC70YwiXX0=
|
41
|
+
http_version:
|
42
|
+
recorded_at: Fri, 19 May 2017 10:25:18 GMT
|
43
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://translate.yandex.net/api/v1.5/tr.json/translate
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: text=Car&lang=en-ru&key=wrong_api_key
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 403
|
19
|
+
message: Forbidden
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- nginx/1.6.2
|
23
|
+
Date:
|
24
|
+
- Fri, 19 May 2017 10:25:20 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Content-Length:
|
28
|
+
- '43'
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Keep-Alive:
|
32
|
+
- timeout=120
|
33
|
+
X-Content-Type-Options:
|
34
|
+
- nosniff
|
35
|
+
Cache-Control:
|
36
|
+
- no-store
|
37
|
+
body:
|
38
|
+
encoding: UTF-8
|
39
|
+
string: '{"code":401,"message":"API key is invalid"}'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Fri, 19 May 2017 10:25:20 GMT
|
42
|
+
recorded_with: VCR 3.0.3
|
data/yandex-translator.gemspec
CHANGED
@@ -15,6 +15,7 @@ Gem::Specification.new do |gem|
|
|
15
15
|
gem.add_dependency 'httparty', '>= 0.13.4'
|
16
16
|
gem.add_development_dependency 'rspec', '~> 3.1'
|
17
17
|
gem.add_development_dependency 'webmock'
|
18
|
+
gem.add_development_dependency 'vcr'
|
18
19
|
|
19
20
|
gem.files = `git ls-files`.split($/)
|
20
21
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yandex-translator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Artur Egorov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: vcr
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description: Library for Yandex Translate API
|
56
70
|
email:
|
57
71
|
- artur@egorov.in
|
@@ -68,7 +82,14 @@ files:
|
|
68
82
|
- lib/yandex/translator.rb
|
69
83
|
- lib/yandex/translator/version.rb
|
70
84
|
- spec/lib/yandex/translator_spec.rb
|
85
|
+
- spec/lib/yandex/translator_vcr_spec.rb
|
71
86
|
- spec/spec_helper.rb
|
87
|
+
- spec/vcr/_detect.yml
|
88
|
+
- spec/vcr/_langs.yml
|
89
|
+
- spec/vcr/accepts_options.yml
|
90
|
+
- spec/vcr/get_translated_pl_text.yml
|
91
|
+
- spec/vcr/get_translated_ru_text.yml
|
92
|
+
- spec/vcr/wrong_api_key.yml
|
72
93
|
- yandex-translator.gemspec
|
73
94
|
homepage: ''
|
74
95
|
licenses: []
|
@@ -89,10 +110,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
110
|
version: '0'
|
90
111
|
requirements: []
|
91
112
|
rubyforge_project:
|
92
|
-
rubygems_version: 2.
|
113
|
+
rubygems_version: 2.7.6
|
93
114
|
signing_key:
|
94
115
|
specification_version: 4
|
95
116
|
summary: Yandex Translate API
|
96
117
|
test_files:
|
97
118
|
- spec/lib/yandex/translator_spec.rb
|
119
|
+
- spec/lib/yandex/translator_vcr_spec.rb
|
98
120
|
- spec/spec_helper.rb
|
121
|
+
- spec/vcr/_detect.yml
|
122
|
+
- spec/vcr/_langs.yml
|
123
|
+
- spec/vcr/accepts_options.yml
|
124
|
+
- spec/vcr/get_translated_pl_text.yml
|
125
|
+
- spec/vcr/get_translated_ru_text.yml
|
126
|
+
- spec/vcr/wrong_api_key.yml
|