forked from pivotalforks/selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrakefile.rb
More file actions
79 lines (65 loc) · 2.08 KB
/
rakefile.rb
File metadata and controls
79 lines (65 loc) · 2.08 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
$:.unshift File.dirname(__FILE__)
require 'rubygems'
Gem::manage_gems
require 'rake'
require 'spec/rake/spectask'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'rcov/rcovtask'
require 'specs'
require 'buildmaster/project/server_manager'
require 'lib/selenium'
rcov_dir = SITE_SPEC.output_dir.dir('rcov')
rspec_dir = SITE_SPEC.output_dir.dir('rspec')
task :init do
rcov_dir.mkdirs
rspec_dir.mkdirs
end
#desc "Run all specifications"
Spec::Rake::SpecTask.new(:coverage) do |t|
t.spec_files = FileList['spec/**/tc_*.rb']
t.rcov = true
t.rcov_dir = rcov_dir.path
t.spec_opts = ["--format", "html:#{rspec_dir.file('index.html').path}", "--diff"]
t.fail_on_error = true
end
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.main = "README"
rdoc.rdoc_files.include("README", "lib/**/*.rb")
rdoc.options << "--all"
rdoc.rdoc_dir = SITE_SPEC.output_dir.dir('rdoc').path.to_s
end
task :default => [:coverage, :build_site, :rdoc, :package]
task :coverage => [:init]
# ??? if we use the rakt gem task, it will somehow be built multiple times and fail???
task :package do
Gem::manage_gems
Gem::Builder.new(SPEC).build
end
task :local_install do
gem_file = SPEC.full_name + ".gem"
puts "Insalling #{gem_file}..."
Gem::Installer.new(gem_file).install
end
task :build_site do
BuildMaster::Site.new(SITE_SPEC).build
end
task :publish_site do
svn = BuildMaster::SvnDriver.from_path(BuildMaster::Cotta.new.file(__FILE__).parent)
output_dir = SITE_SPEC.output_dir
raise 'output dir needs to be called the same as the project name for one copy action to work' unless output_dir.name == 'selenium'
BuildMaster::PscpDriver.new("#{svn.user}@selenium.rubyforge.org").copy(output_dir.path, '/var/www/gforge-projects')
end
task :test_site do
BuildMaster::Site.new(SITE_SPEC).test
end
task :serve do
BuildMaster::Site.new(SITE_SPEC).server
end
task :setup_site do
BuildMaster::Site.setup(SITE_SPEC)
end
task :selenium do
server = Selenium::SeleniumServer.new(BuildMaster::Cotta.new, 4444)
server.start
end