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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 163db4ee09cf33010d8731e0a1628bece3ae671f9c5c9d251f9210df147d4154
4
- data.tar.gz: e67e8f9932e919e133e3ff5e7a24c5c0069fa874f89f693ba959b3bb16dd3334
3
+ metadata.gz: 14a0c61d17890153d3b6e83697df4ec1e676ce8f7978fcade612b500b1d369b5
4
+ data.tar.gz: ded30bd18af8139eb95ebd7a3c9d26a3cb89eca7479d7286d3c7adc5894d755c
5
5
  SHA512:
6
- metadata.gz: ad2ebc94f688b5d6a2f51004077d9baccb9e15ecd42ef70faaff614878fc4ea50e8cc140c2ffee346a28ae2c4686b50d49544f079817e4daf3b17746b31be15e
7
- data.tar.gz: 7c84153cec840297ee5e7d23856c9e1403d8de0b9caa35d364815fce0f0992c9bc2ea62ac43518630401f11ed3c021b38362c49c05f404566508e8e0d7590e10
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.1.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
- ## Development
37
+ ## Test
38
38
 
39
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
40
-
41
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
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://github.com/[USERNAME]/youdao-translate.
45
+ Bug reports and pull requests are welcome on GitHub at https://gitlab.com/suifeng2012/youdao-translate.
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Youdao
4
4
  module Translate
5
- VERSION = "0.1.0"
5
+ VERSION = "0.2.2"
6
6
  end
7
7
  end
@@ -1,5 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'singleton'
4
+ require 'forwardable'
5
+ require 'http'
6
+
3
7
  module Translate
4
8
  class Youdao
5
9
  include Singleton
@@ -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://github.com/hfpp2012/youdao-translate"
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
- # spec.add_dependency "example-gem", "~> 1.0"
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.1.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://github.com/hfpp2012/youdao-translate
84
+ homepage: https://gitlab.com/suifeng2012/youdao-tranlsate
29
85
  licenses: []
30
86
  metadata:
31
- homepage_uri: https://github.com/hfpp2012/youdao-translate
32
- source_code_uri: https://github.com/hfpp2012/youdao-translate
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: