/
Rakefile
54 lines (44 loc) · 1.33 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
require 'rubygems' unless ENV['NO_RUBYGEMS']
require 'rake/gempackagetask'
require 'rubygems/specification'
require 'date'
require 'spec/rake/spectask'
require 'fileutils'
BOOT_JAR = "appengine-rack.jar"
SUMMARY = <<EOF
Commom dependencies for configuring an App Engine application via Rack.
EOF
spec = Gem::Specification.new do |s|
s.name = "appengine-rack"
s.version = "0.0.12"
s.author = "Ryan Brown"
s.email = "ribrdb@google.com"
s.homepage = "http://code.google.com/p/appengine-jruby"
s.description = s.summary = SUMMARY
s.platform = Gem::Platform::RUBY
s.require_path = 'lib'
s.files = %w(LICENSE Rakefile) + Dir.glob("lib/**/*")
s.add_dependency('rack')
s.add_dependency('jruby-rack', [">= 1.0.1"])
s.add_dependency('jruby-jars', [">= 1.5.1"])
end
task :default => :spec
Rake::GemPackageTask.new(spec) do |pkg|
# TODO apply changes from codereview /1050041/diff/5001/6001
chdir 'src'
system "jar -cf ../lib/#{BOOT_JAR} com/google/appengine/jruby/*.class"
chdir '../lib'
system "jar -uf #{BOOT_JAR} appengine-rack/boot.rb"
chdir '..'
pkg.gem_spec = spec
end
desc "install the gem locally"
task :install => [:package] do
sh %{sudo gem install pkg/#{GEM}-#{GEM_VERSION}}
end
desc "create a gemspec file"
task :make_spec do
File.open("#{GEM}.gemspec", "w") do |file|
file.puts spec.to_ruby
end
end