Take the 2008 Git User's Survey and help out! [ hide ]

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/daikini/merb-plugins.git
Search Repo:
merb-plugins / Rakefile
100644 44 lines (38 sloc) 1.062 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
require "rake"
require 'fileutils'
require 'merb-core/tasks/merb_rake_helper'
 
gems = %w[merb_activerecord merb_helpers merb_sequel merb_param_protection merb_test_unit merb_stories merb_screw_unit]
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 =~ /^GEM_VERSION\s*=\s*"(.*)"$/ }
      Dir.chdir(gem){ sh "rake package" }
      sh %{cp #{gem}/pkg/#{gem}-#{$1}.gem bundle/}
    end
  end
end
 
desc "Release gems in merb-plugins"
task :release do
  gems.each do |dir|
    Dir.chdir(dir){ sh "rake release" }
  end
end