Skip to content

Commit

Permalink
Update image magick path support code
Browse files Browse the repository at this point in the history
  • Loading branch information
Santanu Karmakar committed Jan 11, 2011
1 parent 29c483c commit b849394
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ You can add your own style:
"-bordercolor '#E0E2E3'"])
end

You can provide the path where image_magick is installed as well as well:
You can provide the path where image_magick is installed as well:

SimpleCaptcha.setup do |sc|
sc.image_magick_path = '/usr/bin' # you can check this from console by running: which convert
Expand Down
3 changes: 1 addition & 2 deletions lib/simple_captcha/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ def self.run(cmd, params = "", expected_outcodes = 0)
command = "#{command} 2>&1"

unless (image_magick_path = SimpleCaptcha.image_magick_path).blank?
image_magick_path.chop! if image_magick_path.last == "/"
command = image_magick_path + "/" + command
command = File.join(image_magick_path, command)
end

output = `#{command}`
Expand Down

0 comments on commit b849394

Please sign in to comment.