forked from psi/mongrel_proctitle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
60 lines (52 loc) · 1.51 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
require 'rake'
require 'rake/testtask'
require 'rake/clean'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'rake/contrib/rubyforgepublisher'
require 'fileutils'
include FileUtils
CLEAN.include [ "pkg", "lib/*.bundle", "*.gem", ".config", "**/*.log" ]
desc "Build package"
task :default => [:package]
version = "1.2.3"
name = "mongrel_proctitle"
spec =
Gem::Specification.new do |s|
s.name = name
s.version = version
s.platform = Gem::Platform::RUBY
s.summary = "The mongrel_proctitle GemPlugin"
s.description = s.summary
s.author = "Ryan Tomayko"
s.email = "[email protected]"
s.homepage = "http://github.com/rtomayko/mongrel_proctitle"
s.add_dependency('mongrel', '>= 1.1')
s.add_dependency('gem_plugin', '>= 0.2.3')
s.has_rdoc = true
s.extra_rdoc_files = [ "README" ]
s.bindir = "bin"
s.executables = [ "mongrel_top" ]
s.files = %w(LICENSE README Rakefile) +
Dir.glob("{bin,doc/rdoc,test,lib}/**/*")
s.require_path = "lib"
s.rubyforge_project = "orphans"
end
Rake::GemPackageTask.new(spec) do |p|
p.gem_spec = spec
p.need_zip = true
p.need_tar_gz = true
end
task :install => [:package] do
sh %{gem install pkg/#{name}-#{version}.gem}
end
task :uninstall => [:clean] do
sh %{gem uninstall #{name}}
end
desc 'Publish gems and other distributables to tomayko.com'
task :release => [:package] do
sh <<-end
ssh tomayko.com 'mkdir -p /dist/#{name}' && \
rsync -azP pkg/#{name}-#{version}.* tomayko.com:/dist/#{name}/
end
end