- ruby 1.9.2
- rails 3.2.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
#MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM | |
# | |
# C A U T I O N | |
# | |
# this plugin DELETE a tweet if somebody fav your tweet | |
# | |
# このぷらぐいんはふぁぼられるとさくじょするぷらぐいんです | |
# | |
#MMMMMMMMMMMMMMMMMMMMMMXkl;.. ..':d0WMMMMMMMMMMMMMMMMMMMMM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sprite_factory' | |
namespace :assets do | |
desc 'recreate sprite images and css' | |
task :resprite => :environment do | |
Dir.glob('app/assets/images/icons/*.svg').each do |svg_file| | |
%x(convert -antialias -background transparent #{svg_file} -resize 15x14 #{File.dirname svg_file}/#{File.basename(svg_file).gsub(/\.svg\z/, ".png")} ) | |
end | |
SpriteFactory.cssurl = "image-url('$IMAGE')" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image.setAttributeNS("http://www.w3.org/1999/xlink","href","http://bacolicious.s3.amazonaws.com/bacon.png") |