Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 80 lines (65 sloc) 2.008 kB
3cab2f5 fixing tests
wolfdancer authored
1 file = File.join(File.dirname(__FILE__), 'lib')
6307194 line ending fix probably done by git
wolfdancer authored
2
3 require 'rubygems'
4 Gem::manage_gems
5 require 'rake'
6 require 'spec/rake/spectask'
7 require 'rake/gempackagetask'
8 require 'rake/rdoctask'
9 require 'rcov/rcovtask'
10 require 'specs'
11 require 'buildmaster/project/server_manager'
3cab2f5 fixing tests
wolfdancer authored
12 require file + '/selenium'
6307194 line ending fix probably done by git
wolfdancer authored
13
14 rcov_dir = SITE_SPEC.output_dir.dir('rcov')
15 rspec_dir = SITE_SPEC.output_dir.dir('rspec')
16
17 task :init do
18 rcov_dir.mkdirs
19 rspec_dir.mkdirs
20 end
21
22 #desc "Run all specifications"
23 Spec::Rake::SpecTask.new(:coverage) do |t|
24 t.spec_files = FileList['spec/**/tc_*.rb']
25 t.rcov = true
26 t.rcov_dir = rcov_dir.path
27 t.spec_opts = ["--format", "html:#{rspec_dir.file('index.html').path}", "--diff"]
28 t.fail_on_error = true
29 end
30
31 Rake::RDocTask.new(:rdoc) do |rdoc|
32 rdoc.main = "README"
33 rdoc.rdoc_files.include("README", "lib/**/*.rb")
34 rdoc.options << "--all"
35 rdoc.rdoc_dir = SITE_SPEC.output_dir.dir('rdoc').path.to_s
36 end
37
38 task :default => [:coverage, :build_site, :rdoc, :package]
39 task :coverage => [:init]
40
41 # ??? if we use the rakt gem task, it will somehow be built multiple times and fail???
42 task :package do
43 Gem::manage_gems
44 Gem::Builder.new(SPEC).build
45 end
46
47 task :local_install do
48 gem_file = SPEC.full_name + ".gem"
49 puts "Insalling #{gem_file}..."
50 Gem::Installer.new(gem_file).install
51 end
52
53 task :build_site do
54 BuildMaster::Site.new(SITE_SPEC).build
55 end
56
57 task :publish_site do
4c0ccd3 website update
wolfdancer authored
58 username = 'wolfdancer'
6307194 line ending fix probably done by git
wolfdancer authored
59 output_dir = SITE_SPEC.output_dir
60 raise 'output dir needs to be called the same as the project name for one copy action to work' unless output_dir.name == 'selenium'
4c0ccd3 website update
wolfdancer authored
61 BuildMaster::PscpDriver.new("#{username}@selenium.rubyforge.org").copy(output_dir.path, '/var/www/gforge-projects')
6307194 line ending fix probably done by git
wolfdancer authored
62 end
63
64 task :test_site do
65 BuildMaster::Site.new(SITE_SPEC).test
66 end
67
68 task :serve do
69 BuildMaster::Site.new(SITE_SPEC).server
70 end
71
72 task :setup_site do
73 BuildMaster::Site.setup(SITE_SPEC)
74 end
75
76 task :selenium do
77 server = Selenium::SeleniumServer.new(BuildMaster::Cotta.new, 4444)
78 server.start
79 end
Something went wrong with that request. Please try again.