Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 77 lines (63 sloc) 1.568 kB
3edf44a @bret fixing more line endings...
bret authored
1 require 'rubygems'
2 require 'rake/clean'
3 require 'fileutils'
ee919c7 @bret Update the 3 gem projects to each use the common readme file. The top…
bret authored
4
09a9911 @jarmo add note about eol of FireWatir, bump version to 2.0.0.rc1
jarmo authored
5 projects = ['watir', 'commonwatir']
6f47cd3 @jarmo clean commonwatir and root properly
jarmo authored
6
2e4922f Rakefile now works on systems without rake.bat
Alan Shields authored
7 def launch_subrake(cmd)
4dfa5b5 @jarmo allow to run with non-default rake
jarmo authored
8 system("#{Gem.ruby} -S rake #{cmd}")
2e4922f Rakefile now works on systems without rake.bat
Alan Shields authored
9 end
10
fdf3748 Add a default task, add description to :clean, move directory creatio…
Alan Shields authored
11 task :default => :gems
12
13 task :gemdir do
14 mkdir_p "gems" if !File.exist?("gems")
15 end
16
3edf44a @bret fixing more line endings...
bret authored
17 desc "Generate all the Watir gems"
fdf3748 Add a default task, add description to :clean, move directory creatio…
Alan Shields authored
18 task :gems => :gemdir do
02afce3 @jarmo using one CHANGES file for all projects
jarmo authored
19 projects.each do |project|
7f1446b @jarmo fixed "rake gems" task
jarmo authored
20 tmp_files = %w{CHANGES VERSION README.rdoc LICENSE}
6f47cd3 @jarmo clean commonwatir and root properly
jarmo authored
21 FileUtils.cp tmp_files, project
22 Dir.chdir(project) do
2e4922f Rakefile now works on systems without rake.bat
Alan Shields authored
23 launch_subrake "gem"
6f47cd3 @jarmo clean commonwatir and root properly
jarmo authored
24 FileUtils.rm tmp_files
25 end
3edf44a @bret fixing more line endings...
bret authored
26 end
27 gems = Dir['*/pkg/*.gem']
28 gems.each {|gem| FileUtils.install gem, 'gems'}
29 end
30
31 desc "Clean all the projects"
32 task :clean_subprojects do
2e4922f Rakefile now works on systems without rake.bat
Alan Shields authored
33 projects.each do |project|
34 Dir.chdir(project) do
35 launch_subrake "clean"
36 end
3edf44a @bret fixing more line endings...
bret authored
37 end
38 end
39
fdf3748 Add a default task, add description to :clean, move directory creatio…
Alan Shields authored
40 desc "Clean the build environment and projects"
6f47cd3 @jarmo clean commonwatir and root properly
jarmo authored
41 task :clean => [:clean_subprojects] do
42 FileUtils.rm_r Dir.glob("gems/*") << "test/reports", :force => true
43 end
3edf44a @bret fixing more line endings...
bret authored
44
8b92c78 @jarmo allow to use non-mri implementations for running rake tasks
jarmo authored
45 desc "Run tests for Watir and FireWatir"
46 task :test => [:test_watir, :test_firewatir]
47
48 desc 'Run tests for Watir'
49 task :test_watir do
2e4922f Rakefile now works on systems without rake.bat
Alan Shields authored
50 Dir.chdir("watir") do
51 launch_subrake "test"
52 end
3edf44a @bret fixing more line endings...
bret authored
53 end
54
8b92c78 @jarmo allow to use non-mri implementations for running rake tasks
jarmo authored
55 desc 'Run tests for FireWatir'
56 task :test_firewatir do
2e4922f Rakefile now works on systems without rake.bat
Alan Shields authored
57 Dir.chdir("firewatir") do
58 launch_subrake "test"
59 end
3edf44a @bret fixing more line endings...
bret authored
60 end
61
053bb00 @jarib Add WatirSpec submodule + load it in Rakefile if available.
jarib authored
62 #
63 # ------------------------------ watirspec -----------------------------------
64 #
65
66 if File.exist?(path = "spec/watirspec/watirspec.rake")
67 load path
68 end
69
70 namespace :watirspec do
71 desc 'Initialize and fetch the watirspec submodule'
72 task :init do
73 sh "git submodule init"
74 sh "git submodule update"
75 end
76 end
Something went wrong with that request. Please try again.