root/plugins/merb_param_protection/Rakefile

Revision 1282, 1.5 kB (checked in by iv..@gweezlebur.com, 10 months ago)

setup for release

Line 
1 require 'rubygems'
2 require 'rake/gempackagetask'
3 require 'spec/rake/spectask'
4
5 PLUGIN = "merb_param_protection"
6 NAME = "merb_param_protection"
7 VERSION = "0.5.0"
8 AUTHOR = "Lance Carlson"
9 EMAIL = "lancecarlson@gmail.com"
10 HOMEPAGE = "http://merb.devjavu.com"
11 SUMMARY = "Merb plugin that provides params_accessible and params_protected class methods"
12
13 spec = Gem::Specification.new do |s|
14   s.name = NAME
15   s.version = VERSION
16   s.platform = Gem::Platform::RUBY
17   s.has_rdoc = true
18   s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
19   s.summary = SUMMARY
20   s.description = s.summary
21   s.author = AUTHOR
22   s.email = EMAIL
23   #s.homepage = HOMEPAGE
24   s.add_dependency('merb', '>= 0.4.0')
25   s.require_path = 'lib'
26   s.autorequire = PLUGIN
27   s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs}/**/*")
28 end
29
30 Rake::GemPackageTask.new(spec) do |pkg|
31   pkg.gem_spec = spec
32 end
33
34 task :install => [:package] do
35   sh %{sudo gem install pkg/#{NAME}-#{VERSION}}
36 end
37
38 task :release => :package do
39   sh %{rubyforge add_release merb #{PLUGIN} #{VERSION} pkg/#{NAME}-#{VERSION}.gem}
40 end
41
42 desc "Run all specs"
43 Spec::Rake::SpecTask.new('specs') do |t|
44   t.spec_opts = ["--format", "specdoc", "--colour"]
45   t.spec_files = Dir['spec/**/*_spec.rb'].sort
46 end
47
48 desc "RCov"
49 Spec::Rake::SpecTask.new("rcov") do |t|
50   t.rcov_opts = ["--exclude", "gems", "--exclude", "spec"]
51   t.spec_opts = ["--format", "specdoc", "--colour"]
52   t.rcov_opts = ["--exclude","gems", "--exclude", "spec"]
53   t.spec_files = Dir["spec/**/*_spec.rb"].sort
54   t.libs = ["lib", "server/lib" ]
55   t.rcov = true
56 end
Note: See TracBrowser for help on using the browser.