def perform
      file_infos = []

      #  puts "image_source_folder: #{image_source_folder}"
      #  puts "image_to_file_path: #{image_to_file_path}"
      #  puts "stylesheet_to: #{stylesheet_to}"

      counter = 0

      x = 0
      y = 0
      max_w = 0
      max_h = 0

      Dir.entries( image_source_folder ).each do |file_name|
        if file_name != '.' && file_name != '..' && file_name.end_with?(file_extend)
          file_path = "#{image_source_folder}/#{file_name}"

          if ::File.file?(file_path)
            file_name_split = file_name.split('.')
            file_name_split.pop
            file_purename = file_name_split.join('.')

            file_info = {
              :filepath => file_path,
              :filename => file_name,
              :file_purename => file_purename,
              :idx => counter
            }.merge(
              _library.load( file_path )
            )

            file_info[:x] = x
            file_info[:y] = y

            y += (spacing + file_info[:height])

            max_w = [max_w, file_info[:width]].max
            max_h = y

            file_infos << file_info

            counter += 1
          end
        end
      end

      _composite_images(:file_infos => file_infos, :max_w => max_w, :max_h => max_h)
      _composite_css(file_infos, :max_w => max_w, :max_h => max_h)
    end
def perform
      file_infos = []

      #  puts "image_source_folder: #{image_source_folder}"
      #  puts "image_to_file_path: #{image_to_file_path}"
      #  puts "stylesheet_to: #{stylesheet_to}"

      counter = 0

      x = 0
      y = 0
      max_w = 0
      max_h = 0

      Dir.entries( image_source_folder ).each do |file_name|
        if file_name != '.' && file_name != '..' && file_name.end_with?(file_extend)
          file_path = "#{image_source_folder}/#{file_name}"

          if ::File.file?(file_path)
            file_name_split = file_name.split('.')
            file_name_split.pop
            file_purename = file_name_split.join('.')

            file_info = {
              :filepath => file_path,
              :filename => file_name,
              :file_purename => file_purename,
              :idx => counter
            }.merge(
              _library.load( file_path )
            )

            file_info[:x] = x
            file_info[:y] = y

            y += (spacing + file_info[:height])

            max_w = [max_w, file_info[:width]].max
            max_h = y

            file_infos << file_info

            counter += 1
          end
        end
      end

      _composite_images(:file_infos => file_infos, :max_w => max_w, :max_h => max_h)
      _composite_css(file_infos, :max_w => max_w, :max_h => max_h)
    end
:css_extend => "",
  :root_path => '.',
  :scope_name => "rails_xxx",
  :recipe_path => "icons/16x16",
  :file_extend => '.png',
  :spacing => 10,
  :image_to_folder => "app/assets/images",
  :image_source_folder => 'app/assets/images/rails_xxx/sprite_sources',
  :stylesheet_to => "app/assets/stylesheets/rails_xxx/sprite/icons/16x16.css.scss.erb",
  :image_to_file_path => "rails_xxx/sprite/icons/16x16.png"