memegen 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/fonts/Impact.ttf ADDED
Binary file
@@ -2,7 +2,7 @@ require "rubygems"
2
2
  require "bundler/setup"
3
3
 
4
4
  class MemeGenerator
5
- VERSION = "1.0.1"
5
+ VERSION = "1.0.2"
6
6
 
7
7
  class << self
8
8
  def generate(path, top, bottom)
@@ -14,7 +14,7 @@ class MemeGenerator
14
14
  image = canvas.first
15
15
 
16
16
  draw = Magick::Draw.new
17
- draw.font = "fonts/Impact.ttf"
17
+ draw.font = File.join(File.dirname(__FILE__), "..", "fonts", "Impact.ttf")
18
18
  draw.font_weight = Magick::BoldWeight
19
19
 
20
20
  pointsize = image.columns / 5.0
@@ -22,8 +22,7 @@ def parse_path(string)
22
22
  if string =~ /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/ix
23
23
  path = "/tmp/memegen-download-#{Time.now.to_i}"
24
24
  `curl "#{image}" -o #{path} --silent`
25
- elsif path = images.find { |p| p =~ /#{string}\./ }
26
-
25
+ elsif path = images.find { |p| p =~ /\/#{string}\..*$/ }
27
26
  else
28
27
  puts "Error: Image not found. Use --list to view installed images."
29
28
  exit 1
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: memegen
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 1
10
- version: 1.0.1
9
+ - 2
10
+ version: 1.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Brandon Keene
@@ -106,6 +106,7 @@ files:
106
106
  - generators/xzibit_laugh.jpg
107
107
  - generators/y_u_no.jpg
108
108
  - generators/yao_ming.jpg
109
+ - fonts/Impact.ttf
109
110
  - LICENSE
110
111
  - README.md
111
112
  homepage: http://github.com/cmdrkeene/memegen