Raise error when call ImageMagick failed, version 0.2.3
This commit is contained in:
parent
a6ec9813e6
commit
62f589e9fc
|
@ -1,3 +1,8 @@
|
||||||
|
0.2.3
|
||||||
|
-----
|
||||||
|
|
||||||
|
- It will raise error when call ImageMagick failed.
|
||||||
|
|
||||||
0.2.2
|
0.2.2
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
rucaptcha (0.2.0)
|
rucaptcha (0.2.3)
|
||||||
posix-spawn (>= 0.3.0)
|
posix-spawn (>= 0.3.0)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
|
|
|
@ -44,9 +44,10 @@ module RuCaptcha
|
||||||
CODE
|
CODE
|
||||||
|
|
||||||
command.strip!
|
command.strip!
|
||||||
# puts command
|
|
||||||
pid, stdin, stdout, stderr = POSIX::Spawn.popen4(command)
|
pid, stdin, stdout, stderr = POSIX::Spawn.popen4(command)
|
||||||
Process.waitpid(pid)
|
Process.waitpid(pid)
|
||||||
|
err = stderr.read
|
||||||
|
raise "RuCaptcha: #{err.strip}" if err != nil && err.length > 0
|
||||||
stdout.read
|
stdout.read
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
module RuCaptcha
|
module RuCaptcha
|
||||||
VERSION = '0.2.2'
|
VERSION = '0.2.3'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue