GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: Adds basic social networking capabilities to your existing application, including users, blogs, photos, clippings, favorites, and more.
Homepage: http://www.communityengine.org
Clone URL: git://github.com/bborn/communityengine.git
bborn (author)
Thu May 22 14:10:29 -0700 2008
commit  291407f1204155f90b72daed1811599c97300f5b
tree    bc80acf8e8ddf643584dc2b5b629b87d4340f8ba
parent  fbd929ec6ed358c800863ab4ea972c602e46ec0a
communityengine / tasks / install.rake
100644 30 lines (21 sloc) 0.92 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
namespace :community_engine do
 
  desc 'Install Community Engine for the first time'
  task :install => [:check_required_gems] do
        
    Rake::Task["community_engine:generate_plugin_migrations"].invoke
    #check for engines plugin
  end
  
  desc 'Check if the required gems are present'
  task :check_required_gems do
    #check if we have the required gems
    installed_gems = `gem list --no-details --no-versions`.split("\n")
    required_gems = %w(rmagick hpricot mime-types htmlentities RedCloth rake mysql)
    missing_gems = required_gems-installed_gems
    
    if missing_gems.any?
      raise "CommunityEngine installation can't continue because you are missing these required gems: \n - #{missing_gems.join("\n- ")}"
    end
  end
  
  desc 'Generate CommunityEngine plugin migrations'
  task :generate_plugin_migrations do
    `./script/generate plugin_migration community_engine`
  end
  
end