jitterbug 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/jitterbug.gemspec +1 -1
- data/lib/jitterbug.rb +3 -3
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.1
|
data/jitterbug.gemspec
CHANGED
data/lib/jitterbug.rb
CHANGED
@@ -16,11 +16,11 @@ module Jitterbug
|
|
16
16
|
path = "#{root}/public/#{options[:img_path]}/#{hash}.#{options[:format]}".gsub('//', '/')
|
17
17
|
unless File.exist?(path)
|
18
18
|
caption = options[:width] ? "-size #{options[:width]}x caption:'#{label}'" : "label:'#{label}'"
|
19
|
-
|
19
|
+
FileUtils.mkdir_p("#{root}/public/#{options[:img_path]}".gsub('//', '/'))
|
20
20
|
`convert -background #{options[:background]} -fill "#{options[:color]}" \
|
21
21
|
-font #{Jitterbug::Fonts.find(options[:font_dir], options[:font])} \
|
22
|
-
-
|
23
|
-
|
22
|
+
-pointsize #{options[:size]} -blur 0x.3 #{caption} #{path}`
|
23
|
+
# -kerning #{options[:kerning]} TODO add leading and kerning
|
24
24
|
end
|
25
25
|
img_src = "/#{options[:img_path]}/#{hash}.#{options[:format]}".gsub('//', '/')
|
26
26
|
img_class = (['jitterbug'] << options[:class]).compact.join(' ')
|