-
Notifications
You must be signed in to change notification settings - Fork 14
/
rakefile.rb
42 lines (30 loc) · 910 Bytes
/
rakefile.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
$:.unshift File.expand_path("../lib", __FILE__)
require 'rubygems'
require "bundler/gem_tasks"
test_package = File.join(File.dirname(__FILE__), 'test', 'unit')
$: << test_package unless $:.include? test_package
Bundler.require
require 'rake/clean'
require 'rake/testtask'
#require File.join(File.dirname(__FILE__), 'lib', 'flashsdk', 'module')
namespace :test do
Rake::TestTask.new(:units) do |t|
t.libs << "test/unit"
t.test_files = FileList["test/unit/*_test.rb"]
t.verbose = true
end
end
desc "Run the test harness"
task :test => 'test:units'
file 'pkg' do
FileUtils.makedirs 'pkg'
end
gem_package = "flashsdk-#{FlashSDK::VERSION}.gem"
file "pkg/#{gem_package}" => [:clean, 'pkg'] do
sh "gem build flashsdk.gemspec"
FileUtils.mv gem_package, "pkg/#{gem_package}"
end
desc "Create the gem package"
task :package => "pkg/#{gem_package}"
CLEAN.add gem_package
CLEAN.add 'pkg'