Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdrkeene committed May 8, 2011
1 parent a1fe8d6 commit 6003954
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/meme_generator.rb
Expand Up @@ -2,7 +2,7 @@
require "bundler/setup"

class MemeGenerator
VERSION = "1.0.1"
VERSION = "1.0.2"

class << self
def generate(path, top, bottom)
Expand All @@ -14,7 +14,7 @@ def generate(path, top, bottom)
image = canvas.first

draw = Magick::Draw.new
draw.font = "fonts/Impact.ttf"
draw.font = File.join(File.dirname(__FILE__), "..", "fonts", "Impact.ttf")
draw.font_weight = Magick::BoldWeight

pointsize = image.columns / 5.0
Expand Down
3 changes: 1 addition & 2 deletions lib/meme_generator/cli.rb
Expand Up @@ -22,8 +22,7 @@ def parse_path(string)
if string =~ /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/ix
path = "/tmp/memegen-download-#{Time.now.to_i}"
`curl "#{image}" -o #{path} --silent`
elsif path = images.find { |p| p =~ /#{string}\./ }

elsif path = images.find { |p| p =~ /\/#{string}\.*$/ }
else
puts "Error: Image not found. Use --list to view installed images."
exit 1
Expand Down

0 comments on commit 6003954

Please sign in to comment.