forked from runa/openx
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
51 lines (43 loc) · 1.29 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
$: << File.join(File.dirname(__FILE__), "lib")
require 'rubygems'
require 'rake'
require 'rake/testtask'
require 'openx'
Rake::TestTask.new(:test) do |test|
test.test_files = FileList["test/**/test_*.rb"].sort
test.libs << "test"
test.verbose = false
test.warning = true
end
task :default => :test
namespace :openx do
task :clean do
ENV['OPENX_ENV'] = 'test'
include OpenX::Services
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
begin
require 'jeweler'
Jeweler::Tasks.new do |gemspec|
gemspec.name = "krakatoa-openx"
gemspec.summary = "A Ruby interface to the OpenX XML-RPC API"
gemspec.description = "A Ruby interface to the OpenX XML-RPC API"
gemspec.email = "krakatoa1987@gmail.com"
gemspec.homepage = "http://github.com/krakatoa/openx"
gemspec.authors = ["Aaron Patterson", "Andy Smith", "TouchLocal P/L", "Dimitrij Denissenko"]
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler not available. Install it with: gem install jeweler"
end