/
Rakefile
72 lines (64 loc) · 1.85 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
require 'rubygems'
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "overlord"
gem.summary = "Talk with our Google overlords"
gem.description = "Code to interact with the google ajax apis on the server and the client."
gem.email = "justin@tatemae.com"
gem.homepage = "http://github.com/jbasdf/overlord"
gem.authors = ["Justin Ball", "Joel Duffin"]
gem.add_dependency "httparty"
gem.add_dependency "json"
gem.add_development_dependency "shoulda"
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end
desc 'Test overlord.'
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.libs << 'test/rails_root/test'
t.pattern = 'test/rails_root/test/**/*_test.rb'
t.verbose = true
end
begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |t|
#t.libs << 'lib'
t.libs << 'test/rails_root/lib'
t.pattern = 'test/rails_root/test/**/*_test.rb'
t.verbose = true
t.output_dir = 'coverage'
t.rcov_opts << '--exclude "gems/*"'
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
desc 'Run default tests.'
task :default => :test
require 'rake/rdoctask'
desc 'Generate documentation for the recommender plugin.'
Rake::RDocTask.new do |rdoc|
if File.exist?('VERSION')
version = File.read('VERSION')
else
version = ""
end
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "overlord #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
desc 'Translate this gem'
task :translate do
file = File.join(File.dirname(__FILE__), 'config', 'locales', 'en.yml')
system("babelphish -o -y #{file}")
end