Sha256: 12ab4db5586732237a4d81de12bbcf664702eccfbad4d46ff1dbb10227dea134
Contents?: true
Size: 812 Bytes
Versions: 3
Compression:
Stored size: 812 Bytes
Contents
require "bundler/gem_tasks" require "rake/testtask" task :parser do sh "racc -o lib/plate/parser.rb lib/plate/grammar.y" end task :examples do require 'plate' require 'screencap' FileUtils.rm_rf('./examples') Dir.glob('./test/fixtures/src/*').each do |ex| name = File.basename(ex, '.*') output = "./examples/#{name}" Plate::CLI.new.invoke(:compile, [ex], o: output) path = File.expand_path("./examples/#{name}/index.html") f = Screencap::Fetcher.new("file://#{path}") screenshot = f.fetch( output: "./examples/#{name}.png", width: 640, height: 480, debug: true ) end end Rake::TestTask.new(:test) do |t| t.libs << "test" t.libs << "lib" t.test_files = FileList['test/**/*_test.rb'] Rake::Task['parser'].invoke end task default: :test
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
plate-lang-0.1.2 | Rakefile |
plate-lang-0.1.1 | Rakefile |
plate-lang-0.1.0 | Rakefile |