public
Description: Merb Plugins: Even more modules to hook up your Merb installation
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-plugins.git
merb-plugins / merb_stories / Rakefile
100644 51 lines (41 sloc) 1.302 kb
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
require 'rubygems'
require 'rake/gempackagetask'
 
PLUGIN = "merb_stories"
NAME = "merb_stories"
VERSION = "0.9.1"
AUTHOR = "Yehuda Katz"
EMAIL = "ykatz@engineyard.com"
HOMEPAGE = "http://merb-plugins.rubyforge.org/merb-test/"
SUMMARY = "Merb plugin that provides RSpec support"
 
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.add_dependency('merb-core', '>= 0.9.1')
  s.add_dependency('rspec', '>= 1.1.3')
  s.require_path = 'lib'
  s.autorequire = PLUGIN
  s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs,rspec_generators}/**/*")
end
 
windows = (PLATFORM =~ /win32|cygwin/) rescue nil
 
SUDO = windows ? "" : "sudo"
 
Rake::GemPackageTask.new(spec) do |pkg|
  pkg.gem_spec = spec
end
 
desc "Install merb_rspec"
task :install => [:package] do
  sh %{#{SUDO} gem install pkg/#{NAME}-#{VERSION} --no-rdoc --no-ri}
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