Sha256: 45936fded5b70fc021082b125486bc34816a7d819a9a4ba6b8394cc4eace3b02
Contents?: true
Size: 938 Bytes
Versions: 1
Compression:
Stored size: 938 Bytes
Contents
require "bundler/gem_tasks" require "rake/testtask" Rake::TestTask.new do |t| t.pattern = "test/test_*.rb" end desc "generate JavaScript lib for browser" task :jslib do dest = "rocketio.js" dest_min = "rocketio.min.js" require "rubygems" require "sinatra/websocketio" require "sinatra/cometio" require "sinatra/rocketio" require "erb" websocketio_url = nil cometio_url = nil header = ERB.new(File.open(File.expand_path "HEADER.erb", File.dirname(__FILE__)).read).result(binding) js = ERB.new(Sinatra::RocketIO.javascript).result(binding) File.open(dest, "w+") do |f| f.puts header f.write js end puts " => #{dest}" File.open(dest_min, "w+") do |f| f.puts header end system "uglifyjs #{dest} >> #{dest_min}" puts " => #{dest_min}" end desc "Start test server" task :test_server do require File.expand_path 'test/app', File.dirname(__FILE__) App.start end task :default => :test
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sinatra-rocketio-0.2.6 | Rakefile |