google-translate 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.2
1
+ 0.8.3
data/bin/t CHANGED
File without changes
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{google-translate}
8
- s.version = "0.8.2"
8
+ s.version = "0.8.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Alexander Shvets}]
@@ -1,6 +1,7 @@
1
1
  # google_translate.rb
2
2
 
3
3
  require 'open-uri'
4
+
4
5
  require 'cgi'
5
6
  require 'json'
6
7
 
@@ -29,8 +30,7 @@ module Google
29
30
  raise(MissingTextLanguage) if from_text.nil?
30
31
 
31
32
  begin
32
- url = GOOGLE_TRANSLATE_SERVICE_URL + "/translate_a/t?client=t&text=#{from_text}&hl=#{from}&tl=#{to}"
33
- # &sl=auto&multires=1&prev=btn&ssel=0&tsel=4&uptl=ru&alttl=en&sc=1
33
+ url = GOOGLE_TRANSLATE_SERVICE_URL + "/translate_a/t?client=t&text=#{from_text}&hl=#{from}&sl=auto&tl=#{to}&multires=1&prev=btn&ssel=0&tsel=4&uptl=#{to}&alttl=#{from}&sc=1"
34
34
 
35
35
  open(URI.escape(url)) do |stream|
36
36
  content = stream.read
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-translate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-10-12 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
16
- requirement: &2157560420 !ruby/object:Gem::Requirement
16
+ requirement: &2156685560 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2157560420
24
+ version_requirements: *2156685560
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: jeweler
27
- requirement: &2157559940 !ruby/object:Gem::Requirement
27
+ requirement: &2156683380 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *2157559940
35
+ version_requirements: *2156683380
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: gemcutter
38
- requirement: &2157559460 !ruby/object:Gem::Requirement
38
+ requirement: &2156681220 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *2157559460
46
+ version_requirements: *2156681220
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: json_pure
49
- requirement: &2157558980 !ruby/object:Gem::Requirement
49
+ requirement: &2156669020 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.1.4
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *2157558980
57
+ version_requirements: *2156669020
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: json_pure
60
- requirement: &2157558500 !ruby/object:Gem::Requirement
60
+ requirement: &2156667220 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *2157558500
68
+ version_requirements: *2156667220
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: jeweler
71
- requirement: &2157558020 !ruby/object:Gem::Requirement
71
+ requirement: &2156665280 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *2157558020
79
+ version_requirements: *2156665280
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: gemcutter
82
- requirement: &2157557540 !ruby/object:Gem::Requirement
82
+ requirement: &2156663300 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *2157557540
90
+ version_requirements: *2156663300
91
91
  description: Simple client for Google Translate API.
92
92
  email: alexander.shvets@gmail.com
93
93
  executables: