Permalink
Switch branches/tags
Find file
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (38 sloc) 1.29 KB
require 'rubygems'
require 'rake/gempackagetask'
PLUGIN = "merb_autoscaffold"
NAME = "merb_autoscaffold"
VERSION = "0.1.2"
AUTHOR = "Aaron Wheeler"
EMAIL = "aaron@fightinjoe.com"
HOMEPAGE = "http://merb-plugins.rubyforge.org/merb_autoscaffold/"
SUMMARY = "Merb plugin that provides scaffolding for free for all DataMapper models."
spec = Gem::Specification.new do |s|
s.name = NAME
s.version = VERSION
s.platform = Gem::Platform::RUBY
s.has_rdoc = true
s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
s.summary = SUMMARY
s.description = s.summary
s.author = AUTHOR
s.email = EMAIL
s.homepage = HOMEPAGE
s.require_path = 'lib'
s.autorequire = PLUGIN
s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs}/**/*")
s.add_dependency('merb', '>= 0.9.2')
s.add_dependency('paginator', '>= 1.1.0')
end
Rake::GemPackageTask.new(spec) do |pkg|
pkg.gem_spec = spec
end
task :install => [:package] do
sh %{sudo gem install pkg/#{NAME}-#{VERSION}}
end
namespace :jruby do
desc "Run :package and install the resulting .gem with jruby"
task :install => :package do
sh %{#{SUDO} jruby -S gem install pkg/#{NAME}-#{Merb::VERSION}.gem --no-rdoc --no-ri}
end
end