Sha256: 2f5caf4c2f0c43f1413dd18485dfb8690209525bff587155fb5bf2040ab5834a

Contents?: true

Size: 620 Bytes

Versions: 1

Compression:

Stored size: 620 Bytes

Contents

require 'bundler/gem_tasks'
require 'rake/testtask'

Rake::TestTask.new(:test) do |t|
  t.libs << 'test'
  t.libs << 'lib'
  t.test_files = FileList['test/**/*_test.rb']
  t.warning = false
end

task default: :test

namespace :emoji do
  desc 'Generate emoji/index.yml from emoji/images'
  task :generate_index do
    require 'prawn/emoji'
    require 'yaml'

    emoji_files = Prawn::Emoji.root / 'emoji' / 'images' / '*.png'
    emoji_names = Pathname.glob(emoji_files).map { |f| f.basename('.png').to_s }

    index_file  = Prawn::Emoji.root / 'emoji' / 'index.yml'
    index_file.write emoji_names.to_yaml
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
prawn-emoji-2.0.0 Rakefile