forked from djberg96/html-table
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
146 lines (121 loc) · 3.46 KB
/
Rakefile
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
require 'rake'
require 'rake/clean'
require 'rake/testtask'
CLEAN.include("**/*.gem", "**/*.rbc")
namespace :gem do
desc 'Build the html-table gem'
task :create => [:clean] do
require 'rubygems/package'
spec = eval(IO.read('html-table.gemspec'))
spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
Gem::Package.build(spec, true)
end
desc "Install the html-table package as a gem"
task :install => [:create] do
file = Dir["*.gem"].first
sh "gem install -l #{file}"
end
end
namespace 'example' do
desc "Run the first simple html-table example"
task :simple1 do
sh 'ruby -Ilib examples/simple1.rb'
end
desc "Run the second simple html-table example"
task :simple2 do
sh 'ruby -Ilib examples/simple2.rb'
end
desc "Run the third simple html-table example"
task :simple3 do
sh 'ruby -Ilib examples/simple3.rb'
end
desc "Run the first intermediate html-table example"
task :intermediate1 do
sh 'ruby -Ilib examples/intermediate1.rb'
end
desc "Run the second intermediate html-table example"
task :intermediate2 do
sh 'ruby -Ilib examples/intermediate2.rb'
end
desc "Run the advanced html-table example"
task :advanced do
sh 'ruby -Ilib examples/advanced.rb'
end
end
Rake::TestTask.new do |t|
t.warning = true
t.verbose = true
end
namespace 'test' do
Rake::TestTask.new('attribute_handler') do |t|
t.warning = true
t.verbose = true
t.test_files = FileList['test/test_attribute_handler.rb']
end
Rake::TestTask.new('body') do |t|
t.warning = true
t.verbose = true
t.test_files = FileList['test/test_body.rb']
end
Rake::TestTask.new('caption') do |t|
t.warning = true
t.verbose = true
t.test_files = FileList['test/test_caption.rb']
end
Rake::TestTask.new('col') do |t|
t.warning = true
t.verbose = true
t.test_files = FileList['test/test_col.rb']
end
Rake::TestTask.new('colgroup') do |t|
t.warning = true
t.verbose = true
t.test_files = FileList['test/test_colgroup.rb']
end
Rake::TestTask.new('data') do |t|
t.warning = true
t.verbose = true
t.test_files = FileList['test/test_data.rb']
end
Rake::TestTask.new('foot') do |t|
t.warning = true
t.verbose = true
t.test_files = FileList['test/test_foot.rb']
end
Rake::TestTask.new('head') do |t|
t.warning = true
t.verbose = true
t.test_files = FileList['test/test_head.rb']
end
Rake::TestTask.new('header') do |t|
t.warning = true
t.verbose = true
t.test_files = FileList['test/test_header.rb']
end
Rake::TestTask.new('html_handler') do |t|
t.warning = true
t.verbose = true
t.test_files = FileList['test/test_html_handler.rb']
end
Rake::TestTask.new('row') do |t|
t.warning = true
t.verbose = true
t.test_files = FileList['test/test_row.rb']
end
Rake::TestTask.new('table') do |t|
t.warning = true
t.verbose = true
t.test_files = FileList['test/test_table.rb']
end
Rake::TestTask.new('tablesection') do |t|
t.warning = true
t.verbose = true
t.test_files = FileList['test/test_tablesection.rb']
end
Rake::TestTask.new('tag_handler') do |t|
t.warning = true
t.verbose = true
t.test_files = FileList['test/test_tag_handler.rb']
end
end
task :default => :test