public
Fork of wycats/merb-plugins
Description: Merb Plugins: Even more modules to hook up your Merb installation
Homepage: http://www.merbivore.com
Clone URL: git://github.com/somebee/merb-plugins.git
merb-plugins / Rakefile
100644 43 lines (33 sloc) 0.957 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
require "rake"
require 'fileutils'
 
windows = (PLATFORM =~ /win32|cygwin/) rescue nil
 
SUDO = windows ? "" : "sudo"
 
gems = %w[merb_activerecord merb_helpers merb_sequel merb_param_protection merb_test_unit merb_stories]
 
orm_gems = %w[merb_activerecord merb_sequel]
 
desc "Install it all"
task :install => "install:gems"
 
namespace :install do
  desc "Install the merb-plugins sub-gems"
  task :gems do
    gems.each do |dir|
      Dir.chdir(dir){ sh "rake install" }
    end
  end
 
  desc "Install the ORM merb-plugins sub-gems"
  task :orm do
    orm_gems.each do |dir|
       Dir.chdir(dir){ sh "rake install" }
    end
  end
end
 
 
desc "Bundle up all the merb-plugins gems"
task :bundle do
  mkdir_p "bundle"
  gems.each do |gem|
    File.open("#{gem}/Rakefile") do |rakefile|
      rakefile.read.detect {|l| l =~ /^VERSION\s*=\s*"(.*)"$/ }
      Dir.chdir(gem){ sh "rake package" }
      sh %{cp #{gem}/pkg/#{gem}-#{$1}.gem bundle/}
    end
  end
end