youdao-translate 0.1.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +44 -1
- data/README.md +10 -10
- data/lib/youdao/translate/version.rb +1 -1
- data/lib/youdao/translate/youdao.rb +4 -0
- data/youdao-translate.gemspec +5 -2
- metadata +61 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14a0c61d17890153d3b6e83697df4ec1e676ce8f7978fcade612b500b1d369b5
|
4
|
+
data.tar.gz: ded30bd18af8139eb95ebd7a3c9d26a3cb89eca7479d7286d3c7adc5894d755c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 619bb13ad5f82b16256e1cd4bbae2fb8973cae3a626eb76918c1955603e631c98e8c16eb337a24ec380b6ffb8cd18f2e5461edf8503a3a89aabcee8dffd3cb97
|
7
|
+
data.tar.gz: c9931210cb2d176ea7c94c2ef0b39bacff48f75dd9015155f4e71c16f779464d8263f205b89d8ae84bab659e1542d42b94bb3c128b6d6395b30689ddcfed6197
|
data/Gemfile.lock
CHANGED
@@ -1,18 +1,61 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
youdao-translate (0.
|
4
|
+
youdao-translate (0.2.2)
|
5
|
+
forwardable (~> 1.3.2)
|
6
|
+
http (~> 5.0)
|
7
|
+
singleton (~> 0.1.1)
|
5
8
|
|
6
9
|
GEM
|
7
10
|
remote: https://rubygems.org/
|
8
11
|
specs:
|
12
|
+
addressable (2.8.0)
|
13
|
+
public_suffix (>= 2.0.2, < 5.0)
|
14
|
+
diff-lcs (1.5.0)
|
15
|
+
domain_name (0.5.20190701)
|
16
|
+
unf (>= 0.0.5, < 1.0.0)
|
17
|
+
ffi (1.15.5)
|
18
|
+
ffi-compiler (1.0.1)
|
19
|
+
ffi (>= 1.0.0)
|
20
|
+
rake
|
21
|
+
forwardable (1.3.2)
|
22
|
+
http (5.0.4)
|
23
|
+
addressable (~> 2.8)
|
24
|
+
http-cookie (~> 1.0)
|
25
|
+
http-form_data (~> 2.2)
|
26
|
+
llhttp-ffi (~> 0.4.0)
|
27
|
+
http-cookie (1.0.4)
|
28
|
+
domain_name (~> 0.5)
|
29
|
+
http-form_data (2.3.0)
|
30
|
+
llhttp-ffi (0.4.0)
|
31
|
+
ffi-compiler (~> 1.0)
|
32
|
+
rake (~> 13.0)
|
33
|
+
public_suffix (4.0.6)
|
9
34
|
rake (13.0.6)
|
35
|
+
rspec (3.11.0)
|
36
|
+
rspec-core (~> 3.11.0)
|
37
|
+
rspec-expectations (~> 3.11.0)
|
38
|
+
rspec-mocks (~> 3.11.0)
|
39
|
+
rspec-core (3.11.0)
|
40
|
+
rspec-support (~> 3.11.0)
|
41
|
+
rspec-expectations (3.11.0)
|
42
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
43
|
+
rspec-support (~> 3.11.0)
|
44
|
+
rspec-mocks (3.11.0)
|
45
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
46
|
+
rspec-support (~> 3.11.0)
|
47
|
+
rspec-support (3.11.0)
|
48
|
+
singleton (0.1.1)
|
49
|
+
unf (0.1.4)
|
50
|
+
unf_ext
|
51
|
+
unf_ext (0.0.8)
|
10
52
|
|
11
53
|
PLATFORMS
|
12
54
|
x86_64-darwin-19
|
13
55
|
|
14
56
|
DEPENDENCIES
|
15
57
|
rake (~> 13.0)
|
58
|
+
rspec (~> 3.7)
|
16
59
|
youdao-translate!
|
17
60
|
|
18
61
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -23,23 +23,23 @@ Or install it yourself as:
|
|
23
23
|
## Usage
|
24
24
|
|
25
25
|
```ruby
|
26
|
-
Translate.get("hello")
|
26
|
+
Translate::Youdao.get("hello")
|
27
27
|
|
28
|
-
Translate.get("hello", from: "zh-CHS", to: "ja")
|
28
|
+
Translate::Youdao.get("hello", from: "zh-CHS", to: "ja")
|
29
29
|
|
30
|
-
Translate.get("hello", to: "ko")
|
30
|
+
Translate::Youdao.get("hello", to: "ko")
|
31
31
|
|
32
|
-
Translate.instance.get("hello")
|
32
|
+
Translate::Youdao.instance.get("hello")
|
33
33
|
|
34
|
-
Translate.instance.get("hello", from: "zh-CHS", to: "ja")
|
34
|
+
Translate::Youdao.instance.get("hello", from: "zh-CHS", to: "ja")
|
35
35
|
```
|
36
36
|
|
37
|
-
##
|
37
|
+
## Test
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
39
|
+
```
|
40
|
+
rspec -f d
|
41
|
+
```
|
42
42
|
|
43
43
|
## Contributing
|
44
44
|
|
45
|
-
Bug reports and pull requests are welcome on GitHub at https://
|
45
|
+
Bug reports and pull requests are welcome on GitHub at https://gitlab.com/suifeng2012/youdao-translate.
|
data/youdao-translate.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
|
11
11
|
spec.summary = "Translate using youdao"
|
12
12
|
spec.description = "Translate using youdao"
|
13
|
-
spec.homepage = "https://
|
13
|
+
spec.homepage = "https://gitlab.com/suifeng2012/youdao-tranlsate"
|
14
14
|
spec.required_ruby_version = ">= 2.6.0"
|
15
15
|
|
16
16
|
spec.metadata["homepage_uri"] = spec.homepage
|
@@ -26,7 +26,10 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.require_paths = ["lib"]
|
27
27
|
|
28
28
|
# Uncomment to register a new dependency of your gem
|
29
|
-
|
29
|
+
spec.add_dependency "singleton", "~> 0.1.1"
|
30
|
+
spec.add_dependency "http", "~> 5.0"
|
31
|
+
spec.add_dependency "forwardable", "~> 1.3.2"
|
32
|
+
spec.add_development_dependency 'rspec', '~> 3.7'
|
30
33
|
|
31
34
|
# For more information and examples about making a new gem, check out our
|
32
35
|
# guide at: https://bundler.io/guides/creating_gem.html
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: youdao-translate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- hfpp2012
|
@@ -9,7 +9,63 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2022-03-09 00:00:00.000000000 Z
|
12
|
-
dependencies:
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: singleton
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.1.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.1.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: http
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '5.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '5.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: forwardable
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.3.2
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.3.2
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.7'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.7'
|
13
69
|
description: Translate using youdao
|
14
70
|
email:
|
15
71
|
- hfpp2012@gmail.com
|
@@ -25,11 +81,11 @@ files:
|
|
25
81
|
- lib/youdao/translate/version.rb
|
26
82
|
- lib/youdao/translate/youdao.rb
|
27
83
|
- youdao-translate.gemspec
|
28
|
-
homepage: https://
|
84
|
+
homepage: https://gitlab.com/suifeng2012/youdao-tranlsate
|
29
85
|
licenses: []
|
30
86
|
metadata:
|
31
|
-
homepage_uri: https://
|
32
|
-
source_code_uri: https://
|
87
|
+
homepage_uri: https://gitlab.com/suifeng2012/youdao-tranlsate
|
88
|
+
source_code_uri: https://gitlab.com/suifeng2012/youdao-tranlsate
|
33
89
|
post_install_message:
|
34
90
|
rdoc_options: []
|
35
91
|
require_paths:
|