shvets-google_translate 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +4 -0
- data/Rakefile +2 -1
- data/google_translate.gemspec +2 -2
- data/lib/google_translate.rb +2 -2
- metadata +1 -1
data/CHANGES
CHANGED
data/Rakefile
CHANGED
@@ -38,7 +38,7 @@ end
|
|
38
38
|
|
39
39
|
desc "Run gem code locally"
|
40
40
|
task :"run:gem" do
|
41
|
-
command = "bin/translate " + ENV['params']
|
41
|
+
command = "bin/translate " + (ENV['params'].nil? ? '' : ENV['params'])
|
42
42
|
puts ruby("#{command}")
|
43
43
|
end
|
44
44
|
|
@@ -62,4 +62,5 @@ task :"github:validate" do
|
|
62
62
|
puts "OK"
|
63
63
|
end
|
64
64
|
|
65
|
+
|
65
66
|
task :default => :rcov
|
data/google_translate.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{google_translate}
|
5
|
-
s.version = "0.6.
|
5
|
+
s.version = "0.6.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.homepage = %q{http://github.com/shvets/google_translate}
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
s.rubyforge_project = %q{google_translate}
|
21
|
-
s.rubygems_version = %q{1.3.
|
21
|
+
s.rubygems_version = %q{1.3.2}
|
22
22
|
s.summary = %q{Simple client for Google Translate API.}
|
23
23
|
|
24
24
|
if s.respond_to? :specification_version then
|
data/lib/google_translate.rb
CHANGED
@@ -115,8 +115,8 @@ module Google
|
|
115
115
|
quote = '(\s|\'|")?'
|
116
116
|
text = '(.*)'
|
117
117
|
|
118
|
-
re1 = /<select#{spaces}name=#{quote}#{tag_name}#{quote}#{spaces}id=#{quote}#{tag_id}#{quote}#{spaces}tabindex
|
119
|
-
text = re1.match(buffer)[
|
118
|
+
re1 = /<select#{spaces}name=#{quote}#{tag_name}#{quote}#{spaces}id=#{quote}#{tag_id}#{quote}#{spaces}tabindex=#{spaces}#{quote}0#{quote}#{spaces}>(.*)<\/select>/
|
119
|
+
text = re1.match(buffer)[7]
|
120
120
|
|
121
121
|
re2 = /<option(\s*)value="([a-z|A-Z]*)">([a-z|A-Z]*)<\/option>/
|
122
122
|
|