baidu_translate 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e247d8f671aa5de5ba22bff4983a709089ac676
4
- data.tar.gz: b411301de1f800723f85758062ebf0bbb7e91a83
3
+ metadata.gz: a80c12a2e790598102ca975459e8f61ac07a88ad
4
+ data.tar.gz: 513964888224de3528f3528233c027799da37a2e
5
5
  SHA512:
6
- metadata.gz: 2bff4e97af6b4e69b74d026a36e99802ac78262e3c61d1219ca49f019cdb741d5ae5f6821d16257bed0f57211b99e6e58776f60951201e46da46a51faa64d711
7
- data.tar.gz: ac8025775c4e9c241ff2b441ab64829a0017bf259e87ddb8f601db7d4453a4b1274a01565269b73ac831cbd9290e09a75d9500804f835c7a3a69f51eadfdec55
6
+ metadata.gz: c322929eab503161f4dd82aebc38a91a7b4361b81ef32e2aa8d3f3f16469ef3016a9f9125d9b20cd3c44ecc94d196606f46b51ec661b1bc6c2c799161d16d6b7
7
+ data.tar.gz: 715492c87f7fcb7574ab70df493cc1d4776b2a3752571e22d53e26654efc3af097f995b5f5c68344a4643a25dbbc68bb359517248f550d017612b1e015523abd
data/README.md CHANGED
@@ -20,22 +20,21 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- 1. Register to Baidu Translate API at
24
- (http://api.fanyi.baidu.com/)
23
+ 1. Register to Baidu Translate API at http://api.fanyi.baidu.com/
25
24
 
26
25
  2. Initialize BaiduTranslate using your AppID and Key.
27
26
 
28
- ```ruby
29
- BaiduTranslate.setup(APP_ID, KEY)
30
- ```
27
+ ```ruby
28
+ BaiduTranslate.setup(APP_ID, KEY)
29
+ ```
31
30
 
32
31
  3. Translate your strings
33
- ```ruby
34
- BaiduTranslate.translate('Apple', :en, :zh)
35
- # => "苹果"
36
- ```
32
+ ```ruby
33
+ BaiduTranslate.translate('Apple', :en, :zh)
34
+ # => "苹果"
35
+ ```
37
36
 
38
- 4. Check http://api.fanyi.baidu.com/api/trans/product/apidoc for the list of available languages and their codes and a list of possible errors.
37
+ 4. Check http://api.fanyi.baidu.com/api/trans/product/apidoc/ for the list of available languages and their codes and a list of possible errors.
39
38
 
40
39
  ## Contributing
41
40
 
@@ -31,6 +31,8 @@ module BaiduTranslate
31
31
  parsed_response['trans_result'][0]['dst']
32
32
  end
33
33
 
34
+ private
35
+
34
36
  def sign(text, salt)
35
37
  undigested_sign = @app_id.to_s + text + salt.to_s + @key
36
38
  md5 = Digest::MD5.new
@@ -1,3 +1,3 @@
1
1
  module BaiduTranslate
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baidu_translate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Nizov