This repository has been archived by the owner on Feb 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile
116 lines (101 loc) · 3.39 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
require 'rubygems'
require 'rake'
begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "the-maestro"
gem.summary = %Q{Maestro: Conduct your clouds.}
gem.description = %Q{Maestro is a cloud provisioning, configuration, and management utility for your Ruby and Ruby On Rails applications.}
gem.homepage = "http://github.com/bploetz/maestro"
gem.authors = ["Brian Ploetz"]
gem.add_development_dependency "thoughtbot-shoulda", "= 2.10.2"
gem.add_dependency "net-ssh", "= 2.0.15"
gem.add_dependency "net-scp", "= 1.0.2"
gem.add_dependency "net-ssh-multi", "= 1.0.1"
gem.add_dependency "net-ssh-gateway", "= 1.0.1"
gem.add_dependency "archive-tar-minitar", "= 0.5.2"
gem.add_dependency "amazon-ec2", "= 0.9.11"
gem.add_dependency "aws-s3", "= 0.6.2"
gem.add_dependency "log4r", "= 1.1.7"
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end
desc 'Run all unit and integration tests'
task :test do
errors = %w(test:units test:integration).collect do |task|
begin
Rake::Task[task].invoke
nil
rescue => e
task
end
end.compact
abort "Errors running #{errors.to_sentence(:locale => :en)}!" if errors.any?
end
require 'rake/testtask'
namespace :test do
Rake::TestTask.new(:units) do |test|
test.libs << 'lib' << 'test/unit'
test.pattern = 'test/unit/test_*.rb'
test.verbose = true
end
Rake::TestTask.new(:integration) do |test|
test.libs << 'lib' << 'test/integration'
test.pattern = 'test/integration/test_*.rb'
test.verbose = true
end
namespace :integration do
Rake::TestTask.new(:aws) do |test|
test.libs << 'lib' << 'test/integration'
test.pattern = 'test/integration/test_aws_cloud.rb'
test.verbose = true
end
Rake::TestTask.new(:ubuntu) do |test|
test.libs << 'lib' << 'test/integration'
test.pattern = 'test/integration/test_ubuntu.rb'
test.verbose = true
end
Rake::TestTask.new(:debian) do |test|
test.libs << 'lib' << 'test/integration'
test.pattern = 'test/integration/test_debian.rb'
test.verbose = true
end
Rake::TestTask.new(:fedora) do |test|
test.libs << 'lib' << 'test/integration'
test.pattern = 'test/integration/test_fedora.rb'
test.verbose = true
end
Rake::TestTask.new(:centos) do |test|
test.libs << 'lib' << 'test/integration'
test.pattern = 'test/integration/test_cent_os.rb'
test.verbose = true
end
end
end
begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |test|
test.libs << 'lib' << 'test/units' << 'test/integration'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
end
rescue LoadError
task :rcov do
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
end
end
task :test => :check_dependencies
task :default => :test
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
files = ['README.rdoc', 'LICENSE', 'lib/**/*.rb']
rdoc.rdoc_dir = 'rdoc'
rdoc.options << "-A Module.dsl_property"
rdoc.main = 'README.rdoc'
rdoc.title = "Maestro #{version}"
rdoc.rdoc_files.include('LICENSE', 'README.rdoc', 'lib/**/*.rb')
end