public
Description: Rails plugin for managing your site's version number.
Homepage: http://fiatdev.com/2007/03/31/new-rails-plugin-app-version
Clone URL: git://github.com/toland/app_version.git
app_version / uninstall.rb
100644 12 lines (8 sloc) 0.731 kb
1
2
3
4
5
6
7
8
9
10
11
12
targetTemplateDir = File.join(RAILS_ROOT, 'lib/templates')
 
targetTemplateFile = File.join(RAILS_ROOT, 'lib/templates/version.yml.erb')
targetConfigSampleFile = File.join(RAILS_ROOT, '/config/version.yml')
targetTemplateSampleFile = File.join(RAILS_ROOT, 'lib/templates/version.yml')
 
if File.exist?(targetTemplateFile) then FileUtils.rm( targetTemplateFile, :verbose => true) end
if File.exist?(targetConfigSampleFile) then FileUtils.rm( targetConfigSampleFile, :verbose => true) end
if File.exist?(targetTemplateSampleFile) then FileUtils.rm( targetTemplateSampleFile, :verbose => true) end
 
if Dir.entries( targetTemplateDir ).entries.length == 2 then FileUtils.rmdir( targetTemplateDir, :verbose => true ) end