-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathRakefile
70 lines (60 loc) · 2.05 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
$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
require 'config/vendorized_gems'
require 'magellan'
require 'spec/rake/spectask'
require 'magellan/rake/broken_link_task'
require 'magellan/rake/expected_links_task'
task :default => [:spec]
Spec::Rake::SpecTask.new do |t|
t.libs << File.join(File.dirname(__FILE__), 'lib')
t.spec_files = 'spec/**/*_spec.rb'
end
desc "Run all specs with RCov"
Spec::Rake::SpecTask.new(:rcov) do |t|
t.spec_files = FileList['spec/**/*_spec.rb']
t.libs << File.join(File.dirname(__FILE__), 'lib')
t.rcov = true
t.rcov_dir = "artifacts/rcov"
t.rcov_opts << '--text-report'
t.rcov_opts << '--exclude spec'
end
Magellan::Rake::BrokenLinkTask.new do |t|
t.origin_url = "http://www.blurb.com/"
t.explore_depth = 3
t.failure_log = "log.txt"
end
Magellan::Rake::ExpectedLinksTask.new("gap") do |t|
t.origin_url = "http://www.gap.com/"
t.explore_depth = 2
t.patterns_and_expected_links = YAML.load_file("gap.yml")
t.ignored_urls = ["http://www.gap.com/customerService/info.do?cid=2019"]
end
Magellan::Rake::ExpectedLinksTask.new("digg") do |t|
t.origin_url = "http://digg.com/"
t.explore_depth = 2
t.patterns_and_expected_links = YAML.load_file("digg.yml")
t.ignored_urls = ["http://digg.com/slices/topTenList/all"]
end
Magellan::Rake::ExpectedLinksTask.new("blurb") do |t|
t.origin_url = "http://www.blurb.com/"
t.explore_depth = 3
t.patterns_and_expected_links = YAML.load_file("digg.yml")
t.ignored_urls = []
end
begin
require 'jeweler'
Jeweler::Tasks.new do |s|
s.name = "magellan"
s.summary = "A web testing framework that embraces the discoverable nature of the web"
s.email = "[email protected]"
s.homepage = "http://github.com/nolman/magellan"
s.description = "TODO"
s.authors = ["Nolan Evans"]
s.rubyforge_project = 'magellan'
s.add_dependency 'mechanize'
s.add_dependency 'activesupport'
s.rubyforge_project = 'magellan'
end
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end