Sha256: cf0b894fb4be23c10c12e1eac03b37a630c69727a3bae59ee7f584044e81d64c

Contents?: true

Size: 651 Bytes

Versions: 3

Compression:

Stored size: 651 Bytes

Contents

# frozen_string_literal: true

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

3 entries across 3 versions & 1 rubygems

Version Path
prawn-emoji-2.1.1 Rakefile
prawn-emoji-2.1.0 Rakefile
prawn-emoji-2.0.1 Rakefile