-
Notifications
You must be signed in to change notification settings - Fork 24
/
Rakefile
74 lines (62 loc) · 2.01 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
require 'rake'
require 'rake/clean'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'rake/testtask'
require 'fileutils'
include FileUtils
NAME = "mouseHole"
REV = File.read(".svn/entries")[/committed-rev="(\d+)"/, 1] rescue nil
VERS = "1.9" + (REV ? ".#{REV}" : "")
CLEAN.include ['**/.*.sw?', '*.gem', '.config']
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'doc/rdoc'
rdoc.options << '--line-numbers'
rdoc.rdoc_files.add ['README.rdoc', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
end
desc "Packages up MouseHole 2."
task :default => [:package]
task :package => [:clean]
desc "Run all the tests"
Rake::TestTask.new do |t|
t.libs << "test"
t.test_files = FileList['test/test_*.rb']
t.verbose = true
end
spec =
Gem::Specification.new do |s|
s.name = NAME
s.version = VERS
s.platform = Gem::Platform::RUBY
s.has_rdoc = false
s.extra_rdoc_files = [ "README.rdoc" ]
s.summary = "a scriptable proxy, an alternative to Greasemonkey and personal web server."
s.description = s.summary
s.executables = ['mouseHole']
s.author = "Colin 'Evaryont' Shea"
s.email = "[email protected]"
s.homepage = "http://github.com/evaryont/mousehole"
s.add_dependency('camping-omnibus', '>= 1.5.180')
s.add_dependency('hpricot', '>=0.5')
s.add_dependency('json', '>= 1.0.2')
s.required_ruby_version = '>= 1.8.4'
s.files = %w(COPYING README.rdoc Rakefile) +
Dir.glob("{bin,doc/rdoc,test,lib,static}/**/*") +
Dir.glob("ext/**/*.{h,c,rb}") +
Dir.glob("samples/**/*.rb") +
Dir.glob("tools/*.rb")
s.require_path = "lib"
# s.extensions = FileList["ext/**/extconf.rb"].to_a
s.bindir = "bin"
end
Rake::GemPackageTask.new(spec) do |p|
p.need_tar = true
p.gem_spec = spec
end
task :install do
sh %{rake package}
sh %{sudo gem install pkg/#{NAME}-#{VERS}}
end
task :uninstall => [:clean] do
sh %{sudo gem uninstall mongrel}
end