attribute_imagifiable 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/attribute_imagifiable.gemspec +1 -1
- data/lib/attribute_imagifiable.rb +1 -1
- metadata +1 -1
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = "attribute_imagifiable"
|
7
|
-
gem.version = "0.0.
|
7
|
+
gem.version = "0.0.7"
|
8
8
|
gem.authors = ["Stefan Wienert", "Akos Toth"]
|
9
9
|
gem.email = ["stefan.wienert@pludoni.de"]
|
10
10
|
gem.description = %q{Using paperclip to generate images from sensible attributes like e-mails and telephone numbers, in order to reduce crawler's success}
|
@@ -32,7 +32,7 @@ module AttributeImagifiable
|
|
32
32
|
if value.present?
|
33
33
|
arg = Shellwords.escape(value)
|
34
34
|
tmp_name = Rails.root.join("tmp/#{as}-#{SecureRandom.hex(10)}.jpg")
|
35
|
-
cmd = "convert -fill black -font #{font} -gravity center -size
|
35
|
+
cmd = "convert -fill black -font #{font} -gravity center -size x65 label:#{arg} #{tmp_name}"
|
36
36
|
unless system(cmd)
|
37
37
|
raise RuntimeError.new "Image generation of #{attribute} failed. #{tmp_name}"
|
38
38
|
end
|