Skip to content
Newer
Older
100644 54 lines (41 sloc) 1.31 KB
80bce50 add test task and TestUnicodeUtils
Stefan Lang authored
1 # encoding: utf-8
9cb2b1f add Rakefile
Stefan Lang authored
2
3 require "#{File.dirname(__FILE__)}/lib/unicode_utils/version"
4
0fa4497 Rakefile: read SUFFIX environment variable
Stefan Lang authored
5 suffix = ENV["SUFFIX"]
6
9cb2b1f add Rakefile
Stefan Lang authored
7 gem_filename = "unicode_utils-#{UnicodeUtils::VERSION}.gem"
8
0681467 add quick-test rake task and make it the default
Stefan Lang authored
9 task "default" => "quick-test"
80bce50 add test task and TestUnicodeUtils
Stefan Lang authored
10
11 desc "Run unit tests."
12 task "test" do
0fa4497 Rakefile: read SUFFIX environment variable
Stefan Lang authored
13 ruby "-I lib test/suite.rb"
80bce50 add test task and TestUnicodeUtils
Stefan Lang authored
14 end
15
0681467 add quick-test rake task and make it the default
Stefan Lang authored
16 desc "Quick test run."
17 task "quick-test" do
0fa4497 Rakefile: read SUFFIX environment variable
Stefan Lang authored
18 ruby "-I lib -I . test/test_unicode_utils.rb"
0681467 add quick-test rake task and make it the default
Stefan Lang authored
19 end
20
d2ae1cd add coverage task using SimpleCov
Stefan Lang authored
21 desc "Run tests and generate coverage report."
22 task "coverage" do
0fa4497 Rakefile: read SUFFIX environment variable
Stefan Lang authored
23 ruby "-I lib test/coverage.rb"
d2ae1cd add coverage task using SimpleCov
Stefan Lang authored
24 end
25
9cb2b1f add Rakefile
Stefan Lang authored
26 desc "Build unicode_utils gem."
27 task "gem" do
0fa4497 Rakefile: read SUFFIX environment variable
Stefan Lang authored
28 sh "gem#{suffix} build unicode_utils.gemspec"
9cb2b1f add Rakefile
Stefan Lang authored
29 mkdir "pkg" unless File.directory? "pkg"
30 mv gem_filename, "pkg"
31 end
32
33 desc "Run rdoc to generate html documentation."
34 task "doc" do
2d6eed6 another README.txt => README.rdoc fix
Stefan Lang authored
35 sh "rdoc#{suffix} -o doc --charset=UTF-8 --title=UnicodeUtils --main=README.rdoc lib README.rdoc INSTALL.txt CHANGES.txt LICENSE.txt"
1cdca5b README update, add publish-doc task
Stefan Lang authored
36 end
37
38 desc "Publish doc/ on unicode-utils.rubyfore.org. " +
39 "Note: scp will prompt for rubyforge password."
40 task "publish-doc" => "doc" do
a1c37a5 Rakefile: publish-doc: specify identity file
Stefan Lang authored
41 sh "scp -i ~/.ssh/id_rsa_s0 -r doc/* langi@rubyforge.org:/var/www/gforge-projects/unicode-utils/"
9cb2b1f add Rakefile
Stefan Lang authored
42 end
43
5d55eda move compiled data files from lib to new cdata directory
Stefan Lang authored
44 desc "Compile Unicode data files from data/ to cdata/."
45 task "compile-data" do
0fa4497 Rakefile: read SUFFIX environment variable
Stefan Lang authored
46 ruby "data/compile.rb"
5d55eda move compiled data files from lib to new cdata directory
Stefan Lang authored
47 end
48
9cb2b1f add Rakefile
Stefan Lang authored
49 desc "Remove generated packages and documentation."
50 task "clean" do
51 rm_r "pkg" if File.exist? "pkg"
52 rm_r "doc" if File.exist? "doc"
53 end
Something went wrong with that request. Please try again.