forked from jandot/ruby-ensembl-api
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
97 lines (85 loc) · 2.73 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
namespace :gem do
desc "Rebuild GEM and gemspec"
task :rebuild do
unless ENV.include?("version")
raise "usage: rake gem:rebuild version= [number]"
end
version = ENV['version']
outfile = File.open('ruby-ensembl-api.gemspec','w')
outfile.puts 'Gem::Specification.new do |s|'
outfile.puts ' s.name = "ruby-ensembl-api"'
outfile.puts ' s.version ='+"'#{version}'"
outfile.puts ''
outfile.puts ' s.authors = ["Jan Aerts", "Francesco Strozzi"]'
outfile.puts ' s.email = ["[email protected]","[email protected]"]'
outfile.puts ' s.homepage = "http://rubyforge.org/projects/bioruby-annex/"'
outfile.puts ' s.summary = "API to Ensembl databases"'
outfile.puts ' s.description = "ensembl-api provides a ruby API to the Ensembl databases (http://www.ensembl.org)"'
outfile.puts ''
outfile.puts ' s.has_rdoc = true'
outfile.puts ''
outfile.puts ' s.platform = Gem::Platform::RUBY'
outfile.puts ' s.files = ["' + FileList.new("bin/*", "lib/**/*.rb", "samples/**/*", "test/**/*.rb", "doc/**/*.html").join("\",\"") + '"]'
outfile.puts ' s.extra_rdoc_files = ["TUTORIAL.rdoc"]'
outfile.puts ''
outfile.puts ' s.test_files = ["' + FileList.new("test/**/test_*.rb").join("\",\"") + '"]'
outfile.puts ''
outfile.puts ''
outfile.puts ' s.add_dependency("bio", [">=1"])'
outfile.puts ' s.add_dependency("activerecord")'
outfile.puts ''
outfile.puts ' s.require_path = "lib"'
outfile.puts ' s.autorequire = "ensembl"'
outfile.puts ''
outfile.puts ' s.bindir = "bin"'
outfile.puts ' s.executables = ["ensembl"]'
outfile.puts ' s.default_executable = "ensembl"'
outfile.puts 'end'
outfile.close
system("gem build ruby-ensembl-api.gemspec")
end
end
namespace :test do
desc "Run all tests for release 56"
task :run => :base do
Dir.glob("test/unit/release_56/**/*.rb").each do |name|
ruby name
end
end
desc "Run base tests (only connection and releases)"
task :base do
Dir.glob("test/unit/*.rb").each do |name|
ruby name
end
end
desc "Run Core tests (only release 56)"
task :core do
Dir.glob("test/unit/release_53/core/*.rb").each do |name|
ruby name
end
end
desc "Run Variation tests (only release 56)"
task :variation do
Dir.glob("test/unit/release_53/variation/*.rb").each do |name|
ruby name
end
end
desc "Run Ensembl Genomes tests"
task :genomes do
Dir.glob("test/unit/ensembl_genomes/*.rb").each do |name|
ruby name
end
end
desc "Run tests for release 53"
task :release53 do
Dir.glob("test/unit/release_53/**/*.rb").each do |name|
ruby name
end
end
desc "Run tests for release 50"
task :release50 do
Dir.glob("test/unit/release_50/**/*.rb").each do |name|
ruby name
end
end
end