-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathRakefile
40 lines (34 loc) · 871 Bytes
/
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
# -*- ruby -*-
require 'rubygems'
require 'hoe'
$: << "lib/"
require 'openx'
HOE = Hoe.new('openx', OpenX::VERSION) do |p|
# p.rubyforge_name = 'ruby-openxx' # if different than lowercase project name
p.developer('Aaron Patterson', '[email protected]')
end
namespace :openx do
task :clean do
include OpenX::Services
ENV['OPENX_ENV'] = 'test'
Agency.find(:all) do |agency|
Advertiser.find(:all, agency.id).each do |advertiser|
Campaign.find(:all, advertiser.id).each do |campaign|
Banner.find(:all, campaign.id).each do |banner|
banner.destroy
end
campaign.destroy
end
advertiser.destroy
end
end
end
end
namespace :gem do
task :spec do
File.open("#{HOE.name}.gemspec", 'w') do |f|
f.write(HOE.spec.to_ruby)
end
end
end
# vim: syntax=Ruby