-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathRakefile
More file actions
122 lines (96 loc) · 2.77 KB
/
Rakefile
File metadata and controls
122 lines (96 loc) · 2.77 KB
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
require 'rake'
require 'rake/clean'
require 'rspec/core/rake_task'
require 'rubocop/rake_task'
CLEAN.include("**/*.gem", "**/*.rbc", "**/*.lock")
namespace :gem do
desc 'Build the html-table gem'
task :create => [:clean] do
require 'rubygems/package'
spec = Gem::Specification.load('html-table.gemspec')
spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
Gem::Package.build(spec)
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
RuboCop::RakeTask.new
namespace :spec do
RSpec::Core::RakeTask.new(:attribute_handler) do |t|
t.pattern = 'spec/attribute_handler_spec.rb'
end
RSpec::Core::RakeTask.new(:body) do |t|
t.pattern = 'spec/body_spec.rb'
end
RSpec::Core::RakeTask.new(:caption) do |t|
t.pattern = 'spec/caption_spec.rb'
end
RSpec::Core::RakeTask.new(:col) do |t|
t.pattern = 'spec/col_spec.rb'
end
RSpec::Core::RakeTask.new(:colgroup) do |t|
t.pattern = 'spec/colgroup_spec.rb'
end
RSpec::Core::RakeTask.new(:data) do |t|
t.pattern = 'spec/data_spec.rb'
end
RSpec::Core::RakeTask.new(:foot) do |t|
t.pattern = 'spec/foot_spec.rb'
end
RSpec::Core::RakeTask.new(:head) do |t|
t.pattern = 'spec/head_spec.rb'
end
RSpec::Core::RakeTask.new(:header) do |t|
t.pattern = 'spec/header_spec.rb'
end
RSpec::Core::RakeTask.new(:html_handler) do |t|
t.pattern = 'spec/html_handler_spec.rb'
end
RSpec::Core::RakeTask.new(:row) do |t|
t.pattern = 'spec/row_spec.rb'
end
RSpec::Core::RakeTask.new(:table) do |t|
t.pattern = 'spec/table_spec.rb'
end
RSpec::Core::RakeTask.new(:tablesection) do |t|
t.pattern = 'spec/tablesection_spec.rb'
end
RSpec::Core::RakeTask.new(:tag_handler) do |t|
t.pattern = 'spec/tag_handler_spec.rb'
end
RSpec::Core::RakeTask.new(:all) do |t|
t.verbose = false
t.pattern = 'spec/*_spec.rb'
t.rspec_opts = '-f documentation -w'
end
end
task :default => ['spec:all', :clean]