public
Description: A resourceful plugin providing lightweight blog functionality to Rails applications
Homepage:
Clone URL: git://github.com/vigetlabs/bloget.git
bloget / uninstall.rb
100644 13 lines (11 sloc) 0.453 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
# Uninstall hook code here
unless Kernel.const_defined?('RAILS_ROOT')
  Kernel.const_set('RAILS_ROOT', File.join(File.dirname(__FILE__), '..', '..', '..'))
end
 
if (File.exists?(RAILS_ROOT) && File.exists?(File.join(RAILS_ROOT, 'app')))
  require "#{RAILS_ROOT}/config/boot"
  require "#{RAILS_ROOT}/config/environment"
  require 'rails_generator'
  require 'rails_generator/scripts/destroy'
 
  Rails::Generator::Scripts::Destroy.new.run(['bloget'])
end